diff --git a/designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/VcsMovePanel.java b/designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/VcsMovePanel.java index 99ce67f21c..064da17e7e 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/VcsMovePanel.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/VcsMovePanel.java @@ -5,6 +5,7 @@ import com.fr.base.svg.IconUtils; import com.fr.design.dialog.BasicDialog; import com.fr.design.dialog.BasicPane; import com.fr.design.dialog.DialogActionAdapter; +import com.fr.design.dialog.FineJOptionPane; import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.ibutton.UIRadioButton; import com.fr.design.gui.ilable.UILabel; @@ -26,6 +27,7 @@ import com.fr.workspace.server.vcs.v2.move.VcsMoveStrategy; import javax.swing.BorderFactory; import javax.swing.ButtonGroup; +import javax.swing.JOptionPane; import javax.swing.JPanel; import javax.swing.JProgressBar; import javax.swing.SwingUtilities; @@ -277,18 +279,7 @@ public class VcsMovePanel extends BasicPane { BasicDialog dlg = choosePane.showMediumWindow(SwingUtilities.getWindowAncestor(VcsMovePanel.this), new DialogActionAdapter() { @Override public void doOk() { - //进度条面板 - initProcessPane(); - VcsMovePanel.this.getParentCard().next(getParentPane()); - VcsMoveStrategy strategy; - if (moveDefaultButton.isSelected()) { - strategy = VcsMoveStrategy.createNumStrategy((int) spinner.getValue()); - } else if (moveNothingButton.isSelected()) { - strategy = VcsMoveStrategy.ALL_GIVE_UP; - } else { - strategy = VcsMoveStrategy.ALL_RETAIN; - } - new MoveWorker(strategy).execute(); + createConfirmPane(VcsMovePanel.this); } }); dlg.setVisible(true); @@ -296,6 +287,42 @@ public class VcsMovePanel extends BasicPane { }); } + private void createConfirmPane(Component parent) { + VerticalFlowLayout layout = new VerticalFlowLayout(VerticalFlowLayout.TOP); + layout.setAlignLeft(true); + JPanel panel = new JPanel(); + panel.setLayout(layout); + UILabel titleLabel = new UILabel(Toolkit.i18nText("Fine-Design_Vcs_Move_Tip_Title")); + UILabel firstLabel = new UILabel(Toolkit.i18nText("Fine-Design_Vcs_Move_Tip_First")); + UILabel secondLabel = new UILabel(Toolkit.i18nText("Fine-Design_Vcs_Move_Tip_Second")); + titleLabel.setForeground(TIP_COLOR); + firstLabel.setForeground(TIP_COLOR); + secondLabel.setForeground(TIP_COLOR); + panel.add(new UILabel(Toolkit.i18nText("Fine-Design_Vcs_Move_Right_Now"))); + panel.add(titleLabel); + panel.add(firstLabel); + panel.add(secondLabel); + int value = FineJOptionPane.showConfirmDialog(parent, panel, Toolkit.i18nText("Fine-Design_Vcs_Move_Title"), JOptionPane.YES_NO_OPTION); + processMove(value); + } + + private void processMove(int value) { + if (value == YES_OPTION) { + //进度条面板 + initProcessPane(); + VcsMovePanel.this.getParentCard().next(getParentPane()); + VcsMoveStrategy strategy; + if (moveDefaultButton.isSelected()) { + strategy = VcsMoveStrategy.createNumStrategy((int) spinner.getValue()); + } else if (moveNothingButton.isSelected()) { + strategy = VcsMoveStrategy.ALL_GIVE_UP; + } else { + strategy = VcsMoveStrategy.ALL_RETAIN; + } + new MoveWorker(strategy).execute(); + } + } + private void initSuccessPane() { JPanel successPane = new JPanel(); JPanel body = FRGUIPaneFactory.createY_AXISBoxInnerContainer_L_Pane();