|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnextapp.echo.AbstractComponent
nextapp.echo.text.TextComponent
nextapp.echo.TextField
echopoint.TextField
echopoint.ClientDatePicker
public class ClientDatePicker
A ClientDatePicker
allows the user to select a date
without requiring a trip back to the server. The formatted date
is placed into the content of the TextField.
ClientDatePicker
uses the following date format strings :
Field | Full Form | Short Form -------------+--------------------+----------------------- Year | yyyy (4 digits) | yy (2 digits), y (2 or 4 digits) Month | MMM (name or abbr.)| MM (2 digits), M (1 or 2 digits) | NNN (abbr.) | Day of Month | dd (2 digits) | d (1 or 2 digits) Day of Week | EE (name) | E (abbr) Hour (1-12) | hh (2 digits) | h (1 or 2 digits) Hour (0-23) | HH (2 digits) | H (1 or 2 digits) Hour (0-11) | KK (2 digits) | K (1 or 2 digits) Hour (1-24) | kk (2 digits) | k (1 or 2 digits) Minute | mm (2 digits) | m (1 or 2 digits) Second | ss (2 digits) | s (1 or 2 digits) AM/PM | a |
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface echopoint.positionable.Borderable |
---|
Borderable.NestedStyleInfo |
Nested classes/interfaces inherited from interface echopoint.positionable.MouseCursorable |
---|
MouseCursorable.NestedStyleInfo |
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 |
Fields inherited from interface nextapp.echo.ToolTipSupport |
---|
TOOL_TIP_TEXT_CHANGED_PROPERTY |
Constructor Summary | |
---|---|
ClientDatePicker()
Creates a default ClientDatePicker |
|
ClientDatePicker(java.util.Calendar date)
Creates a ClientDatePicker with number as the initial
Date value. |
|
ClientDatePicker(java.util.Calendar date,
int columns)
Creates a ClientDatePicker with number as the initial
value and a given column size. |
|
ClientDatePicker(int columns)
Creates a ClientDatePicker that is columns wide. |
|
ClientDatePicker(java.lang.String text)
Creates a ClientDatePicker with text as the initial
value. |
|
ClientDatePicker(java.lang.String text,
int columns)
Creates a ClientDatePicker with text as the initial
value and that is columns wide. |
Method Summary | |
---|---|
void |
applyStyle(Style style)
Sets stylistic properties of this component based on a Style
object. |
Color |
getBottomLineForeground()
|
java.lang.String |
getButtonText()
|
Font |
getCalendarFont()
|
Color |
getCurrentDateBackground()
|
Color |
getCurrentDateBorderForeground()
|
Color |
getCurrentDateForeground()
|
Color |
getCurrentDateRolloverBackground()
|
Color |
getCurrentDateRolloverForeground()
|
Color |
getCurrentMonthDateBackground()
|
Color |
getCurrentMonthDateForeground()
|
Color |
getCurrentMonthDateRolloverBackground()
|
Color |
getCurrentMonthDateRolloverForeground()
|
java.text.SimpleDateFormat |
getDateFormat()
|
Color |
getDayColumnHeaderBackground()
|
Color |
getDayColumnHeaderForeground()
|
ImageReference |
getIcon()
|
Color |
getInvalidColor()
|
java.util.Locale |
getLocale()
Returns the locale of the component. |
Color |
getMonthNavigationBackground()
|
Color |
getMonthNavigationForeground()
|
Color |
getNavigationRolloverBackground()
|
Color |
getNavigationRolloverForeground()
|
int |
getOffsetX()
|
int |
getOffsetY()
|
Color |
getOtherMonthDateBackground()
|
Color |
getOtherMonthDateForeground()
|
Color |
getOtherMonthDateRolloverBackground()
|
Color |
getOtherMonthDateRolloverForeground()
|
java.util.Calendar |
getSelectedDate()
|
Color |
getTodayTextBackground()
|
Color |
getTodayTextForeground()
|
Color |
getTopLineForeground()
|
Color |
getYearNavigationBackground()
|
Color |
getYearNavigationForeground()
|
boolean |
isButtonRendering()
|
boolean |
isValid()
This method returns TRUE if the text of the ClientDatePicker can be parsed into a valid Date with the current DateFormat. |
protected void |
set(java.lang.Class clazz,
java.lang.String propertyName,
java.lang.Object arg)
Sets a property and fires the corresponding property change event. |
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 |
setBottomLineForeground(Color bottomLineForeground)
|
void |
setButtonRendering(boolean buttonRendering)
Setting this to false causes the button text and/or icon to be rendered as a plain button instead of a push button. |
void |
setButtonText(java.lang.String buttonText)
|
void |
setCalendarFont(Font calendarFont)
|
void |
setCurrentDateBackground(Color currentDateBackground)
|
void |
setCurrentDateBorderForeground(Color currentDateBorderForeground)
|
void |
setCurrentDateForeground(Color currentDateForeground)
|
void |
setCurrentDateRolloverBackground(Color currentDateRolloverBackground)
|
void |
setCurrentDateRolloverForeground(Color currentDateRolloverForeground)
|
void |
setCurrentMonthDateBackground(Color currentMonthDateBackground)
|
void |
setCurrentMonthDateForeground(Color currentMonthDateForeground)
|
void |
setCurrentMonthDateRolloverBackground(Color currentMonthDateRolloverBackground)
|
void |
setCurrentMonthDateRolloverForeground(Color currentMonthDateRolloverForeground)
|
void |
setDateFormat(java.text.SimpleDateFormat format)
Sets the format String for the date picker. |
void |
setDayColumnHeaderBackground(Color dayColumnHeaderBackground)
|
void |
setDayColumnHeaderForeground(Color dayColumnHeaderForeground)
|
void |
setIcon(ImageReference icon)
|
void |
setInvalidColor(Color invalidColor)
|
void |
setLocale(java.util.Locale locale)
Sets the locale of the component. |
void |
setMonthNavigationBackground(Color monthNavigationBackground)
|
void |
setMonthNavigationForeground(Color monthNavigationForeground)
|
void |
setNavigationRolloverBackground(Color navigationRolloverBackground)
|
void |
setNavigationRolloverForeground(Color navigationRolloverForeground)
|
void |
setOffsetX(int offsetX)
|
void |
setOffsetY(int offsetY)
|
void |
setOtherMonthDateBackground(Color otherMonthDateBackground)
|
void |
setOtherMonthDateForeground(Color otherMonthDateForeground)
|
void |
setOtherMonthDateRolloverBackground(Color otherMonthDateRolloverBackground)
|
void |
setOtherMonthDateRolloverForeground(Color otherMonthDateRolloverForeground)
|
void |
setSelectedDate(java.util.Calendar date)
|
void |
setTodayTextBackground(Color todayTextBackground)
|
void |
setTodayTextForeground(Color todayTextForeground)
|
void |
setTopLineForeground(Color topLineForeground)
|
void |
setYearNavigationBackground(Color yearNavigationBackground)
|
void |
setYearNavigationForeground(Color yearNavigationForeground)
|
Methods inherited from class nextapp.echo.text.TextComponent |
---|
getCssClass, getDocument, getHorizontalAlignment, getText, isEditable, setCssClass, setDocument, setEditable, setHorizontalAlignment, setText |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface echopoint.validation.Validateable |
---|
getIdentifier, getText |
Field Detail |
---|
public static final java.lang.String INVALID_COLOR_PROPERTY
public static final java.lang.String BOTTOM_LINE_FOREGROUND_PROPERTY
public static final java.lang.String TOP_LINE_FOREGROUND_PROPERTY
public static final java.lang.String TODAY_TEXT_FOREGROUND_PROPERTY
public static final java.lang.String TODAY_TEXT_BACKGROUND_PROPERTY
public static final java.lang.String OTHER_MONTH_DATE_FOREGROUND_PROPERTY
public static final java.lang.String OTHER_MONTH_DATE_BACKGROUND_PROPERTY
public static final java.lang.String DAY_COLUMN_HEADER_FOREGROUND_PROPERTY
public static final java.lang.String DAY_COLUMN_HEADER_BACKGROUND_PROPERTY
public static final java.lang.String CURRENT_MONTH_DATE_FOREGROUND_PROPERTY
public static final java.lang.String CURRENT_MONTH_DATE_BACKGROUND_PROPERTY
public static final java.lang.String CURRENT_DATE_FOREGROUND_PROPERTY
public static final java.lang.String CURRENT_DATE_BACKGROUND_PROPERTY
public static final java.lang.String CALENDAR_FONT_PROPERTY
public static final java.lang.String YEAR_NAVIGATION_FOREGROUND_PROPERTY
public static final java.lang.String YEAR_NAVIGATION_BACKGROUND_PROPERTY
public static final java.lang.String MONTH_NAVIGATION_FOREGROUND_PROPERTY
public static final java.lang.String MONTH_NAVIGATION_BACKGROUND_PROPERTY
public static final java.lang.String CURRENT_DATE_BORDER_FOREGROUND_PROPERTY
public static final java.lang.String OTHER_MONTH_DATE_ROLLOVER_FOREGROUND_PROPERTY
public static final java.lang.String OTHER_MONTH_DATE_ROLLOVER_BACKGROUND_PROPERTY
public static final java.lang.String CURRENT_MONTH_DATE_ROLLOVER_FOREGROUND_PROPERTY
public static final java.lang.String CURRENT_MONTH_DATE_ROLLOVER_BACKGROUND_PROPERTY
public static final java.lang.String CURRENT_DATE_ROLLOVER_FOREGROUND_PROPERTY
public static final java.lang.String CURRENT_DATE_ROLLOVER_BACKGROUND_PROPERTY
public static final java.lang.String NAVIGATION_ROLLOVER_FOREGROUND_PROPERTY
public static final java.lang.String NAVIGATION_ROLLOVER_BACKGROUND_PROPERTY
public static final java.lang.String ICON_PROPERTY
public static final java.lang.String BUTTON_TEXT_PROPERTY
public static final java.lang.String BUTTON_RENDERING_PROPERTY
public static final java.lang.String DATE_FORMAT_PROPERTY
public static final java.lang.String OFFSET_Y_PROPERTY
public static final java.lang.String OFFSET_X_PROPERTY
public static final java.lang.String LOCALE_PROPERTY
public static final java.lang.String STYLE_INVALID_COLOR
public static final java.lang.String STYLE_BOTTOM_LINE_FOREGROUND
public static final java.lang.String STYLE_TOP_LINE_FOREGROUND
public static final java.lang.String STYLE_TODAY_TEXT_FOREGROUND
public static final java.lang.String STYLE_TODAY_TEXT_BACKGROUND
public static final java.lang.String STYLE_OTHER_MONTH_DATE_FOREGROUND
public static final java.lang.String STYLE_OTHER_MONTH_DATE_BACKGROUND
public static final java.lang.String STYLE_DAY_COLUMN_HEADER_FOREGROUND
public static final java.lang.String STYLE_DAY_COLUMN_HEADER_BACKGROUND
public static final java.lang.String STYLE_CURRENT_MONTH_DATE_FOREGROUND
public static final java.lang.String STYLE_CURRENT_MONTH_DATE_BACKGROUND
public static final java.lang.String STYLE_CURRENT_DATE_FOREGROUND
public static final java.lang.String STYLE_CURRENT_DATE_BACKGROUND
public static final java.lang.String STYLE_CALENDAR_FONT
public static final java.lang.String STYLE_YEAR_NAVIGATION_FOREGROUND
public static final java.lang.String STYLE_YEAR_NAVIGATION_BACKGROUND
public static final java.lang.String STYLE_MONTH_NAVIGATION_FOREGROUND
public static final java.lang.String STYLE_MONTH_NAVIGATION_BACKGROUND
public static final java.lang.String STYLE_CURRENT_DATE_BORDER_FOREGROUND
public static final java.lang.String STYLE_OTHER_MONTH_DATE_ROLLOVER_FOREGROUND
public static final java.lang.String STYLE_OTHER_MONTH_DATE_ROLLOVER_BACKGROUND
public static final java.lang.String STYLE_CURRENT_MONTH_DATE_ROLLOVER_FOREGROUND
public static final java.lang.String STYLE_CURRENT_MONTH_DATE_ROLLOVER_BACKGROUND
public static final java.lang.String STYLE_CURRENT_DATE_ROLLOVER_FOREGROUND
public static final java.lang.String STYLE_CURRENT_DATE_ROLLOVER_BACKGROUND
public static final java.lang.String STYLE_NAVIGATION_ROLLOVER_FOREGROUND
public static final java.lang.String STYLE_NAVIGATION_ROLLOVER_BACKGROUND
public static final java.lang.String STYLE_ICON
public static final java.lang.String STYLE_BUTTON_TEXT
public static final java.lang.String STYLE_BUTTON_RENDERING
public static final ImageReference DEFAULT_ICON
Constructor Detail |
---|
public ClientDatePicker()
ClientDatePicker
public ClientDatePicker(int columns)
ClientDatePicker
that is columns wide.
public ClientDatePicker(java.util.Calendar date)
ClientDatePicker
with number
as the initial
Date value.
public ClientDatePicker(java.util.Calendar date, int columns)
ClientDatePicker
with number
as the initial
value and a given column size.
public ClientDatePicker(java.lang.String text)
ClientDatePicker
with text
as the initial
value.
public ClientDatePicker(java.lang.String text, int columns)
ClientDatePicker
with text
as the initial
value and that is columns
wide.
Method Detail |
---|
public Color getNavigationRolloverBackground()
public void setNavigationRolloverBackground(Color navigationRolloverBackground)
navigationRolloverBackground
- public Color getNavigationRolloverForeground()
public void setNavigationRolloverForeground(Color navigationRolloverForeground)
navigationRolloverForeground
- public java.lang.String getButtonText()
public void setButtonText(java.lang.String buttonText)
buttonText
- public ImageReference getIcon()
public void setIcon(ImageReference icon)
icon
- public int getOffsetX()
public void setOffsetX(int offsetX)
offsetX
- public int getOffsetY()
public void setOffsetY(int offsetY)
offsetY
- public Color getCurrentDateRolloverBackground()
public void setCurrentDateRolloverBackground(Color currentDateRolloverBackground)
currentDateRolloverBackground
- public Color getCurrentDateRolloverForeground()
public void setCurrentDateRolloverForeground(Color currentDateRolloverForeground)
currentDateRolloverForeground
- public Color getCurrentMonthDateRolloverBackground()
public void setCurrentMonthDateRolloverBackground(Color currentMonthDateRolloverBackground)
currentMonthDateRolloverBackground
- public Color getCurrentMonthDateRolloverForeground()
public void setCurrentMonthDateRolloverForeground(Color currentMonthDateRolloverForeground)
currentMonthDateRolloverForeground
- public Color getOtherMonthDateRolloverBackground()
public void setOtherMonthDateRolloverBackground(Color otherMonthDateRolloverBackground)
otherMonthDateRolloverBackground
- public Color getOtherMonthDateRolloverForeground()
public void setOtherMonthDateRolloverForeground(Color otherMonthDateRolloverForeground)
otherMonthDateRolloverForeground
- public Color getCurrentDateBorderForeground()
public void setCurrentDateBorderForeground(Color currentDateBorderForeground)
currentDateBorderForeground
- public Color getMonthNavigationBackground()
public void setMonthNavigationBackground(Color monthNavigationBackground)
monthNavigationBackground
- public Color getMonthNavigationForeground()
public void setMonthNavigationForeground(Color monthNavigationForeground)
monthNavigationForeground
- public Color getYearNavigationBackground()
public void setYearNavigationBackground(Color yearNavigationBackground)
yearNavigationBackground
- public Color getYearNavigationForeground()
public void setYearNavigationForeground(Color yearNavigationForeground)
yearNavigationForeground
- public Font getCalendarFont()
public void setCalendarFont(Font calendarFont)
public Color getCurrentDateBackground()
public void setCurrentDateBackground(Color currentDateBackground)
public Color getCurrentDateForeground()
public void setCurrentDateForeground(Color currentDateForeground)
currentDateForeground
- public Color getCurrentMonthDateBackground()
public void setCurrentMonthDateBackground(Color currentMonthDateBackground)
currentMonthDateBackground
- public Color getCurrentMonthDateForeground()
public void setCurrentMonthDateForeground(Color currentMonthDateForeground)
currentMonthDateForeground
- public Color getDayColumnHeaderBackground()
public void setDayColumnHeaderBackground(Color dayColumnHeaderBackground)
dayColumnHeaderBackground
- public Color getDayColumnHeaderForeground()
public void setDayColumnHeaderForeground(Color dayColumnHeaderForeground)
dayColumnHeaderForeground
- public Color getOtherMonthDateBackground()
public void setOtherMonthDateBackground(Color otherMonthDateBackground)
otherMonthDateBackground
- public Color getOtherMonthDateForeground()
public void setOtherMonthDateForeground(Color otherMonthDateForeground)
otherMonthDateForeground
- public Color getTodayTextBackground()
public void setTodayTextBackground(Color todayTextBackground)
todayTextBackground
- public Color getTodayTextForeground()
public void setTodayTextForeground(Color todayTextForeground)
todayTextForeground
- public Color getTopLineForeground()
public void setTopLineForeground(Color topLineForeground)
topLineForeground
- public Color getBottomLineForeground()
public void setBottomLineForeground(Color bottomLineForeground)
bottomLineForeground
- public void setInvalidColor(Color invalidColor)
public Color getInvalidColor()
public java.util.Calendar getSelectedDate()
public void setSelectedDate(java.util.Calendar date)
date
- public void setDateFormat(java.text.SimpleDateFormat format)
format
- public java.text.SimpleDateFormat getDateFormat()
public boolean isValid()
public void applyStyle(Style style)
Component
Style
object. The version of this method in Component
will set
foreground and background colors and the font from the style if they are
present. Components should override this method if they allow more
properties to be set from a style object, and should call
super.applyStyle() if necessary.
applyStyle
in interface Borderable
applyStyle
in interface MouseCursorable
applyStyle
in interface Component
applyStyle
in class TextField
style
- The style object from which to retrieve properties for this
Component
.TextField.applyStyle(nextapp.echo.Style)
public java.util.Locale getLocale()
Component
getLocale
in interface Validateable
getLocale
in interface Component
getLocale
in class AbstractComponent
public void setLocale(java.util.Locale locale)
Component
setLocale
in interface Component
setLocale
in class AbstractComponent
locale
- The new locale for the component.public boolean isButtonRendering()
public void setButtonRendering(boolean buttonRendering)
protected void set(java.lang.Class clazz, java.lang.String propertyName, java.lang.Object arg)
public java.lang.Object set(java.lang.reflect.Field field, java.lang.Object newValue) throws java.lang.Exception
ReflectionSetter
public Object set(Field f, Object newValue) throws Exception { Object oldValue = f.get(this); f.set(this,newValue); return oldValue; }
set
in interface ReflectionSetter
set
in class TextField
field
- - the field to be setnewValue
- - the new value to be set
java.lang.IllegalAccessException
java.lang.IllegalArgumentException
java.lang.NullPointerException
java.lang.Exception
ReflectionSetter.set(Field, Object)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |