|
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 | +--com.klg.jclass.swing.DateTimePopup
Class that functions as the popup editor for JCPopupCalendar.
Field Summary | |
protected com.klg.jclass.swing.DateTimeChooser |
chooser
A date/time chooser component to do the editing. |
protected com.klg.jclass.util.value.JCValueModel |
model
Value model used to store the editor's value. |
protected Component |
parent
The popup's parent. |
protected com.klg.jclass.util.JCListenerList |
popupListeners
A list of listeners to tell about value changes. |
Constructor Summary | |
DateTimePopup()
A no arguments constructor. |
|
DateTimePopup(Component parent)
A constructor with a given parent. |
|
DateTimePopup(Component parent,
Calendar c)
Create a DateTimePopup with a given date/time but otherwise with default values. |
|
DateTimePopup(Component parent,
int chooserType,
boolean showTimeComponent,
boolean showApplyButton,
Locale l,
Calendar c)
Create a DateTimePopup of the given chooserType. |
|
DateTimePopup(Component parent,
int chooserType,
boolean showTimeComponent,
boolean showApplyButton,
Locale l,
Calendar c,
String[] months,
String[] shortMonths,
String[] days)
Create a DateTimePopup of the given chooserType. |
Method Summary | |
void |
addPopupListener(com.klg.jclass.util.swing.JCPopupListener l)
Add a JCPopupListener to the popup to inform when the value in the popup component has been committed. |
void |
firePopupEvent()
Fire a popup event to all listeners. |
com.klg.jclass.swing.DateTimeChooser |
getDateTimeChooser()
Returns the DateTimeChooser component that does the date/time editing. |
JComponent |
getEditorComponent()
Returns the component in the popup that does the date/time editing. |
boolean |
getHidePopupOnDayTableClick()
Get whether the popup will popdown when the user selects a day on the day table. |
boolean |
getShowApplyButton()
Get whether an apply button be shown in the popup. |
boolean |
getShowTimeComponent()
Returns whether the time component should appear or not. |
void |
removePopupListener(com.klg.jclass.util.swing.JCPopupListener l)
Removes a JCPopupListener. |
void |
setFont(Font f)
Sets the Font of the popup. |
void |
setHidePopupOnDayTableClick(boolean hidePopupOnDayTableClick)
Set whether the popup will popdown when the user selects a day on the day table. |
void |
setLocale(Locale locale)
Sets the locale being used by the popup. |
void |
setMaximumDate(Object maxDate)
Sets the maximum date. |
void |
setMinimumDate(Object 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 popup editor. |
void |
valueChanged(com.klg.jclass.util.value.JCValueEvent event)
The method informs a listener that the value has been changed. |
void |
valueChanging(com.klg.jclass.util.value.JCValueEvent event)
The value is changing. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected Component parent
protected com.klg.jclass.swing.DateTimeChooser chooser
protected com.klg.jclass.util.JCListenerList popupListeners
protected com.klg.jclass.util.value.JCValueModel model
Constructor Detail |
public DateTimePopup()
public DateTimePopup(Component parent)
parent
- The popup's parent.public DateTimePopup(Component parent, Calendar c)
parent
- The popup's parent.c
- The date/time stored in a Calendar objectpublic DateTimePopup(Component parent, int chooserType, boolean showTimeComponent, boolean showApplyButton, Locale l, Calendar c)
parent
- The popup's parentchooserType
- 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
- Determines whether the apply button is shown or not.l
- The locale to usec
- The date/time stored in a Calendar objectpublic DateTimePopup(Component parent, int chooserType, boolean showTimeComponent, boolean showApplyButton, Locale l, Calendar c, String[] months, String[] shortMonths, String[] days)
parent
- The popup's parentchooserType
- 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
- Determines whether the apply button is shown or not.l
- The locale to usec
- The date/time stored in a Calendar objectmonths
- 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 |
public com.klg.jclass.swing.DateTimeChooser getDateTimeChooser()
public JComponent getEditorComponent()
getEditorComponent
in interface JCPopupCalendarEditor
getDateTimeChooser()
public void addPopupListener(com.klg.jclass.util.swing.JCPopupListener l)
addPopupListener
in interface JCPopupCalendarEditor
l
- The popup listener to addpublic void removePopupListener(com.klg.jclass.util.swing.JCPopupListener l)
removePopupListener
in interface JCPopupCalendarEditor
l
- The popup listener to removepublic void firePopupEvent()
firePopupEvent
in interface JCPopupCalendarEditor
public void setValue(Object value)
setValue
in interface JCPopupCalendarEditor
value
- The value to set on the popup editor. This value can be of
type Calendar or Date.public void setMinimumDate(Object minDate)
setMinimumDate
in interface JCPopupCalendarEditor
minDate
- The new minimum date. This value can be of type Calendar or
Date.public void setMaximumDate(Object maxDate)
setMaximumDate
in interface JCPopupCalendarEditor
maxDate
- The new maximum date. This value can be of type Calendar or
Date.public void setLocale(Locale locale)
setLocale
in interface JCPopupCalendarEditor
locale
- The new locale to be usedpublic void setFont(Font f)
Font
of the popup. This font gets propagated to the
child components
setFont
in interface JCPopupCalendarEditor
f
- the new Font
for the popuppublic void setShowTimeComponent(boolean showTimeComponent)
setShowTimeComponent
in interface JCPopupCalendarEditor
showTimeComponent
- If true, the time component will appearpublic boolean getShowTimeComponent()
getShowTimeComponent
in interface JCPopupCalendarEditor
public void setShowApplyButton(boolean showApplyButton)
setShowApplyButton
in interface JCPopupCalendarEditor
showApplyButton
- If true, an apply button is shown in the popup.public boolean getShowApplyButton()
getShowApplyButton
in interface JCPopupCalendarEditor
public void setHidePopupOnDayTableClick(boolean hidePopupOnDayTableClick)
setHidePopupOnDayTableClick
in interface JCPopupCalendarEditor
hidePopupOnDayTableClick
- If true, the popup will popdown when the
user selects a day on the day table.public boolean getHidePopupOnDayTableClick()
getHidePopupOnDayTableClick
in interface JCPopupCalendarEditor
public void valueChanging(com.klg.jclass.util.value.JCValueEvent event)
new_value
or abort the change altogether. In the case of an
abort (initiatied by calling event.setAllowChange(false)
), the
valueChanged
method will never be called.
valueChanging
in interface JCValueListener
event
- The event generated by the value changingpublic void valueChanged(com.klg.jclass.util.value.JCValueEvent event)
valueChanged
in interface JCValueListener
event
- The event generated by the value changed
|
Copyright © 2004 Quest Software Inc.. All rights reserved. |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |