mavis.gui
Class StyledCellEditor

java.lang.Object
  extended by javax.swing.AbstractCellEditor
      extended by javax.swing.DefaultCellEditor
          extended by mavis.gui.StyledCellEditor
All Implemented Interfaces:
java.io.Serializable, javax.swing.CellEditor, javax.swing.table.TableCellEditor, javax.swing.tree.TreeCellEditor

public class StyledCellEditor
extends javax.swing.DefaultCellEditor

CellEditor to compliment StyledTableCellRenderer. Applies the horizontalAlignment, foreground and font styles to the component returned by another cell editor. Unless otherwise specified, uses a DefaultCellEditor.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.DefaultCellEditor
javax.swing.DefaultCellEditor.EditorDelegate
 
Field Summary
 
Fields inherited from class javax.swing.DefaultCellEditor
clickCountToStart, delegate, editorComponent
 
Fields inherited from class javax.swing.AbstractCellEditor
changeEvent, listenerList
 
Constructor Summary
StyledCellEditor(javax.swing.JCheckBox checkBox)
          Constructs a StyledCellEditor object that uses a check box.
StyledCellEditor(javax.swing.JComboBox comboBox)
          Constructs a StyledCellEditor object that uses a combo box.
StyledCellEditor(javax.swing.JTextField textField)
          Constructs a StyledCellEditor that uses a text field.
 
Method Summary
 java.awt.Component getTableCellEditorComponent(javax.swing.JTable table, java.lang.Object value, boolean isSelected, int row, int column)
          Implements the TableCellEditor interface.
 java.awt.Component getTreeCellEditorComponent(javax.swing.JTree tree, java.lang.Object value, boolean isSelected, boolean expanded, boolean leaf, int row)
          Implements the TreeCellEditor interface.
 
Methods inherited from class javax.swing.DefaultCellEditor
cancelCellEditing, getCellEditorValue, getClickCountToStart, getComponent, isCellEditable, setClickCountToStart, shouldSelectCell, stopCellEditing
 
Methods inherited from class javax.swing.AbstractCellEditor
addCellEditorListener, fireEditingCanceled, fireEditingStopped, getCellEditorListeners, removeCellEditorListener
 
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, removeCellEditorListener
 
Methods inherited from interface javax.swing.CellEditor
addCellEditorListener, removeCellEditorListener
 

Constructor Detail

StyledCellEditor

public StyledCellEditor(javax.swing.JTextField textField)
Constructs a StyledCellEditor that uses a text field.

Parameters:
textField - a JTextField object

StyledCellEditor

public StyledCellEditor(javax.swing.JCheckBox checkBox)
Constructs a StyledCellEditor object that uses a check box.

Parameters:
checkBox - a JCheckBox object

StyledCellEditor

public StyledCellEditor(javax.swing.JComboBox comboBox)
Constructs a StyledCellEditor object that uses a combo box.

Parameters:
comboBox - a JComboBox object
Method Detail

getTreeCellEditorComponent

public java.awt.Component getTreeCellEditorComponent(javax.swing.JTree tree,
                                                     java.lang.Object value,
                                                     boolean isSelected,
                                                     boolean expanded,
                                                     boolean leaf,
                                                     int row)
Implements the TreeCellEditor interface.

Specified by:
getTreeCellEditorComponent in interface javax.swing.tree.TreeCellEditor
Overrides:
getTreeCellEditorComponent in class javax.swing.DefaultCellEditor

getTableCellEditorComponent

public java.awt.Component getTableCellEditorComponent(javax.swing.JTable table,
                                                      java.lang.Object value,
                                                      boolean isSelected,
                                                      int row,
                                                      int column)
Implements the TableCellEditor interface.

Specified by:
getTableCellEditorComponent in interface javax.swing.table.TableCellEditor
Overrides:
getTableCellEditorComponent in class javax.swing.DefaultCellEditor