mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-06-06 16:05:32 +00:00
#811 Export ActionScript fail fixed
Creating buttons simplified (common code lines moved to function)
This commit is contained in:
@@ -134,7 +134,7 @@ public class MainFrameRibbonMenu extends MainFrameMenu implements ActionListener
|
||||
|
||||
private static final String ACTION_EXPORT = "EXPORT";
|
||||
|
||||
private static final String ACTION_IMPORT_TEXT = "IMPORTTEXT";
|
||||
private static final String ACTION_IMPORT_TEXT = "IMPORTTEXT";
|
||||
|
||||
private static final String ACTION_CHECK_UPDATES = "CHECKUPDATES";
|
||||
|
||||
@@ -199,7 +199,9 @@ public class MainFrameRibbonMenu extends MainFrameMenu implements ActionListener
|
||||
private JCommandButton exportSelectionCommandButton;
|
||||
|
||||
private JCommandButton importTextCommandButton;
|
||||
|
||||
private JCommandButton importXmlCommandButton;
|
||||
|
||||
private JCommandButton exportXmlCommandButton;
|
||||
|
||||
private JCommandToggleButton viewModeResourcesToggleButton;
|
||||
@@ -411,7 +413,7 @@ public class MainFrameRibbonMenu extends MainFrameMenu implements ActionListener
|
||||
|
||||
reloadCommandButton = new JCommandButton(fixCommandTitle(translate("menu.file.reload")), View.getResizableIcon("reload16"));
|
||||
assignListener(reloadCommandButton, ACTION_RELOAD);
|
||||
|
||||
|
||||
saveasexeCommandButton = new JCommandButton(fixCommandTitle(translate("menu.file.saveasexe")), View.getResizableIcon("saveasexe16"));
|
||||
assignListener(saveasexeCommandButton, ACTION_SAVE_AS_EXE);
|
||||
|
||||
@@ -419,7 +421,7 @@ public class MainFrameRibbonMenu extends MainFrameMenu implements ActionListener
|
||||
editBand.addCommandButton(saveCommandButton, RibbonElementPriority.TOP);
|
||||
editBand.addCommandButton(saveasCommandButton, RibbonElementPriority.MEDIUM);
|
||||
editBand.addCommandButton(saveasexeCommandButton, RibbonElementPriority.MEDIUM);
|
||||
editBand.addCommandButton(reloadCommandButton, RibbonElementPriority.MEDIUM);
|
||||
editBand.addCommandButton(reloadCommandButton, RibbonElementPriority.MEDIUM);
|
||||
|
||||
JRibbonBand exportBand = new JRibbonBand(translate("menu.export"), null);
|
||||
exportBand.setResizePolicies(getResizePolicies(exportBand));
|
||||
@@ -429,8 +431,7 @@ public class MainFrameRibbonMenu extends MainFrameMenu implements ActionListener
|
||||
assignListener(exportAllCommandButton, ACTION_EXPORT);
|
||||
exportSelectionCommandButton = new JCommandButton(fixCommandTitle(translate("menu.file.export.selection")), View.getResizableIcon("exportsel16"));
|
||||
assignListener(exportSelectionCommandButton, ACTION_EXPORT_SEL);
|
||||
|
||||
|
||||
|
||||
exportXmlCommandButton = new JCommandButton(fixCommandTitle(translate("menu.file.export.xml")), View.getResizableIcon("exportxml32"));
|
||||
assignListener(exportXmlCommandButton, ACTION_EXPORT_SWF_XML);
|
||||
|
||||
@@ -438,18 +439,17 @@ public class MainFrameRibbonMenu extends MainFrameMenu implements ActionListener
|
||||
exportBand.addCommandButton(exportAllCommandButton, RibbonElementPriority.MEDIUM);
|
||||
exportBand.addCommandButton(exportSelectionCommandButton, RibbonElementPriority.MEDIUM);
|
||||
exportBand.addCommandButton(exportXmlCommandButton, RibbonElementPriority.MEDIUM);
|
||||
|
||||
|
||||
JRibbonBand importBand = new JRibbonBand(translate("menu.import"), null);
|
||||
importBand.setResizePolicies(getResizePolicies(importBand));
|
||||
importTextCommandButton = new JCommandButton(fixCommandTitle(translate("menu.file.import.text")), View.getResizableIcon("importtext32"));
|
||||
assignListener(importTextCommandButton, ACTION_IMPORT_TEXT);
|
||||
|
||||
|
||||
importXmlCommandButton = new JCommandButton(fixCommandTitle(translate("menu.file.import.xml")), View.getResizableIcon("importxml32"));
|
||||
assignListener(importXmlCommandButton, ACTION_IMPORT_SWF_XML);
|
||||
|
||||
importBand.addCommandButton(importXmlCommandButton, RibbonElementPriority.TOP);
|
||||
importBand.addCommandButton(importTextCommandButton, RibbonElementPriority.TOP);
|
||||
importBand.addCommandButton(importTextCommandButton, RibbonElementPriority.TOP);
|
||||
|
||||
JRibbonBand viewBand = new JRibbonBand(translate("menu.view"), null);
|
||||
viewBand.setResizePolicies(getResizePolicies(viewBand));
|
||||
@@ -948,7 +948,7 @@ public class MainFrameRibbonMenu extends MainFrameMenu implements ActionListener
|
||||
case ACTION_IMPORT_TEXT:
|
||||
importText();
|
||||
break;
|
||||
|
||||
|
||||
case ACTION_EXPORT_SWF_XML:
|
||||
mainFrame.getPanel().exportSwfXml();
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user