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 intprotected doubleprotected intprotected intprotected RmaCellEditor.EditorDelegateprotected JComponentFields 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 TypeMethodDescriptionvoidprotected voidprotected voidintClickCountToStart controls the number of clicks required to start editing.Returns the a reference to the editor component.doubleintintgetTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column) getTreeCellEditorComponent(JTree tree, Object value, boolean isSelected, boolean expanded, boolean leaf, int row) intbooleanisCellEditable(EventObject anEvent) voidsetClickCountToStart(int count) Specifies the number of clicks needed to start editing.voidsetDisplayScaleFactor(int paramId, double scale) voidsetDisplayUnitSystem(int unitSystem) voidsetUnitSystem(int unitSystem) booleanshouldSelectCell(EventObject anEvent) booleanMethods inherited from class javax.swing.AbstractCellEditor
addCellEditorListener, getCellEditorListeners, removeCellEditorListenerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:
getCellEditorValuein interfaceCellEditor
-
isCellEditable
- Specified by:
isCellEditablein interfaceCellEditor- Overrides:
isCellEditablein classAbstractCellEditor
-
shouldSelectCell
- Specified by:
shouldSelectCellin interfaceCellEditor- Overrides:
shouldSelectCellin classAbstractCellEditor
-
stopCellEditing
public boolean stopCellEditing()- Specified by:
stopCellEditingin interfaceCellEditor- Overrides:
stopCellEditingin classAbstractCellEditor
-
cancelCellEditing
public void cancelCellEditing()- Specified by:
cancelCellEditingin interfaceCellEditor- Overrides:
cancelCellEditingin classAbstractCellEditor
-
getTreeCellEditorComponent
public Component getTreeCellEditorComponent(JTree tree, Object value, boolean isSelected, boolean expanded, boolean leaf, int row) - Specified by:
getTreeCellEditorComponentin interfaceTreeCellEditor
-
getTableCellEditorComponent
public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column) - Specified by:
getTableCellEditorComponentin interfaceTableCellEditor
-
fireEditingStopped
protected void fireEditingStopped()- Overrides:
fireEditingStoppedin classAbstractCellEditor
-
fireEditingCanceled
protected void fireEditingCanceled()- Overrides:
fireEditingCanceledin classAbstractCellEditor
-