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.StringCANCEL_NAMEstatic java.lang.StringOK_NAME
-
Constructor Summary
Constructors Constructor Description ColorTableCellEditor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.awt.WindowcreateWindow(java.awt.Window owner)Create the popup window.java.lang.ObjectgetCellEditorValue()protected java.awt.PointgetPopupLocation()Default implementation returns the top left corner of the table cell.java.awt.ComponentgetTableCellEditorComponent(javax.swing.JTable table, java.lang.Object value, boolean isSelected, int row, int column)protected voidhidePopup()Hide the popup window if it is showing.protected voidshowPopup()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:
getTableCellEditorComponentin interfacejavax.swing.table.TableCellEditor- Overrides:
getTableCellEditorComponentin classPopupTableCellEditor
-
getCellEditorValue
public java.lang.Object getCellEditorValue()
-
getPopupLocation
protected java.awt.Point getPopupLocation()
Description copied from class:PopupTableCellEditorDefault implementation returns the top left corner of the table cell.- Overrides:
getPopupLocationin classPopupTableCellEditor
-
createWindow
protected java.awt.Window createWindow(java.awt.Window owner)
Description copied from class:PopupTableCellEditorCreate the popup window.- Specified by:
createWindowin classPopupTableCellEditor- Parameters:
owner- the window containing the table
-
showPopup
protected void showPopup()
Description copied from class:PopupTableCellEditorShow the popup window.- Overrides:
showPopupin classPopupTableCellEditor
-
hidePopup
protected void hidePopup()
Description copied from class:PopupTableCellEditorHide the popup window if it is showing.- Overrides:
hidePopupin classPopupTableCellEditor
-
-