|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
org.tbee.swing.JCalendarPicker
public class JCalendarPicker
| Nested Class Summary | |
|---|---|
static class |
JCalendarPicker.Mode
|
| Nested classes/interfaces inherited from class javax.swing.JComponent |
|---|
JComponent.AccessibleJComponent |
| Nested classes/interfaces inherited from class java.awt.Container |
|---|
Container.AccessibleAWTContainer |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
| Field Summary | |
|---|---|
static String |
CALENDAR_PROPERTY_ID
|
static String |
CALENDARS_PROPERTY_ID
|
static String |
DISPLAYEDCALENDAR_PROPERTY_ID
|
protected Calendar |
iCalendar
|
protected List<Calendar> |
iCalendars
|
protected JToggleButton[] |
iDateJToggleButton
|
protected JLabel[] |
iDaynameJLabels
|
protected Calendar |
iDisplayedCalendar
|
protected Locale |
iLocale
|
protected JCalendarPicker.Mode |
iMode
|
protected AtomicInteger |
iModifying
|
protected JSpinner |
iMonthJSpinner
|
protected SpinnerListModel |
iMonthSpinnerModel
|
protected Calendar |
iReferenceCalendar
|
protected Color |
iWeekendLabelColor
|
protected JLabel[] |
iWeeknumberJLabels
|
protected JSpinner |
iYearJSpinner
|
protected org.tbee.swing.JCalendarPicker.YearSpinnerModel |
iYearSpinnerModel
|
static String |
LOCALE_PROPERTY_ID
|
static String |
MODE_PROPERTY_ID
|
static String |
REFERENCECALENDAR_PROPERTY_ID
|
static String |
WEEKENDLABELCOLOR_PROPERTY_ID
|
| Fields inherited from class javax.swing.JComponent |
|---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
| Fields inherited from class java.awt.Component |
|---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
JCalendarPicker()
|
|
| Method Summary | |
|---|---|
void |
addCalendar(Calendar value)
|
protected void |
constructGUI()
|
protected JPanel |
constructGUIMonth()
|
protected JPanel |
constructGUIPicker()
|
protected JPanel |
constructGUIYear()
|
protected int |
determineDaysInMonth()
determine the number of days in the month |
protected int |
determineFirstOfMonthDayOfWeek()
determine on which day of week idx the first of the months is |
Calendar |
getCalendar()
Calendar: the last selected |
List<Calendar> |
getCalendars()
Calendars: all selected calendars (depends on the selection mode) |
Calendar |
getDisplayedCalendar()
ReferenceCalendar: determines how the component looks like e.g. |
Locale |
getLocale()
Locale: determines the language of the labels |
JCalendarPicker.Mode |
getMode()
Mode: single, range or multiple |
protected List<String> |
getMonthNames()
|
Calendar |
getReferenceCalendar()
ReferenceCalendar: determines how the component looks like e.g. |
Color |
getWeekendLabelColor()
WeekendLabelColor: single, range or multiple |
protected List<Integer> |
getWeekLabels()
Get a list with the weeklabels |
boolean |
isModifying()
|
boolean |
isSelected(Calendar calendar)
determine if a date is selected |
protected boolean |
isToday(Calendar calendar)
determine if a date is today |
protected boolean |
isWeekday(int idx,
int weekdaynr)
check if a certain weekday name is a certain day-of-the-week |
protected boolean |
isWeekdayWeekend(int idx)
check if a certain weekday name is a certain day-of-the-week |
protected void |
refreshCalendar()
|
protected void |
refreshLabels()
|
void |
refreshSelection()
|
void |
removeCalendar(Calendar value)
|
void |
setCalendar(Calendar value)
|
void |
setCalendars(List<Calendar> value)
|
void |
setDisplayedCalendar(Calendar value)
|
void |
setLocale(Locale value)
|
void |
setMode(JCalendarPicker.Mode value)
|
void |
setReferenceCalendar(Calendar value)
|
void |
setWeekendLabelColor(Color value)
|
JCalendarPicker |
withCalendar(Calendar value)
|
JCalendarPicker |
withCalendars(List<Calendar> value)
|
JCalendarPicker |
withLocale(Locale value)
|
JCalendarPicker |
withMode(JCalendarPicker.Mode value)
|
JCalendarPicker |
withReferenceCalendar(Calendar value)
|
JCalendarPicker |
withWeekendLabelColor(Color value)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected volatile Calendar iCalendar
public static final String CALENDAR_PROPERTY_ID
protected volatile List<Calendar> iCalendars
public static final String CALENDARS_PROPERTY_ID
protected volatile Calendar iReferenceCalendar
public static final String REFERENCECALENDAR_PROPERTY_ID
protected volatile Locale iLocale
public static final String LOCALE_PROPERTY_ID
protected volatile JCalendarPicker.Mode iMode
public static final String MODE_PROPERTY_ID
protected volatile Color iWeekendLabelColor
public static final String WEEKENDLABELCOLOR_PROPERTY_ID
protected volatile Calendar iDisplayedCalendar
public static final String DISPLAYEDCALENDAR_PROPERTY_ID
protected volatile AtomicInteger iModifying
protected JSpinner iYearJSpinner
protected org.tbee.swing.JCalendarPicker.YearSpinnerModel iYearSpinnerModel
protected JSpinner iMonthJSpinner
protected SpinnerListModel iMonthSpinnerModel
protected JLabel[] iDaynameJLabels
protected JLabel[] iWeeknumberJLabels
protected JToggleButton[] iDateJToggleButton
| Constructor Detail |
|---|
public JCalendarPicker()
| Method Detail |
|---|
public Calendar getCalendar()
public void setCalendar(Calendar value)
public JCalendarPicker withCalendar(Calendar value)
public List<Calendar> getCalendars()
public void setCalendars(List<Calendar> value)
public JCalendarPicker withCalendars(List<Calendar> value)
public void addCalendar(Calendar value)
public void removeCalendar(Calendar value)
public Calendar getReferenceCalendar()
public void setReferenceCalendar(Calendar value)
public JCalendarPicker withReferenceCalendar(Calendar value)
public Locale getLocale()
getLocale in class Componentpublic void setLocale(Locale value)
setLocale in class Componentpublic JCalendarPicker withLocale(Locale value)
public JCalendarPicker.Mode getMode()
public void setMode(JCalendarPicker.Mode value)
public JCalendarPicker withMode(JCalendarPicker.Mode value)
public boolean isSelected(Calendar calendar)
public boolean isModifying()
public Color getWeekendLabelColor()
public void setWeekendLabelColor(Color value)
public JCalendarPicker withWeekendLabelColor(Color value)
public Calendar getDisplayedCalendar()
public void setDisplayedCalendar(Calendar value)
protected void constructGUI()
protected JPanel constructGUIYear()
protected JPanel constructGUIMonth()
protected JPanel constructGUIPicker()
protected void refreshLabels()
protected void refreshCalendar()
public void refreshSelection()
protected List<String> getMonthNames()
protected List<Integer> getWeekLabels()
protected boolean isWeekday(int idx,
int weekdaynr)
protected boolean isWeekdayWeekend(int idx)
protected int determineFirstOfMonthDayOfWeek()
protected int determineDaysInMonth()
protected boolean isToday(Calendar calendar)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||