|
|
|
@ -26,7 +26,11 @@ import com.fr.workspace.server.vcs.VcsManager;
|
|
|
|
|
import com.fr.workspace.server.vcs.v2.move.VcsMoveService; |
|
|
|
|
import com.fr.workspace.server.vcs.v2.move.VcsMoveStrategy; |
|
|
|
|
|
|
|
|
|
import javax.swing.*; |
|
|
|
|
import javax.swing.ButtonGroup; |
|
|
|
|
import javax.swing.JPanel; |
|
|
|
|
import javax.swing.JProgressBar; |
|
|
|
|
import javax.swing.SwingUtilities; |
|
|
|
|
import javax.swing.SwingWorker; |
|
|
|
|
import java.awt.*; |
|
|
|
|
import java.awt.event.MouseAdapter; |
|
|
|
|
import java.awt.event.MouseEvent; |
|
|
|
@ -76,7 +80,7 @@ public class VcsMovePanel extends BasicPane {
|
|
|
|
|
private BasicPane choosePane; |
|
|
|
|
private CardLayout parentCard; |
|
|
|
|
private JPanel parentPane; |
|
|
|
|
private static final JProgressBar progressBar = new JProgressBar(); |
|
|
|
|
private static final JProgressBar PROGRESS_BAR = new JProgressBar(); |
|
|
|
|
|
|
|
|
|
private JPanel progressPanel; |
|
|
|
|
private UILabel tipLabel; |
|
|
|
@ -141,13 +145,13 @@ public class VcsMovePanel extends BasicPane {
|
|
|
|
|
private void initProcessPane() { |
|
|
|
|
JPanel processPane = new JPanel(); |
|
|
|
|
JPanel body = FRGUIPaneFactory.createY_AXISBoxInnerContainer_L_Pane(); |
|
|
|
|
progressBar.setStringPainted(true); |
|
|
|
|
progressBar.setUI(new ModernUIProgressBarUI()); |
|
|
|
|
progressBar.setBorderPainted(false); |
|
|
|
|
progressBar.setOpaque(false); |
|
|
|
|
progressBar.setBorder(null); |
|
|
|
|
progressBar.setSize(BasicDialog.MEDIUM); |
|
|
|
|
body.add(progressBar); |
|
|
|
|
PROGRESS_BAR.setStringPainted(true); |
|
|
|
|
PROGRESS_BAR.setUI(new ModernUIProgressBarUI()); |
|
|
|
|
PROGRESS_BAR.setBorderPainted(false); |
|
|
|
|
PROGRESS_BAR.setOpaque(false); |
|
|
|
|
PROGRESS_BAR.setBorder(null); |
|
|
|
|
PROGRESS_BAR.setSize(BasicDialog.MEDIUM); |
|
|
|
|
body.add(PROGRESS_BAR); |
|
|
|
|
body.add(new UILabel(StringUtils.BLANK)); |
|
|
|
|
tipLabel = new UILabel(Toolkit.i18nText("Fine-Design_Vcs_While_Moving")); |
|
|
|
|
tipLabel.setAlignmentX(CENTER_ALIGNMENT); |
|
|
|
@ -330,7 +334,7 @@ public class VcsMovePanel extends BasicPane {
|
|
|
|
|
protected Void doInBackground() throws Exception { |
|
|
|
|
try { |
|
|
|
|
//开始迁移
|
|
|
|
|
VcsMoveService.getInstance().startMove(new VcsMoveService.MoveServiceWhileMoving() { |
|
|
|
|
VcsMoveService.getInstance().startMove(new VcsMoveService.BaseMoveServiceWhileMoving() { |
|
|
|
|
@Override |
|
|
|
|
public void publishProgress() { |
|
|
|
|
int num = VcsMoveService.getInstance().getCurrentMove(); |
|
|
|
@ -338,7 +342,7 @@ public class VcsMovePanel extends BasicPane {
|
|
|
|
|
} |
|
|
|
|
@Override |
|
|
|
|
public void prepare4Move() { |
|
|
|
|
progressBar.setMaximum(VcsMoveService.getInstance().getTotal()); |
|
|
|
|
PROGRESS_BAR.setMaximum(VcsMoveService.getInstance().getTotal()); |
|
|
|
|
} |
|
|
|
|
}, strategy); |
|
|
|
|
} catch (Exception e) { |
|
|
|
@ -353,7 +357,7 @@ public class VcsMovePanel extends BasicPane {
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
protected void process(List<Integer> chunks) { |
|
|
|
|
progressBar.setValue(chunks.get(chunks.size() - 1)); |
|
|
|
|
PROGRESS_BAR.setValue(chunks.get(chunks.size() - 1)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|