JSpinnerDateEditor, JTextFieldDateEditorpublic interface IDateEditor
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
void |
addPropertyChangeListener(PropertyChangeListener listener) |
Adds a property change listener that should be added to the implementing
UI component.
|
void |
addPropertyChangeListener(String propertyName,
PropertyChangeListener listener) |
Adds a property change listener that should be added to the implementing
UI component.
|
Date |
getDate() |
Returns the date.
|
String |
getDateFormatString() |
Returns the date format string.
|
Date |
getMaxSelectableDate() |
Gets the minimum selectable date.
|
Date |
getMinSelectableDate() |
Gets the maximum selectable date.
|
JComponent |
getUiComponent() |
Returns the UI component, e.g. the actual JTextField implementing the
editor.
|
void |
removePropertyChangeListener(PropertyChangeListener listener) |
Removes a property change listener.
|
void |
removePropertyChangeListener(String propertyName,
PropertyChangeListener listener) |
Removes the listener from the date editor's property change listeners for the specific property.
|
void |
setDate(Date date) |
Sets the date.
|
void |
setDateFormatString(String dateFormatString) |
Sets the date format string, e.g.
|
void |
setEnabled(boolean enabled) |
Enables or disables the UI compoment.
|
void |
setLocale(Locale locale) |
Sets the locale.
|
void |
setMaxSelectableDate(Date max) |
Sets the maximum selectable date.
|
void |
setMinSelectableDate(Date min) |
Sets the minimum selectable date.
|
void |
setSelectableDateRange(Date min,
Date max) |
Sets a valid date range for selectable dates.
|
Date getDate()
void setDate(Date date)
date - the date to setvoid setDateFormatString(String dateFormatString)
dateFormatString - the date format stringString getDateFormatString()
void setSelectableDateRange(Date min, Date max)
min - the minimum selectable date or null (then the minimum date should be
set to 01\01\0001)max - the maximum selectable date or null (then the maximum date should be
set to 01\01\9999)Date getMaxSelectableDate()
Date getMinSelectableDate()
void setMaxSelectableDate(Date max)
max - maximum selectable datevoid setMinSelectableDate(Date min)
min - minimum selectable dateJComponent getUiComponent()
void setLocale(Locale locale)
locale - the locale to setvoid setEnabled(boolean enabled)
enabled - true, if the UI component should be enabled.void addPropertyChangeListener(PropertyChangeListener listener)
listener - the property change listener.void addPropertyChangeListener(String propertyName, PropertyChangeListener listener)
propertyName - the property name, e.g. "date"listener - the property change listener.void removePropertyChangeListener(PropertyChangeListener listener)
listener - the property change listener.void removePropertyChangeListener(String propertyName, PropertyChangeListener listener)
propertyName - the property to listen for, e.g. "date"listener - the listenerCopyright © 2019. All rights reserved.