Package net.sf.freecol.client.gui.panel
Class ColorCellEditor
- java.lang.Object
-
- javax.swing.AbstractCellEditor
-
- net.sf.freecol.client.gui.panel.ColorCellEditor
-
- All Implemented Interfaces:
java.awt.event.ActionListener
,java.io.Serializable
,java.util.EventListener
,javax.swing.CellEditor
,javax.swing.table.TableCellEditor
public final class ColorCellEditor extends javax.swing.AbstractCellEditor implements javax.swing.table.TableCellEditor, java.awt.event.ActionListener
A table cell editor that can be used to edit colors.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private ColorChooserPanel
colorChooserPanel
private javax.swing.JButton
colorEditButton
private java.awt.Color
currentColor
private FreeColClient
freeColClient
private static java.util.logging.Logger
logger
-
Constructor Summary
Constructors Constructor Description ColorCellEditor(FreeColClient freeColClient)
The constructor to use.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
actionPerformed(java.awt.event.ActionEvent ae)
java.lang.Object
getCellEditorValue()
java.awt.Component
getTableCellEditorComponent(javax.swing.JTable table, java.lang.Object value, boolean hasFocus, int row, int column)
-
Methods inherited from class javax.swing.AbstractCellEditor
addCellEditorListener, cancelCellEditing, fireEditingCanceled, fireEditingStopped, getCellEditorListeners, isCellEditable, removeCellEditorListener, shouldSelectCell, stopCellEditing
-
-
-
-
Field Detail
-
logger
private static final java.util.logging.Logger logger
-
freeColClient
private final FreeColClient freeColClient
-
colorEditButton
private final javax.swing.JButton colorEditButton
-
colorChooserPanel
private ColorChooserPanel colorChooserPanel
-
currentColor
private java.awt.Color currentColor
-
-
Constructor Detail
-
ColorCellEditor
public ColorCellEditor(FreeColClient freeColClient)
The constructor to use.- Parameters:
freeColClient
- The top level component that holds all other components.
-
-
Method Detail
-
getTableCellEditorComponent
public java.awt.Component getTableCellEditorComponent(javax.swing.JTable table, java.lang.Object value, boolean hasFocus, int row, int column)
- Specified by:
getTableCellEditorComponent
in interfacejavax.swing.table.TableCellEditor
-
getCellEditorValue
public java.lang.Object getCellEditorValue()
- Specified by:
getCellEditorValue
in interfacejavax.swing.CellEditor
-
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent ae)
- Specified by:
actionPerformed
in interfacejava.awt.event.ActionListener
-
-