FreeHEP API
Version v1.2.2

org.freehep.util.parameterdatabase.editor
Class SelectorEditor

java.lang.Object
  |
  +--javax.swing.AbstractCellEditor
        |
        +--javax.swing.DefaultCellEditor
              |
              +--org.freehep.util.parameterdatabase.editor.SelectorEditor
All Implemented Interfaces:
CellEditor, Serializable, TableCellEditor, TreeCellEditor

public class SelectorEditor
extends DefaultCellEditor

This is a generic editor which allows all subclasses of the Selector class to be edited in a table or tree with a JComboBox.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.swing.DefaultCellEditor
clickCountToStart, delegate, editorComponent
 
Fields inherited from class javax.swing.AbstractCellEditor
changeEvent, listenerList
 
Constructor Summary
SelectorEditor()
           
 
Method Summary
 Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column)
          This sets the initial value for the editor.
 Component getTreeCellEditorComponent(JTree tree, Object value, boolean isSelected, boolean expanded, boolean leaf, int row)
          This sets the initial value for the editor.
 
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
 

Constructor Detail

SelectorEditor

public SelectorEditor()
Method Detail

getTableCellEditorComponent

public Component getTableCellEditorComponent(JTable table,
                                             Object value,
                                             boolean isSelected,
                                             int row,
                                             int column)
This sets the initial value for the editor. We override this to ensure that the underlying JComboBox has the correct values loaded into it.

Specified by:
getTableCellEditorComponent in interface TableCellEditor
Overrides:
getTableCellEditorComponent in class DefaultCellEditor

getTreeCellEditorComponent

public Component getTreeCellEditorComponent(JTree tree,
                                            Object value,
                                            boolean isSelected,
                                            boolean expanded,
                                            boolean leaf,
                                            int row)
This sets the initial value for the editor. We override this to ensure that the underlying JComboBox has the correct values loaded into it.

Specified by:
getTreeCellEditorComponent in interface TreeCellEditor
Overrides:
getTreeCellEditorComponent in class DefaultCellEditor

FreeHEP API
Version v1.2.2

Copyright © 2000-2003 FreeHEP, All Rights Reserved.