public class ColorCellEditor extends AbstractCellEditor implements TableCellEditor, ActionListener
Color cell editor.| Modifier and Type | Field and Description |
|---|---|
protected JButton |
button |
protected JColorChooser |
colorChooser |
protected Color |
currentColor |
protected JDialog |
dialog |
protected static String |
EDIT |
changeEvent, listenerList| Constructor and Description |
|---|
ColorCellEditor() |
| Modifier and Type | Method and Description |
|---|---|
void |
actionPerformed(ActionEvent e)
Handles events from the editor button and from
the dialog's OK button.
|
Color |
getCellEditorValue() |
Component |
getTableCellEditorComponent(JTable table,
Object value,
boolean isSelected,
int row,
int column) |
protected static String |
toBrowserHexValue(int number) |
protected static String |
toHex(int r,
int g,
int b) |
addCellEditorListener, cancelCellEditing, fireEditingCanceled, fireEditingStopped, getCellEditorListeners, isCellEditable, removeCellEditorListener, shouldSelectCell, stopCellEditingclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddCellEditorListener, cancelCellEditing, isCellEditable, removeCellEditorListener, shouldSelectCell, stopCellEditingprotected Color currentColor
protected final JButton button
protected final JColorChooser colorChooser
protected final JDialog dialog
protected static final String EDIT
public void actionPerformed(ActionEvent e)
actionPerformed in interface ActionListenerpublic Color getCellEditorValue()
getCellEditorValue in interface CellEditorprotected static String toHex(int r, int g, int b)
protected static String toBrowserHexValue(int number)
public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column)
getTableCellEditorComponent in interface TableCellEditorCopyright © 2008–2018 Ultreia.io. All rights reserved.