|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.Widget
com.smartgwt.client.widgets.BaseWidget
com.smartgwt.client.widgets.Canvas
com.smartgwt.client.widgets.DateChooser
public class DateChooser
Simple interactive calendar interface used to pick a date.
Used by the DateItem
class.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject |
---|
com.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabled |
Field Summary |
---|
Fields inherited from class com.smartgwt.client.widgets.BaseWidget |
---|
config, configOnly, id, isElementSet |
Fields inherited from class com.google.gwt.user.client.ui.UIObject |
---|
DEBUG_ID_PREFIX |
Constructor Summary | |
---|---|
DateChooser()
|
|
DateChooser(com.google.gwt.core.client.JavaScriptObject jsObj)
|
Method Summary | |
---|---|
HandlerRegistration |
addDataChangedHandler(DataChangedHandler handler)
Add a dataChanged handler. |
void |
cancelClick()
Fired when the user clicks the cancel button in this date chooser. |
protected com.google.gwt.core.client.JavaScriptObject |
create()
|
java.lang.String |
getAlternateStyleSuffix()
The text appended to the style name when using alternateWeekStyles . |
java.lang.Boolean |
getAlternateWeekStyles()
Whether alternating weeks should be drawn in alternating styles. |
java.lang.String |
getBaseBottomButtonStyle()
CSS style to apply to the buttons at the bottom of the DateChooser ("Today" and "Cancel"). |
java.lang.String |
getBaseButtonStyle()
Base css style applied to this picker's buttons. |
java.lang.String |
getBaseNavButtonStyle()
CSS style to apply to navigation buttons and date display at the top of the component. |
java.lang.String |
getBaseWeekdayStyle()
Base css style applied to weekdays. |
java.lang.String |
getBaseWeekendStyle()
Base css style applied to weekends. |
java.lang.String |
getCancelButtonTitle()
Title for the cancellation button. |
java.util.Date |
getData()
Get the current value of the picker. |
java.lang.Boolean |
getDisableWeekends()
Whether it should be valid to pick a weekend day. |
int |
getFirstDayOfWeek()
Day of the week to show in the first column. |
int |
getHeaderHeight()
Height of the header area (containing the next/previous month & year buttons) in pixels |
java.lang.String |
getHeaderStyle()
CSS style applied to the day-of-week headers. |
java.lang.String |
getMonthMenuStyle()
Style for the pop-up year menu. |
java.lang.String |
getNextMonthIcon()
Icon for the next month button |
int |
getNextMonthIconHeight()
Height of the icon for the next month button |
int |
getNextMonthIconWidth()
Width of the icon for the next month button |
java.lang.String |
getNextYearIcon()
Icon for the next year button |
int |
getNextYearIconHeight()
Height of the icon for the next year button |
int |
getNextYearIconWidth()
Width of the icon for the next year button |
static DateChooser |
getOrCreateRef(com.google.gwt.core.client.JavaScriptObject jsObj)
|
java.lang.String |
getPrevMonthIcon()
Icon for the previous month button |
int |
getPrevMonthIconHeight()
Height of the icon for the previous month button |
int |
getPrevMonthIconWidth()
Width of the icon for the previous month button |
java.lang.String |
getPrevYearIcon()
Icon for the previous year button |
int |
getPrevYearIconHeight()
Height of the icon for the previous year button |
int |
getPrevYearIconWidth()
Width of the icon for the previous year button |
java.lang.Boolean |
getShowCancelButton()
Determines whether the "Cancel" button will be displayed. |
java.lang.Boolean |
getShowDoubleYearIcon()
If this property is set to true the previous and next year buttons will render out the previous and next month button icons twice rather than using the prevYearIcon and nextYearIcon .
|
java.lang.Boolean |
getShowTodayButton()
Determines whether the "Today" button will be displayed, allowing the user to select the current date. |
java.lang.Boolean |
getShowWeekends()
Whether weekend days should be shown. |
java.lang.String |
getSkinImgDir()
Overridden directory where images for this widget (such as the month and year button icons) may be found. |
java.lang.Integer |
getTodayButtonHeight()
If set specifies a fixed height for the Today and Cancel buttons. |
java.lang.String |
getTodayButtonTitle()
Title for "Today" button. |
java.lang.String |
getWeekendHeaderStyle()
Optional CSS style applied to the day-of-week headers for weekend days. |
java.lang.String |
getYearMenuStyle()
Style for the pop-up year menu. |
void |
setAlternateStyleSuffix(java.lang.String alternateStyleSuffix)
The text appended to the style name when using alternateWeekStyles . |
void |
setAlternateWeekStyles(java.lang.Boolean alternateWeekStyles)
Whether alternating weeks should be drawn in alternating styles. |
void |
setBaseBottomButtonStyle(java.lang.String baseBottomButtonStyle)
CSS style to apply to the buttons at the bottom of the DateChooser ("Today" and "Cancel"). |
void |
setBaseButtonStyle(java.lang.String baseButtonStyle)
Base css style applied to this picker's buttons. |
void |
setBaseNavButtonStyle(java.lang.String baseNavButtonStyle)
CSS style to apply to navigation buttons and date display at the top of the component. |
void |
setBaseWeekdayStyle(java.lang.String baseWeekdayStyle)
Base css style applied to weekdays. |
void |
setBaseWeekendStyle(java.lang.String baseWeekendStyle)
Base css style applied to weekends. |
void |
setCancelButtonTitle(java.lang.String cancelButtonTitle)
Title for the cancellation button. |
void |
setData(java.util.Date date)
Set the picker to show the given date. |
void |
setDisableWeekends(java.lang.Boolean disableWeekends)
Whether it should be valid to pick a weekend day. |
void |
setFirstDayOfWeek(int firstDayOfWeek)
Day of the week to show in the first column. |
void |
setHeaderHeight(int headerHeight)
Height of the header area (containing the next/previous month & year buttons) in pixels |
void |
setHeaderStyle(java.lang.String headerStyle)
CSS style applied to the day-of-week headers. |
void |
setMonthMenuStyle(java.lang.String monthMenuStyle)
Style for the pop-up year menu. |
void |
setNextMonthIcon(java.lang.String nextMonthIcon)
Icon for the next month button |
void |
setNextMonthIconHeight(int nextMonthIconHeight)
Height of the icon for the next month button |
void |
setNextMonthIconWidth(int nextMonthIconWidth)
Width of the icon for the next month button |
void |
setNextYearIcon(java.lang.String nextYearIcon)
Icon for the next year button |
void |
setNextYearIconHeight(int nextYearIconHeight)
Height of the icon for the next year button |
void |
setNextYearIconWidth(int nextYearIconWidth)
Width of the icon for the next year button |
void |
setPrevMonthIcon(java.lang.String prevMonthIcon)
Icon for the previous month button |
void |
setPrevMonthIconHeight(int prevMonthIconHeight)
Height of the icon for the previous month button |
void |
setPrevMonthIconWidth(int prevMonthIconWidth)
Width of the icon for the previous month button |
void |
setPrevYearIcon(java.lang.String prevYearIcon)
Icon for the previous year button |
void |
setPrevYearIconHeight(int prevYearIconHeight)
Height of the icon for the previous year button |
void |
setPrevYearIconWidth(int prevYearIconWidth)
Width of the icon for the previous year button |
void |
setShowCancelButton(java.lang.Boolean showCancelButton)
Determines whether the "Cancel" button will be displayed. |
void |
setShowDoubleYearIcon(java.lang.Boolean showDoubleYearIcon)
If this property is set to true the previous and next year buttons will render out the previous and next month button icons twice rather than using the prevYearIcon and nextYearIcon .
|
void |
setShowTodayButton(java.lang.Boolean showTodayButton)
Determines whether the "Today" button will be displayed, allowing the user to select the current date. |
void |
setShowWeekends(java.lang.Boolean showWeekends)
Whether weekend days should be shown. |
void |
setSkinImgDir(java.lang.String skinImgDir)
Overridden directory where images for this widget (such as the month and year button icons) may be found. |
void |
setTodayButtonHeight(java.lang.Integer todayButtonHeight)
If set specifies a fixed height for the Today and Cancel buttons. |
void |
setTodayButtonTitle(java.lang.String todayButtonTitle)
Title for "Today" button. |
void |
setWeekendHeaderStyle(java.lang.String weekendHeaderStyle)
Optional CSS style applied to the day-of-week headers for weekend days. |
void |
setYearMenuStyle(java.lang.String yearMenuStyle)
Style for the pop-up year menu. |
void |
todayClick()
Fired when the user clicks the Today button. |
Methods inherited from class com.google.gwt.user.client.ui.Widget |
---|
doAttachChildren, doDetachChildren, getParent, isAttached, onAttach, onBrowserEvent, onDetach, onLoad, onUnload, removeFromParent |
Methods inherited from class com.google.gwt.user.client.ui.UIObject |
---|
addStyleDependentName, ensureDebugId, ensureDebugId, ensureDebugId, getStyleElement, getStyleName, getStylePrimaryName, getStylePrimaryName, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, setElement, setPixelSize, setSize, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setVisible, sinkEvents, unsinkEvents |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.google.gwt.event.shared.HasHandlers |
---|
fireEvent |
Constructor Detail |
---|
public DateChooser()
public DateChooser(com.google.gwt.core.client.JavaScriptObject jsObj)
Method Detail |
---|
public static DateChooser getOrCreateRef(com.google.gwt.core.client.JavaScriptObject jsObj)
protected com.google.gwt.core.client.JavaScriptObject create()
create
in class Canvas
public void setHeaderHeight(int headerHeight) throws java.lang.IllegalStateException
headerHeight
- headerHeight Default value is 20
java.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic int getHeaderHeight()
public void setSkinImgDir(java.lang.String skinImgDir)
Note : This is an advanced setting
setSkinImgDir
in class Canvas
skinImgDir
- skinImgDir Default value is "images/common/"public java.lang.String getSkinImgDir()
getSkinImgDir
in class Canvas
public void setPrevYearIcon(java.lang.String prevYearIcon) throws java.lang.IllegalStateException
prevYearIcon
- prevYearIcon Default value is "[SKIN]doubleArrow_left.gif"
java.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic java.lang.String getPrevYearIcon()
public void setPrevYearIconWidth(int prevYearIconWidth) throws java.lang.IllegalStateException
prevYearIconWidth
- prevYearIconWidth Default value is 14
java.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic int getPrevYearIconWidth()
public void setPrevYearIconHeight(int prevYearIconHeight) throws java.lang.IllegalStateException
prevYearIconHeight
- prevYearIconHeight Default value is 7
java.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic int getPrevYearIconHeight()
public void setPrevMonthIcon(java.lang.String prevMonthIcon) throws java.lang.IllegalStateException
prevMonthIcon
- prevMonthIcon Default value is "[SKIN]arrow_left.gif"
java.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic java.lang.String getPrevMonthIcon()
public void setPrevMonthIconWidth(int prevMonthIconWidth) throws java.lang.IllegalStateException
prevMonthIconWidth
- prevMonthIconWidth Default value is 7
java.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic int getPrevMonthIconWidth()
public void setPrevMonthIconHeight(int prevMonthIconHeight) throws java.lang.IllegalStateException
prevMonthIconHeight
- prevMonthIconHeight Default value is 7
java.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic int getPrevMonthIconHeight()
public void setNextYearIcon(java.lang.String nextYearIcon) throws java.lang.IllegalStateException
nextYearIcon
- nextYearIcon Default value is "[SKIN]doubleArrow_right.gif"
java.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic java.lang.String getNextYearIcon()
public void setNextYearIconWidth(int nextYearIconWidth) throws java.lang.IllegalStateException
nextYearIconWidth
- nextYearIconWidth Default value is 14
java.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic int getNextYearIconWidth()
public void setNextYearIconHeight(int nextYearIconHeight)
nextYearIconHeight
- nextYearIconHeight Default value is 7public int getNextYearIconHeight()
public void setNextMonthIcon(java.lang.String nextMonthIcon)
nextMonthIcon
- nextMonthIcon Default value is "[SKIN]arrow_right.gif"public java.lang.String getNextMonthIcon()
public void setNextMonthIconWidth(int nextMonthIconWidth)
nextMonthIconWidth
- nextMonthIconWidth Default value is 7public int getNextMonthIconWidth()
public void setNextMonthIconHeight(int nextMonthIconHeight)
nextMonthIconHeight
- nextMonthIconHeight Default value is 7public int getNextMonthIconHeight()
public void setShowDoubleYearIcon(java.lang.Boolean showDoubleYearIcon)
prevYearIcon
and nextYearIcon
.
Set to true
by default as not all skins contain media for the year icons.
showDoubleYearIcon
- showDoubleYearIcon Default value is truepublic java.lang.Boolean getShowDoubleYearIcon()
prevYearIcon
and nextYearIcon
.
Set to true
by default as not all skins contain media for the year icons.
public void setYearMenuStyle(java.lang.String yearMenuStyle) throws java.lang.IllegalStateException
yearMenuStyle
- yearMenuStyle Default value is "dateChooserYearMenu"
java.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic java.lang.String getYearMenuStyle()
public void setMonthMenuStyle(java.lang.String monthMenuStyle) throws java.lang.IllegalStateException
monthMenuStyle
- monthMenuStyle Default value is "dateChooserMonthMenu"
java.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic java.lang.String getMonthMenuStyle()
public void setShowTodayButton(java.lang.Boolean showTodayButton)
showTodayButton
- showTodayButton Default value is truepublic java.lang.Boolean getShowTodayButton()
public void setShowCancelButton(java.lang.Boolean showCancelButton)
showCancelButton
- showCancelButton Default value is falsepublic java.lang.Boolean getShowCancelButton()
public void setTodayButtonTitle(java.lang.String todayButtonTitle)
todayButtonTitle
- todayButtonTitle Default value is "Today"public java.lang.String getTodayButtonTitle()
public void setCancelButtonTitle(java.lang.String cancelButtonTitle)
cancelButtonTitle
- cancelButtonTitle Default value is "Cancel"public java.lang.String getCancelButtonTitle()
public void setTodayButtonHeight(java.lang.Integer todayButtonHeight)
todayButtonHeight
- todayButtonHeight Default value is nullpublic java.lang.Integer getTodayButtonHeight()
public void setDisableWeekends(java.lang.Boolean disableWeekends) throws java.lang.IllegalStateException
Which days are considered weekends is controlled by com.smartgwt.client..Date#weekendDays
.
disableWeekends
- disableWeekends Default value is false
java.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic java.lang.Boolean getDisableWeekends()
Which days are considered weekends is controlled by com.smartgwt.client..Date#weekendDays
.
public void setShowWeekends(java.lang.Boolean showWeekends) throws java.lang.IllegalStateException
com.smartgwt.client..Date#weekendDays
.
showWeekends
- showWeekends Default value is true
java.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic java.lang.Boolean getShowWeekends()
com.smartgwt.client..Date#weekendDays
.
public void setFirstDayOfWeek(int firstDayOfWeek) throws java.lang.IllegalStateException
firstDayOfWeek
- firstDayOfWeek Default value is 0
java.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic int getFirstDayOfWeek()
public void setBaseButtonStyle(java.lang.String baseButtonStyle)
baseButtonStyle
- baseButtonStyle Default value is "dateChooserButton"public java.lang.String getBaseButtonStyle()
public void setBaseWeekdayStyle(java.lang.String baseWeekdayStyle)
baseButtonStyle
.
baseWeekdayStyle
- baseWeekdayStyle Default value is nullpublic java.lang.String getBaseWeekdayStyle()
baseButtonStyle
.
public void setBaseWeekendStyle(java.lang.String baseWeekendStyle)
baseWeekdayStyle
.
baseWeekendStyle
- baseWeekendStyle Default value is nullpublic java.lang.String getBaseWeekendStyle()
baseWeekdayStyle
.
public void setAlternateWeekStyles(java.lang.Boolean alternateWeekStyles)
alternateStyleSuffix
appended to it.
alternateWeekStyles
- alternateWeekStyles Default value is nullpublic java.lang.Boolean getAlternateWeekStyles()
alternateStyleSuffix
appended to it.
public void setAlternateStyleSuffix(java.lang.String alternateStyleSuffix)
alternateWeekStyles
.
alternateStyleSuffix
- alternateStyleSuffix Default value is "Dark"public java.lang.String getAlternateStyleSuffix()
alternateWeekStyles
.
public void setHeaderStyle(java.lang.String headerStyle)
weekendHeaderStyle
headerStyle
- headerStyle Default value is "dateChooserButtonDisabled"public java.lang.String getHeaderStyle()
weekendHeaderStyle
public void setWeekendHeaderStyle(java.lang.String weekendHeaderStyle)
headerStyle
will be applied to both weekdays and weekend days.
weekendHeaderStyle
- weekendHeaderStyle Default value is nullpublic java.lang.String getWeekendHeaderStyle()
headerStyle
will be applied to both weekdays and weekend days.
public void setBaseNavButtonStyle(java.lang.String baseNavButtonStyle)
baseButtonStyle
is used.
baseNavButtonStyle
- baseNavButtonStyle Default value is nullpublic java.lang.String getBaseNavButtonStyle()
baseButtonStyle
is used.
public void setBaseBottomButtonStyle(java.lang.String baseBottomButtonStyle)
baseButtonStyle
is used.
baseBottomButtonStyle
- baseBottomButtonStyle Default value is nullpublic java.lang.String getBaseBottomButtonStyle()
baseButtonStyle
is used.
public void setData(java.util.Date date)
date
- new valuepublic java.util.Date getData()
See addDataChangedHandler(com.smartgwt.client.widgets.events.DataChangedHandler)
for how to respond to the user picking a date.
public HandlerRegistration addDataChangedHandler(DataChangedHandler handler)
Method to override or observe in order to be notified when a user picks a date value.
Has no default behavior (so no need to call Super).
Use getData()
to get the current date value.
addDataChangedHandler
in interface HasDataChangedHandlers
handler
- the dataChanged handler
HandlerRegistration
used to remove this handlerpublic void cancelClick()
public void todayClick()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |