|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sciapp.editors.DateEditor
public class DateEditor
An editor for table and tree cells that handles the editing of Date objects.
Field Summary | |
---|---|
protected ChangeEvent |
changeEvent
The ChangeEvent fired when editing is stopped or canceled. |
protected EventListenerList |
listenerList
The listenerlist of CellEditorListeners. |
Constructor Summary | |
---|---|
DateEditor()
Constructs a DateEditor object that uses a Dialog component to edit dates. |
Method Summary | |
---|---|
void |
actionPerformed(ActionEvent e)
Handles events received from the dialog component. |
void |
addCellEditorListener(CellEditorListener l)
Adds a CellEditorListener to the listener list. |
void |
cancelCellEditing()
Tells the editor to cancel editing and not accept any partially edited value. |
protected void |
fireEditingCanceled()
Notifies all listeners that have registered interest for notification on this event type. |
protected void |
fireEditingStopped()
Notifies all listeners that have registered interest for notification on this event type. |
Object |
getCellEditorValue()
Returns the value contained in the editor. |
Component |
getTableCellEditorComponent(JTable table,
Object value,
boolean isSelected,
int row,
int column)
Implementation of the one method defined by javax.swing.table.TableCellEditor. |
boolean |
isCellEditable(EventObject e)
Returns true. |
void |
removeCellEditorListener(CellEditorListener l)
Removes a CellEditorListener from the listener list. |
boolean |
shouldSelectCell(EventObject anEvent)
Returns true. |
boolean |
stopCellEditing()
Calls fireEditingStopped and returns true. |
void |
updateUI()
Updates the DateEditor's dialog UI. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected EventListenerList listenerList
protected transient ChangeEvent changeEvent
Constructor Detail |
---|
public DateEditor()
Method Detail |
---|
public void actionPerformed(ActionEvent e)
actionPerformed
in interface ActionListener
public void addCellEditorListener(CellEditorListener l)
CellEditorListener
to the listener list.
addCellEditorListener
in interface CellEditor
l
- the new listener to be addedpublic void cancelCellEditing()
cancelCellEditing
in interface CellEditor
protected void fireEditingCanceled()
EventListenerList
protected void fireEditingStopped()
EventListenerList
public Object getCellEditorValue()
getCellEditorValue
in interface CellEditor
public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column)
getTableCellEditorComponent
in interface TableCellEditor
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
public boolean isCellEditable(EventObject e)
isCellEditable
in interface CellEditor
e
- an event object
CellEditor.shouldSelectCell(java.util.EventObject)
public void removeCellEditorListener(CellEditorListener l)
CellEditorListener
from the listener list.
removeCellEditorListener
in interface CellEditor
l
- the listener to be removedpublic boolean shouldSelectCell(EventObject anEvent)
shouldSelectCell
in interface CellEditor
anEvent
- an event object
CellEditor.isCellEditable(java.util.EventObject)
public boolean stopCellEditing()
fireEditingStopped
and returns true.
stopCellEditing
in interface CellEditor
public void updateUI()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |