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