Browse Source

模板解密对话框修改

fbp/merge
renekton 4 months ago
parent
commit
08795afd60
  1. 26
      designer-base/src/main/java/com/fr/design/mainframe/DecodeDialog.java

26
designer-base/src/main/java/com/fr/design/mainframe/DecodeDialog.java

@ -1,11 +1,15 @@
package com.fr.design.mainframe;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
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.io.XMLEncryptUtils;
import com.fr.design.DesignerEnvManager;
@ -19,6 +23,9 @@ import com.fr.stable.CodeUtils;
import com.fr.stable.StringUtils;
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 {
private UITextField jt;
@ -32,22 +39,18 @@ public class DecodeDialog {
this.file = file;
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"));
newNameLable.setBounds(20, 10, 130, 30);
jt = new UITextField(StringUtils.EMPTY);
jt.selectAll();
jt.setBounds(130, 15, 150, 20);
jd.add(newNameLable);
jd.add(jt);
jd.add(row(20, cell(newNameLable), cell(jt)).getComponent(), BorderLayout.NORTH);
hintsLabel = new UILabel();
hintsLabel.setBounds(20, 50, 250, 30);
hintsLabel.setForeground(Color.RED);
hintsLabel.setVisible(false);
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() {
public void actionPerformed(ActionEvent e) {
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"));
cancelButton.setBounds(250, 90, 60, 25);
cancelButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
jd.dispose();
}
});
jd.add(cancelButton);
jd.add(confirmButton);
jd.add(hintsLabel);
JPanel buttonPane = new JPanel(new BorderLayout());
buttonPane.setBorder(new ScaledEmptyBorder(10, 10, 10, 10));
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.setModal(true);
jd.setTitle(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_ECP_Decode"));

Loading…
Cancel
Save