|
|
|
@ -32,8 +32,6 @@ import javax.swing.JProgressBar;
|
|
|
|
|
import javax.swing.SwingUtilities; |
|
|
|
|
import javax.swing.SwingWorker; |
|
|
|
|
import java.awt.*; |
|
|
|
|
import java.awt.event.ActionEvent; |
|
|
|
|
import java.awt.event.ActionListener; |
|
|
|
|
import java.awt.event.MouseAdapter; |
|
|
|
|
import java.awt.event.MouseEvent; |
|
|
|
|
import java.util.List; |
|
|
|
@ -104,19 +102,12 @@ public class VcsMovePanel extends BasicPane {
|
|
|
|
|
|
|
|
|
|
private UISpinner spinner; |
|
|
|
|
|
|
|
|
|
private MoveCallBack callBack; |
|
|
|
|
|
|
|
|
|
private JPanel updatePane; |
|
|
|
|
|
|
|
|
|
private boolean visible = false; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public VcsMovePanel(CardLayout cardLayout, JPanel parentPane, MoveCallBack callBack) { |
|
|
|
|
public VcsMovePanel(CardLayout cardLayout, JPanel parentPane) { |
|
|
|
|
this.parentCard = cardLayout; |
|
|
|
|
this.parentPane = parentPane; |
|
|
|
|
this.callBack = callBack; |
|
|
|
|
this.setLayout(new BorderLayout()); |
|
|
|
|
updatePane = FRGUIPaneFactory.createBoxFlowInnerContainer_S_Pane(); |
|
|
|
|
JPanel updatePane = FRGUIPaneFactory.createBoxFlowInnerContainer_S_Pane(); |
|
|
|
|
updatePane.setBackground(BACK_GROUND_COLOR); |
|
|
|
|
//初始化迁移的面板
|
|
|
|
|
initVcsLabel(updatePane); |
|
|
|
@ -270,37 +261,25 @@ public class VcsMovePanel extends BasicPane {
|
|
|
|
|
JPanel successPane = new JPanel(); |
|
|
|
|
JPanel body = FRGUIPaneFactory.createY_AXISBoxInnerContainer_L_Pane(); |
|
|
|
|
successButton = new UIButton(Toolkit.i18nText("Fine-Design_Vcs_Move_Success_Go")); |
|
|
|
|
initSuccessButtonListener(); |
|
|
|
|
iconLabel = new UILabel(IconUtils.readIcon("/com/fr/design/vcs/move_success.svg")); |
|
|
|
|
successLabel = new UILabel(Toolkit.i18nText("Fine-Design_Vcs_Move_Success")); |
|
|
|
|
successLabel.setFont(FONT); |
|
|
|
|
successTipLabel = new UILabel(Toolkit.i18nText("Fine-Design_Vcs_Move_Success_Tip")); |
|
|
|
|
initStatusPane(successTipLabel, iconLabel, successLabel, successButton, body, SUCCESS, successPane); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void initSuccessButtonListener() { |
|
|
|
|
successButton.addActionListener(new ActionListener() { |
|
|
|
|
@Override |
|
|
|
|
public void actionPerformed(ActionEvent e) { |
|
|
|
|
doAfterMove(); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void initFailedButtonListener() { |
|
|
|
|
failedButton.addActionListener(new ActionListener() { |
|
|
|
|
@Override |
|
|
|
|
public void actionPerformed(ActionEvent e) { |
|
|
|
|
doAfterMove(); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void doAfterMove() { |
|
|
|
|
visible = !VcsHelper.getInstance().isLegacyMode(); |
|
|
|
|
updatePane.setVisible(!visible); |
|
|
|
|
callBack.doCallBack(visible); |
|
|
|
|
parentCard.show(parentPane, SETTING); |
|
|
|
|
successTipLabel.setForeground(TIP_COLOR); |
|
|
|
|
body.add(iconLabel); |
|
|
|
|
body.add(new UILabel(StringUtils.BLANK)); |
|
|
|
|
body.add(successLabel); |
|
|
|
|
body.add(new UILabel(StringUtils.BLANK)); |
|
|
|
|
body.add(successTipLabel); |
|
|
|
|
body.add(new UILabel(StringUtils.BLANK)); |
|
|
|
|
body.add(successButton); |
|
|
|
|
successPane.add(body); |
|
|
|
|
successPane.setLayout(FRGUIPaneFactory.createCenterLayout(body, 0.5f, 0.5f)); |
|
|
|
|
parentPane.add(successPane, SUCCESS); |
|
|
|
|
iconLabel.setAlignmentX(CENTER_ALIGNMENT); |
|
|
|
|
successLabel.setAlignmentX(CENTER_ALIGNMENT); |
|
|
|
|
successButton.setAlignmentX(CENTER_ALIGNMENT); |
|
|
|
|
successTipLabel.setAlignmentX(CENTER_ALIGNMENT); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -321,30 +300,25 @@ public class VcsMovePanel extends BasicPane {
|
|
|
|
|
JPanel failedPane = new JPanel(); |
|
|
|
|
JPanel body = FRGUIPaneFactory.createY_AXISBoxInnerContainer_L_Pane(); |
|
|
|
|
failedButton = new UIButton(Toolkit.i18nText("Fine-Design_Vcs_Move_Failed_Go")); |
|
|
|
|
initFailedButtonListener(); |
|
|
|
|
failedIconLabel = new UILabel(IconUtils.readIcon("/com/fr/design/vcs/move_failed.svg")); |
|
|
|
|
failedLabel = new UILabel(Toolkit.i18nText("Fine-Design_Vcs_Move_Failed")); |
|
|
|
|
failedLabel.setFont(FONT); |
|
|
|
|
failedTipLabel = new UILabel(Toolkit.i18nText("Fine-Design_Vcs_Move_Failed_Tip")); |
|
|
|
|
initStatusPane(failedTipLabel, failedIconLabel, failedLabel, failedButton, body, FAILED, failedPane); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void initStatusPane(UILabel tipLabel, UILabel iconLabel, UILabel label, UIButton button, JPanel body, String tag,JPanel statusPane) { |
|
|
|
|
tipLabel.setForeground(TIP_COLOR); |
|
|
|
|
body.add(iconLabel); |
|
|
|
|
failedTipLabel.setForeground(TIP_COLOR); |
|
|
|
|
body.add(failedIconLabel); |
|
|
|
|
body.add(new UILabel(StringUtils.BLANK)); |
|
|
|
|
body.add(label); |
|
|
|
|
body.add(failedLabel); |
|
|
|
|
body.add(new UILabel(StringUtils.BLANK)); |
|
|
|
|
body.add(tipLabel); |
|
|
|
|
body.add(failedTipLabel); |
|
|
|
|
body.add(new UILabel(StringUtils.BLANK)); |
|
|
|
|
body.add(button); |
|
|
|
|
statusPane.add(body); |
|
|
|
|
statusPane.setLayout(FRGUIPaneFactory.createCenterLayout(body, 0.5f, 0.5f)); |
|
|
|
|
parentPane.add(statusPane, tag); |
|
|
|
|
iconLabel.setAlignmentX(CENTER_ALIGNMENT); |
|
|
|
|
label.setAlignmentX(CENTER_ALIGNMENT); |
|
|
|
|
button.setAlignmentX(CENTER_ALIGNMENT); |
|
|
|
|
tipLabel.setAlignmentX(CENTER_ALIGNMENT); |
|
|
|
|
body.add(failedButton); |
|
|
|
|
failedPane.add(body); |
|
|
|
|
failedPane.setLayout(FRGUIPaneFactory.createCenterLayout(body, 0.5f, 0.5f)); |
|
|
|
|
parentPane.add(failedPane, FAILED); |
|
|
|
|
failedIconLabel.setAlignmentX(CENTER_ALIGNMENT); |
|
|
|
|
failedLabel.setAlignmentX(CENTER_ALIGNMENT); |
|
|
|
|
failedButton.setAlignmentX(CENTER_ALIGNMENT); |
|
|
|
|
failedTipLabel.setAlignmentX(CENTER_ALIGNMENT); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -403,15 +377,4 @@ public class VcsMovePanel extends BasicPane {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 迁移回调事件 |
|
|
|
|
* |
|
|
|
|
*/ |
|
|
|
|
public static class MoveCallBack { |
|
|
|
|
/** |
|
|
|
|
* 处理回调 |
|
|
|
|
*/ |
|
|
|
|
public void doCallBack(boolean visible){} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|