JBCSolutions - Jbcgrid v1.6

This document is the API specification for the JbcGrid, version 1.6


jbc.grid
Class JbcCellEditorComboBox

java.lang.Object
  extended by javax.swing.AbstractCellEditor
      extended by javax.swing.DefaultCellEditor
          extended by jbc.grid.JbcCellEditorComboBox
All Implemented Interfaces:
java.io.Serializable, javax.swing.CellEditor, javax.swing.table.TableCellEditor, javax.swing.tree.TreeCellEditor

public class JbcCellEditorComboBox
extends javax.swing.DefaultCellEditor

This class implements a JCombobox as an editor and allows to edit values in a table cell. This class uses the ClickCountToStart value provided by JbcGridTable as a default value. This CellEditor takes the alternate background color feature into account. This class is extended from DefaultCellEditor.

Author:
Copyright © 1999-2004, JBC. All Rights Reserved.
Licensed Materials - Property of JBC.
See Also:
Serialized Form

Constructor Summary
JbcCellEditorComboBox()
          Creates a JbcCellEditorComboBox with a default data model.
JbcCellEditorComboBox(javax.swing.ComboBoxModel aModel)
          Creates a JbcCellEditorComboBox that takes it's items from an existing ComboBoxModel.
JbcCellEditorComboBox(java.lang.Object[] items)
          Creates a JbcCellEditorComboBox that contains the elements in the specified array.
JbcCellEditorComboBox(java.util.Vector items)
          Creates a JbcCellEditorComboBox that contains the elements in the specified Vector.
 
Method Summary
 java.awt.Component getTableCellEditorComponent(javax.swing.JTable table, java.lang.Object value, boolean isSelected, int row, int column)
          Sets an initial value for the editor.
 
Methods inherited from class javax.swing.DefaultCellEditor
cancelCellEditing, getCellEditorValue, getClickCountToStart, getComponent, getTreeCellEditorComponent, isCellEditable, setClickCountToStart, shouldSelectCell, stopCellEditing
 
Methods inherited from class javax.swing.AbstractCellEditor
addCellEditorListener, getCellEditorListeners, removeCellEditorListener
 
Methods inherited from class java.lang.Object
equals, 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

JbcCellEditorComboBox

public JbcCellEditorComboBox()
Creates a JbcCellEditorComboBox with a default data model.


JbcCellEditorComboBox

public JbcCellEditorComboBox(javax.swing.ComboBoxModel aModel)
Creates a JbcCellEditorComboBox that takes it's items from an existing ComboBoxModel.


JbcCellEditorComboBox

public JbcCellEditorComboBox(java.lang.Object[] items)
Creates a JbcCellEditorComboBox that contains the elements in the specified array.


JbcCellEditorComboBox

public JbcCellEditorComboBox(java.util.Vector items)
Creates a JbcCellEditorComboBox that contains the elements in the specified Vector.

Method Detail

getTableCellEditorComponent

public java.awt.Component getTableCellEditorComponent(javax.swing.JTable table,
                                                      java.lang.Object value,
                                                      boolean isSelected,
                                                      int row,
                                                      int column)
Sets an initial value for the editor. This will cause the editor to stopEditing and lose any partially edited value if the editor is editing when this method is called.

Returns the component that should be added to the client's Component hierarchy. Once installed in the client's hierarchy this component will then be able to draw and receive user input.

Specified by:
getTableCellEditorComponent in interface javax.swing.table.TableCellEditor
Overrides:
getTableCellEditorComponent in class javax.swing.DefaultCellEditor
Parameters:
table - the JTable that is asking the editor to edit; can be null
value - the value of the cell to be edited; it is up to the specific editor to interpret and draw the value. For example, if value is the string "true", it could be rendered as a string or it could be rendered as a check box that is checked. null is a valid value
isSelected - true if the cell is to be rendered with highlighting
row - the row of the cell being edited
column - the column of the cell being edited
Returns:
the component for editing

JBCSolutions - Jbcgrid v1.6

JBCSolutions - Jbcgrid v1.6