|
JClass DesktopViews 6.3.0 API Documentation |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Component | +--java.awt.Container | +--javax.swing.JComponent | +--javax.swing.JPanel | +--com.klg.jclass.util.calendar.CalendarContainer | +--com.klg.jclass.util.calendar.DateTimeEditor
Class that wraps a JCDateChooser and a Time Component together.
Nested Class Summary | |
protected class |
DateTimeEditor.DateChooser
The date chooser component. |
Nested classes inherited from class javax.swing.JPanel |
JPanel.AccessibleJPanel |
Nested classes inherited from class javax.swing.JComponent |
JComponent.AccessibleJComponent |
Nested classes inherited from class java.awt.Container |
Container.AccessibleAWTContainer |
Nested classes inherited from class java.awt.Component |
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary | |
protected JButton |
applyButton
A button that sets the current value on the popup calendar and pops down the popup. |
protected com.klg.jclass.util.calendar.JCDateChooser |
dateChooser
The date chooser. |
protected boolean |
hidePopupOnDayTableClick
If true, popdown popup if user clicks on day table. |
protected boolean |
showApplyButton
Add an apply button to the popup. |
protected boolean |
showTimeComponent
Controls whether the timeComponent is shown. |
protected com.klg.jclass.util.calendar.CalendarComponent |
timeComponent
The time component. |
protected com.klg.jclass.util.calendar.CalendarContainer |
timeContainer
The container which holds the time component. |
Fields inherited from class com.klg.jclass.util.calendar.CalendarContainer |
actionListeners, initialized, locale, model, specialDates, userFont |
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 | |
DateTimeEditor()
Create a DateTimeChooser with default values and no associated popupEditor. |
|
DateTimeEditor(int chooserType,
boolean showTimeComponent,
boolean showApplyButton,
Locale l,
Calendar c)
Create a DateTimeChooser that specifies the type of chooser, whether or not to show a time component, the locale, and an intial date/time. |
|
DateTimeEditor(int chooserType,
boolean showTimeComponent,
boolean showApplyButton,
Locale l,
Calendar c,
String[] months,
String[] shortMonths,
String[] days)
Create a DateTimeChooser that specifies the type of chooser, whether or not to show a time component, the locale, an intial date/time, and gives a list of month, shortMonth, and day strings to use for the calendar. |
Method Summary | |
protected JButton |
createApplyButton()
Create an apply button. |
protected com.klg.jclass.util.calendar.CalendarComponent |
createTimeComponent(int type,
Calendar c)
Create the time component based on the passed in type. |
protected com.klg.jclass.util.calendar.CalendarContainer |
createTimeContainer(Calendar c)
Create the time component and the the container which holds it. |
protected void |
firePopupEvent()
Fire a popup event to all listeners. |
JButton |
getApplyButton()
Return the applyButton. |
int |
getChooserType()
Gets the date chooser type. |
com.klg.jclass.util.calendar.JCDateChooser |
getDateChooser()
Returns the JCDateChooser component. |
boolean |
getHidePopupOnDayTableClick()
Get whether the popup will popdown when the user selects a day on the day table. |
Calendar |
getMaximumDate()
Returns the maximum roll date. |
Calendar |
getMinimumDate()
Returns the minimum roll date. |
boolean |
getShowApplyButton()
Get whether an apply button be shown in the popup. |
boolean |
getShowTimeComponent()
Returns whether the time component should appear or not. |
com.klg.jclass.util.calendar.CalendarComponent |
getTimeComponent()
Returns the time component. |
Object |
getValue()
Returns the value in the data model. |
void |
setChooserType(int type)
Sets the date chooser type. |
void |
setHidePopupOnDayTableClick(boolean hidePopupOnDayTableClick)
Set whether the popup will popdown when the user selects a day on the day table. |
void |
setMaximumDate(Calendar maxDate)
Sets the maximum roll date. |
void |
setMinimumDate(Calendar minDate)
Sets the minimum date. |
void |
setShowApplyButton(boolean showApplyButton)
Set whether an apply button be shown in the popup. |
void |
setShowTimeComponent(boolean showTimeComponent)
Sets whether the time component should appear or not. |
void |
setValue(Object value)
Sets the value in the data model. |
protected void |
updateLayout(boolean doLayout)
Update the layout so that we get the dateChooser, then the timeContainer if it is required, and then the apply button if it is required. |
protected void |
updateTimeComponent(int type)
Update the time component in response to the user changing the chooser type. |
Methods inherited from class com.klg.jclass.util.calendar.CalendarContainer |
actionPerformed, addActionListener, componentAdded, componentRemoved, getCalendarModel, getLocale, getUserFont, removeActionListener, setCalendarModel, setFont, setLocale, setSpecialDates |
Methods inherited from class javax.swing.JPanel |
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected com.klg.jclass.util.calendar.JCDateChooser dateChooser
protected com.klg.jclass.util.calendar.CalendarComponent timeComponent
protected com.klg.jclass.util.calendar.CalendarContainer timeContainer
protected JButton applyButton
protected boolean showTimeComponent
protected boolean showApplyButton
protected boolean hidePopupOnDayTableClick
Constructor Detail |
public DateTimeEditor()
public DateTimeEditor(int chooserType, boolean showTimeComponent, boolean showApplyButton, Locale l, Calendar c)
chooserType
- The type of date chooser. Must be one of
JCDateChooser.QUICK_SELECT, JCDateChooser.DUAL_SPIN,
JCDateChooser.SPIN_POPDOWN, or JCDateChooser.READ_ONLY. Note that
specifying JCDateChooser.SPIN_POPDOWN will cause JCDateChooser.DUAL_SPIN to
be used because we cannot have a popdown within a popdown.showTimeComponent
- Determines whether the time component is shown or
not.showApplyButton
- If true, an apply button is shown.l
- The locale to use.c
- The intial date and time.public DateTimeEditor(int chooserType, boolean showTimeComponent, boolean showApplyButton, Locale l, Calendar c, String[] months, String[] shortMonths, String[] days)
chooserType
- The type of date chooser. Must be one of
JCDateChooser.QUICK_SELECT, JCDateChooser.DUAL_SPIN,
JCDateChooser.SPIN_POPDOWN, or JCDateChooser.READ_ONLY. Note that
specifying JCDateChooser.SPIN_POPDOWN will cause JCDateChooser.DUAL_SPIN to
be used because we cannot have a popdown within a popdown.showTimeComponent
- Determines whether the time component is shown or
not.showApplyButton
- If true, an apply button is shown.l
- The locale to usec
- The intial date and time.months
- The month strings to use for the calendar. Note that this
array must be the correct size for the locale (or longer).shortMonths
- The shortMonth strings to use for the calendar. Note that
this array must be the correct size for the locale (or longer).days
- The day strings to use for the calendar. Note that this
array must be the correct size for the locale (or longer).Method Detail |
protected com.klg.jclass.util.calendar.CalendarComponent createTimeComponent(int type, Calendar c)
type
- The type of chooserc
- The initial time
protected void updateTimeComponent(int type)
type
- The new chooser typeprotected com.klg.jclass.util.calendar.CalendarContainer createTimeContainer(Calendar c)
c
- An initial time for the time component
public com.klg.jclass.util.calendar.CalendarComponent getTimeComponent()
TimeSpin
,
TimeLabel
protected void firePopupEvent()
protected JButton createApplyButton()
public JButton getApplyButton()
protected void updateLayout(boolean doLayout)
public void setChooserType(int type)
type
- The type of chooser; must be one of
JCDateChooser.QUICK_SELECT
,
JCDateChooser.DUAL_SPIN,
, or
JCDateChooser.READ_ONLY
. The chooser cannot be of
type JCDateChooser.SPIN_POPDOWN
because we cannot have
a popdown within a popdown.public int getChooserType()
JCDateChooser.QUICK_SELECT
JCDateChooser.DUAL_SPIN
JCDateChooser.READ_ONLY
JCDateChooser.SPIN_POPDOWN
because we cannot have
a popdown within a popdown.
public void setShowTimeComponent(boolean showTimeComponent)
showTimeComponent
- If true, the time component will appearpublic boolean getShowTimeComponent()
public boolean getShowApplyButton()
public void setShowApplyButton(boolean showApplyButton)
showApplyButton
- The new value of showApplyButton. If true, an apply
button is shown in the popup.public boolean getHidePopupOnDayTableClick()
public void setHidePopupOnDayTableClick(boolean hidePopupOnDayTableClick)
hidePopupOnDayTableClick
- The new value of hidePopupOnDayTableClick. If
true, the popup will popdown when the user selects a day on the day table.public Object getValue()
public void setValue(Object value)
value
- The value for the data model.public Calendar getMinimumDate()
Calendar
,
setMinimumDate(java.util.Calendar)
,
getMaximumDate()
,
setMaximumDate(java.util.Calendar)
public void setMinimumDate(Calendar minDate)
minDate
- the new minimum dateCalendar
,
getMinimumDate()
,
getMaximumDate()
,
setMaximumDate(java.util.Calendar)
public Calendar getMaximumDate()
Calendar
,
setMinimumDate(java.util.Calendar)
,
getMinimumDate()
,
setMaximumDate(java.util.Calendar)
public void setMaximumDate(Calendar maxDate)
maxDate
- the new maximum dateCalendar
,
setMinimumDate(java.util.Calendar)
,
getMinimumDate()
,
getMaximumDate()
public com.klg.jclass.util.calendar.JCDateChooser getDateChooser()
JCDateChooser
component.
JCDateChooser
|
Copyright © 2004 Quest Software Inc.. All rights reserved. |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |