|
swingx Version 2009-07-31 |
|||||||||
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 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(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 ActionListener |
createPickerActionListener()
Creates and returns the ActionListener for the Picker. |
Date |
getCellEditorValue()
Returns the pickers date. |
int |
getClickCountToStart()
Returns the number of clicks needed to start editing. |
DateFormat[] |
getFormats()
|
protected ActionListener |
getPickerActionListener()
Returns the ActionListener to add to the datePicker. |
Component |
getTableCellEditorComponent(JTable table,
Object value,
boolean isSelected,
int row,
int column)
|
Component |
getTreeCellEditorComponent(JTree tree,
Object value,
boolean isSelected,
boolean expanded,
boolean leaf,
int row)
|
protected Date |
getValueAsDate(Object value)
Returns the given value as Date. |
protected void |
handleParseException(ParseException e)
|
boolean |
isCellEditable(EventObject anEvent)
|
protected boolean |
isEmpty(Object value)
|
void |
setClickCountToStart(int count)
Specifies the number of clicks needed to start editing. |
void |
setFormats(DateFormat... formats)
|
boolean |
stopCellEditing()
Overridden to commit pending edits. |
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 DateFormat dateFormat
protected int clickCountToStart
protected boolean ignoreAction
Constructor Detail |
---|
public DatePickerCellEditor()
public DatePickerCellEditor(DateFormat dateFormat)
dateFormat
- Method Detail |
---|
public Date getCellEditorValue()
getCellEditorValue
in interface CellEditor
public boolean isCellEditable(EventObject anEvent)
isCellEditable
in interface CellEditor
isCellEditable
in class AbstractCellEditor
public boolean stopCellEditing()
Overridden to commit pending edits. If commit successful, returns super, else returns false.
stopCellEditing
in interface CellEditor
stopCellEditing
in class AbstractCellEditor
public void setClickCountToStart(int count)
count
- an int specifying the number of clicks needed to start
editinggetClickCountToStart()
public int getClickCountToStart()
public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column)
getTableCellEditorComponent
in interface TableCellEditor
public Component getTreeCellEditorComponent(JTree tree, Object value, boolean isSelected, boolean expanded, boolean leaf, int row)
getTreeCellEditorComponent
in interface TreeCellEditor
protected Date getValueAsDate(Object value)
value
- the value to map as Date
protected void handleParseException(ParseException e)
e
- protected boolean isEmpty(Object value)
protected boolean commitChange()
public DateFormat[] getFormats()
JXDatePicker.getFormats().
public void setFormats(DateFormat... formats)
formats
- the formats to use in the datepicker.JXDatePicker.setFormats(DateFormat...)
protected ActionListener getPickerActionListener()
protected ActionListener createPickerActionListener()
|
swingx Version 2009-07-31 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |