|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.pivot.wtk.Component
org.apache.pivot.wtk.Button
org.apache.pivot.wtk.CalendarButton
public class CalendarButton
A component that allows a user to select a calendar date. The calendar is hidden until the user pushes the button.
Nested Class Summary | |
---|---|
static interface |
CalendarButton.Skin
CalendarButton skin interface. |
Nested classes/interfaces inherited from class org.apache.pivot.wtk.Button |
---|
Button.ButtonDataBindMapping, Button.DataRenderer, Button.SelectedBindMapping, Button.State, Button.StateBindMapping |
Nested classes/interfaces inherited from class org.apache.pivot.wtk.Component |
---|
Component.DecoratorSequence, Component.StyleDictionary, Component.UserDataDictionary |
Field Summary | |
---|---|
static String |
COUNTRY_KEY
|
static String |
LANGUAGE_KEY
|
static String |
VARIANT_KEY
|
Constructor Summary | |
---|---|
CalendarButton()
|
|
CalendarButton(int year,
int month)
|
Method Summary | |
---|---|
void |
clear()
Clears any bound values in the component. |
void |
clearSelection()
Clears the selection. |
ListenerList<CalendarButtonListener> |
getCalendarButtonListeners()
Returns the calendar button listener list. |
ListenerList<CalendarButtonSelectionListener> |
getCalendarButtonSelectionListeners()
Returns the calendar button selection listener list. |
Filter<CalendarDate> |
getDisabledDateFilter()
|
Window |
getListPopup()
|
Locale |
getLocale()
Returns the locale used to present calendar data. |
int |
getMonth()
Gets the month to which this calendar button is currently set. |
CalendarDate |
getSelectedDate()
Returns the currently selected date. |
Calendar.SelectedDateBindMapping |
getSelectedDateBindMapping()
|
BindType |
getSelectedDateBindType()
|
String |
getSelectedDateKey()
Gets the data binding key that is set on this calendar button. |
int |
getYear()
Gets the year to which this calendar button is currently set. |
void |
load(Object context)
Copies bound values from the bind context to the component. |
void |
setDisabledDateFilter(Filter<CalendarDate> disabledDateFilter)
|
void |
setLocale(Dictionary<String,?> locale)
Sets the locale used to present calendar data. |
void |
setLocale(Locale locale)
Sets the locale used to present calendar data. |
void |
setLocale(String locale)
Sets the locale used to present calendar data. |
void |
setMonth(int month)
Sets this calendar's month. |
void |
setSelectedDate(CalendarDate selectedDate)
Sets the selected date. |
void |
setSelectedDate(String selectedDate)
Sets the selected date to the date represented by the specified date string. |
void |
setSelectedDateBindMapping(Calendar.SelectedDateBindMapping bindMapping)
|
void |
setSelectedDateBindType(BindType selectedDateBindType)
|
void |
setSelectedDateKey(String selectedDateKey)
Sets this calendar button's data binding key. |
protected void |
setSkin(Skin skin)
Sets the skin, replacing any previous skin. |
void |
setToggleButton(boolean toggleButton)
Sets the button's toggle state. |
void |
setYear(int year)
Sets this calendar's year. |
void |
store(Object context)
Copies bound values from the component to the bind context. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String LANGUAGE_KEY
public static final String COUNTRY_KEY
public static final String VARIANT_KEY
Constructor Detail |
---|
public CalendarButton()
public CalendarButton(int year, int month)
Method Detail |
---|
protected void setSkin(Skin skin)
Component
setSkin
in class Component
skin
- The new skin.public Window getListPopup()
public void setToggleButton(boolean toggleButton)
Button
setToggleButton
in class Button
UnsupportedOperationException
- This method is not supported by CalendarButton.public int getYear()
public void setYear(int year)
public int getMonth()
public void setMonth(int month)
public CalendarDate getSelectedDate()
public void setSelectedDate(CalendarDate selectedDate)
selectedDate
- The date to select, or null to clear the selection.public final void setSelectedDate(String selectedDate)
selectedDate
- A string in the form of [YYYY]-[MM]-[DD] (e.g. 2008-07-23)public Locale getLocale()
public void setLocale(Locale locale)
locale
- public void setLocale(Dictionary<String,?> locale)
locale
- An dictionary containing values for language, country, and variant.
Country and variant are optional but the must adhere to the following
rules:
public void setLocale(String locale)
locale
- A JSON map containing values for language, country, and variant.setLocale(Dictionary)
public Filter<CalendarDate> getDisabledDateFilter()
public void setDisabledDateFilter(Filter<CalendarDate> disabledDateFilter)
public String getSelectedDateKey()
public void setSelectedDateKey(String selectedDateKey)
public BindType getSelectedDateBindType()
public void setSelectedDateBindType(BindType selectedDateBindType)
public Calendar.SelectedDateBindMapping getSelectedDateBindMapping()
public void setSelectedDateBindMapping(Calendar.SelectedDateBindMapping bindMapping)
public void load(Object context)
Component
load
in class Button
public void store(Object context)
Component
store
in class Button
public void clear()
Component
clear
in class Button
public void clearSelection()
public ListenerList<CalendarButtonListener> getCalendarButtonListeners()
public ListenerList<CalendarButtonSelectionListener> getCalendarButtonSelectionListeners()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |