|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.awt.Component java.awt.Container javax.swing.JComponent uic.widgets.calendar.UICDateEdit
public class UICDateEdit
A widget for selecting or entering a date.
The UICDateEdit widget has the looks of a combo box. Per default it is non-editable as shown here: , but it can also be set to be editable, as is shown here: .
When the UICDateEdit button is clicked it pops up a UICDatePicker
that stays
open until a date is selected on the date picker's calendar, or until the popup is cancelled.
If a locale is specified the DateEdit will display it's date in that format. For example: If the Dutch locale is specified the UICDateEdit button looks like this: . This locale is also passed on to the date picker in the popup.
Nested Class Summary | |
---|---|
protected class |
UICDateEdit.UICDatePickerButton
|
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Container |
---|
Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary | |
---|---|
static String |
PROPERTY_DATECHANGE
This field can be used for listening to propertyChange events this widget fires. |
Fields inherited from class javax.swing.JComponent |
---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
|
UICDateEdit()
Constructs a new UICDateEdit with the default model. |
|
UICDateEdit(Locale locale,
Calendar cal)
Constructs a new UICDateEdit with the specified locale and Calendar to use as selected date. |
protected |
UICDateEdit(UICCalendarModel model)
Constructs a new UICDateEdit that uses the specified model. |
Method Summary | |
---|---|
void |
dateFieldInputDoneSlot()
Called when a date is entered in the dateField. |
void |
datePickerSelectedSlot()
Called when a date was selected in the datePicker |
Dimension |
getMaximumSize()
|
UICCalendarModel |
getModel()
Returns the UICCalendarModel for this DateEdit. |
Calendar |
getSelectedCalendar()
Returns the date (Calendar) that is the current value. |
boolean |
getShowWeekNrs()
Returns whether or not weeknumbers are shown in the datepicker popup |
boolean |
isEditable()
Returns whether or not this is an editable UICDateEdit. |
static void |
main(String[] args)
|
void |
pickerButtonClickedSlot()
Called when the button was clicked. |
void |
setEditable(boolean editable)
Sets the UICDateEdit to editable or not. |
void |
setEnabled(boolean enable)
En- or disable all components in the UICDateEdit. |
void |
setSelectedCalendar(Calendar cal)
Sets the current date (Calendar) for this widget. |
void |
setShowWeekNrs(boolean showWeekNrs)
Turn weeknumber in the datepicker popup on or off. |
protected void |
syncFromModel()
Syncronize this widget from the UICCalendarModel |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String PROPERTY_DATECHANGE
PropertyChangedAction
) to this widget
using this field you will get an event each time the selected date changed.
Constructor Detail |
---|
public UICDateEdit()
UICCalendarModel.UICCalendarModel()
public UICDateEdit(Locale locale, Calendar cal)
locale
- the locale to use.cal
- the date to select.UICCalendarModel.UICCalendarModel(Locale,Calendar)
protected UICDateEdit(UICCalendarModel model)
UICCalendarModel
Method Detail |
---|
public void setEnabled(boolean enable)
setEnabled
in class JComponent
public void setEditable(boolean editable)
editable
- if true the UICDateEdit is set to editable, if false
to non-editable.public boolean isEditable()
public void setShowWeekNrs(boolean showWeekNrs)
showWeekNrs
- true to show weeknumbers, false to hide them.public boolean getShowWeekNrs()
public void datePickerSelectedSlot()
protected void syncFromModel()
public void pickerButtonClickedSlot()
public void setSelectedCalendar(Calendar cal)
cal
- the calendar to set.public Calendar getSelectedCalendar()
public void dateFieldInputDoneSlot()
public UICCalendarModel getModel()
public Dimension getMaximumSize()
getMaximumSize
in class JComponent
public static void main(String[] args) throws Exception
Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |