Reorganize BasicFrame file menu
This commit is contained in:
parent
4d6916bb47
commit
dad762c31e
Before Width: | Height: | Size: 740 B After Width: | Height: | Size: 740 B |
@ -43,6 +43,7 @@ import javax.swing.ListSelectionModel;
|
|||||||
import javax.swing.SwingUtilities;
|
import javax.swing.SwingUtilities;
|
||||||
import javax.swing.border.BevelBorder;
|
import javax.swing.border.BevelBorder;
|
||||||
import javax.swing.event.ChangeEvent;
|
import javax.swing.event.ChangeEvent;
|
||||||
|
import javax.swing.filechooser.FileFilter;
|
||||||
import javax.swing.tree.DefaultTreeSelectionModel;
|
import javax.swing.tree.DefaultTreeSelectionModel;
|
||||||
import javax.swing.tree.TreePath;
|
import javax.swing.tree.TreePath;
|
||||||
import javax.swing.tree.TreeSelectionModel;
|
import javax.swing.tree.TreeSelectionModel;
|
||||||
@ -86,7 +87,6 @@ import net.sf.openrocket.gui.util.SaveFileWorker;
|
|||||||
import net.sf.openrocket.gui.util.SwingPreferences;
|
import net.sf.openrocket.gui.util.SwingPreferences;
|
||||||
import net.sf.openrocket.l10n.Translator;
|
import net.sf.openrocket.l10n.Translator;
|
||||||
import net.sf.openrocket.logging.Markers;
|
import net.sf.openrocket.logging.Markers;
|
||||||
import net.sf.openrocket.rocketcomponent.AxialStage;
|
|
||||||
import net.sf.openrocket.rocketcomponent.ComponentChangeEvent;
|
import net.sf.openrocket.rocketcomponent.ComponentChangeEvent;
|
||||||
import net.sf.openrocket.rocketcomponent.ComponentChangeListener;
|
import net.sf.openrocket.rocketcomponent.ComponentChangeListener;
|
||||||
import net.sf.openrocket.rocketcomponent.Rocket;
|
import net.sf.openrocket.rocketcomponent.Rocket;
|
||||||
@ -344,63 +344,23 @@ public class BasicFrame extends JFrame {
|
|||||||
*/
|
*/
|
||||||
private void createMenu() {
|
private void createMenu() {
|
||||||
JMenuBar menubar = new JMenuBar();
|
JMenuBar menubar = new JMenuBar();
|
||||||
JMenu menu;
|
JMenu fileMenu;
|
||||||
JMenuItem item;
|
JMenuItem item;
|
||||||
|
|
||||||
//// File
|
// File
|
||||||
menu = new JMenu(trans.get("main.menu.file"));
|
fileMenu = new JMenu(trans.get("main.menu.file"));
|
||||||
menu.setMnemonic(KeyEvent.VK_F);
|
fileMenu.setMnemonic(KeyEvent.VK_F);
|
||||||
//// File-handling related tasks
|
fileMenu.getAccessibleContext().setAccessibleDescription(trans.get("main.menu.file.desc"));
|
||||||
menu.getAccessibleContext().setAccessibleDescription(trans.get("main.menu.file.desc"));
|
menubar.add(fileMenu);
|
||||||
menubar.add(menu);
|
|
||||||
|
|
||||||
//// New
|
//// New etc.
|
||||||
item = new JMenuItem(trans.get("main.menu.file.new"), KeyEvent.VK_N);
|
addFileCreateAndOpenMenuItems(fileMenu, this);
|
||||||
item.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_N, SHORTCUT_KEY));
|
|
||||||
item.setMnemonic(KeyEvent.VK_N);
|
|
||||||
//// Create a new rocket design
|
|
||||||
item.getAccessibleContext().setAccessibleDescription(trans.get("main.menu.file.new.desc"));
|
|
||||||
item.setIcon(Icons.FILE_NEW);
|
|
||||||
item.addActionListener(new ActionListener() {
|
|
||||||
@Override
|
|
||||||
public void actionPerformed(ActionEvent e) {
|
|
||||||
log.info(Markers.USER_MARKER, "New... selected");
|
|
||||||
newAction();
|
|
||||||
closeIfReplaceable();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
menu.add(item);
|
|
||||||
|
|
||||||
//// Open...
|
// ------------------------------------------------------------------------------------------
|
||||||
item = new JMenuItem(trans.get("main.menu.file.open"), KeyEvent.VK_O);
|
|
||||||
item.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_O, SHORTCUT_KEY));
|
|
||||||
//// Open a rocket design
|
|
||||||
item.getAccessibleContext().setAccessibleDescription(trans.get("main.menu.file.open.desc"));
|
|
||||||
item.setIcon(Icons.FILE_OPEN);
|
|
||||||
item.addActionListener(new ActionListener() {
|
|
||||||
@Override
|
|
||||||
public void actionPerformed(ActionEvent e) {
|
|
||||||
log.info(Markers.USER_MARKER, "Open... selected");
|
|
||||||
openAction();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
menu.add(item);
|
|
||||||
|
|
||||||
//// Open Recent...
|
fileMenu.addSeparator();
|
||||||
item = new MRUDesignFileAction(trans.get("main.menu.file.openRecent"), this);
|
|
||||||
item.getAccessibleContext().setAccessibleDescription(trans.get("main.menu.file.openRecent.desc"));
|
|
||||||
item.setIcon(Icons.FILE_OPEN);
|
|
||||||
menu.add(item);
|
|
||||||
|
|
||||||
//// Open example...
|
//// Save
|
||||||
item = new ExampleDesignFileAction(trans.get("main.menu.file.openExample"), this);
|
|
||||||
item.getAccessibleContext().setAccessibleDescription(trans.get("main.menu.file.openExample.desc"));
|
|
||||||
item.setIcon(Icons.FILE_OPEN_EXAMPLE);
|
|
||||||
menu.add(item);
|
|
||||||
|
|
||||||
menu.addSeparator();
|
|
||||||
|
|
||||||
//// Save
|
|
||||||
item = new JMenuItem(trans.get("main.menu.file.save"), KeyEvent.VK_S);
|
item = new JMenuItem(trans.get("main.menu.file.save"), KeyEvent.VK_S);
|
||||||
item.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_S, SHORTCUT_KEY));
|
item.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_S, SHORTCUT_KEY));
|
||||||
//// Save the current rocket design
|
//// Save the current rocket design
|
||||||
@ -413,9 +373,9 @@ public class BasicFrame extends JFrame {
|
|||||||
saveAction();
|
saveAction();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
menu.add(item);
|
fileMenu.add(item);
|
||||||
|
|
||||||
//// Save as...
|
//// Save as...
|
||||||
item = new JMenuItem(trans.get("main.menu.file.saveAs"), KeyEvent.VK_A);
|
item = new JMenuItem(trans.get("main.menu.file.saveAs"), KeyEvent.VK_A);
|
||||||
item.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_S,
|
item.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_S,
|
||||||
SHORTCUT_KEY | ActionEvent.SHIFT_MASK));
|
SHORTCUT_KEY | ActionEvent.SHIFT_MASK));
|
||||||
@ -429,51 +389,42 @@ public class BasicFrame extends JFrame {
|
|||||||
saveAsAction();
|
saveAsAction();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
menu.add(item);
|
fileMenu.add(item);
|
||||||
|
|
||||||
//// BEGIN CREATE and implement File > "Export as" menu and submenu
|
|
||||||
|
|
||||||
// // INITIALIZE "Export as" submenu with options list
|
//// Export as
|
||||||
JMenu exportSubMenu = new JMenu();
|
JMenu exportSubMenu = new JMenu(trans.get("main.menu.file.exportAs"));
|
||||||
JMenuItem exportMenu = new JMenuItem(),
|
exportSubMenu.getAccessibleContext().setAccessibleDescription(trans.get("main.menu.file.exportAs.desc"));
|
||||||
RASAero= new JMenuItem("RASAero (Unavailable)"),
|
exportSubMenu.setIcon(Icons.FILE_EXPORT);
|
||||||
RockSim = new JMenuItem("RockSim"),
|
|
||||||
Print3D = new JMenuItem("Exterior airframe");
|
|
||||||
|
|
||||||
// // CREATE File > "Export as" menu line with icon, and "Export as" submenu
|
/* Pending Future Development
|
||||||
exportSubMenu = new JMenu(trans.get("main.menu.file.export_as"));
|
////// Export RASAero
|
||||||
exportSubMenu.getAccessibleContext().setAccessibleDescription(trans.get("main.menu.file.export_as.desc"));
|
JMenuItem exportRASAero = new JMenuItem(trans.get("main.fileMenu.file.exportAs.RASAero"));
|
||||||
exportSubMenu.setIcon(Icons.FILE_EXPORT_AS);
|
exportRASAero.setIcon(Icons.RASAERO
|
||||||
|
exportRASAero.getAccessibleContext().setAccessibleDescription(trans.get("main.fileMenu.file.exportAs.RASAero.desc"));
|
||||||
/* // // PENDING Future development
|
exportRASAero.addActionListener(new ActionListener() {
|
||||||
// // ADD RASAero to "Export as" exportSubMenu options
|
|
||||||
exportSubMenu.add(RASAero);
|
|
||||||
RASAero.setForeground(Color.lightGray);
|
|
||||||
|
|
||||||
// // PENDING Future development
|
|
||||||
// // CREATE RASAero listener
|
|
||||||
RASAero.addActionListener(new ActionListener() {
|
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
exportRASAeroAction();}});
|
exportRASAeroAction();}
|
||||||
*/
|
});
|
||||||
// // ADD RockSim to "Export as" exportSubMenu options
|
exportSubMenu.add(exportRASAero);
|
||||||
exportSubMenu.add(RockSim);
|
*/
|
||||||
|
|
||||||
// // CREATE RockSim listener
|
////// Export RockSim
|
||||||
RockSim.addActionListener(new ActionListener() {
|
JMenuItem exportRockSim = new JMenuItem(trans.get("main.menu.file.exportAs.RockSim"));
|
||||||
|
exportRockSim.setIcon(Icons.ROCKSIM);
|
||||||
|
exportRockSim.getAccessibleContext().setAccessibleDescription(trans.get("main.menu.file.exportAs.RockSim.desc"));
|
||||||
|
exportRockSim.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
exportRockSimAction();}});
|
exportRockSimAction();}
|
||||||
|
});
|
||||||
|
exportSubMenu.add(exportRockSim);
|
||||||
|
|
||||||
// // ADD Export options in exportSubMenu to "Export as" menu
|
fileMenu.add(exportSubMenu);
|
||||||
menu.add(exportSubMenu);
|
fileMenu.addSeparator();
|
||||||
|
|
||||||
// // END CREATE and implement File > "Export as" menu and submenu
|
// ------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
//// BEGIN CREATE na implement File > "Save decal image. . . menu and submenu
|
|
||||||
|
|
||||||
menu.addSeparator();
|
|
||||||
|
|
||||||
//// Save decal image...
|
//// Save decal image...
|
||||||
item = new JMenuItem(trans.get("main.menu.file.exportDecal"));
|
item = new JMenuItem(trans.get("main.menu.file.exportDecal"));
|
||||||
@ -486,25 +437,20 @@ public class BasicFrame extends JFrame {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
item.setEnabled(document.getDecalList().size() > 0);
|
item.setEnabled(document.getDecalList().size() > 0);
|
||||||
final JMenuItem exportMenuItem = item;
|
|
||||||
/**
|
// TODO
|
||||||
document.getRocket().addChangeListener(new StateChangeListener() {
|
/* document.getRocket().addChangeListener(new StateChangeListener() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void stateChanged(EventObject e) {
|
public void stateChanged(EventObject e) {
|
||||||
exportMenuItem.setEnabled(document.getDecalList().size() > 0);
|
exportMenuItem.setEnabled(document.getDecalList().size() > 0);
|
||||||
}
|
}
|
||||||
});
|
}); */
|
||||||
*/
|
fileMenu.add(item);
|
||||||
menu.add(item);
|
|
||||||
|
|
||||||
//// END CREATE na implement File > "Save decal image. . . menu and submenu
|
|
||||||
|
|
||||||
//// BEGIN PRINT Design specifications, including parts list and templates
|
|
||||||
|
|
||||||
|
//// Print design info...
|
||||||
item = new JMenuItem(trans.get("main.menu.file.print"), KeyEvent.VK_P);
|
item = new JMenuItem(trans.get("main.menu.file.print"), KeyEvent.VK_P);
|
||||||
item.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_P, SHORTCUT_KEY));
|
item.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_P, SHORTCUT_KEY));
|
||||||
//// Print specifications, including parts list and fin template
|
|
||||||
item.getAccessibleContext().setAccessibleDescription(trans.get("main.menu.file.print.desc"));
|
item.getAccessibleContext().setAccessibleDescription(trans.get("main.menu.file.print.desc"));
|
||||||
item.setIcon(Icons.FILE_PRINT);
|
item.setIcon(Icons.FILE_PRINT);
|
||||||
item.addActionListener(new ActionListener() {
|
item.addActionListener(new ActionListener() {
|
||||||
@ -514,58 +460,10 @@ public class BasicFrame extends JFrame {
|
|||||||
printAction();
|
printAction();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
menu.add(item);
|
fileMenu.add(item);
|
||||||
|
fileMenu.addSeparator();
|
||||||
|
|
||||||
//// END PRINT Design specifications, including parts list and templates
|
// ------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
/* //// THE IMPORT ROCKSIM .RKT FEATURE IS FULLY WITHIN THE SCOPE OF THE "OPEN" FEATURE
|
|
||||||
//// THIS FEATURE IS BEING DEACTIVATED PENDING REMOVAL
|
|
||||||
|
|
||||||
menu.addSeparator();
|
|
||||||
|
|
||||||
//// BEGIN IMPORT RockSim RKT design file
|
|
||||||
JMenuItem importMenu;
|
|
||||||
item = new JMenuItem(trans.get("main.menu.file.import"));
|
|
||||||
item.getAccessibleContext().setAccessibleDescription(trans.get("main.menu.file.import.desc"));
|
|
||||||
item.setIcon(Icons.FILE_IMPORT);
|
|
||||||
item.addActionListener(new ActionListener() {
|
|
||||||
@Override
|
|
||||||
public void actionPerformed(ActionEvent e) {
|
|
||||||
log.info(Markers.USER_MARKER, "Import... selected");
|
|
||||||
importAction();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
menu.add(item);
|
|
||||||
//// END IMPORT RockSim RKT design file
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* //// PENDING Future development
|
|
||||||
//// BEGIN CREATE and implement File > "Encode 3D" menu and submenu
|
|
||||||
|
|
||||||
// // INITIALIZE "Encode 3D" submenu with options list
|
|
||||||
JMenu encode3dSubmenu = new JMenu();
|
|
||||||
JMenuItem encodeMenu = new JMenuItem(),
|
|
||||||
External_Airframe = new JMenuItem("External airframe (unavailable)"),
|
|
||||||
Single_Component = new JMenuItem("Component (unavailable)");
|
|
||||||
|
|
||||||
// // CREATE File > "Encode 3D" menu line with icon
|
|
||||||
JMenuItem encode3dSubMenu = new JMenu(trans.get("main.menu.file.encode_3d"));
|
|
||||||
encode3dSubMenu.getAccessibleContext().setAccessibleDescription(trans.get("main.menu.file.encode_3d.desc"));
|
|
||||||
encode3dSubMenu.setForeground(Color.lightGray);
|
|
||||||
encode3dSubMenu.setIcon(Icons.ENCODE_3D);
|
|
||||||
|
|
||||||
// // CREATE "Encode 3D" submenu
|
|
||||||
// // ADD Encode 3D option items to submenu
|
|
||||||
encode3dSubMenu.add(External_Airframe);
|
|
||||||
External_Airframe.setForeground(Color.lightGray);
|
|
||||||
encode3dSubMenu.add(Single_Component);
|
|
||||||
Single_Component.setForeground(Color.lightGray);
|
|
||||||
|
|
||||||
// // ADD Listeners
|
|
||||||
|
|
||||||
//// END CREATE and implement File > "Encode 3D" menu and submenu
|
|
||||||
*/
|
|
||||||
menu.addSeparator();
|
|
||||||
|
|
||||||
//// Close
|
//// Close
|
||||||
item = new JMenuItem(trans.get("main.menu.file.close"), KeyEvent.VK_C);
|
item = new JMenuItem(trans.get("main.menu.file.close"), KeyEvent.VK_C);
|
||||||
@ -581,9 +479,9 @@ public class BasicFrame extends JFrame {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
menu.add(item);
|
fileMenu.add(item);
|
||||||
|
|
||||||
menu.addSeparator();
|
fileMenu.addSeparator();
|
||||||
|
|
||||||
//// Quit
|
//// Quit
|
||||||
item = new JMenuItem(trans.get("main.menu.file.quit"), KeyEvent.VK_Q);
|
item = new JMenuItem(trans.get("main.menu.file.quit"), KeyEvent.VK_Q);
|
||||||
@ -598,15 +496,15 @@ public class BasicFrame extends JFrame {
|
|||||||
quitAction();
|
quitAction();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
menu.add(item);
|
fileMenu.add(item);
|
||||||
|
|
||||||
//// Edit
|
//// Edit
|
||||||
menu = new JMenu(trans.get("main.menu.edit"));
|
fileMenu = new JMenu(trans.get("main.menu.edit"));
|
||||||
menu.setMnemonic(KeyEvent.VK_E);
|
fileMenu.setMnemonic(KeyEvent.VK_E);
|
||||||
|
|
||||||
//// Rocket editing
|
//// Rocket editing
|
||||||
menu.getAccessibleContext().setAccessibleDescription(trans.get("main.menu.edit.desc"));
|
fileMenu.getAccessibleContext().setAccessibleDescription(trans.get("main.menu.edit.desc"));
|
||||||
menubar.add(menu);
|
menubar.add(fileMenu);
|
||||||
|
|
||||||
Action action = UndoRedoAction.newUndoAction(document);
|
Action action = UndoRedoAction.newUndoAction(document);
|
||||||
item = new JMenuItem(action);
|
item = new JMenuItem(action);
|
||||||
@ -616,7 +514,7 @@ public class BasicFrame extends JFrame {
|
|||||||
//// Undo the previous operation
|
//// Undo the previous operation
|
||||||
item.getAccessibleContext().setAccessibleDescription(trans.get("main.menu.edit.undo.desc"));
|
item.getAccessibleContext().setAccessibleDescription(trans.get("main.menu.edit.undo.desc"));
|
||||||
|
|
||||||
menu.add(item);
|
fileMenu.add(item);
|
||||||
|
|
||||||
action = UndoRedoAction.newRedoAction(document);
|
action = UndoRedoAction.newRedoAction(document);
|
||||||
item = new JMenuItem(action);
|
item = new JMenuItem(action);
|
||||||
@ -625,33 +523,33 @@ public class BasicFrame extends JFrame {
|
|||||||
|
|
||||||
//// Redo the previously undone operation
|
//// Redo the previously undone operation
|
||||||
item.getAccessibleContext().setAccessibleDescription(trans.get("main.menu.edit.redo.desc"));
|
item.getAccessibleContext().setAccessibleDescription(trans.get("main.menu.edit.redo.desc"));
|
||||||
menu.add(item);
|
fileMenu.add(item);
|
||||||
|
|
||||||
menu.addSeparator();
|
fileMenu.addSeparator();
|
||||||
|
|
||||||
|
|
||||||
item = new JMenuItem(actions.getEditAction());
|
item = new JMenuItem(actions.getEditAction());
|
||||||
menu.add(item);
|
fileMenu.add(item);
|
||||||
|
|
||||||
item = new JMenuItem(actions.getCutAction());
|
item = new JMenuItem(actions.getCutAction());
|
||||||
menu.add(item);
|
fileMenu.add(item);
|
||||||
|
|
||||||
item = new JMenuItem(actions.getCopyAction());
|
item = new JMenuItem(actions.getCopyAction());
|
||||||
menu.add(item);
|
fileMenu.add(item);
|
||||||
|
|
||||||
item = new JMenuItem(actions.getPasteAction());
|
item = new JMenuItem(actions.getPasteAction());
|
||||||
menu.add(item);
|
fileMenu.add(item);
|
||||||
|
|
||||||
item = new JMenuItem(actions.getDuplicateAction());
|
item = new JMenuItem(actions.getDuplicateAction());
|
||||||
menu.add(item);
|
fileMenu.add(item);
|
||||||
|
|
||||||
item = new JMenuItem(actions.getDeleteAction());
|
item = new JMenuItem(actions.getDeleteAction());
|
||||||
menu.add(item);
|
fileMenu.add(item);
|
||||||
|
|
||||||
menu.addSeparator();
|
fileMenu.addSeparator();
|
||||||
|
|
||||||
item = new JMenuItem(actions.getScaleAction());
|
item = new JMenuItem(actions.getScaleAction());
|
||||||
menu.add(item);
|
fileMenu.add(item);
|
||||||
|
|
||||||
|
|
||||||
//// Preferences
|
//// Preferences
|
||||||
@ -667,10 +565,10 @@ public class BasicFrame extends JFrame {
|
|||||||
PreferencesDialog.showPreferences(BasicFrame.this);
|
PreferencesDialog.showPreferences(BasicFrame.this);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
menu.add(item);
|
fileMenu.add(item);
|
||||||
|
|
||||||
//// Edit Component Preset File
|
//// Edit Component Preset File
|
||||||
if (System.getProperty("openrocket.preseteditor.menu") != null) {
|
if (System.getProperty("openrocket.preseteditor.fileMenu") != null) {
|
||||||
item = new JMenuItem(trans.get("main.menu.edit.editpreset"));
|
item = new JMenuItem(trans.get("main.menu.edit.editpreset"));
|
||||||
item.addActionListener(new ActionListener() {
|
item.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
@ -682,13 +580,13 @@ public class BasicFrame extends JFrame {
|
|||||||
dialog.setVisible(true);
|
dialog.setVisible(true);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
menu.add(item);
|
fileMenu.add(item);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Tools
|
// Tools
|
||||||
menu = new JMenu(trans.get("main.menu.tools"));
|
fileMenu = new JMenu(trans.get("main.menu.tools"));
|
||||||
menubar.add(menu);
|
menubar.add(fileMenu);
|
||||||
|
|
||||||
//// Component analysis
|
//// Component analysis
|
||||||
item = new JMenuItem(trans.get("main.menu.tools.componentAnalysis"), KeyEvent.VK_C);
|
item = new JMenuItem(trans.get("main.menu.tools.componentAnalysis"), KeyEvent.VK_C);
|
||||||
@ -702,7 +600,7 @@ public class BasicFrame extends JFrame {
|
|||||||
ComponentAnalysisDialog.showDialog(rocketpanel);
|
ComponentAnalysisDialog.showDialog(rocketpanel);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
menu.add(item);
|
fileMenu.add(item);
|
||||||
|
|
||||||
//// Optimize
|
//// Optimize
|
||||||
item = new JMenuItem(trans.get("main.menu.tools.optimization"), KeyEvent.VK_O);
|
item = new JMenuItem(trans.get("main.menu.tools.optimization"), KeyEvent.VK_O);
|
||||||
@ -718,7 +616,7 @@ public class BasicFrame extends JFrame {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
menu.add(item);
|
fileMenu.add(item);
|
||||||
|
|
||||||
//// Custom expressions
|
//// Custom expressions
|
||||||
item = new JMenuItem(trans.get("main.menu.tools.customExpressions"), KeyEvent.VK_E);
|
item = new JMenuItem(trans.get("main.menu.tools.customExpressions"), KeyEvent.VK_E);
|
||||||
@ -730,7 +628,7 @@ public class BasicFrame extends JFrame {
|
|||||||
new CustomExpressionDialog(document, BasicFrame.this).setVisible(true);
|
new CustomExpressionDialog(document, BasicFrame.this).setVisible(true);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
menu.add(item);
|
fileMenu.add(item);
|
||||||
|
|
||||||
item = new JMenuItem(trans.get("PhotoFrame.title"), KeyEvent.VK_P);
|
item = new JMenuItem(trans.get("PhotoFrame.title"), KeyEvent.VK_P);
|
||||||
item.getAccessibleContext().setAccessibleDescription(trans.get("PhotoFrame.desc"));
|
item.getAccessibleContext().setAccessibleDescription(trans.get("PhotoFrame.desc"));
|
||||||
@ -742,19 +640,19 @@ public class BasicFrame extends JFrame {
|
|||||||
pa.setVisible(true);
|
pa.setVisible(true);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
menu.add(item);
|
fileMenu.add(item);
|
||||||
|
|
||||||
//// Debug
|
//// Debug
|
||||||
// // (shown if openrocket.debug.menu is defined)
|
// // (shown if openrocket.debug.fileMenu is defined)
|
||||||
if (System.getProperty("openrocket.debug.menu") != null) {
|
if (System.getProperty("openrocket.debug.fileMenu") != null) {
|
||||||
menubar.add(makeDebugMenu());
|
menubar.add(makeDebugMenu());
|
||||||
}
|
}
|
||||||
|
|
||||||
//// Help
|
//// Help
|
||||||
menu = new JMenu(trans.get("main.menu.help"));
|
fileMenu = new JMenu(trans.get("main.menu.help"));
|
||||||
menu.setMnemonic(KeyEvent.VK_H);
|
fileMenu.setMnemonic(KeyEvent.VK_H);
|
||||||
menu.getAccessibleContext().setAccessibleDescription(trans.get("main.menu.help.desc"));
|
fileMenu.getAccessibleContext().setAccessibleDescription(trans.get("main.menu.help.desc"));
|
||||||
menubar.add(menu);
|
menubar.add(fileMenu);
|
||||||
|
|
||||||
//// Guided tours
|
//// Guided tours
|
||||||
item = new JMenuItem(trans.get("main.menu.help.tours"), KeyEvent.VK_L);
|
item = new JMenuItem(trans.get("main.menu.help.tours"), KeyEvent.VK_L);
|
||||||
@ -767,9 +665,9 @@ public class BasicFrame extends JFrame {
|
|||||||
GuidedTourSelectionDialog.showDialog(BasicFrame.this);
|
GuidedTourSelectionDialog.showDialog(BasicFrame.this);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
menu.add(item);
|
fileMenu.add(item);
|
||||||
|
|
||||||
menu.addSeparator();
|
fileMenu.addSeparator();
|
||||||
|
|
||||||
//// Bug report
|
//// Bug report
|
||||||
item = new JMenuItem(trans.get("main.menu.help.bugReport"), KeyEvent.VK_B);
|
item = new JMenuItem(trans.get("main.menu.help.bugReport"), KeyEvent.VK_B);
|
||||||
@ -782,7 +680,7 @@ public class BasicFrame extends JFrame {
|
|||||||
BugReportDialog.showBugReportDialog(BasicFrame.this);
|
BugReportDialog.showBugReportDialog(BasicFrame.this);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
menu.add(item);
|
fileMenu.add(item);
|
||||||
|
|
||||||
//// Debug log
|
//// Debug log
|
||||||
item = new JMenuItem(trans.get("main.menu.help.debugLog"), KeyEvent.VK_D);
|
item = new JMenuItem(trans.get("main.menu.help.debugLog"), KeyEvent.VK_D);
|
||||||
@ -796,9 +694,9 @@ public class BasicFrame extends JFrame {
|
|||||||
new DebugLogDialog(BasicFrame.this).setVisible(true);
|
new DebugLogDialog(BasicFrame.this).setVisible(true);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
menu.add(item);
|
fileMenu.add(item);
|
||||||
|
|
||||||
menu.addSeparator();
|
fileMenu.addSeparator();
|
||||||
|
|
||||||
//// License
|
//// License
|
||||||
item = new JMenuItem(trans.get("main.menu.help.license"), KeyEvent.VK_L);
|
item = new JMenuItem(trans.get("main.menu.help.license"), KeyEvent.VK_L);
|
||||||
@ -811,7 +709,7 @@ public class BasicFrame extends JFrame {
|
|||||||
new LicenseDialog(BasicFrame.this).setVisible(true);
|
new LicenseDialog(BasicFrame.this).setVisible(true);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
menu.add(item);
|
fileMenu.add(item);
|
||||||
|
|
||||||
//// About
|
//// About
|
||||||
item = new JMenuItem(trans.get("main.menu.help.about"), KeyEvent.VK_A);
|
item = new JMenuItem(trans.get("main.menu.help.about"), KeyEvent.VK_A);
|
||||||
@ -824,11 +722,90 @@ public class BasicFrame extends JFrame {
|
|||||||
new AboutDialog(BasicFrame.this).setVisible(true);
|
new AboutDialog(BasicFrame.this).setVisible(true);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
menu.add(item);
|
fileMenu.add(item);
|
||||||
|
|
||||||
this.setJMenuBar(menubar);
|
this.setJMenuBar(menubar);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void addFileCreateAndOpenMenuItems(JMenu fileMenu, Window parent) {
|
||||||
|
JMenuItem item;
|
||||||
|
|
||||||
|
//// New
|
||||||
|
item = new JMenuItem(trans.get("main.menu.file.new"), KeyEvent.VK_N);
|
||||||
|
item.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_N, SHORTCUT_KEY));
|
||||||
|
item.setMnemonic(KeyEvent.VK_N);
|
||||||
|
item.getAccessibleContext().setAccessibleDescription(trans.get("main.menu.file.new.desc"));
|
||||||
|
item.setIcon(Icons.FILE_NEW);
|
||||||
|
item.addActionListener(new ActionListener() {
|
||||||
|
@Override
|
||||||
|
public void actionPerformed(ActionEvent e) {
|
||||||
|
log.info(Markers.USER_MARKER, "New... selected");
|
||||||
|
newAction();
|
||||||
|
if (parent instanceof BasicFrame) {
|
||||||
|
((BasicFrame) parent).closeIfReplaceable();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
fileMenu.add(item);
|
||||||
|
|
||||||
|
//// Open...
|
||||||
|
item = new JMenuItem(trans.get("main.menu.file.open"), KeyEvent.VK_O);
|
||||||
|
item.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_O, SHORTCUT_KEY));
|
||||||
|
item.getAccessibleContext().setAccessibleDescription(trans.get("main.menu.file.open.desc"));
|
||||||
|
item.setIcon(Icons.FILE_OPEN);
|
||||||
|
item.addActionListener(new ActionListener() {
|
||||||
|
@Override
|
||||||
|
public void actionPerformed(ActionEvent e) {
|
||||||
|
log.info(Markers.USER_MARKER, "Open... selected");
|
||||||
|
openAction(parent);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
fileMenu.add(item);
|
||||||
|
|
||||||
|
//// Open Recent
|
||||||
|
item = new MRUDesignFileAction(trans.get("main.menu.file.openRecent"), parent);
|
||||||
|
item.getAccessibleContext().setAccessibleDescription(trans.get("main.menu.file.openRecent.desc"));
|
||||||
|
item.setIcon(Icons.FILE_OPEN);
|
||||||
|
fileMenu.add(item);
|
||||||
|
|
||||||
|
//// Open example
|
||||||
|
BasicFrame basicFrame = parent instanceof BasicFrame ? (BasicFrame) parent : null;
|
||||||
|
item = new ExampleDesignFileAction(trans.get("main.menu.file.openExample"), basicFrame);
|
||||||
|
item.getAccessibleContext().setAccessibleDescription(trans.get("main.menu.file.openExample.desc"));
|
||||||
|
item.setIcon(Icons.FILE_OPEN_EXAMPLE);
|
||||||
|
fileMenu.add(item);
|
||||||
|
|
||||||
|
//// Import
|
||||||
|
JMenu importSubMenu = new JMenu(trans.get("main.menu.file.import"));
|
||||||
|
importSubMenu.getAccessibleContext().setAccessibleDescription(trans.get("main.menu.file.import.desc"));
|
||||||
|
importSubMenu.setIcon(Icons.FILE_IMPORT);
|
||||||
|
fileMenu.add(importSubMenu);
|
||||||
|
|
||||||
|
////// Import RASAero
|
||||||
|
JMenuItem importRASAero = new JMenuItem(trans.get("main.menu.file.import.RASAero"));
|
||||||
|
importRASAero.getAccessibleContext().setAccessibleDescription(trans.get("main.menu.file.import.RASAero.desc"));
|
||||||
|
importRASAero.setIcon(Icons.RASAERO);
|
||||||
|
importRASAero.addActionListener(new ActionListener() {
|
||||||
|
@Override
|
||||||
|
public void actionPerformed(ActionEvent e) {
|
||||||
|
importRASAeroAction(parent);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
importSubMenu.add(importRASAero);
|
||||||
|
|
||||||
|
////// Import RockSim
|
||||||
|
JMenuItem importRockSim = new JMenuItem(trans.get("main.menu.file.import.RockSim"));
|
||||||
|
importRockSim.getAccessibleContext().setAccessibleDescription(trans.get("main.menu.file.import.RockSim.desc"));
|
||||||
|
importRockSim.setIcon(Icons.ROCKSIM);
|
||||||
|
importRockSim.addActionListener(new ActionListener() {
|
||||||
|
@Override
|
||||||
|
public void actionPerformed(ActionEvent e) {
|
||||||
|
importRockSimAction(parent);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
importSubMenu.add(importRockSim);
|
||||||
|
}
|
||||||
|
|
||||||
public RocketActions getRocketActions() {
|
public RocketActions getRocketActions() {
|
||||||
return actions;
|
return actions;
|
||||||
}
|
}
|
||||||
@ -1109,16 +1086,17 @@ public class BasicFrame extends JFrame {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private void openAction() {
|
/**
|
||||||
openAction(this);
|
* Open a custom design file, specified by the file filter.
|
||||||
}
|
* @param parent parent window to open the file chooser on
|
||||||
|
* @param filter the file filter to use, or null for no filter. E.g. use "RockSim" for RockSim files.
|
||||||
public static void openAction(Window parent) {
|
*/
|
||||||
|
public static void openAction(Window parent, FileFilter filter) {
|
||||||
JFileChooser chooser = new JFileChooser();
|
JFileChooser chooser = new JFileChooser();
|
||||||
|
|
||||||
chooser.addChoosableFileFilter(FileHelper.ALL_DESIGNS_FILTER);
|
chooser.addChoosableFileFilter(FileHelper.ALL_DESIGNS_FILTER);
|
||||||
chooser.addChoosableFileFilter(FileHelper.OPENROCKET_DESIGN_FILTER);
|
chooser.addChoosableFileFilter(filter);
|
||||||
chooser.setFileFilter(FileHelper.OPENROCKET_DESIGN_FILTER);
|
chooser.setFileFilter(filter);
|
||||||
|
|
||||||
chooser.setFileSelectionMode(JFileChooser.FILES_ONLY);
|
chooser.setFileSelectionMode(JFileChooser.FILES_ONLY);
|
||||||
chooser.setMultiSelectionEnabled(true);
|
chooser.setMultiSelectionEnabled(true);
|
||||||
@ -1143,38 +1121,34 @@ public class BasicFrame extends JFrame {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void importAction() {
|
/**
|
||||||
JFileChooser chooser = new JFileChooser();
|
* Open an OpenRocket file.
|
||||||
|
*/
|
||||||
chooser.addChoosableFileFilter(FileHelper.ALL_DESIGNS_FILTER);
|
public static void openAction(Window parent) {
|
||||||
chooser.addChoosableFileFilter(FileHelper.ROCKSIM_DESIGN_FILTER);
|
openAction(parent, FileHelper.OPENROCKET_DESIGN_FILTER);
|
||||||
chooser.setFileFilter(FileHelper.ROCKSIM_DESIGN_FILTER);
|
|
||||||
|
|
||||||
chooser.setFileSelectionMode(JFileChooser.FILES_ONLY);
|
|
||||||
chooser.setMultiSelectionEnabled(true);
|
|
||||||
chooser.setCurrentDirectory(((SwingPreferences) Application.getPreferences()).getDefaultDirectory());
|
|
||||||
int option = chooser.showOpenDialog(this);
|
|
||||||
if (option != JFileChooser.APPROVE_OPTION) {
|
|
||||||
log.info(Markers.USER_MARKER, "Decided not to open files, option=" + option);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
((SwingPreferences) Application.getPreferences()).setDefaultDirectory(chooser.getCurrentDirectory());
|
|
||||||
|
|
||||||
File[] files = chooser.getSelectedFiles();
|
|
||||||
log.info(Markers.USER_MARKER, "Opening files " + Arrays.toString(files));
|
|
||||||
|
|
||||||
for (File file : files) {
|
|
||||||
log.info("Opening file: " + file);
|
|
||||||
if (open(file, this) != null) {
|
|
||||||
MRUDesignFile opts = MRUDesignFile.getInstance();
|
|
||||||
opts.addFile(file.getAbsolutePath());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void closeIfReplaceable() {
|
/**
|
||||||
|
* Import a RockSim file.
|
||||||
|
* @param parent parent window to open the file chooser on
|
||||||
|
*/
|
||||||
|
public static void importRockSimAction(Window parent) {
|
||||||
|
log.info(Markers.USER_MARKER, "Import RockSim selected");
|
||||||
|
openAction(parent, FileHelper.ROCKSIM_DESIGN_FILTER);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Import a RASAero file.
|
||||||
|
* @param parent parent window to open the file chooser on
|
||||||
|
*/
|
||||||
|
public static void importRASAeroAction(Window parent) {
|
||||||
|
log.info(Markers.USER_MARKER, "Import RASAero selected");
|
||||||
|
openAction(parent, FileHelper.RASAERO_DESIGN_FILTER);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void closeIfReplaceable() {
|
||||||
// Close previous window if replacing
|
// Close previous window if replacing
|
||||||
if (replaceable && document.isSaved()) {
|
if (replaceable && document.isSaved()) {
|
||||||
// We are replacing the frame, make new window have current location
|
// We are replacing the frame, make new window have current location
|
||||||
@ -1338,14 +1312,16 @@ public class BasicFrame extends JFrame {
|
|||||||
/**
|
/**
|
||||||
* "Save" action. If the design is new, then this is identical to "Save As", with a default file filter for .ork.
|
* "Save" action. If the design is new, then this is identical to "Save As", with a default file filter for .ork.
|
||||||
* If the rocket being edited previously was opened from a .ork file, then it will be saved immediately to the same
|
* If the rocket being edited previously was opened from a .ork file, then it will be saved immediately to the same
|
||||||
* file. But clicking on 'Save' for an existing design file with a .rkt will bring up a confirmation dialog because
|
* file. But clicking on 'Save' for an existing design file with a RockSim or RASAero file will bring up a confirmation
|
||||||
* it's potentially a destructive write (loss of some fidelity if it's truly an original RockSim generated file).
|
* dialog because it's potentially a destructive write (loss of some fidelity if it's truly an original RockSim/RASAero
|
||||||
|
* generated file).
|
||||||
*
|
*
|
||||||
* @return true if the file was saved, false otherwise
|
* @return true if the file was saved, false otherwise
|
||||||
*/
|
*/
|
||||||
private boolean saveAction() {
|
private boolean saveAction() {
|
||||||
File file = document.getFile();
|
File file = document.getFile();
|
||||||
if (file == null || document.getDefaultStorageOptions().getFileType().equals(FileType.ROCKSIM)) {
|
if (file == null || document.getDefaultStorageOptions().getFileType().equals(FileType.ROCKSIM)
|
||||||
|
|| document.getDefaultStorageOptions().getFileType().equals(FileType.RASAERO)) {
|
||||||
log.info("Document does not contain file, opening save as dialog instead");
|
log.info("Document does not contain file, opening save as dialog instead");
|
||||||
return saveAsAction();
|
return saveAsAction();
|
||||||
}
|
}
|
||||||
@ -1369,11 +1345,6 @@ public class BasicFrame extends JFrame {
|
|||||||
*/
|
*/
|
||||||
//// END RASAERO Export Action
|
//// END RASAERO Export Action
|
||||||
|
|
||||||
public void actionPerformed(ActionEvent e) {
|
|
||||||
log.info(Markers.USER_MARKER, "Import... selected");
|
|
||||||
importAction();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
//// BEGIN ROCKSIM Export Action
|
//// BEGIN ROCKSIM Export Action
|
||||||
/**
|
/**
|
||||||
|
@ -65,54 +65,10 @@ public class DummyFrameMenuOSX extends JFrame {
|
|||||||
//// File
|
//// File
|
||||||
menu = new JMenu(trans.get("main.menu.file"));
|
menu = new JMenu(trans.get("main.menu.file"));
|
||||||
menu.setMnemonic(KeyEvent.VK_F);
|
menu.setMnemonic(KeyEvent.VK_F);
|
||||||
//// File-handling related tasks
|
|
||||||
menu.getAccessibleContext().setAccessibleDescription(trans.get("main.menu.file.desc"));
|
menu.getAccessibleContext().setAccessibleDescription(trans.get("main.menu.file.desc"));
|
||||||
menubar.add(menu);
|
menubar.add(menu);
|
||||||
|
|
||||||
//// New
|
BasicFrame.addFileCreateAndOpenMenuItems(menu, DummyFrameMenuOSX.this);
|
||||||
item = new JMenuItem(trans.get("main.menu.file.new"), KeyEvent.VK_N);
|
|
||||||
item.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_N, BasicFrame.SHORTCUT_KEY));
|
|
||||||
item.setMnemonic(KeyEvent.VK_N);
|
|
||||||
//// Create a new rocket design
|
|
||||||
item.getAccessibleContext().setAccessibleDescription(trans.get("main.menu.file.new.desc"));
|
|
||||||
item.setIcon(Icons.FILE_NEW);
|
|
||||||
item.addActionListener(new ActionListener() {
|
|
||||||
@Override
|
|
||||||
public void actionPerformed(ActionEvent e) {
|
|
||||||
DummyFrameMenuOSX.removeDummyDialog();
|
|
||||||
log.info(Markers.USER_MARKER, "New... selected");
|
|
||||||
BasicFrame.newAction();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
menu.add(item);
|
|
||||||
|
|
||||||
//// Open...
|
|
||||||
item = new JMenuItem(trans.get("main.menu.file.open"), KeyEvent.VK_O);
|
|
||||||
item.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_O, BasicFrame.SHORTCUT_KEY));
|
|
||||||
//// Open a rocket design
|
|
||||||
item.getAccessibleContext().setAccessibleDescription(trans.get("main.menu.file.open.desc"));
|
|
||||||
item.setIcon(Icons.FILE_OPEN);
|
|
||||||
item.addActionListener(new ActionListener() {
|
|
||||||
@Override
|
|
||||||
public void actionPerformed(ActionEvent e) {
|
|
||||||
DummyFrameMenuOSX.removeDummyDialog();
|
|
||||||
log.info(Markers.USER_MARKER, "Open... selected");
|
|
||||||
BasicFrame.openAction(DummyFrameMenuOSX.this);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
menu.add(item);
|
|
||||||
|
|
||||||
//// Open Recent...
|
|
||||||
item = new MRUDesignFileAction(trans.get("main.menu.file.openRecent"), this);
|
|
||||||
item.getAccessibleContext().setAccessibleDescription(trans.get("main.menu.file.openRecent.desc"));
|
|
||||||
item.setIcon(Icons.FILE_OPEN);
|
|
||||||
menu.add(item);
|
|
||||||
|
|
||||||
//// Open example...
|
|
||||||
item = new ExampleDesignFileAction(trans.get("main.menu.file.openExample"), null);
|
|
||||||
item.getAccessibleContext().setAccessibleDescription(trans.get("main.menu.file.openExample.desc"));
|
|
||||||
item.setIcon(Icons.FILE_OPEN_EXAMPLE);
|
|
||||||
menu.add(item);
|
|
||||||
|
|
||||||
menu.addSeparator();
|
menu.addSeparator();
|
||||||
|
|
||||||
|
@ -54,9 +54,9 @@ public class Icons {
|
|||||||
public static final Icon FILE_SAVE_AS = loadImageIcon("pix/icons/document-save-as.png", "Save document as");
|
public static final Icon FILE_SAVE_AS = loadImageIcon("pix/icons/document-save-as.png", "Save document as");
|
||||||
public static final Icon SAVE_DECAL = loadImageIcon("pix/icons/Painting-Transparent-PNG_16.png", "Save decal image");
|
public static final Icon SAVE_DECAL = loadImageIcon("pix/icons/Painting-Transparent-PNG_16.png", "Save decal image");
|
||||||
public static final Icon FILE_PRINT = loadImageIcon("pix/icons/print-design.specs.png", "Print specifications");
|
public static final Icon FILE_PRINT = loadImageIcon("pix/icons/print-design.specs.png", "Print specifications");
|
||||||
// public static final Icon FILE_IMPORT = loadImageIcon("pix/icons/model_import.png", "Import");
|
public static final Icon FILE_IMPORT = loadImageIcon("pix/icons/model_import.png", "Import");
|
||||||
public static final Icon FILE_EXPORT_AS = loadImageIcon("pix/icons/model_export.png", "Export model as");
|
public static final Icon FILE_EXPORT = loadImageIcon("pix/icons/model_export.png", "Export");
|
||||||
public static final Icon ENCODE_3D = loadImageIcon("pix/icons/model_encode3d.png", "Encode 3D");
|
public static final Icon EXPORT_3D = loadImageIcon("pix/icons/model_export3d.png", "Export 3D");
|
||||||
public static final Icon FILE_CLOSE = loadImageIcon("pix/icons/document-close.png", "Close document");
|
public static final Icon FILE_CLOSE = loadImageIcon("pix/icons/document-close.png", "Close document");
|
||||||
public static final Icon FILE_QUIT = loadImageIcon("pix/icons/application-exit.png", "Quit OpenRocket");
|
public static final Icon FILE_QUIT = loadImageIcon("pix/icons/application-exit.png", "Quit OpenRocket");
|
||||||
public static final Icon EDIT_UNDO = loadImageIcon("pix/icons/edit-undo.png", trans.get("Icons.Undo"));
|
public static final Icon EDIT_UNDO = loadImageIcon("pix/icons/edit-undo.png", trans.get("Icons.Undo"));
|
||||||
@ -101,8 +101,8 @@ public class Icons {
|
|||||||
public static final Icon MASS_OVERRIDE_SUBCOMPONENT = loadImageIcon("pix/icons/mass-override-subcomponent.png", "Mass Override Subcomponent");
|
public static final Icon MASS_OVERRIDE_SUBCOMPONENT = loadImageIcon("pix/icons/mass-override-subcomponent.png", "Mass Override Subcomponent");
|
||||||
|
|
||||||
// MANUFACTURERS ICONS
|
// MANUFACTURERS ICONS
|
||||||
public static final Icon RASAERO_ICON = loadImageIcon("pix/icons/RASAero_16.png", "RASAero Icon");
|
public static final Icon RASAERO = loadImageIcon("pix/icons/RASAero_16.png", "RASAero Icon");
|
||||||
public static final Icon ROCKSIM_ICON = loadImageIcon("pix/icons/Rocksim_16.png", "Rocksim Icon");
|
public static final Icon ROCKSIM = loadImageIcon("pix/icons/Rocksim_16.png", "Rocksim Icon");
|
||||||
|
|
||||||
|
|
||||||
static {
|
static {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user