Package rma.swing.table
Class RmaCellEditor
java.lang.Object
javax.swing.AbstractCellEditor
rma.swing.table.RmaCellEditor
- All Implemented Interfaces:
Serializable
,CellEditor
,TableCellEditor
,TreeCellEditor
- Direct Known Subclasses:
RmaJTable.OneClickCheckBoxEditor
The editor for table and tree cells.
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected int
protected double
protected int
protected int
protected RmaCellEditor.EditorDelegate
protected JComponent
Fields inherited from class javax.swing.AbstractCellEditor
changeEvent, listenerList
-
Constructor Summary
ConstructorsConstructorDescriptionRmaCellEditor
(JButton button) RmaCellEditor
(JComboBox comboBox) Constructs a RMACellEditor object that uses a combo box.RmaCellEditor
(JTextArea textArea, boolean addScrollPane) Constructs a RMACellEditor that uses a text Area.RmaCellEditor
(JTextField textField) RmaCellEditor
(JToggleButton checkBoxOrRadio) Constructs a RMACellEditor object that uses a check box.RmaCellEditor
(RmaJDecimalField textField) Constructs a RMACellEditor that uses a text field.RmaCellEditor
(RmaJDescriptionField descField) Constructs a RMACellEditor that uses a text Area.RmaCellEditor
(RmaJIntegerField textField) Constructs a RMACellEditor that uses a text field. -
Method Summary
Modifier and TypeMethodDescriptionvoid
protected void
protected void
int
ClickCountToStart controls the number of clicks required to start editing.Returns the a reference to the editor component.double
int
int
getTableCellEditorComponent
(JTable table, Object value, boolean isSelected, int row, int column) getTreeCellEditorComponent
(JTree tree, Object value, boolean isSelected, boolean expanded, boolean leaf, int row) int
boolean
isCellEditable
(EventObject anEvent) void
setClickCountToStart
(int count) Specifies the number of clicks needed to start editing.void
setDisplayScaleFactor
(int paramId, double scale) void
setDisplayUnitSystem
(int unitSystem) void
setUnitSystem
(int unitSystem) boolean
shouldSelectCell
(EventObject anEvent) boolean
Methods inherited from class javax.swing.AbstractCellEditor
addCellEditorListener, getCellEditorListeners, removeCellEditorListener
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface javax.swing.CellEditor
addCellEditorListener, removeCellEditorListener
-
Field Details
-
editorComponent
-
delegate
-
clickCountToStart
protected int clickCountToStart -
_unitSystem
protected int _unitSystem -
_paramScaleId
protected int _paramScaleId -
_scaleFactor
protected double _scaleFactor
-
-
Constructor Details
-
RmaCellEditor
public RmaCellEditor() -
RmaCellEditor
-
RmaCellEditor
Constructs a RMACellEditor that uses a text field.- Parameters:
textField
- a JTextField object ...
-
RmaCellEditor
Constructs a RMACellEditor that uses a text field.- Parameters:
textField
- a RmaIntegerField object ...
-
RmaCellEditor
Constructs a RMACellEditor that uses a text Area.- Parameters:
textArea
- a JTextArea object ...
-
RmaCellEditor
Constructs a RMACellEditor that uses a text Area.- Parameters:
descField
- a JTextArea object ...
-
RmaCellEditor
Constructs a RMACellEditor object that uses a check box.- Parameters:
checkBoxOrRadio
- a JCheckBox object ...
-
RmaCellEditor
Constructs a RMACellEditor object that uses a combo box.- Parameters:
comboBox
- a JComboBox object ...
-
RmaCellEditor
-
-
Method Details
-
getComponent
Returns the a reference to the editor component.- Returns:
- the editor Component
-
getEditorComponent
-
setDisplayUnitSystem
public void setDisplayUnitSystem(int unitSystem) -
getDisplayUnitSystem
public int getDisplayUnitSystem() -
setDisplayScaleFactor
public void setDisplayScaleFactor(int paramId, double scale) -
getDisplayScaleFactor
public double getDisplayScaleFactor() -
setClickCountToStart
public void setClickCountToStart(int count) Specifies the number of clicks needed to start editing.- Parameters:
count
- an int specifying the number of clicks needed to start editing- See Also:
-
getClickCountToStart
public int getClickCountToStart()ClickCountToStart controls the number of clicks required to start editing. -
getParamScaleId
public int getParamScaleId() -
getUnitSystem
public int getUnitSystem() -
setUnitSystem
public void setUnitSystem(int unitSystem) -
getCellEditorValue
- Specified by:
getCellEditorValue
in interfaceCellEditor
-
isCellEditable
- Specified by:
isCellEditable
in interfaceCellEditor
- Overrides:
isCellEditable
in classAbstractCellEditor
-
shouldSelectCell
- Specified by:
shouldSelectCell
in interfaceCellEditor
- Overrides:
shouldSelectCell
in classAbstractCellEditor
-
stopCellEditing
public boolean stopCellEditing()- Specified by:
stopCellEditing
in interfaceCellEditor
- Overrides:
stopCellEditing
in classAbstractCellEditor
-
cancelCellEditing
public void cancelCellEditing()- Specified by:
cancelCellEditing
in interfaceCellEditor
- Overrides:
cancelCellEditing
in classAbstractCellEditor
-
getTreeCellEditorComponent
public Component getTreeCellEditorComponent(JTree tree, Object value, boolean isSelected, boolean expanded, boolean leaf, int row) - Specified by:
getTreeCellEditorComponent
in interfaceTreeCellEditor
-
getTableCellEditorComponent
public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column) - Specified by:
getTableCellEditorComponent
in interfaceTableCellEditor
-
fireEditingStopped
protected void fireEditingStopped()- Overrides:
fireEditingStopped
in classAbstractCellEditor
-
fireEditingCanceled
protected void fireEditingCanceled()- Overrides:
fireEditingCanceled
in classAbstractCellEditor
-