Class SpinnerCellEditor
java.lang.Object
javax.swing.AbstractCellEditor
be.gaudry.swing.component.table.editors.SpinnerCellEditor
- All Implemented Interfaces:
Serializable
,CellEditor
,TableCellEditor
Cell editor showing a single line input field that lets the user select a number
or an object value from an ordered sequence.
Provided by the broldev.core.swing project.
- Since:
- 1.0 (Dec 26, 2008), broldev.core.swing 0.0.1-SNAPSHOT dependency
- Version:
- 1.0 (Dec 26, 2008)
- Author:
- Steph GAUDRY
- See Also:
- Serialized Form
-
Field Summary
Fields inherited from class javax.swing.AbstractCellEditor
changeEvent, listenerList
-
Constructor Summary
ConstructorDescriptionBuilds an instance to edit numbers between 1 and 99000 and a step equals to 1SpinnerCellEditor(SpinnerModel model)
Builds an instance with a custom model. -
Method Summary
Modifier and TypeMethodDescriptiongetTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column)
void
setModel(SpinnerModel model)
Customize spinner to set specific default value, min, max, and step.Methods inherited from class javax.swing.AbstractCellEditor
addCellEditorListener, cancelCellEditing, fireEditingCanceled, fireEditingStopped, getCellEditorListeners, isCellEditable, removeCellEditorListener, shouldSelectCell, stopCellEditing
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, cancelCellEditing, isCellEditable, removeCellEditorListener, shouldSelectCell, stopCellEditing
-
Constructor Details
-
SpinnerCellEditor
public SpinnerCellEditor()Builds an instance to edit numbers between 1 and 99000 and a step equals to 1 -
SpinnerCellEditor
Builds an instance with a custom model.- Parameters:
model
- for the sequence of values
-
-
Method Details
-
setModel
Customize spinner to set specific default value, min, max, and step.- Parameters:
model
- for the sequence of values
-
getTableCellEditorComponent
public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column)- Specified by:
getTableCellEditorComponent
in interfaceTableCellEditor
-
getCellEditorValue
- Specified by:
getCellEditorValue
in interfaceCellEditor
-