FreeHEP API
Version current

org.freehep.util.parameterdatabase.editor
Class SelectorEditor

java.lang.Object
  extended byjavax.swing.AbstractCellEditor
      extended byjavax.swing.DefaultCellEditor
          extended byorg.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
Source Code:
SelectorEditor.java

Nested Class Summary
 
Nested classes inherited from class javax.swing.DefaultCellEditor
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
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.


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.


FreeHEP API
Version current

Copyright © 2000-2004 FreeHEP, All Rights Reserved.