|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.swing.AbstractCellEditor com.jidesoft.grid.AbstractJideCellEditor com.jidesoft.grid.ContextSensitiveCellEditor com.jidesoft.grid.ExComboBoxCellEditor com.jidesoft.grid.DateCellEditor
public class DateCellEditor
CellEditor for Date or Calendar. It uses DateExComboBox to provide an editor for Date or Calendar. You can override
createDateComboBox()
method to provide your own DateExComboBox.
Field Summary | |
---|---|
static EditorContext |
DATETIME_CONTEXT
|
static int |
TYPE_SQL_DATE
|
static int |
TYPE_SQL_TIME
|
static int |
TYPE_SQL_TIMESTAMP
|
static int |
TYPE_UTIL_CALENDAR
|
static int |
TYPE_UTIL_DATE
|
Fields inherited from class com.jidesoft.grid.ExComboBoxCellEditor |
---|
_comboBox |
Fields inherited from class com.jidesoft.grid.ContextSensitiveCellEditor |
---|
DEFAULT_CELL_EDITOR_BORDER |
Fields inherited from class com.jidesoft.grid.AbstractJideCellEditor |
---|
_clickCountToStart |
Fields inherited from class javax.swing.AbstractCellEditor |
---|
changeEvent, listenerList |
Constructor Summary | |
---|---|
DateCellEditor()
Creates a DateCellEditor. |
|
DateCellEditor(boolean useDate)
Creates a DateCellEditor. |
|
DateCellEditor(DateModel dateModel)
Creates a DateCellEditor with a date model. |
|
DateCellEditor(DateModel dateModel,
boolean useDate)
Creates a DateCellEditor with a date model. |
Method Summary | |
---|---|
protected DateExComboBox |
createDateComboBox()
Creates the DateExComboBox. |
ExComboBox |
createExComboBox()
Creates the date combobox used by this cell editor. |
Object |
getCellEditorValue()
Gets the value of the cell editor. |
int |
getDataType()
Gets the date type. |
boolean |
isTimeDisplayed()
Checks if the time is displayed. |
void |
setCellEditorValue(Object value)
Sets the value to the combobox. |
void |
setDataType(int dataType)
Sets the date type. |
void |
setTimeDisplayed(boolean timeDisplayed)
Sets the timeDisplayed property. |
ValidationResult |
validate(Object oldValue,
Object newValue)
Validates date using DateModel. |
Methods inherited from class com.jidesoft.grid.ExComboBoxCellEditor |
---|
actionPerformed, createExComboBox, customizeExComboBox, getComboBox, getTableCellEditorComponent, isEditorStyleSupported, popupMenuCanceled, popupMenuWillBecomeInvisible, popupMenuWillBecomeVisible, setConverter, setType, stopCellEditing |
Methods inherited from class com.jidesoft.grid.ContextSensitiveCellEditor |
---|
getConverter, getConverterContext, getEditorContext, getEditorStyle, getType, isUseConverterContext, setConverterContext, setEditorContext, setEditorStyle, setUseConverterContext |
Methods inherited from class com.jidesoft.grid.AbstractJideCellEditor |
---|
addValidationListener, getClickCountToStart, getDefaultErrorBehavior, getValidationListeners, isAutoStopCellEditing, isCellEditable, isPassEnterKeyToTable, removeValidationListener, setAutoStopCellEditing, setClickCountToStart, setDefaultErrorBehavior, setPassEnterKeyToTable |
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, isCellEditable, removeCellEditorListener, shouldSelectCell |
Field Detail |
---|
public static final EditorContext DATETIME_CONTEXT
public static final int TYPE_UTIL_CALENDAR
public static final int TYPE_UTIL_DATE
public static final int TYPE_SQL_DATE
public static final int TYPE_SQL_TIME
public static final int TYPE_SQL_TIMESTAMP
Constructor Detail |
---|
public DateCellEditor()
public DateCellEditor(boolean useDate)
useDate
- true or false. If useDate is true, getCellEditorValue() will return an instance of Date. Otherwise
it will return an instance of Calendar. Default is false.public DateCellEditor(DateModel dateModel)
dateModel
- the new DateModel.public DateCellEditor(DateModel dateModel, boolean useDate)
dateModel
- the new DateModel.useDate
- true or false. If useDate is true, getCellEditorValue() will return an instance of Date.
Otherwise it will return an instance of Calendar. Default is false.Method Detail |
---|
public ExComboBox createExComboBox()
createExComboBox
in class ExComboBoxCellEditor
protected DateExComboBox createDateComboBox()
public int getDataType()
TYPE_UTIL_DATE
, TYPE_UTIL_CALENDAR
, TYPE_SQL_DATE
, TYPE_SQL_TIME
and TYPE_SQL_TIMESTAMP
. They are
corresponding to java.util.Date, java.util.Calendar, java.sql.Date and java.sql.Time respectively. The
getCellEditorValue will return the data type as specified.
public void setDataType(int dataType)
TYPE_UTIL_DATE
, TYPE_UTIL_CALENDAR
, TYPE_SQL_DATE
, TYPE_SQL_TIME
and TYPE_SQL_TIMESTAMP
. They are
corresponding to java.util.Date, java.util.Calendar, java.sql.Date and java.sql.Time respectively. The
getCellEditorValue will return the data type as specified.
dataType
- the data type.public Object getCellEditorValue()
getCellEditorValue
in interface CellEditor
getCellEditorValue
in class ExComboBoxCellEditor
public void setCellEditorValue(Object value)
ExComboBoxCellEditor
setCellEditorValue
in class ExComboBoxCellEditor
value
- the new value.public ValidationResult validate(Object oldValue, Object newValue)
validate
in interface JideCellEditor
validate
in class AbstractJideCellEditor
oldValue
- the old value.newValue
- the new value.
public boolean isTimeDisplayed()
public void setTimeDisplayed(boolean timeDisplayed)
DateChooserPanel
will show a time
spinner so that user can change time.
timeDisplayed
- true or false.
|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |