Copyright © 2005 Scientific Applications. All Rights Reserved.

com.sciapp.editors
Class TableComboBoxEditor

java.lang.Object
  extended by javax.swing.AbstractCellEditor
      extended by javax.swing.DefaultCellEditor
          extended by com.sciapp.editors.TableComboBoxEditor
All Implemented Interfaces:
Serializable, CellEditor, TableCellEditor, TreeCellEditor

public class TableComboBoxEditor
extends DefaultCellEditor

An editor for table and tree table cells that uses multiple values contained in a JComboBox.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces 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
TableComboBoxEditor()
          Constructs a TableComboBoxEditor with a default JComboBox object.
TableComboBoxEditor(JComboBox comboBox)
          Constructs a TableComboBoxEditor with the JComboBox object specified in the argument of the constructor.
TableComboBoxEditor(String[] items)
          Constructs a TableComboBoxEditor with a default JComboBox object, having items as the combobox's values.
 
Method Summary
 JComboBox getComboBox()
          Returns the combobox that contains the possible editor values.
 
Methods inherited from class javax.swing.DefaultCellEditor
cancelCellEditing, getCellEditorValue, getClickCountToStart, getComponent, getTableCellEditorComponent, getTreeCellEditorComponent, 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

TableComboBoxEditor

public TableComboBoxEditor()
Constructs a TableComboBoxEditor with a default JComboBox object.


TableComboBoxEditor

public TableComboBoxEditor(String[] items)
Constructs a TableComboBoxEditor with a default JComboBox object, having items as the combobox's values.


TableComboBoxEditor

public TableComboBoxEditor(JComboBox comboBox)
Constructs a TableComboBoxEditor with the JComboBox object specified in the argument of the constructor.

WARNING: If you use this constructor to supply your own combo box, and you are using frozen columns in your application, you will run into a situation where the combobox's popup menu will be displaced because of the existence of frozen columns. To avoid this from happening, you should use the other two constructors that utilize a proper internal combo box instance. Of course, if you do not make use of frozen columns at all, this constructor is safe to use.

Method Detail

getComboBox

public JComboBox getComboBox()
Returns the combobox that contains the possible editor values.

Returns:
the combo box.

Copyright © 2005 Scientific Applications. All Rights Reserved.