mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-09-26 17:40:49 +00:00
prepare for Issue #350 (Allow to open multiple SWF files into the same ffdec instance), some action commands moved to constants
This commit is contained in:
@@ -47,6 +47,9 @@ import javax.swing.JTextField;
|
||||
*/
|
||||
public class FontEmbedDialog extends AppDialog implements ActionListener {
|
||||
|
||||
static final String ACTION_OK = "OK";
|
||||
static final String ACTION_CANCEL = "CANCEL";
|
||||
|
||||
private JComboBox<String> sourceFont;
|
||||
private JCheckBox[] rangeCheckboxes;
|
||||
private String rangeNames[];
|
||||
@@ -130,10 +133,10 @@ public class FontEmbedDialog extends AppDialog implements ActionListener {
|
||||
|
||||
JPanel buttonsPanel = new JPanel(new FlowLayout());
|
||||
JButton okButton = new JButton(AppStrings.translate("button.ok"));
|
||||
okButton.setActionCommand("OK");
|
||||
okButton.setActionCommand(ACTION_OK);
|
||||
okButton.addActionListener(this);
|
||||
JButton cancelButton = new JButton(AppStrings.translate("button.cancel"));
|
||||
cancelButton.setActionCommand("CANCEL");
|
||||
cancelButton.setActionCommand(ACTION_CANCEL);
|
||||
cancelButton.addActionListener(this);
|
||||
buttonsPanel.add(okButton);
|
||||
buttonsPanel.add(cancelButton);
|
||||
@@ -198,11 +201,11 @@ public class FontEmbedDialog extends AppDialog implements ActionListener {
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
switch (e.getActionCommand()) {
|
||||
case "OK":
|
||||
case ACTION_OK:
|
||||
result = true;
|
||||
setVisible(false);
|
||||
break;
|
||||
case "CANCEL":
|
||||
case ACTION_CANCEL:
|
||||
result = false;
|
||||
setVisible(false);
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user