|
||||||||||
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 javax.swing.JPanel uic.widgets.calendar.UICDatePickerBase uic.widgets.calendar.UICDatePicker
public class UICDatePicker
A widget for selection a date with a little more intelligence than the UICCalendar. Also this widget is wrapped around a UICCalendar.
To change the month for the date picker you can use the month selector that pops
up if the month button is clicked. Also to roll one month down or up you can use
the '< ' and '> ' buttons. Another way to roll months up or
down is by using the navigation of the embedded UICCalendar . |
To change the year for the date picker you can use the year input field that pops up when the year button is
clicked. It is also possible to roll one year down or up by using the '<< ' and
'>> ' buttons. |
You can change the week for the date picker by using the week input field that pups up when the week button is clicked. |
By specifing a locale you can decide which locale should be used to display the date picker. If we should
specify the Dutch locale (nl, NL) for example the date picker and it's month selector would look like this:
Nested Class Summary | |
---|---|
protected class |
UICDatePicker.SpecialPopup
A wrapper for the popping components. |
Nested classes/interfaces inherited from class javax.swing.JPanel |
---|
JPanel.AccessibleJPanel |
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 |
---|
Fields inherited from class uic.widgets.calendar.UICDatePickerBase |
---|
bMonth, bMonthAction, bNextMonth, bNextMonthAction, bNextYear, bNextYearAction, bPrevMonth, bPrevMonthAction, bPrevYear, bPrevYearAction, calendar, sDate, weekPanel, yearPanel |
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 | |
---|---|
|
UICDatePicker()
Constructs a new UICDatePicker with the default locale and today as the selected date. |
|
UICDatePicker(Locale locale,
Calendar cal)
Constructs a new UICDatePicker with the specified locale and Calendar to use as selected date. |
protected |
UICDatePicker(UICCalendarModel model)
Construcs a new UICDatePicker that uses the specified model. |
Method Summary | |
---|---|
void |
addActionListener(ActionListener listener)
Adds the specified listener to the ActionListener list. |
void |
bMonthPressedSlot()
Called if the month button is pressed. |
void |
bNextMonthPressedSlot()
Called if the next-month-button is pressed. |
void |
bNextYearPressedSlot()
Called if the next-year-button is pressed. |
void |
bPrevMonthPressedSlot()
Called if the previous-month-button is pressed. |
void |
bPrevYearPressedSlot()
Called if the previous-year-button is pressed. |
Calendar |
getCalendar()
|
int |
getDate()
|
UICCalendarModel |
getModel()
|
int |
getMonth()
|
boolean |
getShowWeekNrs()
Returns whether or not weeknrs should be shown. |
int |
getWeek()
|
int |
getYear()
|
protected void |
guiInit()
intizlize the gui. |
static void |
main(String[] args)
|
void |
removeActionListener(ActionListener listener)
Removes the specified listener from the ActionListener list. |
protected void |
resetEditComponent()
|
void |
sDateEnteredSlot()
Called if enter is inputted in the sDate textfield. |
void |
setCalendar(Calendar calendar)
|
void |
setDate(int date)
|
void |
setMonth(int month)
|
void |
setShowWeekNrs(boolean showWeekNrs)
Configure whether or not the calendar component should show weeknumbers. |
void |
setWeek(int week)
|
void |
setYear(int year)
|
void |
syncWithModelSlot()
Called whenever the UICCalendarModel fires a PropertyChangedEvent, to make sure the UICDatePicker UI represents the Model correct. |
TranslationInterface |
translate()
|
void |
updateNextPrevButtonsSlot()
|
void |
weekInputEnteredSlot(Object newWeekValue)
|
void |
yearInputEnteredSlot()
|
Methods inherited from class javax.swing.JPanel |
---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public UICDatePicker()
public UICDatePicker(Locale locale, Calendar cal)
locale
- the locale to use.cal
- the date to select.protected UICDatePicker(UICCalendarModel model)
Method Detail |
---|
protected void guiInit()
guiInit
in class UICDatePickerBase
public void syncWithModelSlot()
public void updateNextPrevButtonsSlot()
public void sDateEnteredSlot()
public void bPrevYearPressedSlot()
bPrevYearPressedSlot
in class UICDatePickerBase
public void bNextYearPressedSlot()
bNextYearPressedSlot
in class UICDatePickerBase
public void bPrevMonthPressedSlot()
bPrevMonthPressedSlot
in class UICDatePickerBase
public void bNextMonthPressedSlot()
bNextMonthPressedSlot
in class UICDatePickerBase
public void yearInputEnteredSlot()
public void bMonthPressedSlot()
bMonthPressedSlot
in class UICDatePickerBase
protected void resetEditComponent()
public void weekInputEnteredSlot(Object newWeekValue)
public void setShowWeekNrs(boolean showWeekNrs)
showWeekNrs
- if true weeknumbers should be shown; if false not.public boolean getShowWeekNrs()
public TranslationInterface translate()
translate
in class UICDatePickerBase
public UICCalendarModel getModel()
public void setCalendar(Calendar calendar)
public Calendar getCalendar()
public void setYear(int year)
public int getYear()
public void setMonth(int month)
public int getMonth()
public void setDate(int date)
public int getDate()
public void setWeek(int week)
public int getWeek()
public void addActionListener(ActionListener listener)
listener
- the listener to add.public void removeActionListener(ActionListener listener)
listener
- the listener to remove.public static void main(String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |