gui.tables
Class ColorEditor

java.lang.Object
  extended by javax.swing.AbstractCellEditor
      extended by gui.tables.ColorEditor
All Implemented Interfaces:
java.awt.event.ActionListener, java.io.Serializable, java.util.EventListener, javax.swing.CellEditor, javax.swing.table.TableCellEditor

public class ColorEditor
extends javax.swing.AbstractCellEditor
implements javax.swing.table.TableCellEditor, java.awt.event.ActionListener

Cell Editor to choose a color for a Cluster.

See Also:
Serialized Form

Field Summary
private  javax.swing.JButton button
          The button.
private  java.awt.Color currentColor
          The current color.
protected static java.lang.String EDIT
          The Constant EDIT.
(package private) static boolean printLog
          Flag to enable debug message printing for this class.
(package private) static long serialVersionUID
          The version tracking unique identifier for Serialization.
 
Fields inherited from class javax.swing.AbstractCellEditor
changeEvent, listenerList
 
Constructor Summary
ColorEditor()
          Instantiates a new color editor.
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
          Handles events from the editor button and from the dialog's OK button.
 java.lang.Object getCellEditorValue()
           
 java.awt.Component getTableCellEditorComponent(javax.swing.JTable table, java.lang.Object value, boolean isSelected, int row, int column)
           
private  void log(java.lang.String message)
          Prints debug information to stdout when printLog is set to true.
 
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

serialVersionUID

static final long serialVersionUID
The version tracking unique identifier for Serialization.

See Also:
Constant Field Values

printLog

static final boolean printLog
Flag to enable debug message printing for this class.

See Also:
Constant Field Values

currentColor

private java.awt.Color currentColor
The current color.


button

private javax.swing.JButton button
The button.


EDIT

protected static final java.lang.String EDIT
The Constant EDIT.

See Also:
Constant Field Values
Constructor Detail

ColorEditor

public ColorEditor()
Instantiates a new color editor.

Method Detail

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
Parameters:
e - the event

getCellEditorValue

public java.lang.Object getCellEditorValue()
Specified by:
getCellEditorValue in interface javax.swing.CellEditor

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

log

private void log(java.lang.String message)
Prints debug information to stdout when printLog is set to true.

Parameters:
message - the message