Class ComboBoxCell
java.lang.Object
javax.swing.AbstractCellEditor
javax.swing.DefaultCellEditor
table.ComboBoxCell
- All Implemented Interfaces:
ActionListener, Serializable, EventListener, CellEditor, TableCellEditor, TableCellRenderer, TreeCellEditor
public class ComboBoxCell
extends DefaultCellEditor
implements TableCellRenderer, TableCellEditor, ActionListener
Created by IntelliJ IDEA.
User: OrsotronIII
Date: 8-mar-2005
Time: 8.41.48
This class allows multiple-choice table cells to be rendered as combobox instead of
simple text fields. This gives users a more understandable view of a table GUI.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class DefaultCellEditor
DefaultCellEditor.EditorDelegate -
Field Summary
Fields inherited from class DefaultCellEditor
clickCountToStart, delegate, editorComponentFields inherited from class AbstractCellEditor
changeEvent, listenerList -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidReturns combo box contained into this renderer.getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column) getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) Methods inherited from class DefaultCellEditor
cancelCellEditing, getCellEditorValue, getClickCountToStart, getComponent, getTreeCellEditorComponent, isCellEditable, setClickCountToStart, shouldSelectCell, stopCellEditingMethods inherited from class AbstractCellEditor
addCellEditorListener, fireEditingCanceled, fireEditingStopped, getCellEditorListeners, removeCellEditorListenerMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface CellEditor
addCellEditorListener, cancelCellEditing, getCellEditorValue, isCellEditable, removeCellEditorListener, shouldSelectCell, stopCellEditing
-
Constructor Details
-
ComboBoxCell
-
-
Method Details
-
getTableCellRendererComponent
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) - Specified by:
getTableCellRendererComponentin interfaceTableCellRenderer
-
getComboBox
Returns combo box contained into this renderer. This provides further customization capabilities.- Returns:
- :ComboBox to be rendered.
-
getTableCellEditorComponent
public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column) - Specified by:
getTableCellEditorComponentin interfaceTableCellEditor- Overrides:
getTableCellEditorComponentin classDefaultCellEditor
-
actionPerformed
- Specified by:
actionPerformedin interfaceActionListener
-