|
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.AbstractComboBoxCellEditor com.jidesoft.grid.LegacyDateCellEditor
public class LegacyDateCellEditor
CellEditor for Date or Calendar. It uses DateComboBox to provide an editor for Date or Calendar. You can override
createDateComboBox()
method to provide your own DateComboBox.
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.AbstractComboBoxCellEditor |
---|
_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 | |
---|---|
LegacyDateCellEditor()
Creates a LegacyDateCellEditor. |
|
LegacyDateCellEditor(boolean useDate)
Creates a LegacyDateCellEditor. |
|
LegacyDateCellEditor(DateModel dateModel)
Creates a LegacyDateCellEditor with a date model. |
|
LegacyDateCellEditor(DateModel dateModel,
boolean useDate)
Creates a LegacyDateCellEditor with a date model. |
Method Summary | |
---|---|
AbstractComboBox |
createAbstractComboBox()
Creates the date combobox used by this cell editor. |
protected DateComboBox |
createDateComboBox()
|
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.AbstractComboBoxCellEditor |
---|
actionPerformed, createAbstractComboBox, customizeAbstractComboBox, getComboBox, getTableCellEditorComponent, isEditorStyleSupported, itemStateChanged, popupMenuCanceled, popupMenuWillBecomeInvisible, popupMenuWillBecomeVisible, setConverter, stopCellEditing |
Methods inherited from class com.jidesoft.grid.ContextSensitiveCellEditor |
---|
getConverter, getConverterContext, getEditorContext, getEditorStyle, getType, isUseConverterContext, setConverterContext, setEditorContext, setEditorStyle, setType, 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 LegacyDateCellEditor()
public LegacyDateCellEditor(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 LegacyDateCellEditor(DateModel dateModel)
dateModel
- the new DateModel.public LegacyDateCellEditor(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 AbstractComboBox createAbstractComboBox()
createAbstractComboBox
in class AbstractComboBoxCellEditor
protected DateComboBox 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 AbstractComboBoxCellEditor
public void setCellEditorValue(Object value)
AbstractComboBoxCellEditor
setCellEditorValue
in class AbstractComboBoxCellEditor
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 |