Class ColorEditor
- java.lang.Object
-
- javax.swing.AbstractCellEditor
-
- org.bidib.wizard.mvc.common.view.table.ColorEditor
-
- All Implemented Interfaces:
ActionListener,Serializable,EventListener,CellEditor,TableCellEditor
public class ColorEditor extends AbstractCellEditor implements TableCellEditor, ActionListener
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceColorEditor.ColorChooserValueUpdate
-
Field Summary
Fields Modifier and Type Field Description protected static StringEDITprotected static StringOK-
Fields inherited from class javax.swing.AbstractCellEditor
changeEvent, listenerList
-
-
Constructor Summary
Constructors Constructor Description ColorEditor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidactionPerformed(ActionEvent e)ObjectgetCellEditorValue()ComponentgetTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column)bytereduceColor(Color color)Reduce a 32-bit RGB color to a 8-bit 3-3-2 color.voidsetColorChooserValueUpdate(ColorEditor.ColorChooserValueUpdate chooserValueUpdate)-
Methods inherited from class javax.swing.AbstractCellEditor
addCellEditorListener, cancelCellEditing, fireEditingCanceled, fireEditingStopped, getCellEditorListeners, isCellEditable, removeCellEditorListener, shouldSelectCell, stopCellEditing
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface javax.swing.CellEditor
addCellEditorListener, cancelCellEditing, isCellEditable, removeCellEditorListener, shouldSelectCell, stopCellEditing
-
-
-
-
Field Detail
-
EDIT
protected static final String EDIT
- See Also:
- Constant Field Values
-
OK
protected static final String OK
- See Also:
- Constant Field Values
-
-
Method Detail
-
setColorChooserValueUpdate
public void setColorChooserValueUpdate(ColorEditor.ColorChooserValueUpdate chooserValueUpdate)
-
actionPerformed
public void actionPerformed(ActionEvent e)
- Specified by:
actionPerformedin interfaceActionListener
-
reduceColor
public byte reduceColor(Color color)
Reduce a 32-bit RGB color to a 8-bit 3-3-2 color.- Parameters:
color- the 32-bit RGB color- Returns:
- the 8-bit 3-3-2 color
-
getCellEditorValue
public Object getCellEditorValue()
- Specified by:
getCellEditorValuein interfaceCellEditor
-
getTableCellEditorComponent
public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column)
- Specified by:
getTableCellEditorComponentin interfaceTableCellEditor
-
-