|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.swing.AbstractCellEditor
org.jdesktop.swingx.table.DatePickerCellEditor
public class DatePickerCellEditor
A CellEditor using a JXDatePicker as editor component.
NOTE: this class will be moved!
Field Summary | |
---|---|
protected int |
clickCountToStart
|
protected java.text.DateFormat |
dateFormat
|
protected JXDatePicker |
datePicker
|
protected boolean |
ignoreAction
|
Fields inherited from class javax.swing.AbstractCellEditor |
---|
changeEvent, listenerList |
Constructor Summary | |
---|---|
DatePickerCellEditor()
Instantiates a editor with the default dateFormat. |
|
DatePickerCellEditor(java.text.DateFormat dateFormat)
Instantiates an editor with the given dateFormat. |
Method Summary | |
---|---|
protected boolean |
commitChange()
Commits any pending edits and returns a boolean indicating whether the commit was successful. |
protected java.awt.event.ActionListener |
createPickerActionListener()
Creates and returns the ActionListener for the Picker. |
java.util.Date |
getCellEditorValue()
Returns the pickers date. |
int |
getClickCountToStart()
Returns the number of clicks needed to start editing. |
java.text.DateFormat[] |
getFormats()
|
protected java.awt.event.ActionListener |
getPickerActionListener()
Returns the ActionListener to add to the datePicker. |
java.awt.Component |
getTableCellEditorComponent(javax.swing.JTable table,
java.lang.Object value,
boolean isSelected,
int row,
int column)
|
java.awt.Component |
getTreeCellEditorComponent(javax.swing.JTree tree,
java.lang.Object value,
boolean isSelected,
boolean expanded,
boolean leaf,
int row)
|
protected java.util.Date |
getValueAsDate(java.lang.Object value)
Returns the given value as Date. |
protected void |
handleParseException(java.text.ParseException e)
|
boolean |
isCellEditable(java.util.EventObject anEvent)
|
protected boolean |
isEmpty(java.lang.Object value)
|
void |
setClickCountToStart(int count)
Specifies the number of clicks needed to start editing. |
void |
setFormats(java.text.DateFormat... formats)
|
boolean |
stopCellEditing()
|
Methods inherited from class javax.swing.AbstractCellEditor |
---|
addCellEditorListener, cancelCellEditing, fireEditingCanceled, fireEditingStopped, getCellEditorListeners, removeCellEditorListener, shouldSelectCell |
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, cancelCellEditing, removeCellEditorListener, shouldSelectCell |
Field Detail |
---|
protected JXDatePicker datePicker
protected java.text.DateFormat dateFormat
protected int clickCountToStart
protected boolean ignoreAction
Constructor Detail |
---|
public DatePickerCellEditor()
public DatePickerCellEditor(java.text.DateFormat dateFormat)
dateFormat
- Method Detail |
---|
public java.util.Date getCellEditorValue()
getCellEditorValue
in interface javax.swing.CellEditor
public boolean isCellEditable(java.util.EventObject anEvent)
isCellEditable
in interface javax.swing.CellEditor
isCellEditable
in class javax.swing.AbstractCellEditor
public boolean stopCellEditing()
Overridden to commit pending edits. If commit successful, returns super, else returns false.
stopCellEditing
in interface javax.swing.CellEditor
stopCellEditing
in class javax.swing.AbstractCellEditor
public void setClickCountToStart(int count)
count
- an int specifying the number of clicks needed to start
editinggetClickCountToStart()
public int getClickCountToStart()
public java.awt.Component getTableCellEditorComponent(javax.swing.JTable table, java.lang.Object value, boolean isSelected, int row, int column)
getTableCellEditorComponent
in interface javax.swing.table.TableCellEditor
public java.awt.Component getTreeCellEditorComponent(javax.swing.JTree tree, java.lang.Object value, boolean isSelected, boolean expanded, boolean leaf, int row)
getTreeCellEditorComponent
in interface javax.swing.tree.TreeCellEditor
protected java.util.Date getValueAsDate(java.lang.Object value)
value
- the value to map as Date
protected void handleParseException(java.text.ParseException e)
e
- protected boolean isEmpty(java.lang.Object value)
protected boolean commitChange()
public java.text.DateFormat[] getFormats()
JXDatePicker.getFormats().
public void setFormats(java.text.DateFormat... formats)
formats
- the formats to use in the datepicker.JXDatePicker.setFormats(DateFormat...)
protected java.awt.event.ActionListener getPickerActionListener()
protected java.awt.event.ActionListener createPickerActionListener()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |