EchoPoint
1.0

echopoint
Class DatePicker

java.lang.Object
  extended bynextapp.echo.Component
      extended bynextapp.echo.Container
          extended byechopoint.EchoPointComponent
              extended byechopoint.DatePicker
All Implemented Interfaces:
MouseCursorable, ReflectionSetter, java.io.Serializable, ToolTipPopUpSupport, nextapp.echo.ToolTipSupport

public class DatePicker
extends EchoPointComponent

The DatePicker 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.

Author:
Brad Baker
See Also:
Serialized Form

Nested Class Summary
static class DatePicker.NestedStyleInfo
          Nested public static StyleInfo class.
 
Field Summary
static java.lang.String BORDER_COLOR_CHANGED_PROPERTY
           
static java.lang.String BORDER_SIZE_CHANGED_PROPERTY
           
static java.lang.String CALENDAR_BACKGROUND_CHANGED_PROPERTY
           
static java.lang.String CALENDAR_BACKGROUND_SELECTED_CHANGED_PROPERTY
           
static java.lang.String CALENDAR_FONT_CHANGED_PROPERTY
          Property Names
static java.lang.String CALENDAR_FONT_SELECTED_CHANGED_PROPERTY
           
static java.lang.String CALENDAR_FOREGROUND_CHANGED_PROPERTY
           
static java.lang.String CALENDAR_FOREGROUND_SELECTED_CHANGED_PROPERTY
           
static java.lang.String CALENDAR_NONMONTH_FOREGROUND_CHANGED_PROPERTY
           
static java.lang.String CALENDAR_ROLLOVER_BACKGROUND_CHANGED_PROPERTY
           
static java.lang.String CALENDAR_ROLLOVER_FOREGROUND_CHANGED_PROPERTY
           
static int CLR_SCHEME_BW
           
static int CLR_SCHEME_COLOR
           
static int CLR_SCHEME_DEFAULT
           
static java.lang.String COLOR_SCHEME_CHANGED_PROPERTY
           
static nextapp.echo.Font defaultCalendarFont
           
static nextapp.echo.Font defaultNavigationFont
           
static nextapp.echo.Font defaultSelectedFont
           
static java.lang.String DOW_NAME_LENGTH_PROPERTY_CHANGED
           
static java.lang.String LOCALE_CHANGED_PROPERTY
           
static java.lang.String MODEL_CHANGED_PROPERTY
           
static java.lang.String MONTH_NAME_LENGTH_PROPERTY_CHANGED
           
static java.lang.String NAVIGATION_ARROWS_CHANGED_PROPERTY
           
static java.lang.String NAVIGATION_BACKGROUND_CHANGED_PROPERTY
           
static java.lang.String NAVIGATION_FONT_CHANGED_PROPERTY
           
static java.lang.String NAVIGATION_FOREGROUND_CHANGED_PROPERTY
           
static java.lang.String NAVIGATION_ROLLOVER_BACKGROUND_CHANGED_PROPERTY
           
static java.lang.String NAVIGATION_ROLLOVER_FOREGROUND_CHANGED_PROPERTY
           
static java.lang.String SELECTABLE_MONTH_CHANGED_PROPERTY
           
static java.lang.String SELECTABLE_YEAR__CHANGED_PROPERTY
           
static java.lang.String SELECTED_BACKGROUND_CHANGED_PROPERTY
           
static java.lang.String SELECTED_FONT_CHANGED_PROPERTY
           
static java.lang.String SELECTED_FOREGROUND_CHANGED_PROPERTY
           
static java.lang.String SELECTED_ROLLOVER_BACKGROUND_CHANGED_PROPERTY
           
static java.lang.String SELECTED_ROLLOVER_FOREGROUND_CHANGED_PROPERTY
           
static java.lang.String SELECTION_DISPLAYBAR_CHANGED_PROPERTY
           
static java.lang.String STYLE_BORDER_COLOR
          A style constant for the Border Color property.
static java.lang.String STYLE_BORDER_SIZE
          A style constant for the Border Size property.
static java.lang.String STYLE_CALENDAR_BACKGROUND
          A style constant for the Calendar Background property.
static java.lang.String STYLE_CALENDAR_FONT
          A style constant for the Calendar Font property.
static java.lang.String STYLE_CALENDAR_FOREGROUND
          A style constant for the Calendar Foreground property.
static java.lang.String STYLE_CALENDAR_NON_MONTH_FOREGROUND
          A style constant for the Calendar Non Month Foreground property.
static java.lang.String STYLE_CALENDAR_ROLLOVER_BACKGROUND
          A style constant for the Calendar Rollover Background property.
static java.lang.String STYLE_CALENDAR_ROLLOVER_FOREGROUND
          A style constant for the Calendar Rollover Foreground property.
static java.lang.String STYLE_CALENDAR_SELECTED_BACKGROUND
          A style constant for the Calendar Selected Background property.
static java.lang.String STYLE_CALENDAR_SELECTED_FONT
          A style constant for the Calendar Selected Font property.
static java.lang.String STYLE_CALENDAR_SELECTED_FOREGROUND
          A style constant for the Calendar Selected Foreground property.
static java.lang.String STYLE_DOW_NAME_LENGTH
          A style constant for the Day of the Week Name Length property.
static java.lang.String STYLE_MONTH_NAME_LENGTH
          A style constant for the Month Name Length property.
static java.lang.String STYLE_MONTH_SELECTABLE
          A style constant for the Month Selectable property.
static java.lang.String STYLE_NAVIGATION_ARROWS
          A style constant for the Navigation Arrows property.
static java.lang.String STYLE_NAVIGATION_BACKGROUND
          A style constant for the Navigation Background property.
static java.lang.String STYLE_NAVIGATION_FONT
          A style constant for the Navigation Font property.
static java.lang.String STYLE_NAVIGATION_FOREGROUND
          A style constant for the Navigation Foreground property.
static java.lang.String STYLE_NAVIGATION_ROLLOVER_BACKGROUND
          A style constant for the Navigation Rollover Background property.
static java.lang.String STYLE_NAVIGATION_ROLLOVER_FOREGROUND
          A style constant for the Navigation Rollover Foreground property.
static java.lang.String STYLE_SELECTED_BACKGROUND
          A style constant for the Selected Background property.
static java.lang.String STYLE_SELECTED_FONT
          A style constant for the Selected Font property.
static java.lang.String STYLE_SELECTED_FOREGROUND
          A style constant for the Selected Foreground property.
static java.lang.String STYLE_SELECTED_ROLLOVER_BACKGROUND
          A style constant for the Selected Rollover Background property.
static java.lang.String STYLE_SELECTED_ROLLOVER_FOREGROUND
          A style constant for the Selected Rollover Foreground property.
static java.lang.String STYLE_SELECTION_DISPLAYBAR
          A style constant for the SelectionDisplayBar property.
static java.lang.String STYLE_TOOL_TIP_TEXT
          A style constant for the ToolTipText property.
static java.lang.String STYLE_WEEK_NUMBER_ABBREVIATION
          A style constant for the WeekNumber property.
static java.lang.String STYLE_YEAR_RANGE
          A style constant for the Year Range property.
static java.lang.String STYLE_YEAR_SELECTABLE
          A style constant for the Year Selectable property.
static java.lang.String WEEK_NUMBER_ABBREVIATION_CHANGED_PROPERTY
           
static java.lang.String YEAR_RANGE_CHANGED_PROPERTY
          static style "name to value class" mapping array
 
Fields inherited from class echopoint.EchoPointComponent
TOOL_TIP_TEXT_CHANGED_PROPERTY, toolTipPopUp
 
Fields inherited from class nextapp.echo.Component
BACKGROUND_CHANGED_PROPERTY, CHILDREN_CHANGED_PROPERTY, ENABLED_CHANGED_PROPERTY, FONT_CHANGED_PROPERTY, FOREGROUND_CHANGED_PROPERTY, IDENTIFIER_CHANGED_PROPERTY, listenerList, STYLE_BACKGROUND, STYLE_FONT, STYLE_FOREGROUND, UPDATE_PROPERTY, VISIBLE_CHANGED_PROPERTY
 
Fields inherited from interface echopoint.positionable.MouseCursorable
borderStyleSymbolics, 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, STYLE_MOUSE_CURSOR, STYLE_MOUSE_CURSOR_URI
 
Constructor Summary
DatePicker()
          Constructs a DatePicker with the currently selected date set to right now.
DatePicker(java.util.Calendar newSelectedDate)
          Constructs a DatePicker with the currently selected date set to the one provided.
DatePicker(java.util.Calendar newSelectedDate, java.util.Locale locale)
          Constructs a DatePicker with the currently selected date set to the one provided and a the specified Locale.
 
Method Summary
 void addChangeListener(nextapp.echo.event.ChangeListener l)
          Adds a ChangeListener to the date picker.
 void applyStyle(nextapp.echo.Style style)
          Applies the provided style to the component.
protected  void buildColorScheme(int colorScheme)
          Builds the default Color scheme
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, java.util.Locale locale)
          Copys the values of one calendar into another, always clearing the time portion of the new calendar
 nextapp.echo.Color getBorderColor()
           
 int getBorderSize()
           
 nextapp.echo.Color getCalendarBackground()
           
 nextapp.echo.Font getCalendarFont()
           
 nextapp.echo.Color getCalendarForeground()
           
 nextapp.echo.Color getCalendarNonMonthForeground()
           
 nextapp.echo.Color getCalendarRollOverBackground()
           
 nextapp.echo.Color getCalendarRollOverForeground()
           
 nextapp.echo.Color getCalendarSelectedBackground()
           
 nextapp.echo.Font getCalendarSelectedFont()
           
 nextapp.echo.Color getCalendarSelectedForeground()
           
 int getColorScheme()
           
 java.util.Calendar getDisplayedDate()
           
 int getDowNameLength()
          Gets the length of the day of the week names when displayed.
 java.util.Locale getLocale()
          Returns the Locale used by the DatePicker for formatting dates
 CalendarSelectionModel getModel()
           
 int getMonthNameLength()
          Gets the length of the month names when displayed.
 nextapp.echo.Color getNavigationBackground()
           
 nextapp.echo.Font getNavigationFont()
           
 nextapp.echo.Color getNavigationForeground()
           
 nextapp.echo.Color getNavigationRollOverBackground()
           
 nextapp.echo.Color getNavigationRollOverForeground()
           
 nextapp.echo.Color getSelectedBackground()
           
 java.util.Calendar getSelectedDate()
           
 nextapp.echo.Font getSelectedFont()
           
 nextapp.echo.Color getSelectedForeground()
           
 nextapp.echo.Color getSelectedRollOverBackground()
           
 nextapp.echo.Color getSelectedRollOverForeground()
           
 java.lang.String getWeekNumberAbbreviation()
          Returns String for weekNumberAbbreviation (WN)
 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 removeChangeListener(nextapp.echo.event.ChangeListener l)
          Removes a ChangeListener from this component.
 java.lang.Object set(java.lang.reflect.Field field, java.lang.Object newValue)
          Called to save the old value of a field, set in a new value and return the old value of a field.
 void setBorderColor(nextapp.echo.Color newBorderColor)
          Sets the Color of the DatePicker's border
This methods fires a PropertyChangeEvent with a getPropertyName() value of DatePicker.BORDER_COLOR_CHANGED_PROPERTY
 void setBorderSize(int newBorderSize)
          Sets the size of the DatePicker's border
This methods fires a PropertyChangeEvent with a getPropertyName() value of DatePicker.BORDER_SIZE_CHANGED_PROPERTY
 void setCalendarBackground(nextapp.echo.Color newCalendarBackground)
          Sets the background Color of the DatePicker's calendar area.
 void setCalendarFont(nextapp.echo.Font newCalendarFont)
          Sets the background Font of the DatePicker's calendar area.
 void setCalendarForeground(nextapp.echo.Color newCalendarForeground)
          Sets the foreground Color of the DatePicker's calendar area.
 void setCalendarNonMonthForeground(nextapp.echo.Color newCalendarNonMonthForeground)
          Sets the foreground Color of days that are not within the currently displayed date of the DatePicker's calendar area.
 void setCalendarRollOverBackground(nextapp.echo.Color newCalendarRollOverBackground)
          Sets the rollover background Color of the DatePicker's calendar area.
 void setCalendarRollOverForeground(nextapp.echo.Color newCalendarRollOverForeground)
          Sets the rollover foreground Color of the DatePicker's calendar area.
 void setCalendarSelectedBackground(nextapp.echo.Color newCalendarBackground)
          Sets the background Color of the selected date in the DatePicker's calendar area.
 void setCalendarSelectedFont(nextapp.echo.Font newFont)
          Sets the foreground Color of the selected date in the DatePicker's calendar area.
 void setCalendarSelectedForeground(nextapp.echo.Color newCalendarForeground)
          Sets the foreground Color of the selected date in the DatePicker's calendar area.
 void setColorScheme(int newColorScheme)
          Sets the color scheme in use within the DatePicker
This methods fires a PropertyChangeEvent with a getPropertyName() value of DatePicker.COLOR_SCHEME_CHANGED_PROPERTY
 void setDisplayedDate(java.util.Calendar newDisplayedDate)
          Sets the currently displayed date within the DatePicker
This methods causes the underlying CalendarSelectionModel to change.
 void setDowNameLength(int newValue)
          Sets the length of the day of the week names when displayed.
 void setLocale(java.util.Locale newLocale)
          Sets the Locale used by the DatePicker for formatting dates
 void setModel(CalendarSelectionModel newModel)
          Sets a new CalendarSelectionModel model into the DatePicker
This methods fires a PropertyChangeEvent with a getPropertyName() value of DatePicker.MODEL_CHANGED_PROPERTY
 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 newVisible)
          Sets whether the NavigationArrows are visible This methods fires a PropertyChangeEvent with a getPropertyName() value of DatePicker.NAVIGATION_ARROWS_CHANGED_PROPERTY
 void setNavigationBackground(nextapp.echo.Color newNavigationBackground)
          Sets the background Color of the DatePicker's navigation area.
 void setNavigationFont(nextapp.echo.Font newNavigationFont)
          Sets the background Font of the DatePicker's navigation area.
 void setNavigationForeground(nextapp.echo.Color newNavigationForeground)
          Sets the foreground Color of the DatePicker's navigation area.
 void setNavigationRollOverBackground(nextapp.echo.Color newNavigationRollOverBackground)
          Sets the rollover background Color of the DatePicker's navigation area.
 void setNavigationRollOverForeground(nextapp.echo.Color newNavigationRollOverForeground)
          Sets the rollover foreground Color of the DatePicker's navigation area.
 void setSelectedBackground(nextapp.echo.Color newSelectedBackground)
          Sets the background Color of the DatePicker's selected area.
 void setSelectedDate(java.util.Calendar newSelectedDate)
          Sets the currently selected date within the DatePicker
This methods causes the underlying CalendarSelectionModel to change.
 void setSelectedFont(nextapp.echo.Font newSelectedFont)
          Sets the Font of the DatePicker's selected area.
 void setSelectedForeground(nextapp.echo.Color newSelectedForeground)
          Sets the foreground Color of the DatePicker's selected area.
 void setSelectedRollOverBackground(nextapp.echo.Color newSelectedRollOverBackground)
          Sets the rollover background Color of the DatePicker's selected area.
 void setSelectedRollOverForeground(nextapp.echo.Color newSelectedRollOverForeground)
          Sets the rollover foreground Color of the DatePicker's selected area.
 void setSelectionDisplayBarVisible(boolean newVisible)
          Sets whether the SelectionDisplayBar is visible This methods fires a PropertyChangeEvent with a getPropertyName() value of DatePicker.SELECTION_DISPLAYBAR_CHANGED_PROPERTY
 void setWeekNumberAbbreviation(java.lang.String abbreviation)
          Sets weekNumberAbbreviation This methods fires a PropertyChangeEvent with a getPropertyName() value of DatePicker.WEEK_NUMBER_ABBREVIATION_CHANGED_PROPERTY
 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 echopoint.EchoPointComponent
getMouseCursor, getMouseCursorURI, getToolTipPopUp, getToolTipText, set, set, set, set, set, set, set, set, set, setEnabledAllChildren, setMouseCursor, setMouseCursorURI, setToolTipText, validate
 
Methods inherited from class nextapp.echo.Component
add, add, addHierarchyListener, addPropertyChangeListener, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getComponent, getComponentCount, getComponents, getEchoInstance, getFont, getForeground, getIdentifier, getParent, indexOf, init, isAncestorOf, isEnabled, isRegistered, isShowing, isVisible, remove, remove, removeAll, removeHierarchyListener, removePropertyChangeListener, setBackground, setEnabled, setFont, setForeground, setIdentifier, setVisible, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BORDER_COLOR_CHANGED_PROPERTY

public static final java.lang.String BORDER_COLOR_CHANGED_PROPERTY
See Also:
Constant Field Values

BORDER_SIZE_CHANGED_PROPERTY

public static final java.lang.String BORDER_SIZE_CHANGED_PROPERTY
See Also:
Constant Field Values

CALENDAR_BACKGROUND_CHANGED_PROPERTY

public static final java.lang.String CALENDAR_BACKGROUND_CHANGED_PROPERTY
See Also:
Constant Field Values

CALENDAR_BACKGROUND_SELECTED_CHANGED_PROPERTY

public static final java.lang.String CALENDAR_BACKGROUND_SELECTED_CHANGED_PROPERTY
See Also:
Constant Field Values

CALENDAR_FONT_CHANGED_PROPERTY

public static final java.lang.String CALENDAR_FONT_CHANGED_PROPERTY
Property Names

See Also:
Constant Field Values

CALENDAR_FOREGROUND_CHANGED_PROPERTY

public static final java.lang.String CALENDAR_FOREGROUND_CHANGED_PROPERTY
See Also:
Constant Field Values

CALENDAR_FOREGROUND_SELECTED_CHANGED_PROPERTY

public static final java.lang.String CALENDAR_FOREGROUND_SELECTED_CHANGED_PROPERTY
See Also:
Constant Field Values

CALENDAR_FONT_SELECTED_CHANGED_PROPERTY

public static final java.lang.String CALENDAR_FONT_SELECTED_CHANGED_PROPERTY
See Also:
Constant Field Values

CALENDAR_NONMONTH_FOREGROUND_CHANGED_PROPERTY

public static final java.lang.String CALENDAR_NONMONTH_FOREGROUND_CHANGED_PROPERTY
See Also:
Constant Field Values

CALENDAR_ROLLOVER_BACKGROUND_CHANGED_PROPERTY

public static final java.lang.String CALENDAR_ROLLOVER_BACKGROUND_CHANGED_PROPERTY
See Also:
Constant Field Values

CALENDAR_ROLLOVER_FOREGROUND_CHANGED_PROPERTY

public static final java.lang.String CALENDAR_ROLLOVER_FOREGROUND_CHANGED_PROPERTY
See Also:
Constant Field Values

CLR_SCHEME_BW

public static final int CLR_SCHEME_BW
See Also:
Constant Field Values

CLR_SCHEME_COLOR

public static final int CLR_SCHEME_COLOR
See Also:
Constant Field Values

CLR_SCHEME_DEFAULT

public static final int CLR_SCHEME_DEFAULT
See Also:
Constant Field Values

COLOR_SCHEME_CHANGED_PROPERTY

public static final java.lang.String COLOR_SCHEME_CHANGED_PROPERTY
See Also:
Constant Field Values

defaultCalendarFont

public static nextapp.echo.Font defaultCalendarFont

defaultNavigationFont

public static nextapp.echo.Font defaultNavigationFont

defaultSelectedFont

public static nextapp.echo.Font defaultSelectedFont

DOW_NAME_LENGTH_PROPERTY_CHANGED

public static final java.lang.String DOW_NAME_LENGTH_PROPERTY_CHANGED
See Also:
Constant Field Values

MONTH_NAME_LENGTH_PROPERTY_CHANGED

public static final java.lang.String MONTH_NAME_LENGTH_PROPERTY_CHANGED
See Also:
Constant Field Values

LOCALE_CHANGED_PROPERTY

public static final java.lang.String LOCALE_CHANGED_PROPERTY
See Also:
Constant Field Values

MODEL_CHANGED_PROPERTY

public static final java.lang.String MODEL_CHANGED_PROPERTY
See Also:
Constant Field Values

NAVIGATION_BACKGROUND_CHANGED_PROPERTY

public static final java.lang.String NAVIGATION_BACKGROUND_CHANGED_PROPERTY
See Also:
Constant Field Values

NAVIGATION_FONT_CHANGED_PROPERTY

public static final java.lang.String NAVIGATION_FONT_CHANGED_PROPERTY
See Also:
Constant Field Values

NAVIGATION_FOREGROUND_CHANGED_PROPERTY

public static final java.lang.String NAVIGATION_FOREGROUND_CHANGED_PROPERTY
See Also:
Constant Field Values

NAVIGATION_ROLLOVER_BACKGROUND_CHANGED_PROPERTY

public static final java.lang.String NAVIGATION_ROLLOVER_BACKGROUND_CHANGED_PROPERTY
See Also:
Constant Field Values

NAVIGATION_ROLLOVER_FOREGROUND_CHANGED_PROPERTY

public static final java.lang.String NAVIGATION_ROLLOVER_FOREGROUND_CHANGED_PROPERTY
See Also:
Constant Field Values

NAVIGATION_ARROWS_CHANGED_PROPERTY

public static final java.lang.String NAVIGATION_ARROWS_CHANGED_PROPERTY
See Also:
Constant Field Values

SELECTABLE_MONTH_CHANGED_PROPERTY

public static final java.lang.String SELECTABLE_MONTH_CHANGED_PROPERTY
See Also:
Constant Field Values

SELECTABLE_YEAR__CHANGED_PROPERTY

public static final java.lang.String SELECTABLE_YEAR__CHANGED_PROPERTY
See Also:
Constant Field Values

SELECTED_BACKGROUND_CHANGED_PROPERTY

public static final java.lang.String SELECTED_BACKGROUND_CHANGED_PROPERTY
See Also:
Constant Field Values

SELECTED_FONT_CHANGED_PROPERTY

public static final java.lang.String SELECTED_FONT_CHANGED_PROPERTY
See Also:
Constant Field Values

SELECTED_FOREGROUND_CHANGED_PROPERTY

public static final java.lang.String SELECTED_FOREGROUND_CHANGED_PROPERTY
See Also:
Constant Field Values

SELECTED_ROLLOVER_BACKGROUND_CHANGED_PROPERTY

public static final java.lang.String SELECTED_ROLLOVER_BACKGROUND_CHANGED_PROPERTY
See Also:
Constant Field Values

SELECTED_ROLLOVER_FOREGROUND_CHANGED_PROPERTY

public static final java.lang.String SELECTED_ROLLOVER_FOREGROUND_CHANGED_PROPERTY
See Also:
Constant Field Values

SELECTION_DISPLAYBAR_CHANGED_PROPERTY

public static final java.lang.String SELECTION_DISPLAYBAR_CHANGED_PROPERTY
See Also:
Constant Field Values

WEEK_NUMBER_ABBREVIATION_CHANGED_PROPERTY

public static final java.lang.String WEEK_NUMBER_ABBREVIATION_CHANGED_PROPERTY
See Also:
Constant Field Values

STYLE_BORDER_COLOR

public static final java.lang.String STYLE_BORDER_COLOR
A style constant for the Border Color property. Values of this key must be of type nextapp.echo.Color.

See Also:
Constant Field Values

STYLE_BORDER_SIZE

public static final java.lang.String STYLE_BORDER_SIZE
A style constant for the Border Size property. Values of this key must be of type Integer.

See Also:
Constant Field Values

STYLE_CALENDAR_BACKGROUND

public static final java.lang.String STYLE_CALENDAR_BACKGROUND
A style constant for the Calendar Background property. Values of this key must be of type nextapp.echo.Color.

See Also:
Constant Field Values

STYLE_CALENDAR_FONT

public static final java.lang.String STYLE_CALENDAR_FONT
A style constant for the Calendar Font property. Values of this key must be of type nextapp.echo.Font.

See Also:
Constant Field Values

STYLE_CALENDAR_FOREGROUND

public static final java.lang.String STYLE_CALENDAR_FOREGROUND
A style constant for the Calendar Foreground property. Values of this key must be of type nextapp.echo.Color.

See Also:
Constant Field Values

STYLE_CALENDAR_NON_MONTH_FOREGROUND

public static final java.lang.String STYLE_CALENDAR_NON_MONTH_FOREGROUND
A style constant for the Calendar Non Month Foreground property. Values of this key must be of type nextapp.echo.Color.

See Also:
Constant Field Values

STYLE_CALENDAR_ROLLOVER_BACKGROUND

public static final java.lang.String STYLE_CALENDAR_ROLLOVER_BACKGROUND
A style constant for the Calendar Rollover Background property. Values of this key must be of type nextapp.echo.Color.

See Also:
Constant Field Values

STYLE_CALENDAR_ROLLOVER_FOREGROUND

public static final java.lang.String STYLE_CALENDAR_ROLLOVER_FOREGROUND
A style constant for the Calendar Rollover Foreground property. Values of this key must be of type nextapp.echo.Color.

See Also:
Constant Field Values

STYLE_CALENDAR_SELECTED_BACKGROUND

public static final java.lang.String STYLE_CALENDAR_SELECTED_BACKGROUND
A style constant for the Calendar Selected Background property. Values of this key must be of type nextapp.echo.Color.

See Also:
Constant Field Values

STYLE_CALENDAR_SELECTED_FOREGROUND

public static final java.lang.String STYLE_CALENDAR_SELECTED_FOREGROUND
A style constant for the Calendar Selected Foreground property. Values of this key must be of type nextapp.echo.Color.

See Also:
Constant Field Values

STYLE_CALENDAR_SELECTED_FONT

public static final java.lang.String STYLE_CALENDAR_SELECTED_FONT
A style constant for the Calendar Selected Font property. Values of this key must be of type nextapp.echo.Font.

See Also:
Constant Field Values

STYLE_DOW_NAME_LENGTH

public static final java.lang.String STYLE_DOW_NAME_LENGTH
A style constant for the Day of the Week Name Length property. Values of this key must be of type Integer.

See Also:
Constant Field Values

STYLE_MONTH_NAME_LENGTH

public static final java.lang.String STYLE_MONTH_NAME_LENGTH
A style constant for the Month Name Length property. Values of this key must be of type Integer.

See Also:
Constant Field Values

STYLE_MONTH_SELECTABLE

public static final java.lang.String STYLE_MONTH_SELECTABLE
A style constant for the Month Selectable property. Values of this key must be of type boolean

See Also:
Constant Field Values

STYLE_NAVIGATION_BACKGROUND

public static final java.lang.String STYLE_NAVIGATION_BACKGROUND
A style constant for the Navigation Background property. Values of this key must be of type nextapp.echo.Color.

See Also:
Constant Field Values

STYLE_NAVIGATION_FONT

public static final java.lang.String STYLE_NAVIGATION_FONT
A style constant for the Navigation Font property. Values of this key must be of type nextapp.echo.Font.

See Also:
Constant Field Values

STYLE_NAVIGATION_FOREGROUND

public static final java.lang.String STYLE_NAVIGATION_FOREGROUND
A style constant for the Navigation Foreground property. Values of this key must be of type nextapp.echo.Color.

See Also:
Constant Field Values

STYLE_NAVIGATION_ROLLOVER_BACKGROUND

public static final java.lang.String STYLE_NAVIGATION_ROLLOVER_BACKGROUND
A style constant for the Navigation Rollover Background property. Values of this key must be of type nextapp.echo.Color.

See Also:
Constant Field Values

STYLE_NAVIGATION_ROLLOVER_FOREGROUND

public static final java.lang.String STYLE_NAVIGATION_ROLLOVER_FOREGROUND
A style constant for the Navigation Rollover Foreground property. Values of this key must be of type nextapp.echo.Color.

See Also:
Constant Field Values

STYLE_NAVIGATION_ARROWS

public static final java.lang.String STYLE_NAVIGATION_ARROWS
A style constant for the Navigation Arrows property. Values of this key must be of type boolean

See Also:
Constant Field Values

STYLE_SELECTED_BACKGROUND

public static final java.lang.String STYLE_SELECTED_BACKGROUND
A style constant for the Selected Background property. Values of this key must be of type nextapp.echo.Color.

See Also:
Constant Field Values

STYLE_SELECTED_FONT

public static final java.lang.String STYLE_SELECTED_FONT
A style constant for the Selected Font property. Values of this key must be of type nextapp.echo.Font.

See Also:
Constant Field Values

STYLE_SELECTED_FOREGROUND

public static final java.lang.String STYLE_SELECTED_FOREGROUND
A style constant for the Selected Foreground property. Values of this key must be of type nextapp.echo.Color.

See Also:
Constant Field Values

STYLE_SELECTED_ROLLOVER_BACKGROUND

public static final java.lang.String STYLE_SELECTED_ROLLOVER_BACKGROUND
A style constant for the Selected Rollover Background property. Values of this key must be of type nextapp.echo.Color.

See Also:
Constant Field Values

STYLE_SELECTED_ROLLOVER_FOREGROUND

public static final java.lang.String STYLE_SELECTED_ROLLOVER_FOREGROUND
A style constant for the Selected Rollover Foreground property. Values of this key must be of type nextapp.echo.Color.

See Also:
Constant Field Values

STYLE_TOOL_TIP_TEXT

public static final java.lang.String STYLE_TOOL_TIP_TEXT
A style constant for the ToolTipText property. Values of this key must be of type String

See Also:
Constant Field Values

STYLE_YEAR_RANGE

public static final java.lang.String STYLE_YEAR_RANGE
A style constant for the Year Range property. Values of this key must be of type int

See Also:
Constant Field Values

STYLE_YEAR_SELECTABLE

public static final java.lang.String STYLE_YEAR_SELECTABLE
A style constant for the Year Selectable property. Values of this key must be of type boolean

See Also:
Constant Field Values

STYLE_SELECTION_DISPLAYBAR

public static final java.lang.String STYLE_SELECTION_DISPLAYBAR
A style constant for the SelectionDisplayBar property. Values of this key must be of type boolean

See Also:
Constant Field Values

STYLE_WEEK_NUMBER_ABBREVIATION

public static final java.lang.String STYLE_WEEK_NUMBER_ABBREVIATION
A style constant for the WeekNumber property. Values of this key must be of type String

See Also:
Constant Field Values

YEAR_RANGE_CHANGED_PROPERTY

public static final java.lang.String YEAR_RANGE_CHANGED_PROPERTY
static style "name to value class" mapping array

See Also:
Constant Field Values
Constructor Detail

DatePicker

public DatePicker()
Constructs a DatePicker with the currently selected date set to right now.


DatePicker

public DatePicker(java.util.Calendar newSelectedDate)
Constructs a DatePicker with the currently selected date set to the one provided.


DatePicker

public DatePicker(java.util.Calendar newSelectedDate,
                  java.util.Locale locale)
Constructs a DatePicker with the currently selected date set to the one provided and a the specified Locale.

Method Detail

calendarClearTimePortion

public static java.util.Calendar calendarClearTimePortion(java.util.Calendar cal)
Clears a calendar of its time portion


calendarCopy

public 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 new calendar


addChangeListener

public void addChangeListener(nextapp.echo.event.ChangeListener l)
Adds a ChangeListener to the date picker.

Parameters:
l - The ChangeListener to be added.

applyStyle

public void applyStyle(nextapp.echo.Style style)
Applies the provided style to the component. The base nextapp.echo.Component style names can be used as well.

Specified by:
applyStyle in interface MouseCursorable
Overrides:
applyStyle in class EchoPointComponent
See Also:
Component.applyStyle(nextapp.echo.Style)

buildColorScheme

protected void buildColorScheme(int colorScheme)
Builds the default Color scheme


getBorderColor

public nextapp.echo.Color getBorderColor()
Returns:
The Color of the DatePicker's border.

getBorderSize

public int getBorderSize()
Returns:
The size of the DatePicker's border.

getCalendarBackground

public nextapp.echo.Color getCalendarBackground()
Returns:
The Color of the DatePicker's calendar area.

getCalendarFont

public nextapp.echo.Font getCalendarFont()
Returns:
The Font of the DatePicker's calendar area.

getCalendarForeground

public nextapp.echo.Color getCalendarForeground()
Returns:
The foreground Color of the DatePicker's calendar area.

getCalendarNonMonthForeground

public nextapp.echo.Color getCalendarNonMonthForeground()
Returns:
The foreground Color of days that are not within the the displayed month.

getCalendarRollOverBackground

public nextapp.echo.Color getCalendarRollOverBackground()
Returns:
The rollover background Color of the DatePicker's calendar area.

getCalendarRollOverForeground

public nextapp.echo.Color getCalendarRollOverForeground()
Returns:
The rollover foreground Color of the DatePicker's calendar area.

getCalendarSelectedBackground

public nextapp.echo.Color getCalendarSelectedBackground()
Returns:
The Color of the selected date in the DatePicker's calendar area.

getCalendarSelectedForeground

public nextapp.echo.Color getCalendarSelectedForeground()
Returns:
The foreground Color of the selected date in theDatePicker's calendar area.

getCalendarSelectedFont

public nextapp.echo.Font getCalendarSelectedFont()
Returns:
The code>Font of the selected date in theDatePicker's calendar area.

getColorScheme

public int getColorScheme()
Returns:
The color Scheme in use

getDisplayedDate

public java.util.Calendar getDisplayedDate()
Returns:
The currently displayed date.

getDowNameLength

public int getDowNameLength()
Gets the length of the day of the week names when displayed.

ie. 4=Mond, 3=Mon, 2=Mo, 1=M

The default is 3.

Returns:
the length of the day or the week names

getMonthNameLength

public int getMonthNameLength()
Gets the length of the month names when displayed.

ie. 10=September, 4=Sept, 3=Sep, 1=S

The default is 3.

Returns:
the length of the month names

getLocale

public java.util.Locale getLocale()
Returns the Locale used by the DatePicker for formatting dates

Returns:
java.util.Locale

getModel

public CalendarSelectionModel getModel()
Returns:
The CalendarSelectionModel currently used by the DatePicker's.

getNavigationBackground

public nextapp.echo.Color getNavigationBackground()
Returns:
The Color of the DatePicker's navigation area.

getNavigationFont

public nextapp.echo.Font getNavigationFont()
Returns:
The Font of the DatePicker's navigation area.

getNavigationForeground

public nextapp.echo.Color getNavigationForeground()
Returns:
The foreground Color of the DatePicker's navigation area.

getNavigationRollOverBackground

public nextapp.echo.Color getNavigationRollOverBackground()
Returns:
The rollover background Color of the DatePicker's navigation area.

getNavigationRollOverForeground

public nextapp.echo.Color getNavigationRollOverForeground()
Returns:
The rollover foreground Color of the DatePicker's navigation area.

getSelectedBackground

public nextapp.echo.Color getSelectedBackground()
Returns:
The background Color of the DatePicker's selected area.

getSelectedDate

public java.util.Calendar getSelectedDate()
Returns:
The currently selected date

getSelectedFont

public nextapp.echo.Font getSelectedFont()
Returns:
The Font of the DatePicker's selected area.

getSelectedForeground

public nextapp.echo.Color getSelectedForeground()
Returns:
The foreground Color of the DatePicker's selected area.

getSelectedRollOverBackground

public nextapp.echo.Color getSelectedRollOverBackground()
Returns:
The rollover background Color of the DatePicker's selected area.

getSelectedRollOverForeground

public nextapp.echo.Color getSelectedRollOverForeground()
Returns:
The rollover foreground Color of the DatePicker's selected area.

getYearRange

public int getYearRange()
Returns the number of years that will appear in the selectable Year field.

Returns:
int

isMonthSelectable

public boolean isMonthSelectable()
Returns true if the Month display is selectable

Returns:
boolean

isYearSelectable

public boolean isYearSelectable()
Returns true if the Year display is selectable.

Returns:
boolean

isSelectionDisplayBarVisible

public boolean isSelectionDisplayBarVisible()
Returns true if the SelectionDisplayBar is visible

Returns:
boolean

isNavigationArrowsVisible

public boolean isNavigationArrowsVisible()
Returns true if the NavigationsArrows are visible

Returns:
boolean

getWeekNumberAbbreviation

public java.lang.String getWeekNumberAbbreviation()
Returns String for weekNumberAbbreviation (WN)

Returns:
String

removeChangeListener

public void removeChangeListener(nextapp.echo.event.ChangeListener l)
Removes a ChangeListener from this component.

Parameters:
l - the ChangeListener to remove

setBorderColor

public void setBorderColor(nextapp.echo.Color newBorderColor)
Sets the Color of the DatePicker's border
This methods fires a PropertyChangeEvent with a getPropertyName() value of DatePicker.BORDER_COLOR_CHANGED_PROPERTY


setBorderSize

public void setBorderSize(int newBorderSize)
Sets the size of the DatePicker's border
This methods fires a PropertyChangeEvent with a getPropertyName() value of DatePicker.BORDER_SIZE_CHANGED_PROPERTY


setCalendarBackground

public void setCalendarBackground(nextapp.echo.Color newCalendarBackground)
Sets the background Color of the DatePicker's calendar area.
This methods fires a PropertyChangeEvent with a getPropertyName() value of DatePicker.CALENDAR_BACKGROUND_CHANGED_PROPERTY


setCalendarFont

public void setCalendarFont(nextapp.echo.Font newCalendarFont)
Sets the background Font of the DatePicker's calendar area.
This methods fires a PropertyChangeEvent with a getPropertyName() value of DatePicker.CALENDAR_FONT_CHANGED_PROPERTY


setCalendarForeground

public void setCalendarForeground(nextapp.echo.Color newCalendarForeground)
Sets the foreground Color of the DatePicker's calendar area.
This methods fires a PropertyChangeEvent with a getPropertyName() value of DatePicker.CALENDAR_FOREGROUND_CHANGED_PROPERTY


setCalendarNonMonthForeground

public void setCalendarNonMonthForeground(nextapp.echo.Color newCalendarNonMonthForeground)
Sets the foreground Color of days that are not within the currently displayed date of the DatePicker's calendar area.
This methods fires a PropertyChangeEvent with a getPropertyName() value of DatePicker.CALENDAR_NONMONTH_FOREGROUND_CHANGED_PROPERTY


setCalendarRollOverBackground

public void setCalendarRollOverBackground(nextapp.echo.Color newCalendarRollOverBackground)
Sets the rollover background Color of the DatePicker's calendar area.
This methods fires a PropertyChangeEvent with a getPropertyName() value of DatePicker.CALENDAR_ROLLOVER_BACKGROUND_CHANGED_PROPERTY


setCalendarRollOverForeground

public void setCalendarRollOverForeground(nextapp.echo.Color newCalendarRollOverForeground)
Sets the rollover foreground Color of the DatePicker's calendar area.
This methods fires a PropertyChangeEvent with a getPropertyName() value of DatePicker.CALENDAR_ROLLOVER_FOREGROUND_CHANGED_PROPERTY


setCalendarSelectedBackground

public void setCalendarSelectedBackground(nextapp.echo.Color newCalendarBackground)
Sets the background Color of the selected date in the DatePicker's calendar area.
This methods fires a PropertyChangeEvent with a getPropertyName() value of DatePicker.CALENDAR_BACKGROUND_SELECTED_CHANGED_PROPERTY


setCalendarSelectedForeground

public void setCalendarSelectedForeground(nextapp.echo.Color newCalendarForeground)
Sets the foreground Color of the selected date in the DatePicker's calendar area.
This methods fires a PropertyChangeEvent with a getPropertyName() value of DatePicker.CALENDAR_FOREGROUND_SELECTED_CHANGED_PROPERTY


setCalendarSelectedFont

public void setCalendarSelectedFont(nextapp.echo.Font newFont)
Sets the foreground Color of the selected date in the DatePicker's calendar area.
This methods fires a PropertyChangeEvent with a getPropertyName() value of DatePicker.CALENDAR_FOREGROUND_SELECTED_CHANGED_PROPERTY


setColorScheme

public void setColorScheme(int newColorScheme)
Sets the color scheme in use within the DatePicker
This methods fires a PropertyChangeEvent with a getPropertyName() value of DatePicker.COLOR_SCHEME_CHANGED_PROPERTY


setDisplayedDate

public void setDisplayedDate(java.util.Calendar newDisplayedDate)
Sets the currently displayed date within the DatePicker
This methods causes the underlying CalendarSelectionModel to change.


setDowNameLength

public void setDowNameLength(int newValue)
Sets the length of the day of the week names when displayed.

ie. 4=Mond, 3=Mon, 2=Mo, 1=M

The default is 3.

Parameters:
newValue - - the maximum length of the day of the week names

setMonthNameLength

public void setMonthNameLength(int newValue)
Sets the length of the month names when displayed.

ie. 10=September, 4=Sept, 3=Sep, 1=S

The default is 3.

Parameters:
newValue - - the maximum length of the month names

setLocale

public void setLocale(java.util.Locale newLocale)
Sets the Locale used by the DatePicker for formatting dates

Parameters:
newLocale - java.util.Locale

setModel

public void setModel(CalendarSelectionModel newModel)
Sets a new CalendarSelectionModel model into the DatePicker
This methods fires a PropertyChangeEvent with a getPropertyName() value of DatePicker.MODEL_CHANGED_PROPERTY


setMonthSelectable

public void setMonthSelectable(boolean newMonthSelectable)
Sets whether the Month field is selectable by the user. This methods fires a PropertyChangeEvent with a getPropertyName() value of DatePicker.SELECTABLE_MONTH__CHANGED_PROPERTY

Parameters:
newMonthSelectable - boolean

setNavigationBackground

public void setNavigationBackground(nextapp.echo.Color newNavigationBackground)
Sets the background Color of the DatePicker's navigation area.
This methods fires a PropertyChangeEvent with a getPropertyName() value of DatePicker.NAVIGATION_BACKGROUND_CHANGED_PROPERTY


setNavigationFont

public void setNavigationFont(nextapp.echo.Font newNavigationFont)
Sets the background Font of the DatePicker's navigation area.
This methods fires a PropertyChangeEvent with a getPropertyName() value of DatePicker.NAVIGATION_FONT_CHANGED_PROPERTY


setNavigationForeground

public void setNavigationForeground(nextapp.echo.Color newNavigationForeground)
Sets the foreground Color of the DatePicker's navigation area.
This methods fires a PropertyChangeEvent with a getPropertyName() value of DatePicker.NAVIGATION_FOREGROUND_CHANGED_PROPERTY


setNavigationRollOverBackground

public void setNavigationRollOverBackground(nextapp.echo.Color newNavigationRollOverBackground)
Sets the rollover background Color of the DatePicker's navigation area.
This methods fires a PropertyChangeEvent with a getPropertyName() value of DatePicker.NAVIGATION_ROLLOVER_BACKGROUND_CHANGED_PROPERTY


setNavigationRollOverForeground

public void setNavigationRollOverForeground(nextapp.echo.Color newNavigationRollOverForeground)
Sets the rollover foreground Color of the DatePicker's navigation area.
This methods fires a PropertyChangeEvent with a getPropertyName() value of DatePicker.NAVIGATION_ROLLOVER_FOREGROUND_CHANGED_PROPERTY


setSelectedBackground

public void setSelectedBackground(nextapp.echo.Color newSelectedBackground)
Sets the background Color of the DatePicker's selected area.
This methods fires a PropertyChangeEvent with a getPropertyName() value of DatePicker.SELECTED_BACKGROUND_CHANGED_PROPERTY


setSelectedDate

public void setSelectedDate(java.util.Calendar newSelectedDate)
Sets the currently selected date within the DatePicker
This methods causes the underlying CalendarSelectionModel to change.


setSelectedFont

public void setSelectedFont(nextapp.echo.Font newSelectedFont)
Sets the Font of the DatePicker's selected area.
This methods fires a PropertyChangeEvent with a getPropertyName() value of DatePicker.SELECTED_FONT_CHANGED_PROPERTY


setSelectedForeground

public void setSelectedForeground(nextapp.echo.Color newSelectedForeground)
Sets the foreground Color of the DatePicker's selected area.
This methods fires a PropertyChangeEvent with a getPropertyName() value of DatePicker.SELECTED_FOREGROUND_CHANGED_PROPERTY


setSelectedRollOverBackground

public void setSelectedRollOverBackground(nextapp.echo.Color newSelectedRollOverBackground)
Sets the rollover background Color of the DatePicker's selected area.
This methods fires a PropertyChangeEvent with a getPropertyName() value of DatePicker.SELECTED_ROLLOVER_BACKGROUND_CHANGED_PROPERTY


setSelectedRollOverForeground

public void setSelectedRollOverForeground(nextapp.echo.Color newSelectedRollOverForeground)
Sets the rollover foreground Color of the DatePicker's selected area.
This methods fires a PropertyChangeEvent with a getPropertyName() value of DatePicker.SELECTED_ROLLOVER_FOREGROUND_CHANGED_PROPERTY


setYearRange

public void setYearRange(int newYearRange)
Returns the number of years that will appear in the selectable Year field. This methods fires a PropertyChangeEvent with a getPropertyName() value of DatePicker.YEAR_RANGE_CHANGED_PROPERTY

Parameters:
newYearRange - int

setYearSelectable

public void setYearSelectable(boolean newYearSelectable)
Sets whether the Year field is selectable by the user. This methods fires a PropertyChangeEvent with a getPropertyName() value of DatePicker.SELECTABLE_YEAR__CHANGED_PROPERTY

Parameters:
newYearSelectable - boolean

setSelectionDisplayBarVisible

public void setSelectionDisplayBarVisible(boolean newVisible)
Sets whether the SelectionDisplayBar is visible This methods fires a PropertyChangeEvent with a getPropertyName() value of DatePicker.SELECTION_DISPLAYBAR_CHANGED_PROPERTY

Parameters:
newVisible - boolean

setNavigationArrowsVisible

public void setNavigationArrowsVisible(boolean newVisible)
Sets whether the NavigationArrows are visible This methods fires a PropertyChangeEvent with a getPropertyName() value of DatePicker.NAVIGATION_ARROWS_CHANGED_PROPERTY

Parameters:
newVisible - boolean

setWeekNumberAbbreviation

public void setWeekNumberAbbreviation(java.lang.String abbreviation)
Sets weekNumberAbbreviation This methods fires a PropertyChangeEvent with a getPropertyName() value of DatePicker.WEEK_NUMBER_ABBREVIATION_CHANGED_PROPERTY

Parameters:
abbreviation - String

set

public java.lang.Object set(java.lang.reflect.Field field,
                            java.lang.Object newValue)
                     throws java.lang.Exception
Description copied from interface: ReflectionSetter
Called to save the old value of a field, set in a new value and return the old value of a field. This interface allows a field set operation to be "delegated" back into the class that has permission to perform the field set.

 public Object set(Field f, Object newValue) throws Exception {
      Object oldValue = f.get(this);
      f.set(this,newValue);
      return oldValue;
 }
 

Parameters:
field - - the field to be set
newValue - - the new value to be set
Returns:
the oldValue of the field
Throws:
java.lang.Exception
See Also:
ReflectionSetter.set(Field, Object)

EchoPoint
1.0