From fd3939fbe2a084e7f5eef0a0525db54b438dc6ba Mon Sep 17 00:00:00 2001 From: rodinia814 Date: Tue, 15 May 2012 04:38:27 +0000 Subject: [PATCH] Rename to ComponentPresetEditor git-svn-id: https://openrocket.svn.sourceforge.net/svnroot/openrocket/trunk@677 180e2498-e6e9-4542-8430-84ac67f01cd8 --- ...tPanel.java => ComponentPresetEditor.java} | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) rename core/src/net/sf/openrocket/gui/preset/{ComponentPresetPanel.java => ComponentPresetEditor.java} (94%) diff --git a/core/src/net/sf/openrocket/gui/preset/ComponentPresetPanel.java b/core/src/net/sf/openrocket/gui/preset/ComponentPresetEditor.java similarity index 94% rename from core/src/net/sf/openrocket/gui/preset/ComponentPresetPanel.java rename to core/src/net/sf/openrocket/gui/preset/ComponentPresetEditor.java index 3cdefd15..b7b668ed 100644 --- a/core/src/net/sf/openrocket/gui/preset/ComponentPresetPanel.java +++ b/core/src/net/sf/openrocket/gui/preset/ComponentPresetEditor.java @@ -45,7 +45,7 @@ import java.util.List; * A UI for editing component presets. Currently this is a standalone application - run the main within this class. * TODO: Full I18n TODO: Save As .csv */ -public class ComponentPresetPanel extends JPanel implements PresetResultListener { +public class ComponentPresetEditor extends JPanel implements PresetResultListener { /** * The logger. @@ -92,7 +92,7 @@ public class ComponentPresetPanel extends JPanel implements PresetResultListener * * @param frame the parent window */ - public ComponentPresetPanel(final JFrame frame) { + public ComponentPresetEditor(final JFrame frame) { setLayout(new MigLayout("", "[82.00px, grow][168.00px, grow][84px, grow][117.00px, grow][][222px]", "[346.00px, grow][29px]")); @@ -121,7 +121,7 @@ public class ComponentPresetPanel extends JPanel implements PresetResultListener public void mouseClicked(MouseEvent e) { JTable target = (JTable) e.getSource(); if (target.getSelectedColumn() == 4) { - if (JOptionPane.YES_OPTION == JOptionPane.showConfirmDialog(ComponentPresetPanel.this, + if (JOptionPane.YES_OPTION == JOptionPane.showConfirmDialog(ComponentPresetEditor.this, "Do you want to delete this preset?", "Confirm Delete", JOptionPane.YES_OPTION, JOptionPane.QUESTION_MESSAGE)) { @@ -132,7 +132,7 @@ public class ComponentPresetPanel extends JPanel implements PresetResultListener if (e.getClickCount() == 2) { int row = target.getSelectedRow(); editingSelected = true; - new PresetEditorDialog(ComponentPresetPanel.this, (ComponentPreset) model.getAssociatedObject(row)).setVisible(true); + new PresetEditorDialog(ComponentPresetEditor.this, (ComponentPreset) model.getAssociatedObject(row)).setVisible(true); } } } @@ -217,7 +217,7 @@ public class ComponentPresetPanel extends JPanel implements PresetResultListener @Override public void mouseClicked(MouseEvent arg0) { editingSelected = false; - new PresetEditorDialog(ComponentPresetPanel.this).setVisible(true); + new PresetEditorDialog(ComponentPresetEditor.this).setVisible(true); } }); add(addBtn, "cell 0 1,alignx left,aligny top"); @@ -261,7 +261,7 @@ public class ComponentPresetPanel extends JPanel implements PresetResultListener try { Application.setPreferences(new SwingPreferences()); JFrame dialog = new JFrame(); - dialog.getContentPane().add(new ComponentPresetPanel(dialog)); + dialog.getContentPane().add(new ComponentPresetEditor(dialog)); dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); dialog.pack(); dialog.setVisible(true); @@ -338,7 +338,7 @@ public class ComponentPresetPanel extends JPanel implements PresetResultListener chooser.setCurrentDirectory(((SwingPreferences) Application.getPreferences()).getDefaultDirectory()); } - int option = chooser.showOpenDialog(ComponentPresetPanel.this); + int option = chooser.showOpenDialog(ComponentPresetEditor.this); if (option != JFileChooser.APPROVE_OPTION) { openedFile = null; log.user("User decided not to open, option=" + option); @@ -374,7 +374,7 @@ public class ComponentPresetPanel extends JPanel implements PresetResultListener } catch (Exception e) { e.printStackTrace(); - JOptionPane.showMessageDialog(ComponentPresetPanel.this, "Unable to open OpenRocket component file: " + + JOptionPane.showMessageDialog(ComponentPresetEditor.this, "Unable to open OpenRocket component file: " + file.getName() + " Invalid format. " + e.getMessage()); openedFile = null; return false; @@ -387,7 +387,7 @@ public class ComponentPresetPanel extends JPanel implements PresetResultListener return saveAsORC(); } catch (Exception e1) { - JOptionPane.showMessageDialog(ComponentPresetPanel.this, e1.getLocalizedMessage(), + JOptionPane.showMessageDialog(ComponentPresetEditor.this, e1.getLocalizedMessage(), "Error saving ORC file.", JOptionPane.ERROR_MESSAGE); return false; } @@ -415,7 +415,7 @@ public class ComponentPresetPanel extends JPanel implements PresetResultListener chooser.setCurrentDirectory(((SwingPreferences) Application.getPreferences()).getDefaultDirectory()); } - int option = chooser.showSaveDialog(ComponentPresetPanel.this); + int option = chooser.showSaveDialog(ComponentPresetEditor.this); if (option != JFileChooser.APPROVE_OPTION) { log.user("User decided not to save, option=" + option); return false; -- 2.39.5