Package io.github.jonestimd.swing.table
Class ColorTableCellEditor
- java.lang.Object
-
- javax.swing.AbstractCellEditor
-
- io.github.jonestimd.swing.table.PopupTableCellEditor
-
- io.github.jonestimd.swing.table.ColorTableCellEditor
-
- All Implemented Interfaces:
java.io.Serializable
,javax.swing.CellEditor
,javax.swing.table.TableCellEditor
public class ColorTableCellEditor extends PopupTableCellEditor
A table cell editor for selecting a color. Displays a JColorChooser in a popup window.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
CANCEL_NAME
static java.lang.String
OK_NAME
-
Constructor Summary
Constructors Constructor Description ColorTableCellEditor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.awt.Window
createWindow(java.awt.Window owner)
Create the popup window.java.lang.Object
getCellEditorValue()
protected java.awt.Point
getPopupLocation()
Default implementation returns the top left corner of the table cell.java.awt.Component
getTableCellEditorComponent(javax.swing.JTable table, java.lang.Object value, boolean isSelected, int row, int column)
protected void
hidePopup()
Hide the popup window if it is showing.protected void
showPopup()
Show the popup window.-
Methods inherited from class io.github.jonestimd.swing.table.PopupTableCellEditor
fireEditingCanceled, fireEditingStopped, getTableCellSize
-
Methods inherited from class javax.swing.AbstractCellEditor
addCellEditorListener, cancelCellEditing, getCellEditorListeners, isCellEditable, removeCellEditorListener, shouldSelectCell, stopCellEditing
-
-
-
-
Method Detail
-
getTableCellEditorComponent
public java.awt.Component getTableCellEditorComponent(javax.swing.JTable table, java.lang.Object value, boolean isSelected, int row, int column)
- Specified by:
getTableCellEditorComponent
in interfacejavax.swing.table.TableCellEditor
- Overrides:
getTableCellEditorComponent
in classPopupTableCellEditor
-
getCellEditorValue
public java.lang.Object getCellEditorValue()
-
getPopupLocation
protected java.awt.Point getPopupLocation()
Description copied from class:PopupTableCellEditor
Default implementation returns the top left corner of the table cell.- Overrides:
getPopupLocation
in classPopupTableCellEditor
-
createWindow
protected java.awt.Window createWindow(java.awt.Window owner)
Description copied from class:PopupTableCellEditor
Create the popup window.- Specified by:
createWindow
in classPopupTableCellEditor
- Parameters:
owner
- the window containing the table
-
showPopup
protected void showPopup()
Description copied from class:PopupTableCellEditor
Show the popup window.- Overrides:
showPopup
in classPopupTableCellEditor
-
hidePopup
protected void hidePopup()
Description copied from class:PopupTableCellEditor
Hide the popup window if it is showing.- Overrides:
hidePopup
in classPopupTableCellEditor
-
-