JBCSolutions - Jbcgrid v1.6

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


jbc.grid
Class JbcCellEditorInteger

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

public class JbcCellEditorInteger
extends javax.swing.DefaultCellEditor

This class implements a JbcSpinButton 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. This CellEditor accepts String or Integer objects as input and returns an Integer object. This CellEditor manages the integer value.

This CellEditor requires the JbcBeans package.

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

Constructor Summary
JbcCellEditorInteger(int minimum, int maximum)
           
 
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

JbcCellEditorInteger

public JbcCellEditorInteger(int minimum,
                            int maximum)
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