|
|||||||||
| 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 |
|---|
UIObject.DebugIdImpl, UIObject.DebugIdImplEnabled |
| Field Summary |
|---|
| Fields inherited from class com.smartgwt.client.widgets.BaseWidget |
|---|
config, configOnly, id, isElementSet, scClassName |
| Fields inherited from class com.google.gwt.user.client.ui.UIObject |
|---|
DEBUG_ID_PREFIX |
| Constructor Summary | |
|---|---|
DateChooser()
|
|
DateChooser(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 JavaScriptObject |
create()
|
String |
getAlternateStyleSuffix()
The text appended to the style name when using alternateWeekStyles. |
Boolean |
getAlternateWeekStyles()
Whether alternating weeks should be drawn in alternating styles. |
String |
getBaseBottomButtonStyle()
CSS style to apply to the buttons at the bottom of the DateChooser ("Today" and "Cancel"). |
String |
getBaseButtonStyle()
Base css style applied to this picker's buttons. |
String |
getBaseNavButtonStyle()
CSS style to apply to navigation buttons and date display at the top of the component. |
String |
getBaseWeekdayStyle()
Base css style applied to weekdays. |
String |
getBaseWeekendStyle()
Base css style applied to weekends. |
String |
getCancelButtonTitle()
Title for the cancellation button. |
Date |
getData()
Get the current value of the picker. |
int |
getDayNameLength()
How long (how many characters) shxxould be day names be. |
Boolean |
getDisableWeekends()
Whether it should be valid to pick a weekend day. |
int |
getEndYear()
Last year that may be selected. |
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 |
String |
getHeaderStyle()
CSS style applied to the day-of-week headers. |
String |
getMonthMenuStyle()
Style for the pop-up year menu. |
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 |
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(JavaScriptObject jsObj)
|
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 |
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 |
Boolean |
getShowCancelButton()
Determines whether the "Cancel" button will be displayed. |
Boolean |
getShowTodayButton()
Determines whether the "Today" button will be displayed, allowing the user to select the current date. |
Boolean |
getShowWeekends()
Whether weekend days should be shown. |
String |
getSkinImgDir()
Overridden directory where images for this widget (such as the month and year button icons) may be found. |
int |
getStartYear()
Earliest year that may be selected. |
Integer |
getTodayButtonHeight()
If set specifies a fixed height for the Today and Cancel buttons. |
String |
getTodayButtonTitle()
Title for "Today" button. |
String |
getWeekendHeaderStyle()
Optional CSS style applied to the day-of-week headers for weekend days. |
String |
getYearMenuStyle()
Style for the pop-up year menu. |
void |
setAlternateStyleSuffix(String alternateStyleSuffix)
The text appended to the style name when using alternateWeekStyles. |
void |
setAlternateWeekStyles(Boolean alternateWeekStyles)
Whether alternating weeks should be drawn in alternating styles. |
void |
setBaseBottomButtonStyle(String baseBottomButtonStyle)
CSS style to apply to the buttons at the bottom of the DateChooser ("Today" and "Cancel"). |
void |
setBaseButtonStyle(String baseButtonStyle)
Base css style applied to this picker's buttons. |
void |
setBaseNavButtonStyle(String baseNavButtonStyle)
CSS style to apply to navigation buttons and date display at the top of the component. |
void |
setBaseWeekdayStyle(String baseWeekdayStyle)
Base css style applied to weekdays. |
void |
setBaseWeekendStyle(String baseWeekendStyle)
Base css style applied to weekends. |
void |
setCancelButtonTitle(String cancelButtonTitle)
Title for the cancellation button. |
void |
setData(Date date)
Set the picker to show the given date. |
void |
setDayNameLength(int dayNameLength)
How long (how many characters) shxxould be day names be. |
static void |
setDefaultProperties(DateChooser dateChooserProperties)
Class level method to set the default properties of this class. |
void |
setDisableWeekends(Boolean disableWeekends)
Whether it should be valid to pick a weekend day. |
void |
setEndYear(int endYear)
Last year that may be selected. |
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(String headerStyle)
CSS style applied to the day-of-week headers. |
void |
setMonthMenuStyle(String monthMenuStyle)
Style for the pop-up year menu. |
void |
setNextMonthIcon(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(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(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(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(Boolean showCancelButton)
Determines whether the "Cancel" button will be displayed. |
void |
setShowTodayButton(Boolean showTodayButton)
Determines whether the "Today" button will be displayed, allowing the user to select the current date. |
void |
setShowWeekends(Boolean showWeekends)
Whether weekend days should be shown. |
void |
setSkinImgDir(String skinImgDir)
Overridden directory where images for this widget (such as the month and year button icons) may be found. |
void |
setStartYear(int startYear)
Earliest year that may be selected. |
void |
setTodayButtonHeight(Integer todayButtonHeight)
If set specifies a fixed height for the Today and Cancel buttons. |
void |
setTodayButtonTitle(String todayButtonTitle)
Title for "Today" button. |
void |
setWeekendHeaderStyle(String weekendHeaderStyle)
Optional CSS style applied to the day-of-week headers for weekend days. |
void |
setYearMenuStyle(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 |
|---|
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, getLayoutData, getParent, isAttached, isOrWasAttached, onAttach, onBrowserEvent, onDetach, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents |
| 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, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setVisible, sinkBitlessEvent, 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(JavaScriptObject jsObj)
| Method Detail |
|---|
public static DateChooser getOrCreateRef(JavaScriptObject jsObj)
protected JavaScriptObject create()
create in class Canvaspublic void setAlternateStyleSuffix(String alternateStyleSuffix)
alternateWeekStyles.
alternateStyleSuffix - alternateStyleSuffix Default value is "Dark"public String getAlternateStyleSuffix()
alternateWeekStyles.
public void setAlternateWeekStyles(Boolean alternateWeekStyles)
alternateStyleSuffix appended to it.
alternateWeekStyles - alternateWeekStyles Default value is nullpublic Boolean getAlternateWeekStyles()
alternateStyleSuffix appended to it.
public void setBaseBottomButtonStyle(String baseBottomButtonStyle)
baseButtonStyle is used.
baseBottomButtonStyle - baseBottomButtonStyle Default value is nullpublic String getBaseBottomButtonStyle()
baseButtonStyle is used.
public void setBaseButtonStyle(String baseButtonStyle)
baseButtonStyle - baseButtonStyle Default value is "dateChooserButton"public String getBaseButtonStyle()
public void setBaseNavButtonStyle(String baseNavButtonStyle)
baseButtonStyle is used.
baseNavButtonStyle - baseNavButtonStyle Default value is nullpublic String getBaseNavButtonStyle()
baseButtonStyle is used.
public void setBaseWeekdayStyle(String baseWeekdayStyle)
baseButtonStyle.
baseWeekdayStyle - baseWeekdayStyle Default value is nullpublic String getBaseWeekdayStyle()
baseButtonStyle.
public void setBaseWeekendStyle(String baseWeekendStyle)
baseWeekdayStyle.
baseWeekendStyle - baseWeekendStyle Default value is nullpublic String getBaseWeekendStyle()
baseWeekdayStyle.
public void setCancelButtonTitle(String cancelButtonTitle)
cancelButtonTitle - cancelButtonTitle Default value is "Cancel"public String getCancelButtonTitle()
public void setDayNameLength(int dayNameLength)
throws IllegalStateException
dayNameLength - dayNameLength Default value is 2
IllegalStateException - this property cannot be changed after the component has been createdpublic int getDayNameLength()
public void setDisableWeekends(Boolean disableWeekends)
throws IllegalStateException
Which days are considered weekends is controlled by weekendDays.
disableWeekends - disableWeekends Default value is false
IllegalStateException - this property cannot be changed after the component has been createdpublic Boolean getDisableWeekends()
Which days are considered weekends is controlled by weekendDays.
public void setEndYear(int endYear)
throws IllegalStateException
endYear - endYear Default value is 2015
IllegalStateException - this property cannot be changed after the component has been createdpublic int getEndYear()
public void setFirstDayOfWeek(int firstDayOfWeek)
throws IllegalStateException
firstDayOfWeek - firstDayOfWeek Default value is 0
IllegalStateException - this property cannot be changed after the component has been createdAppearance overview and related methodspublic int getFirstDayOfWeek()
Appearance overview and related methods
public void setHeaderHeight(int headerHeight)
throws IllegalStateException
headerHeight - headerHeight Default value is 20
IllegalStateException - this property cannot be changed after the component has been createdpublic int getHeaderHeight()
public void setHeaderStyle(String headerStyle)
weekendHeaderStyle
headerStyle - headerStyle Default value is "dateChooserButtonDisabled"public String getHeaderStyle()
weekendHeaderStyle
public void setMonthMenuStyle(String monthMenuStyle)
throws IllegalStateException
monthMenuStyle - monthMenuStyle Default value is "dateChooserMonthMenu"
IllegalStateException - this property cannot be changed after the component has been createdpublic String getMonthMenuStyle()
public void setNextMonthIcon(String nextMonthIcon)
nextMonthIcon - nextMonthIcon Default value is "[SKIN]arrow_right.gif"public String getNextMonthIcon()
public void setNextMonthIconHeight(int nextMonthIconHeight)
nextMonthIconHeight - nextMonthIconHeight Default value is 7public int getNextMonthIconHeight()
public void setNextMonthIconWidth(int nextMonthIconWidth)
nextMonthIconWidth - nextMonthIconWidth Default value is 7public int getNextMonthIconWidth()
public void setNextYearIcon(String nextYearIcon)
throws IllegalStateException
nextYearIcon - nextYearIcon Default value is "[SKIN]doubleArrow_right.gif"
IllegalStateException - this property cannot be changed after the component has been createdcom.smartgwt.client.widgets.DateChooser#setShowDoubleYearIconpublic String getNextYearIcon()
com.smartgwt.client.widgets.DateChooser#getShowDoubleYearIconpublic void setNextYearIconHeight(int nextYearIconHeight)
nextYearIconHeight - nextYearIconHeight Default value is 7public int getNextYearIconHeight()
public void setNextYearIconWidth(int nextYearIconWidth)
throws IllegalStateException
nextYearIconWidth - nextYearIconWidth Default value is 14
IllegalStateException - this property cannot be changed after the component has been createdpublic int getNextYearIconWidth()
public void setPrevMonthIcon(String prevMonthIcon)
throws IllegalStateException
prevMonthIcon - prevMonthIcon Default value is "[SKIN]arrow_left.gif"
IllegalStateException - this property cannot be changed after the component has been createdpublic String getPrevMonthIcon()
public void setPrevMonthIconHeight(int prevMonthIconHeight)
throws IllegalStateException
prevMonthIconHeight - prevMonthIconHeight Default value is 7
IllegalStateException - this property cannot be changed after the component has been createdpublic int getPrevMonthIconHeight()
public void setPrevMonthIconWidth(int prevMonthIconWidth)
throws IllegalStateException
prevMonthIconWidth - prevMonthIconWidth Default value is 7
IllegalStateException - this property cannot be changed after the component has been createdpublic int getPrevMonthIconWidth()
public void setPrevYearIcon(String prevYearIcon)
throws IllegalStateException
prevYearIcon - prevYearIcon Default value is "[SKIN]doubleArrow_left.gif"
IllegalStateException - this property cannot be changed after the component has been createdcom.smartgwt.client.widgets.DateChooser#setShowDoubleYearIconpublic String getPrevYearIcon()
com.smartgwt.client.widgets.DateChooser#getShowDoubleYearIcon
public void setPrevYearIconHeight(int prevYearIconHeight)
throws IllegalStateException
prevYearIconHeight - prevYearIconHeight Default value is 7
IllegalStateException - this property cannot be changed after the component has been createdpublic int getPrevYearIconHeight()
public void setPrevYearIconWidth(int prevYearIconWidth)
throws IllegalStateException
prevYearIconWidth - prevYearIconWidth Default value is 14
IllegalStateException - this property cannot be changed after the component has been createdpublic int getPrevYearIconWidth()
public void setShowCancelButton(Boolean showCancelButton)
showCancelButton - showCancelButton Default value is falsepublic Boolean getShowCancelButton()
public void setShowTodayButton(Boolean showTodayButton)
showTodayButton - showTodayButton Default value is truepublic Boolean getShowTodayButton()
public void setShowWeekends(Boolean showWeekends)
throws IllegalStateException
showWeekends - showWeekends Default value is true
IllegalStateException - this property cannot be changed after the component has been createdpublic Boolean getShowWeekends()
public void setSkinImgDir(String skinImgDir)
Note : This is an advanced setting
setSkinImgDir in class CanvasskinImgDir - skinImgDir Default value is "images/common/"Images overview and related methodspublic String getSkinImgDir()
getSkinImgDir in class CanvasImages overview and related methods
public void setStartYear(int startYear)
throws IllegalStateException
startYear - startYear Default value is 1995
IllegalStateException - this property cannot be changed after the component has been createdpublic int getStartYear()
public void setTodayButtonHeight(Integer todayButtonHeight)
todayButtonHeight - todayButtonHeight Default value is nullpublic Integer getTodayButtonHeight()
public void setTodayButtonTitle(String todayButtonTitle)
todayButtonTitle - todayButtonTitle Default value is "Today"public String getTodayButtonTitle()
public void setWeekendHeaderStyle(String weekendHeaderStyle)
headerStyle will be applied to both weekdays and weekend days.
weekendHeaderStyle - weekendHeaderStyle Default value is nullpublic String getWeekendHeaderStyle()
headerStyle will be applied to both weekdays and weekend days.
public void setYearMenuStyle(String yearMenuStyle)
throws IllegalStateException
yearMenuStyle - yearMenuStyle Default value is "dateChooserYearMenu"
IllegalStateException - this property cannot be changed after the component has been createdpublic String getYearMenuStyle()
public void cancelClick()
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 DateChooser.getData to get the
current date value.
addDataChangedHandler in interface HasDataChangedHandlershandler - the dataChanged handler
HandlerRegistration used to remove this handlerpublic Date getData()
See DateChooser.dataChanged for how to respond to the user picking a date.
public void setData(Date date)
date - new valuepublic void todayClick()
public static void setDefaultProperties(DateChooser dateChooserProperties)
Note: This method is intended for setting default attributes only and will effect all instances of the underlying class (including those automatically generated in JavaScript). This method should not be used to apply standard EventHandlers or override methods for a class - use a custom subclass instead.
dateChooserProperties - properties that should be used as new defaults when instances of this class are created
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||