|
|
|
@ -10,7 +10,6 @@ import com.fr.design.gui.ibutton.UIButton;
|
|
|
|
|
import com.fr.design.gui.ibutton.UIRadioButton; |
|
|
|
|
import com.fr.design.gui.ilable.UILabel; |
|
|
|
|
import com.fr.design.gui.iprogressbar.ModernUIProgressBarUI; |
|
|
|
|
import com.fr.design.gui.ispinner.UISpinner; |
|
|
|
|
import com.fr.design.i18n.LocaleLinkProvider; |
|
|
|
|
import com.fr.design.i18n.Toolkit; |
|
|
|
|
import com.fr.design.layout.FRGUIPaneFactory; |
|
|
|
@ -26,8 +25,12 @@ import com.fr.design.widget.FRWidgetFactory;
|
|
|
|
|
import com.fr.general.FRFont; |
|
|
|
|
import com.fr.log.FineLoggerFactory; |
|
|
|
|
import com.fr.stable.StringUtils; |
|
|
|
|
import com.fr.workspace.server.vcs.v2.VcsTaskResult; |
|
|
|
|
import com.fr.workspace.server.vcs.v2.VcsTaskResult.ErrorType; |
|
|
|
|
import com.fr.workspace.server.vcs.v2.move.VcsMoveService; |
|
|
|
|
import com.fr.workspace.server.vcs.v2.move.VcsMoveService.BaseMoveServiceWhileMoving; |
|
|
|
|
import com.fr.workspace.server.vcs.v2.move.VcsMoveStrategy; |
|
|
|
|
import static javax.swing.JOptionPane.YES_OPTION; |
|
|
|
|
|
|
|
|
|
import javax.swing.BorderFactory; |
|
|
|
|
import javax.swing.ButtonGroup; |
|
|
|
@ -36,7 +39,10 @@ import javax.swing.JPanel;
|
|
|
|
|
import javax.swing.JProgressBar; |
|
|
|
|
import javax.swing.SwingUtilities; |
|
|
|
|
import javax.swing.SwingWorker; |
|
|
|
|
import java.awt.*; |
|
|
|
|
import java.awt.BorderLayout; |
|
|
|
|
import java.awt.CardLayout; |
|
|
|
|
import java.awt.Color; |
|
|
|
|
import java.awt.Cursor; |
|
|
|
|
import java.awt.event.ActionEvent; |
|
|
|
|
import java.awt.event.ActionListener; |
|
|
|
|
import java.awt.event.MouseAdapter; |
|
|
|
@ -44,9 +50,6 @@ import java.awt.event.MouseEvent;
|
|
|
|
|
import java.util.List; |
|
|
|
|
import java.util.concurrent.ExecutionException; |
|
|
|
|
|
|
|
|
|
import static javax.swing.JOptionPane.YES_NO_CANCEL_OPTION; |
|
|
|
|
import static javax.swing.JOptionPane.YES_OPTION; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 迁移面板 |
|
|
|
@ -462,21 +465,27 @@ public class VcsMovePanel extends BasicPane {
|
|
|
|
|
protected Boolean doInBackground() throws Exception { |
|
|
|
|
try { |
|
|
|
|
//开始迁移
|
|
|
|
|
VcsMoveService.getInstance().startMove(new VcsMoveService.BaseMoveServiceWhileMoving() { |
|
|
|
|
VcsTaskResult vcsTaskResult = VcsMoveService.getInstance().startMove(new BaseMoveServiceWhileMoving() { |
|
|
|
|
@Override |
|
|
|
|
public void publishProgress() { |
|
|
|
|
int num = VcsMoveService.getInstance().getCurrentMove(); |
|
|
|
|
publish(num); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public void prepare4Move() { |
|
|
|
|
PROGRESS_BAR.setMaximum(VcsMoveService.getInstance().getTotal()); |
|
|
|
|
} |
|
|
|
|
}, strategy); |
|
|
|
|
|
|
|
|
|
if (vcsTaskResult != null && !vcsTaskResult.isSuccess()) { |
|
|
|
|
ErrorType errorType = vcsTaskResult.getErrorType(); |
|
|
|
|
detail = VcsExceptionUtils.createDetailByException(errorType); |
|
|
|
|
} |
|
|
|
|
} catch (Exception e) { |
|
|
|
|
VcsMoveService.getInstance().stopMoving(); |
|
|
|
|
detail = VcsExceptionUtils.createDetailByException(e); |
|
|
|
|
return false; |
|
|
|
|
} finally { |
|
|
|
|
VcsMoveService.getInstance().stopMoving(); |
|
|
|
|
} |
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
|