From c015d586d22b69078b6da61858e5675793856b0b Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Sun, 25 May 2008 08:10:13 +0000 Subject: JAutoDoc :) --- sources/prefs/editors/VSBetterEditor.java | 55 ++++++ sources/prefs/editors/VSColorChooser.java | 25 +++ sources/prefs/editors/VSEditor.java | 253 +++++++++++++++++++++++++++ sources/prefs/editors/VSEditorFrame.java | 30 ++++ sources/prefs/editors/VSEditorTable.java | 110 ++++++++++++ sources/prefs/editors/VSProcessEditor.java | 28 +++ sources/prefs/editors/VSSimulatorEditor.java | 35 ++++ 7 files changed, 536 insertions(+) (limited to 'sources/prefs/editors') diff --git a/sources/prefs/editors/VSBetterEditor.java b/sources/prefs/editors/VSBetterEditor.java index 289749d..211e8ed 100644 --- a/sources/prefs/editors/VSBetterEditor.java +++ b/sources/prefs/editors/VSBetterEditor.java @@ -1,3 +1,7 @@ +/* + * VS is (c) 2008 by Paul C. Buetow + * vs@dev.buetow.org + */ package prefs.editors; import java.awt.*; @@ -7,26 +11,58 @@ import javax.swing.*; import prefs.*; import utils.*; +// TODO: Auto-generated Javadoc +/** + * The Class VSBetterEditor. + */ public abstract class VSBetterEditor extends VSEditor { + + /** The content pane. */ private Container contentPane; + + /** The info area. */ private VSInfoArea infoArea; + + /** The title. */ private String title; + /** + * Instantiates a new vS better editor. + * + * @param prefs the prefs + * @param prefsToEdit the prefs to edit + * @param title the title + */ public VSBetterEditor(VSPrefs prefs, VSPrefs prefsToEdit, String title) { super(prefs, prefsToEdit); this.title = title; this.contentPane = createContentPane(); } + /** + * Gets the title. + * + * @return the title + */ public String getTitle() { return title; } + /** + * Gets the content pane. + * + * @return the content pane + */ public Container getContentPane() { contentPane.setBackground(Color.WHITE); return contentPane; } + /** + * Creates the content pane. + * + * @return the j panel + */ private JPanel createContentPane() { JPanel panel = new JPanel(); panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS)); @@ -43,10 +79,24 @@ public abstract class VSBetterEditor extends VSEditor { return panel; } + /* (non-Javadoc) + * @see prefs.editors.VSEditor#addToButtonPanelFront(javax.swing.JPanel) + */ protected void addToButtonPanelFront(JPanel buttonPanel) { } + + /* (non-Javadoc) + * @see prefs.editors.VSEditor#addToButtonPanelLast(javax.swing.JPanel) + */ protected void addToButtonPanelLast(JPanel buttonPanel) { } + + /* (non-Javadoc) + * @see prefs.editors.VSEditor#addToEditTableLast() + */ protected void addToEditTableLast() { } + /* (non-Javadoc) + * @see prefs.editors.VSEditor#actionPerformed(java.awt.event.ActionEvent) + */ public void actionPerformed(ActionEvent e) { //String actionCommand = e.getActionCommand(); @@ -54,6 +104,11 @@ public abstract class VSBetterEditor extends VSEditor { super.actionPerformed(e); } + /** + * Gets the info area. + * + * @return the info area + */ protected VSInfoArea getInfoArea() { return infoArea; } diff --git a/sources/prefs/editors/VSColorChooser.java b/sources/prefs/editors/VSColorChooser.java index 8d2009d..d7d5692 100644 --- a/sources/prefs/editors/VSColorChooser.java +++ b/sources/prefs/editors/VSColorChooser.java @@ -1,3 +1,7 @@ +/* + * VS is (c) 2008 by Paul C. Buetow + * vs@dev.buetow.org + */ package prefs.editors; import java.awt.*; @@ -6,12 +10,30 @@ import javax.swing.event.*; import prefs.VSPrefs; +// TODO: Auto-generated Javadoc +/** + * The Class VSColorChooser. + */ public class VSColorChooser extends JPanel implements ChangeListener { + + /** The color chooser. */ protected JColorChooser colorChooser; + + /** The color. */ private Color color; + + /** The val field. */ private JTextField valField; + + /** The prefs. */ private VSPrefs prefs; + /** + * Instantiates a new vS color chooser. + * + * @param prefs the prefs + * @param valField the val field + */ public VSColorChooser(VSPrefs prefs, JTextField valField) { super(new BorderLayout()); this.prefs = prefs; @@ -26,6 +48,9 @@ public class VSColorChooser extends JPanel implements ChangeListener { add(colorChooser, BorderLayout.CENTER); } + /* (non-Javadoc) + * @see javax.swing.event.ChangeListener#stateChanged(javax.swing.event.ChangeEvent) + */ public void stateChanged(ChangeEvent e) { Color newColor = colorChooser.getColor(); valField.setBackground(newColor); diff --git a/sources/prefs/editors/VSEditor.java b/sources/prefs/editors/VSEditor.java index 32f2150..8eda1e0 100644 --- a/sources/prefs/editors/VSEditor.java +++ b/sources/prefs/editors/VSEditor.java @@ -1,3 +1,7 @@ +/* + * VS is (c) 2008 by Paul C. Buetow + * vs@dev.buetow.org + */ package prefs.editors; import java.awt.*; @@ -8,66 +12,171 @@ import java.util.*; import utils.*; import prefs.VSPrefs; +// TODO: Auto-generated Javadoc +/** + * The Class VSEditor. + */ public abstract class VSEditor implements ActionListener { + + /** The boolean keys. */ private ArrayList booleanKeys; + + /** The color keys. */ private ArrayList colorKeys; + + /** The float keys. */ private ArrayList floatKeys; + + /** The integer keys. */ private ArrayList integerKeys; + + /** The long keys. */ private ArrayList longKeys; + + /** The string keys. */ private ArrayList stringKeys; + + /** The boolean fields. */ private HashMap booleanFields; + + /** The integer fields. */ private HashMap integerFields; + + /** The color fields. */ private HashMap colorFields; + + /** The float fields. */ private HashMap floatFields; + + /** The long fields. */ private HashMap longFields; + + /** The string fields. */ private HashMap stringFields; + + /** The prefs to edit map. */ private HashMap prefsToEditMap; + + /** The button panel. */ private JPanel buttonPanel; + + /** The edit panel. */ private JPanel editPanel; + + /** The edit table. */ private VSEditorTable editTable; + + /** The frame. */ private VSFrame frame; + + /** The expert mode changed. */ private boolean expertModeChanged; + + /** The prefs. */ protected VSPrefs prefs; + + /** The prefs to edit. */ protected VSPrefs prefsToEdit; + + /** The Constant MIN_UNIT_LENGTH. */ protected static final int MIN_UNIT_LENGTH = 5; + + /** The Constant VALUE_FIELD_COLS. */ protected static final int VALUE_FIELD_COLS = 9; + + /** The Constant ALL_PREFERENCES. */ public static final int ALL_PREFERENCES = 0; + + /** The Constant SIMULATION_PREFERENCES. */ public static final int SIMULATION_PREFERENCES = 1; + /** + * Instantiates a new vS editor. + * + * @param prefs the prefs + * @param prefsToEdit the prefs to edit + */ public VSEditor(VSPrefs prefs, VSPrefs prefsToEdit) { init(prefs, prefsToEdit); } + /** + * Adds the to button panel front. + * + * @param buttonPanel the button panel + */ abstract protected void addToButtonPanelFront(JPanel buttonPanel); + + /** + * Adds the to button panel last. + * + * @param buttonPanel the button panel + */ abstract protected void addToButtonPanelLast(JPanel buttonPanel); + + /** + * Adds the to edit table last. + */ abstract protected void addToEditTableLast(); + /** + * Sets the prefs. + * + * @param prefs the new prefs + */ public void setPrefs(VSPrefs prefs) { this.prefs = prefs; } + /** + * Sets the prefs to edit. + * + * @param prefsToEdit the new prefs to edit + */ public void setPrefsToEdit(VSPrefs prefsToEdit) { this.prefsToEdit = prefsToEdit; } + /** + * Sets the frame. + * + * @param frame the new frame + */ public void setFrame(VSFrame frame) { this.frame = frame; } + /** + * Gets the frame. + * + * @return the frame + */ public VSFrame getFrame() { return frame; } + /** + * Dispose frame if exists. + */ protected void disposeFrameIfExists() { if (frame != null) frame.dispose(); } + /** + * Dispose frame with parent if exists. + */ protected void disposeFrameWithParentIfExists() { if (frame != null) frame.disposeWithParent(); } + /** + * Inits the. + * + * @param prefs the prefs + * @param prefsToEdit the prefs to edit + */ private void init(VSPrefs prefs, VSPrefs prefsToEdit) { this.prefs = prefs; this.prefsToEdit = prefsToEdit; @@ -94,6 +203,13 @@ public abstract class VSEditor implements ActionListener { fillEditPanel(prefsToEdit); } + /** + * Filter keys. + * + * @param set the set + * + * @return the array list< string> + */ private ArrayList filterKeys(Set set) { ArrayList filtered = new ArrayList(); boolean expertMode = prefs.getBoolean("sim.mode.expert"); @@ -110,6 +226,11 @@ public abstract class VSEditor implements ActionListener { return filtered; } + /** + * Creates the button panel. + * + * @return the j panel + */ private JPanel createButtonPanel() { JPanel buttonPanel = new JPanel(); buttonPanel.setBackground(Color.WHITE); @@ -126,6 +247,14 @@ public abstract class VSEditor implements ActionListener { return buttonPanel; } + /** + * Creates the unit panel. + * + * @param comp the comp + * @param key the key + * + * @return the j panel + */ private JPanel createUnitPanel(Component comp, String key) { JPanel unitPanel = new JPanel(new GridBagLayout()); unitPanel.setBackground(Color.WHITE); @@ -147,6 +276,11 @@ public abstract class VSEditor implements ActionListener { return unitPanel; } + /** + * Creates the edit panel. + * + * @return the j panel + */ private JPanel createEditPanel() { JPanel editPanel = new JPanel(); editPanel.setLayout(new BoxLayout(editPanel, BoxLayout.Y_AXIS)); @@ -159,6 +293,15 @@ public abstract class VSEditor implements ActionListener { return editPanel; } + /** + * Creates the integer component. + * + * @param fullKey the full key + * @param key the key + * @param prefsToEdit the prefs to edit + * + * @return the vS tupel< string, component, j combo box> + */ protected VSTupel createIntegerComponent(String fullKey, String key, VSPrefs prefsToEdit) { String descr = prefsToEdit.getDescription(fullKey); String label = descr == null ? fullKey : descr; @@ -186,6 +329,15 @@ public abstract class VSEditor implements ActionListener { return new VSTupel(label, createUnitPanel(valComboBox, fullKey), valComboBox); } + /** + * Creates the boolean component. + * + * @param fullKey the full key + * @param key the key + * @param prefsToEdit the prefs to edit + * + * @return the vS tupel< string, component, j check box> + */ protected VSTupel createBooleanComponent(String fullKey, String key, VSPrefs prefsToEdit) { final String activated = prefs.getString("lang.activated"); String descr = prefsToEdit.getDescription(fullKey); @@ -196,6 +348,15 @@ public abstract class VSEditor implements ActionListener { return new VSTupel(label, createUnitPanel(valField, fullKey), valField); } + /** + * Creates the long component. + * + * @param fullKey the full key + * @param key the key + * @param prefsToEdit the prefs to edit + * + * @return the vS tupel< string, component, j text field> + */ protected VSTupel createLongComponent(String fullKey, String key, VSPrefs prefsToEdit) { String descr = prefsToEdit.getDescription(fullKey); String label = descr == null ? fullKey : descr; @@ -212,6 +373,15 @@ public abstract class VSEditor implements ActionListener { return new VSTupel(label, createUnitPanel(valField, fullKey), valField); } + /** + * Creates the float component. + * + * @param fullKey the full key + * @param key the key + * @param prefsToEdit the prefs to edit + * + * @return the vS tupel< string, component, j text field> + */ protected VSTupel createFloatComponent(String fullKey, String key, VSPrefs prefsToEdit) { String descr = prefsToEdit.getDescription(fullKey); String label = descr == null ? fullKey : descr; @@ -228,6 +398,15 @@ public abstract class VSEditor implements ActionListener { return new VSTupel(label, createUnitPanel(valField, fullKey), valField); } + /** + * Creates the color component. + * + * @param fullKey the full key + * @param key the key + * @param prefsToEdit the prefs to edit + * + * @return the vS tupel< string, component, j text field> + */ protected VSTupel createColorComponent(String fullKey, String key, final VSPrefs prefsToEdit) { String descr = prefsToEdit.getDescription(fullKey); String label = descr == null ? fullKey : descr; @@ -260,6 +439,15 @@ public abstract class VSEditor implements ActionListener { return new VSTupel(label, createUnitPanel(valField, fullKey), valField); } + /** + * Creates the string component. + * + * @param fullKey the full key + * @param key the key + * @param prefsToEdit the prefs to edit + * + * @return the vS tupel< string, component, j text field> + */ protected VSTupel createStringComponent(String fullKey, String key, VSPrefs prefsToEdit) { String descr = prefsToEdit.getDescription(fullKey); String label = descr == null ? fullKey : descr; @@ -276,6 +464,11 @@ public abstract class VSEditor implements ActionListener { return new VSTupel(label, createUnitPanel(valField, fullKey), valField); } + /** + * Fill edit panel. + * + * @param prefsToEdit the prefs to edit + */ private void fillEditPanel(VSPrefs prefsToEdit) { HashMap components = new HashMap(); HashMap labels = new HashMap(); @@ -398,6 +591,13 @@ public abstract class VSEditor implements ActionListener { editTable.fireTableDataChanged(); } + /** + * Adds the to editor. + * + * @param label the label + * @param prefsKey the prefs key + * @param prefsToAdd the prefs to add + */ protected void addToEditor(String label, String prefsKey, VSPrefs prefsToAdd) { addSeparator(label); prefsKey = "(" + prefsKey + ")"; @@ -459,19 +659,42 @@ public abstract class VSEditor implements ActionListener { } } + /** + * Adds the separator. + * + * @param label the label + */ private void addSeparator(String label) { editTable.addSeparator(label); } + /** + * Adds the variable. + * + * @param label the label + * @param component the component + * @param prefs the prefs + */ private void addVariable(String label, Component component, VSPrefs prefs) { addVariable("", label, component, prefs); } + /** + * Adds the variable. + * + * @param prefsKey the prefs key + * @param label the label + * @param component the component + * @param prefs the prefs + */ private void addVariable(String prefsKey, String label, Component component, VSPrefs prefs) { prefsToEditMap.put(prefsKey, prefs); editTable.addVariable(label, component); } + /** + * Reset edit panel. + */ protected void resetEditPanel() { for (String key : integerKeys) { JComboBox valComboBox = integerFields.get(key); @@ -510,6 +733,10 @@ public abstract class VSEditor implements ActionListener { } /** + * Gets the keys. + * + * @param key the key + * * @return [0] := key, [1] := prefsKey */ private String[] getKeys(String key) { @@ -523,6 +750,9 @@ public abstract class VSEditor implements ActionListener { return keys; } + /** + * Save prefs. + */ protected void savePrefs() { boolean expertMode = prefs.getBoolean("sim.mode.expert"); @@ -585,6 +815,11 @@ public abstract class VSEditor implements ActionListener { expertModeChanged = expertMode != prefs.getBoolean("sim.mode.expert"); } + /** + * Expert mode changed. + * + * @return true, if successful + */ public boolean expertModeChanged() { boolean ret = expertModeChanged; @@ -594,6 +829,9 @@ public abstract class VSEditor implements ActionListener { return ret; } + /* (non-Javadoc) + * @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent) + */ public void actionPerformed(ActionEvent e) { String actionCommand = e.getActionCommand(); @@ -605,14 +843,29 @@ public abstract class VSEditor implements ActionListener { } } + /** + * Gets the edits the panel. + * + * @return the edits the panel + */ public JPanel getEditPanel() { return editPanel; } + /** + * Gets the edits the table. + * + * @return the edits the table + */ public VSEditorTable getEditTable() { return editTable; } + /** + * Gets the button panel. + * + * @return the button panel + */ public JPanel getButtonPanel() { return buttonPanel; } diff --git a/sources/prefs/editors/VSEditorFrame.java b/sources/prefs/editors/VSEditorFrame.java index bd98938..18a5eb6 100644 --- a/sources/prefs/editors/VSEditorFrame.java +++ b/sources/prefs/editors/VSEditorFrame.java @@ -1,3 +1,7 @@ +/* + * VS is (c) 2008 by Paul C. Buetow + * vs@dev.buetow.org + */ package prefs.editors; import java.awt.*; @@ -7,10 +11,25 @@ import javax.swing.*; import prefs.*; import utils.*; +// TODO: Auto-generated Javadoc +/** + * The Class VSEditorFrame. + */ public class VSEditorFrame extends VSFrame implements ActionListener { + + /** The editor. */ private VSBetterEditor editor; + + /** The prefs. */ private VSPrefs prefs; + /** + * Instantiates a new vS editor frame. + * + * @param prefs the prefs + * @param relativeTo the relative to + * @param editor the editor + */ public VSEditorFrame(VSPrefs prefs, Component relativeTo, VSBetterEditor editor) { super(editor.getTitle(), relativeTo); this.prefs = prefs; @@ -18,6 +37,9 @@ public class VSEditorFrame extends VSFrame implements ActionListener { init(); } + /** + * Inits the. + */ private void init() { editor.setFrame(this); fillButtonPanel(editor.getButtonPanel()); @@ -29,6 +51,11 @@ public class VSEditorFrame extends VSFrame implements ActionListener { setVisible(true); } + /** + * Fill button panel. + * + * @param buttonPanel the button panel + */ private void fillButtonPanel(JPanel buttonPanel) { JButton okButton = new JButton( prefs.getString("lang.ok")); @@ -44,6 +71,9 @@ public class VSEditorFrame extends VSFrame implements ActionListener { buttonPanel.repaint(); } + /* (non-Javadoc) + * @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent) + */ public void actionPerformed(ActionEvent e) { String actionCommand = e.getActionCommand(); diff --git a/sources/prefs/editors/VSEditorTable.java b/sources/prefs/editors/VSEditorTable.java index 27c422f..b641f33 100644 --- a/sources/prefs/editors/VSEditorTable.java +++ b/sources/prefs/editors/VSEditorTable.java @@ -1,3 +1,7 @@ +/* + * VS is (c) 2008 by Paul C. Buetow + * vs@dev.buetow.org + */ package prefs.editors; import java.util.*; @@ -9,58 +13,127 @@ import javax.swing.text.*; import prefs.*; +// TODO: Auto-generated Javadoc +/** + * The Class VSEditorTable. + */ public class VSEditorTable extends JTable { + + /** The Constant MIN_ROWS. */ private static final int MIN_ROWS = 20; + + /** The prefs. */ private VSPrefs prefs; + + /** The nodes. */ private ArrayList nodes; + + /** The model. */ private VSEditorTableModel model; + /** + * The Class VSNode. + */ private class VSNode { + + /** The key. */ private String key; + + /** The comp. */ private Component comp; + /** + * Instantiates a new vS node. + * + * @param key the key + */ public VSNode(String key) { this.key = key; } + /** + * Instantiates a new vS node. + * + * @param key the key + * @param comp the comp + */ public VSNode(String key, Component comp) { this.key = key; this.comp = comp; } + /** + * Gets the key. + * + * @return the key + */ public String getKey() { return key; } + /** + * Gets the component. + * + * @return the component + */ public Component getComponent() { return comp; } + /** + * Gets the renderer component. + * + * @return the renderer component + */ public Component getRendererComponent() { return comp; } + /** + * Checks if is separator. + * + * @return true, if is separator + */ public boolean isSeparator() { return comp == null; } } + /** + * The Class VSEditorTableModel. + */ private class VSEditorTableModel extends AbstractTableModel implements TableCellRenderer { + + /** + * Instantiates a new vS editor table model. + */ public VSEditorTableModel() { } + /* (non-Javadoc) + * @see javax.swing.table.AbstractTableModel#getColumnName(int) + */ public String getColumnName(int col) { return ""; } + /* (non-Javadoc) + * @see javax.swing.table.TableModel#getRowCount() + */ public int getRowCount() { return nodes.size(); } + /* (non-Javadoc) + * @see javax.swing.table.TableModel#getColumnCount() + */ public int getColumnCount() { return 2; } + /* (non-Javadoc) + * @see javax.swing.table.TableModel#getValueAt(int, int) + */ public Object getValueAt(int row, int col) { VSNode node = nodes.get(row); @@ -77,6 +150,9 @@ public class VSEditorTable extends JTable { return node.getComponent(); } + /* (non-Javadoc) + * @see javax.swing.table.AbstractTableModel#isCellEditable(int, int) + */ public boolean isCellEditable(int row, int col) { if (col == 0) return false; @@ -87,9 +163,15 @@ public class VSEditorTable extends JTable { return true; } + /* (non-Javadoc) + * @see javax.swing.table.AbstractTableModel#setValueAt(java.lang.Object, int, int) + */ public void setValueAt(Object value, int row, int col) { } + /* (non-Javadoc) + * @see javax.swing.table.TableCellRenderer#getTableCellRendererComponent(javax.swing.JTable, java.lang.Object, boolean, boolean, int, int) + */ public Component getTableCellRendererComponent(JTable table, Object object, boolean isSelected, boolean hasFocus, int row, int col) { @@ -119,18 +201,32 @@ public class VSEditorTable extends JTable { } } + /** + * The Class VSTableCellEditor. + */ private class VSTableCellEditor extends AbstractCellEditor implements TableCellEditor { + /* (non-Javadoc) + * @see javax.swing.table.TableCellEditor#getTableCellEditorComponent(javax.swing.JTable, java.lang.Object, boolean, int, int) + */ public Component getTableCellEditorComponent(JTable table, Object object, boolean isSelected, int row, int col) { return nodes.get(row).getComponent(); } + /* (non-Javadoc) + * @see javax.swing.CellEditor#getCellEditorValue() + */ public Object getCellEditorValue() { return new String(""); } } + /** + * Instantiates a new vS editor table. + * + * @param prefs the prefs + */ public VSEditorTable(VSPrefs prefs) { this.prefs = prefs; this.nodes = new ArrayList(); @@ -151,14 +247,28 @@ public class VSEditorTable extends JTable { col.sizeWidthToFit(); } + /** + * Adds the variable. + * + * @param key the key + * @param comp the comp + */ public void addVariable(String key, Component comp) { nodes.add(new VSNode(key, comp)); } + /** + * Adds the separator. + * + * @param text the text + */ public void addSeparator(String text) { nodes.add(new VSNode(text)); } + /** + * Fire table data changed. + */ public void fireTableDataChanged() { model.fireTableDataChanged(); } diff --git a/sources/prefs/editors/VSProcessEditor.java b/sources/prefs/editors/VSProcessEditor.java index bbd256f..e17f89a 100644 --- a/sources/prefs/editors/VSProcessEditor.java +++ b/sources/prefs/editors/VSProcessEditor.java @@ -1,3 +1,7 @@ +/* + * VS is (c) 2008 by Paul C. Buetow + * vs@dev.buetow.org + */ package prefs.editors; import java.awt.event.*; @@ -9,9 +13,24 @@ import protocols.*; import events.*; import prefs.VSPrefs; +// TODO: Auto-generated Javadoc +/** + * The Class VSProcessEditor. + */ public class VSProcessEditor extends VSBetterEditor { + + /** The process. */ private VSProcess process; + + /** The TAKEOVE r_ button. */ public static boolean TAKEOVER_BUTTON; + + /** + * Instantiates a new vS process editor. + * + * @param prefs the prefs + * @param process the process + */ public VSProcessEditor(VSPrefs prefs, VSProcess process) { super(prefs, process, prefs.getString("lang.name") + " - " + prefs.getString("lang.prefs.process"));; this.process = process; @@ -19,6 +38,9 @@ public class VSProcessEditor extends VSBetterEditor { makeProtocolVariablesEditable(); } + /* (non-Javadoc) + * @see prefs.editors.VSBetterEditor#addToButtonPanelFront(javax.swing.JPanel) + */ protected void addToButtonPanelFront(JPanel buttonPanel) { JButton takeoverButton = new JButton( prefs.getString("lang.takeover")); @@ -27,6 +49,9 @@ public class VSProcessEditor extends VSBetterEditor { buttonPanel.add(takeoverButton); } + /** + * Make protocol variables editable. + */ protected void makeProtocolVariablesEditable() { ArrayList editableProtocolsClassnames = VSRegisteredEvents.getEditableProtocolsClassnames(); @@ -39,6 +64,9 @@ public class VSProcessEditor extends VSBetterEditor { } } + /* (non-Javadoc) + * @see prefs.editors.VSBetterEditor#actionPerformed(java.awt.event.ActionEvent) + */ public void actionPerformed(ActionEvent e) { String actionCommand = e.getActionCommand(); diff --git a/sources/prefs/editors/VSSimulatorEditor.java b/sources/prefs/editors/VSSimulatorEditor.java index 36593ac..1264377 100644 --- a/sources/prefs/editors/VSSimulatorEditor.java +++ b/sources/prefs/editors/VSSimulatorEditor.java @@ -1,3 +1,7 @@ +/* + * VS is (c) 2008 by Paul C. Buetow + * vs@dev.buetow.org + */ package prefs.editors; import java.awt.event.*; @@ -6,12 +10,31 @@ import javax.swing.*; import simulator.*; import prefs.*; +// TODO: Auto-generated Javadoc +/** + * The Class VSSimulatorEditor. + */ public class VSSimulatorEditor extends VSBetterEditor { + + /** The simulator frame. */ private VSSimulatorFrame simulatorFrame; + + /** The simulation. */ private VSSimulator simulation; + + /** The TAKEOVE r_ button. */ public static boolean TAKEOVER_BUTTON; + + /** The dont start new simulation. */ private boolean dontStartNewSimulation; + /** + * Instantiates a new vS simulator editor. + * + * @param prefs the prefs + * @param simulatorFrame the simulator frame + * @param simulation the simulation + */ public VSSimulatorEditor(VSPrefs prefs, VSSimulatorFrame simulatorFrame, VSSimulator simulation) { super(prefs, prefs, prefs.getString("lang.name") + " - " + prefs.getString("lang.prefs")); @@ -20,12 +43,21 @@ public class VSSimulatorEditor extends VSBetterEditor { this.simulation = simulation; } + /** + * Instantiates a new vS simulator editor. + * + * @param prefs the prefs + * @param simulatorFrame the simulator frame + */ public VSSimulatorEditor(VSPrefs prefs, VSSimulatorFrame simulatorFrame) { super(prefs, prefs, prefs.getString("lang.name") + " - " + prefs.getString("lang.prefs")); this.simulatorFrame = simulatorFrame; } + /* (non-Javadoc) + * @see prefs.editors.VSBetterEditor#addToButtonPanelFront(javax.swing.JPanel) + */ protected void addToButtonPanelFront(JPanel buttonPanel) { if (TAKEOVER_BUTTON) { TAKEOVER_BUTTON = false; @@ -37,6 +69,9 @@ public class VSSimulatorEditor extends VSBetterEditor { } } + /* (non-Javadoc) + * @see prefs.editors.VSBetterEditor#actionPerformed(java.awt.event.ActionEvent) + */ public void actionPerformed(ActionEvent e) { String actionCommand = e.getActionCommand(); -- cgit v1.2.3