|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnextapp.echo2.app.Component
echopointng.ComponentEx
echopointng.AbleComponent
echopointng.DateChooser
public class DateChooser
The DateChooser class can be used to navigate dates and select
a specified date.
The class uses the CalendarSelectionModel interface to keep
track of the currently selected date. If no calendar is provided on the the
constructor, then todays date is used.
The control consists of three sections, the top level navigation section, the calendar section and the selection sections. You can use the relevant accessor to set/get properties that control the apperance of each section.
When the DateChooser is in fast mode, the navigation between
months does not result in the DateSelectionModel's
displayedDate being updated. The model will be updated if the user selects a
date however. Fast mode is the default.
| Fields inherited from class echopointng.ComponentEx |
|---|
PROPERTY_HIDDEN |
| Fields inherited from interface echopointng.able.AccessKeyable |
|---|
PROPERTY_ACCESS_KEY |
| Fields inherited from interface echopointng.able.Borderable |
|---|
PROPERTY_BORDER |
| Fields inherited from interface echopointng.able.MouseCursorable |
|---|
CURSOR_AUTO, CURSOR_CROSSHAIR, CURSOR_CUSTOM_URI, CURSOR_DEFAULT, CURSOR_E_RESIZE, CURSOR_HELP, CURSOR_MOVE, CURSOR_N_RESIZE, CURSOR_NE_RESIZE, CURSOR_NW_RESIZE, CURSOR_POINTER, CURSOR_S_RESIZE, CURSOR_SE_RESIZE, CURSOR_SW_RESIZE, CURSOR_TEXT, CURSOR_W_RESIZE, CURSOR_WAIT, PROPERTY_MOUSE_CURSOR, PROPERTY_MOUSE_CURSOR_URI |
| Fields inherited from interface echopointng.able.Insetable |
|---|
DEFAULT_INSETS, DEFAULT_OUTSETS, PROPERTY_INSETS, PROPERTY_OUTSETS |
| Fields inherited from interface echopointng.able.Widthable |
|---|
PROPERTY_WIDTH |
| Fields inherited from interface echopointng.able.Heightable |
|---|
PROPERTY_HEIGHT |
| Fields inherited from interface echopointng.able.ToolTipable |
|---|
PROPERTY_TOOL_TIP_TEXT |
| Constructor Summary | |
|---|---|
DateChooser()
Constructs a DateChooser with the currently selected date
set to right now. |
|
DateChooser(java.util.Calendar newSelectedDate)
Constructs a DateChooser with the currently selected date
set to the one provided. |
|
DateChooser(java.util.Calendar newSelectedDate,
java.util.Locale locale)
Constructs a DateChooser with the currently selected date
set to the one provided and a the specified Locale. |
|
| Method Summary | |
|---|---|
static java.util.Calendar |
calendarClearTimePortion(java.util.Calendar cal)
Clears a Calendar of its time portion |
static java.util.Calendar |
calendarCopy(java.util.Calendar cal)
Copys the values of one Calendar into another, always
clearing the time portion of the copied Calendar
if cal is null, then null is returned. |
static java.util.Calendar |
calendarCopy(java.util.Calendar cal,
java.util.Locale locale)
Copys the values of one Calendar into another, always
clearing the time portion of the copied Calendar
if cal is null, then null is returned. |
static java.util.Calendar |
calendarCopy(java.util.Date date,
java.util.Locale locale)
Creates a Calendar, based on the Date object provide that has the time potion cleared from it. |
Color |
getCalendarBackground()
|
Border |
getCalendarBorder()
|
Font |
getCalendarFont()
|
Color |
getCalendarForeground()
|
Color |
getCalendarNonMonthForeground()
|
Color |
getCalendarRolloverBackground()
|
Border |
getCalendarRolloverBorder()
|
Color |
getCalendarRolloverForeground()
|
Color |
getCalendarSelectedBackground()
|
Border |
getCalendarSelectedBorder()
|
Font |
getCalendarSelectedFont()
|
Color |
getCalendarSelectedForeground()
|
java.util.Calendar |
getDisplayedDate()
A shortcurt method to the model's getDisplayedDate() method. |
int |
getDowNameLength()
Gets the length of the day of the week names when displayed. |
boolean |
getFastMode()
When the DateChooser is in fast mode, the navigation
between months does not result in the DateSelectionModel
's displayedDate being updated. |
java.util.Calendar |
getMaximumDate()
Returns the maximum date the DateChooser will display. |
java.util.Calendar |
getMinimumDate()
Returns the minimum date the DateChooser will display. |
CalendarSelectionModel |
getModel()
|
int |
getMonthNameLength()
Gets the length of the month names when displayed. |
Color |
getNavigationBackground()
|
ImageReference |
getNavigationBackwardImage()
Gets the image used as the navigate the DateChooser
backward in time. |
Font |
getNavigationFont()
|
Color |
getNavigationForeground()
|
ImageReference |
getNavigationForwardImage()
Gets the image used as the navigate the DateChooser
forward in time. |
boolean |
getNavigationInhibited()
Returns true if the user is inhbited from navigating beyond the maximum and minimum dates. |
Color |
getSelectedBackground()
|
Border |
getSelectedBorder()
|
java.util.Calendar |
getSelectedDate()
A shortcurt method to the underlying DateChooser's model getSelectedDate() method. |
Font |
getSelectedFont()
|
Color |
getSelectedForeground()
|
Color |
getSelectedRolloverBackground()
|
Border |
getSelectedRolloverBorder()
|
Color |
getSelectedRolloverForeground()
|
java.lang.String |
getWeekNumberAbbreviation()
Returns String for weekNumberAbbreviation (WN) |
Color |
getWeekNumberForeground()
|
int |
getYearRange()
Returns the number of years that will appear in the selectable Year field. |
boolean |
isMonthSelectable()
Returns true if the Month display is selectable |
boolean |
isNavigationArrowsVisible()
Returns true if the NavigationsArrows are visible |
boolean |
isSelectionDisplayBarVisible()
Returns true if the SelectionDisplayBar is visible |
boolean |
isYearSelectable()
Returns true if the Year display is selectable. |
void |
processInput(java.lang.String inputName,
java.lang.Object inputValue)
Processes client input specific to the Component
received from the UpdateManager. |
void |
setCalendarBackground(Color newCalendarBackground)
Sets the background Color of the
DateChooser's calendar area. |
void |
setCalendarBorder(Border newValue)
Sets the Border of the DateChooser's
calendar area. |
void |
setCalendarFont(Font newCalendarFont)
Sets the background Font of the DateChooser's
calendar area. |
void |
setCalendarForeground(Color newCalendarForeground)
Sets the foreground Color of the
DateChooser's calendar area. |
void |
setCalendarNonMonthForeground(Color newCalendarNonMonthForeground)
Sets the foreground Color of days that are not within the
currently displayed date of the DateChooser's calendar
area. |
void |
setCalendarRolloverBackground(Color newCalendarRolloverBackground)
Sets the rollover background Color of the
DateChooser's calendar area. |
void |
setCalendarRolloverBorder(Border newValue)
Sets the rollover Border of the selected date in the
DateChooser's calendar area. |
void |
setCalendarRolloverForeground(Color newCalendarRolloverForeground)
Sets the rollover foreground Color of the
DateChooser's calendar area. |
void |
setCalendarSelectedBackground(Color newCalendarBackground)
Sets the background Color of the selected date in the
DateChooser's calendar area. |
void |
setCalendarSelectedBorder(Border newValue)
Sets the Border of the selected date in the
DateChooser's calendar area. |
void |
setCalendarSelectedFont(Font newFont)
Sets the foreground Color of the selected date in the
DateChooser's calendar area. |
void |
setCalendarSelectedForeground(Color newCalendarForeground)
Sets the foreground Color of the selected date in the
DateChooser's calendar area. |
void |
setDisplayedDate(java.util.Calendar newDisplayedDate)
Sets the currently displayed date within the DateChooser
into the model. |
void |
setDowNameLength(int newValue)
Sets the length of the day of the week names when displayed. |
void |
setFastMode(boolean newValue)
When the DateChooser is in fast mode, the navigation
between months does not result in the DateSelectionModel
's displayedDate being updated. |
void |
setMaximumDate(java.util.Calendar newValue)
Sets the maximum date the DateChooser will display. |
void |
setMinimumDate(java.util.Calendar newValue)
Sets the minimum date the DateChooser will display. |
void |
setModel(CalendarSelectionModel newModel)
Sets a new CalendarSelectionModel model into the
DateChooser |
void |
setMonthNameLength(int newValue)
Sets the length of the month names when displayed. |
void |
setMonthSelectable(boolean newMonthSelectable)
Sets whether the Month field is selectable by the user. |
void |
setNavigationArrowsVisible(boolean newValue)
Sets whether the NavigationArrows are visible |
void |
setNavigationBackground(Color newNavigationBackground)
Sets the background Color of the
DateChooser's navigation area. |
void |
setNavigationBackwardImage(ImageReference newImage)
Sets the image used as the navigate the DateChooser
backward in time. |
void |
setNavigationFont(Font newNavigationFont)
Sets the background Font of the DateChooser's
navigation area. |
void |
setNavigationForeground(Color newNavigationForeground)
Sets the foreground Color of the
DateChooser's navigation area. |
void |
setNavigationForwardImage(ImageReference newImage)
Sets the image used as the navigate the DateChooser
forward in time. |
void |
setNavigationInhibited(boolean newValue)
If set to true the user is inhbited from navigating beyond the maximum and minimum dates. |
void |
setSelectedBackground(Color newSelectedBackground)
Sets the background Color of the
DateChooser's selected area. |
void |
setSelectedBorder(Border newValue)
Sets the Border in the DateChooser's
selected area. |
void |
setSelectedDate(java.util.Calendar newSelectedDate)
Sets the currently selected date within the DateChooser |
void |
setSelectedFont(Font newSelectedFont)
Sets the Font of the DateChooser's selected
area. |
void |
setSelectedForeground(Color newSelectedForeground)
Sets the foreground Color of the
DateChooser's selected area. |
void |
setSelectedRolloverBackground(Color newSelectedRolloverBackground)
Sets the rollover background Color of the
DateChooser's selected area. |
void |
setSelectedRolloverBorder(Border newValue)
Sets the rollover Border in the DateChooser's
selected area. |
void |
setSelectedRolloverForeground(Color newSelectedRolloverForeground)
Sets the rollover foreground Color of the
DateChooser's selected area. |
void |
setSelectionDisplayBarVisible(boolean newValue)
Sets whether the SelectionDisplayBar is visible |
void |
setWeekNumberAbbreviation(java.lang.String abbreviation)
Sets weekNumberAbbreviation |
void |
setWeekNumberForeground(Color newValue)
Sets the foreground color of the Week Number area |
void |
setYearRange(int newYearRange)
Returns the number of years that will appear in the selectable Year field. |
void |
setYearSelectable(boolean newYearSelectable)
Sets whether the Year field is selectable by the user. |
| Methods inherited from class echopointng.AbleComponent |
|---|
getAccessKey, getBorder, getHeight, getInsets, getMouseCursor, getMouseCursorURI, getOutsets, getToolTipText, getWidth, setAccessKey, setBorder, setHeight, setInsets, setMouseCursor, setMouseCursorURI, setOutsets, setToolTipText, setWidth |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface echopointng.able.Delegateable |
|---|
getRenderProperty, getRenderProperty |
| Methods inherited from interface echopointng.able.Delegateable |
|---|
getRenderProperty, getRenderProperty |
| Methods inherited from interface echopointng.able.Delegateable |
|---|
getRenderProperty, getRenderProperty |
| Methods inherited from interface echopointng.able.Delegateable |
|---|
getRenderProperty, getRenderProperty |
| Methods inherited from interface echopointng.able.Delegateable |
|---|
getRenderProperty, getRenderProperty |
| Methods inherited from interface echopointng.able.Delegateable |
|---|
getRenderProperty, getRenderProperty |
| Field Detail |
|---|
public static final Style BLACK_AND_WHITE_STYLE
public static final Style COLORFUL_STYLE
public static final ImageReference DEFAULT_NAVIGATION_BACKWARD_IMAGE
public static final ImageReference DEFAULT_NAVIGATION_FORWARD_IMAGE
public static final Style DEFAULT_STYLE
public static final java.lang.String PROPERTY_CALENDAR_BACKGROUND
public static final java.lang.String PROPERTY_CALENDAR_BORDER
public static final java.lang.String PROPERTY_CALENDAR_FONT
public static final java.lang.String PROPERTY_WEEK_NUMBER_FOREGROUND
public static final java.lang.String PROPERTY_CALENDAR_FOREGROUND
public static final java.lang.String PROPERTY_CALENDAR_NON_MONTH_FOREGROUND
public static final java.lang.String PROPERTY_CALENDAR_ROLLOVER_BACKGROUND
public static final java.lang.String PROPERTY_CALENDAR_ROLLOVER_BORDER
public static final java.lang.String PROPERTY_CALENDAR_ROLLOVER_FOREGROUND
public static final java.lang.String PROPERTY_CALENDAR_SELECTED_BACKGROUND
public static final java.lang.String PROPERTY_CALENDAR_SELECTED_BORDER
public static final java.lang.String PROPERTY_CALENDAR_SELECTED_FONT
public static final java.lang.String PROPERTY_CALENDAR_SELECTED_FOREGROUND
public static final java.lang.String PROPERTY_DOW_NAME_LENGTH
public static final java.lang.String PROPERTY_FAST_MODE
public static final java.lang.String PROPERTY_MAXIMUM_DATE
public static final java.lang.String PROPERTY_MINIMUM_DATE
public static final java.lang.String PROPERTY_MODEL
public static final java.lang.String PROPERTY_MONTH_NAME_LENGTH
public static final java.lang.String PROPERTY_MONTH_SELECTABLE
public static final java.lang.String PROPERTY_NAVIGATION_ARROWS_VISIBLE
public static final java.lang.String PROPERTY_NAVIGATION_BACKGROUND
public static final java.lang.String PROPERTY_NAVIGATION_BACKWARD_IMAGE
public static final java.lang.String PROPERTY_NAVIGATION_FONT
public static final java.lang.String PROPERTY_NAVIGATION_FOREGROUND
public static final java.lang.String PROPERTY_NAVIGATION_FORWARD_IMAGE
public static final java.lang.String PROPERTY_NAVIGATION_INHIBITED
public static final java.lang.String PROPERTY_SELECTED_BACKGROUND
public static final java.lang.String PROPERTY_SELECTED_BORDER
public static final java.lang.String PROPERTY_SELECTED_FONT
public static final java.lang.String PROPERTY_SELECTED_FOREGROUND
public static final java.lang.String PROPERTY_SELECTED_ROLLOVER_BACKGROUND
public static final java.lang.String PROPERTY_SELECTED_ROLLOVER_BORDER
public static final java.lang.String PROPERTY_SELECTED_ROLLOVER_FOREGROUND
public static final java.lang.String PROPERTY_SELECTION_DISPLAYBAR_VISIBLE
public static final java.lang.String PROPERTY_WEEK_NUMBER_ABBREVIATION
public static final java.lang.String PROPERTY_YEAR_RANGE
public static final java.lang.String PROPERTY_YEAR_SELECTABLE
public static final java.lang.String SEL_YEAR_PREFIX
| Constructor Detail |
|---|
public DateChooser()
DateChooser with the currently selected date
set to right now.
public DateChooser(java.util.Calendar newSelectedDate)
DateChooser with the currently selected date
set to the one provided.
public DateChooser(java.util.Calendar newSelectedDate,
java.util.Locale locale)
DateChooser with the currently selected date
set to the one provided and a the specified Locale.
| Method Detail |
|---|
public static java.util.Calendar calendarClearTimePortion(java.util.Calendar cal)
Calendar of its time portion
public static java.util.Calendar calendarCopy(java.util.Calendar cal)
Calendar into another, always
clearing the time portion of the copied Calendar
if cal is null, then null is returned.
public static java.util.Calendar calendarCopy(java.util.Calendar cal,
java.util.Locale locale)
Calendar into another, always
clearing the time portion of the copied Calendar
if cal is null, then null is returned.
public static java.util.Calendar calendarCopy(java.util.Date date,
java.util.Locale locale)
date - - a non null Datelocale - - the Locale to use or null to use the default locale
public Color getCalendarBackground()
Color of the DateChooser's
calendar area.public Border getCalendarBorder()
Border of the DateChooser's
calendar area.public Font getCalendarFont()
Font of the DateChooser's
calendar area.public Color getCalendarForeground()
Color of the
DateChooser's calendar area.public Color getCalendarNonMonthForeground()
Color of days that are not within
the the displayed month.public Color getCalendarRolloverBackground()
Color of the
DateChooser's calendar area.public Border getCalendarRolloverBorder()
Border of the
DateChooser's calendar area.public Color getCalendarRolloverForeground()
Color of the
DateChooser's calendar area.public Color getCalendarSelectedBackground()
Color of the selected date in the
DateChooser's calendar area.public Border getCalendarSelectedBorder()
Border of the selected date in the
DateChooser's calendar area.public Font getCalendarSelectedFont()
DateChooser's calendar area.public Color getCalendarSelectedForeground()
Color of the selected date in the
DateChooser's calendar area.public java.util.Calendar getDisplayedDate()
public boolean getFastMode()
DateChooser is in fast mode, the navigation
between months does not result in the DateSelectionModel
's displayedDate being updated. The model will be updated if the user
selects a date however.
DateChoooser is in fast modepublic void setFastMode(boolean newValue)
DateChooser is in fast mode, the navigation
between months does not result in the DateSelectionModel
's displayedDate being updated. The model will be updated if the user
selects a date however.
newValue - -
the new state of fast mode.public java.util.Calendar getMaximumDate()
public java.util.Calendar getMinimumDate()
public int getDowNameLength()
ie. 4=Mond, 3=Mon, 2=Mo, 1=M
The default is 3.
public CalendarSelectionModel getModel()
CalendarSelectionModel currently used by the
DateChooser's.public int getMonthNameLength()
ie. 10=September, 4=Sept, 3=Sep, 1=S
The default is 3.
public Color getNavigationBackground()
Color of the DateChooser's
navigation area.public ImageReference getNavigationBackwardImage()
DateChooser
backward in time.
public Font getNavigationFont()
Font of the DateChooser's
navigation area.public Color getNavigationForeground()
Color of the
DateChooser's navigation area.public ImageReference getNavigationForwardImage()
DateChooser
forward in time.
public boolean getNavigationInhibited()
public Color getSelectedBackground()
Color of the
DateChooser's selected area.public Border getSelectedBorder()
Border of the DateChooser's
selected area.public java.util.Calendar getSelectedDate()
public Font getSelectedFont()
Font of the DateChooser's
selected area.public Color getSelectedForeground()
Color of the
DateChooser's selected area.public Color getSelectedRolloverBackground()
Color of the
DateChooser's selected area.public Border getSelectedRolloverBorder()
Border of the
DateChooser's selected area.public Color getSelectedRolloverForeground()
Color of the
DateChooser's selected area.public java.lang.String getWeekNumberAbbreviation()
public int getYearRange()
public boolean isMonthSelectable()
public boolean isNavigationArrowsVisible()
public boolean isSelectionDisplayBarVisible()
public boolean isYearSelectable()
public void processInput(java.lang.String inputName,
java.lang.Object inputValue)
ComponentComponent
received from the UpdateManager.
Derivative implementations should take care to invoke
super.processInput().
processInput in class ComponentinputName - the name of the inputinputValue - the value of the inputComponent.processInput(java.lang.String,
java.lang.Object)public void setCalendarBackground(Color newCalendarBackground)
Color of the
DateChooser's calendar area.
public void setCalendarBorder(Border newValue)
Border of the DateChooser's
calendar area.
public void setCalendarFont(Font newCalendarFont)
Font of the DateChooser's
calendar area.
public void setCalendarForeground(Color newCalendarForeground)
Color of the
DateChooser's calendar area.
public void setCalendarNonMonthForeground(Color newCalendarNonMonthForeground)
Color of days that are not within the
currently displayed date of the DateChooser's calendar
area.
public void setCalendarRolloverBackground(Color newCalendarRolloverBackground)
Color of the
DateChooser's calendar area.
public void setCalendarRolloverBorder(Border newValue)
Border of the selected date in the
DateChooser's calendar area.
public void setCalendarRolloverForeground(Color newCalendarRolloverForeground)
Color of the
DateChooser's calendar area.
public void setCalendarSelectedBackground(Color newCalendarBackground)
Color of the selected date in the
DateChooser's calendar area.
public void setCalendarSelectedBorder(Border newValue)
Border of the selected date in the
DateChooser's calendar area.
public void setCalendarSelectedFont(Font newFont)
Color of the selected date in the
DateChooser's calendar area.
public void setCalendarSelectedForeground(Color newCalendarForeground)
Color of the selected date in the
DateChooser's calendar area.
public void setDisplayedDate(java.util.Calendar newDisplayedDate)
DateChooser
into the model.
newDisplayedDate - -
the new displayed datepublic void setMaximumDate(java.util.Calendar newValue)
DateChooser will display. If
this is null then no date restriction is put in place.
newValue - -
the new Maximum date.public void setMinimumDate(java.util.Calendar newValue)
DateChooser will display. If
this is null then no date restriction is put in place.
newValue - -
the new Maximum date.public void setDowNameLength(int newValue)
ie. 4=Mond, 3=Mon, 2=Mo, 1=M
The default is 3.
newValue - -
the maximum length of the day of the week namespublic void setModel(CalendarSelectionModel newModel)
CalendarSelectionModel model into the
DateChooser
public void setMonthNameLength(int newValue)
ie. 10=September, 4=Sept, 3=Sep, 1=S
The default is 3.
newValue - -
the maximum length of the month namespublic void setMonthSelectable(boolean newMonthSelectable)
public void setNavigationArrowsVisible(boolean newValue)
public void setNavigationBackground(Color newNavigationBackground)
Color of the
DateChooser's navigation area.
public void setNavigationBackwardImage(ImageReference newImage)
DateChooser
backward in time.
public void setNavigationFont(Font newNavigationFont)
Font of the DateChooser's
navigation area.
public void setNavigationForeground(Color newNavigationForeground)
Color of the
DateChooser's navigation area.
public void setNavigationForwardImage(ImageReference newImage)
DateChooser
forward in time.
public void setNavigationInhibited(boolean newValue)
newValue - -
the new valuepublic void setSelectedBackground(Color newSelectedBackground)
Color of the
DateChooser's selected area.
public void setSelectedBorder(Border newValue)
Border in the DateChooser's
selected area.
public void setSelectedDate(java.util.Calendar newSelectedDate)
DateChooser
public void setSelectedFont(Font newSelectedFont)
Font of the DateChooser's selected
area.
public void setSelectedForeground(Color newSelectedForeground)
Color of the
DateChooser's selected area.
public void setSelectedRolloverBackground(Color newSelectedRolloverBackground)
Color of the
DateChooser's selected area.
public void setSelectedRolloverBorder(Border newValue)
Border in the DateChooser's
selected area.
public void setSelectedRolloverForeground(Color newSelectedRolloverForeground)
Color of the
DateChooser's selected area.
public void setSelectionDisplayBarVisible(boolean newValue)
public void setWeekNumberAbbreviation(java.lang.String abbreviation)
public void setYearRange(int newYearRange)
public void setYearSelectable(boolean newYearSelectable)
public Color getWeekNumberForeground()
public void setWeekNumberForeground(Color newValue)
newValue - - the new color
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||