Class ColorCellEditor

java.lang.Object
javax.swing.AbstractCellEditor
jaxx.runtime.swing.editor.ColorCellEditor
All Implemented Interfaces:
java.awt.event.ActionListener, java.io.Serializable, java.util.EventListener, javax.swing.CellEditor, javax.swing.table.TableCellEditor

public class ColorCellEditor
extends javax.swing.AbstractCellEditor
implements javax.swing.table.TableCellEditor, java.awt.event.ActionListener
A Color cell editor.
Since:
2.5.4
Author:
Matthieu Allon, Tony Chemit - chemit@codelutin.com
See Also:
Serialized Form
  • Field Summary

    Fields
    Modifier and Type Field Description
    protected javax.swing.JButton button  
    protected javax.swing.JColorChooser colorChooser  
    protected java.awt.Color currentColor  
    protected javax.swing.JDialog dialog  
    protected static java.lang.String EDIT  

    Fields inherited from class javax.swing.AbstractCellEditor

    changeEvent, listenerList
  • Constructor Summary

    Constructors
    Constructor Description
    ColorCellEditor()  
  • Method Summary

    Modifier and Type Method Description
    void actionPerformed​(java.awt.event.ActionEvent e)
    Handles events from the editor button and from the dialog's OK button.
    java.awt.Color getCellEditorValue()  
    java.awt.Component getTableCellEditorComponent​(javax.swing.JTable table, java.lang.Object value, boolean isSelected, int row, int column)  
    protected static java.lang.String toBrowserHexValue​(int number)  
    protected static java.lang.String toHex​(int r, int g, int b)  

    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 Details

    • currentColor

      protected java.awt.Color currentColor
    • button

      protected javax.swing.JButton button
    • colorChooser

      protected javax.swing.JColorChooser colorChooser
    • dialog

      protected javax.swing.JDialog dialog
    • EDIT

      protected static final java.lang.String EDIT
      See Also:
      Constant Field Values
  • Constructor Details

    • ColorCellEditor

      public ColorCellEditor()
  • Method Details

    • actionPerformed

      public void actionPerformed​(java.awt.event.ActionEvent e)
      Handles events from the editor button and from the dialog's OK button.
      Specified by:
      actionPerformed in interface java.awt.event.ActionListener
    • getCellEditorValue

      public java.awt.Color getCellEditorValue()
      Specified by:
      getCellEditorValue in interface javax.swing.CellEditor
    • toHex

      protected static java.lang.String toHex​(int r, int g, int b)
    • toBrowserHexValue

      protected static java.lang.String toBrowserHexValue​(int number)
    • getTableCellEditorComponent

      public java.awt.Component getTableCellEditorComponent​(javax.swing.JTable table, java.lang.Object value, boolean isSelected, int row, int column)
      Specified by:
      getTableCellEditorComponent in interface javax.swing.table.TableCellEditor