|
|
@ -1,11 +1,15 @@ |
|
|
|
package com.fr.design.mainframe; |
|
|
|
package com.fr.design.mainframe; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import java.awt.BorderLayout; |
|
|
|
import java.awt.Color; |
|
|
|
import java.awt.Color; |
|
|
|
import java.awt.event.ActionEvent; |
|
|
|
import java.awt.event.ActionEvent; |
|
|
|
import java.awt.event.ActionListener; |
|
|
|
import java.awt.event.ActionListener; |
|
|
|
|
|
|
|
|
|
|
|
import javax.swing.JDialog; |
|
|
|
import javax.swing.JDialog; |
|
|
|
|
|
|
|
import javax.swing.JPanel; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import com.fine.theme.utils.FineUIStyle; |
|
|
|
|
|
|
|
import com.formdev.flatlaf.util.ScaledEmptyBorder; |
|
|
|
import com.fr.base.BaseUtils; |
|
|
|
import com.fr.base.BaseUtils; |
|
|
|
import com.fr.base.io.XMLEncryptUtils; |
|
|
|
import com.fr.base.io.XMLEncryptUtils; |
|
|
|
import com.fr.design.DesignerEnvManager; |
|
|
|
import com.fr.design.DesignerEnvManager; |
|
|
@ -19,6 +23,9 @@ import com.fr.stable.CodeUtils; |
|
|
|
import com.fr.stable.StringUtils; |
|
|
|
import com.fr.stable.StringUtils; |
|
|
|
import com.fr.design.utils.gui.GUICoreUtils; |
|
|
|
import com.fr.design.utils.gui.GUICoreUtils; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import static com.fine.swing.ui.layout.Layouts.cell; |
|
|
|
|
|
|
|
import static com.fine.swing.ui.layout.Layouts.row; |
|
|
|
|
|
|
|
|
|
|
|
public class DecodeDialog { |
|
|
|
public class DecodeDialog { |
|
|
|
|
|
|
|
|
|
|
|
private UITextField jt; |
|
|
|
private UITextField jt; |
|
|
@ -32,22 +39,18 @@ public class DecodeDialog { |
|
|
|
this.file = file; |
|
|
|
this.file = file; |
|
|
|
|
|
|
|
|
|
|
|
jd = new JDialog(); |
|
|
|
jd = new JDialog(); |
|
|
|
jd.setLayout(null); |
|
|
|
jd.setLayout(new BorderLayout()); |
|
|
|
UILabel newNameLable = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_ECP_Input_Pwd")); |
|
|
|
UILabel newNameLable = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_ECP_Input_Pwd")); |
|
|
|
newNameLable.setBounds(20, 10, 130, 30); |
|
|
|
|
|
|
|
jt = new UITextField(StringUtils.EMPTY); |
|
|
|
jt = new UITextField(StringUtils.EMPTY); |
|
|
|
jt.selectAll(); |
|
|
|
jt.selectAll(); |
|
|
|
jt.setBounds(130, 15, 150, 20); |
|
|
|
jd.add(row(20, cell(newNameLable), cell(jt)).getComponent(), BorderLayout.NORTH); |
|
|
|
jd.add(newNameLable); |
|
|
|
|
|
|
|
jd.add(jt); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
hintsLabel = new UILabel(); |
|
|
|
hintsLabel = new UILabel(); |
|
|
|
hintsLabel.setBounds(20, 50, 250, 30); |
|
|
|
|
|
|
|
hintsLabel.setForeground(Color.RED); |
|
|
|
hintsLabel.setForeground(Color.RED); |
|
|
|
hintsLabel.setVisible(false); |
|
|
|
hintsLabel.setVisible(false); |
|
|
|
|
|
|
|
|
|
|
|
confirmButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Confirm")); |
|
|
|
confirmButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Confirm")); |
|
|
|
confirmButton.setBounds(180, 90, 60, 25); |
|
|
|
FineUIStyle.setStyle(confirmButton, FineUIStyle.PLAIN_BUTTON); |
|
|
|
confirmButton.addActionListener(new ActionListener() { |
|
|
|
confirmButton.addActionListener(new ActionListener() { |
|
|
|
public void actionPerformed(ActionEvent e) { |
|
|
|
public void actionPerformed(ActionEvent e) { |
|
|
|
String key = jt.getText(); |
|
|
|
String key = jt.getText(); |
|
|
@ -64,16 +67,17 @@ public class DecodeDialog { |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
UIButton cancelButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Cancel")); |
|
|
|
UIButton cancelButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Cancel")); |
|
|
|
cancelButton.setBounds(250, 90, 60, 25); |
|
|
|
|
|
|
|
cancelButton.addActionListener(new ActionListener() { |
|
|
|
cancelButton.addActionListener(new ActionListener() { |
|
|
|
public void actionPerformed(ActionEvent e) { |
|
|
|
public void actionPerformed(ActionEvent e) { |
|
|
|
jd.dispose(); |
|
|
|
jd.dispose(); |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
jd.add(cancelButton); |
|
|
|
JPanel buttonPane = new JPanel(new BorderLayout()); |
|
|
|
jd.add(confirmButton); |
|
|
|
buttonPane.setBorder(new ScaledEmptyBorder(10, 10, 10, 10)); |
|
|
|
jd.add(hintsLabel); |
|
|
|
buttonPane.add(row(8, cell(confirmButton), cell(cancelButton)).getComponent(), BorderLayout.EAST); |
|
|
|
|
|
|
|
jd.add(buttonPane, BorderLayout.SOUTH); |
|
|
|
|
|
|
|
jd.add(hintsLabel, BorderLayout.CENTER); |
|
|
|
jd.setSize(340, 180); |
|
|
|
jd.setSize(340, 180); |
|
|
|
jd.setModal(true); |
|
|
|
jd.setModal(true); |
|
|
|
jd.setTitle(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_ECP_Decode")); |
|
|
|
jd.setTitle(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_ECP_Decode")); |
|
|
|