jbc.grid
Class JbcCellEditorTime
java.lang.Object
javax.swing.AbstractCellEditor
javax.swing.DefaultCellEditor
jbc.grid.JbcCellEditorTime
- All Implemented Interfaces:
- java.io.Serializable, javax.swing.CellEditor, javax.swing.table.TableCellEditor, javax.swing.tree.TreeCellEditor
public class JbcCellEditorTime
- extends javax.swing.DefaultCellEditor
This class implements a JbcDateTimeChooser 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 Date, String or Long objects as input and returns a
Date object. This CellEditor manages the time value.
This CellEditor requires the
JbcBeans package.
- Author:
- Copyright © 1999-2004, JBC. All Rights Reserved.
Licensed Materials - Property of JBC.
- See Also:
- Serialized Form
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 |
JbcCellEditorTime
public JbcCellEditorTime(int stylePattern)
JbcCellEditorTime
public JbcCellEditorTime()
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 valueisSelected
- true if the cell is to be rendered with
highlightingrow
- the row of the cell being editedcolumn
- the column of the cell being edited
- Returns:
- the component for editing
JBCSolutions - Jbcgrid v1.6