|
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.JSpinner | +--com.klg.jclass.util.calendar.TimeSpin
The TimeSpin class is used in the DateTimePopup to allow the user to interactively modify the time portion of the current date. In order to get information passed on to it by the DateTimePopup, this class implements the CalendarComponent interface. Note that there are two models, the normal SpinnerModel and the JCValueModel that need to be kept in sync. One holds a Date object and the other holds a Calendar object.
Nested Class Summary |
Nested classes inherited from class javax.swing.JSpinner |
JSpinner.DateEditor, JSpinner.DefaultEditor, JSpinner.ListEditor, JSpinner.NumberEditor |
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 com.klg.jclass.util.calendar.BoundsValidator |
boundsValidator
A validator that checks for values between a min and max date. |
protected boolean |
ignoreChange
Ignore change in spinner if already changing spinner. |
protected com.klg.jclass.util.value.JCValueModel |
valueModel
The calendar value model. |
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 | |
TimeSpin()
No args constructor. |
|
TimeSpin(Date date)
Constructor which supplies a starting time (in a Date object). |
|
TimeSpin(Date date,
Locale l)
Constructor which supplies a starting time (in a Date object) and a locale. |
Method Summary | |
void |
addActionListener(ActionListener l)
This is unused. |
Calendar |
getMaximumDate()
Returns the maximum roll date. |
Calendar |
getMinimumDate()
Returns the minimum roll date. |
void |
removeActionListener(ActionListener l)
This is unused. |
void |
setCalendarModel(com.klg.jclass.util.value.JCValueModel valueModel)
Sets the current date being used by the calendar component. |
void |
setColumns(int columns)
Set the number of columns in the editor to a new value. |
void |
setColumns(SimpleDateFormat sdf)
Set the columns in the editor to be the pattern size of the passed in SimpleDateFormat. |
void |
setFont(Font f)
Sets the font for this component. |
void |
setFormat(DateFormat df)
Set the format to use in the JCFormattedTextField for this TimeSpin object. |
void |
setLocale(Locale l)
Set the locale the TimeSpin object should use. |
void |
setMaximumDate(Calendar maxDate)
Sets the maximum roll date. |
void |
setMinimumDate(Calendar minDate)
Sets the minimum date. |
void |
setModel(SpinnerModel model)
Overrides JSpinner.setModel(model) so that it can keep both of its models in sync. |
void |
setSpecialDates(com.klg.jclass.util.calendar.JCCalendar special_dates)
This is unused. |
void |
stateChanged(ChangeEvent e)
The spinner model has changed. |
void |
valueChanged(com.klg.jclass.util.value.JCValueEvent event)
The calendar value model has changed. |
void |
valueChanging(com.klg.jclass.util.value.JCValueEvent event)
The value is changing. |
Methods inherited from class javax.swing.JSpinner |
addChangeListener, commitEdit, createEditor, fireStateChanged, getChangeListeners, getEditor, getModel, getNextValue, getPreviousValue, getUI, getUIClassID, getValue, removeChangeListener, setEditor, setUI, setValue, 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.value.JCValueModel valueModel
protected com.klg.jclass.util.calendar.BoundsValidator boundsValidator
protected boolean ignoreChange
Constructor Detail |
public TimeSpin()
public TimeSpin(Date date)
date
- The starting timepublic TimeSpin(Date date, Locale l)
date
- The starting timel
- The locale to useMethod Detail |
public void setCalendarModel(com.klg.jclass.util.value.JCValueModel valueModel)
setCalendarModel
in interface CalendarComponent
valueModel
- The new calendar value model. This must be of type
CalendarValueModel.public void setModel(SpinnerModel model)
setModel
in class JSpinner
model
- The new model. This must be a SpinnerDateModel.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 void setSpecialDates(com.klg.jclass.util.calendar.JCCalendar special_dates)
setSpecialDates
in interface CalendarComponent
special_dates
- The new list of special dates stored within a
JCCalendar objectpublic void addActionListener(ActionListener l)
addActionListener
in interface CalendarComponent
l
- The action listener to be addedpublic void removeActionListener(ActionListener l)
removeActionListener
in interface CalendarComponent
l
- The action listener to be removedpublic void valueChanging(com.klg.jclass.util.value.JCValueEvent event)
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 changedpublic void stateChanged(ChangeEvent e)
stateChanged
in interface ChangeListener
e
- A ChangeEvent objectpublic void setLocale(Locale l)
setLocale
in interface CalendarComponent
setLocale
in class Component
l
- The locale object to use.public void setFormat(DateFormat df)
df
- The new formatpublic void setColumns(SimpleDateFormat sdf)
sdf
- The format from which to get the pattern sizepublic void setColumns(int columns)
columns
- The new number of columns (must be non-negative)public void setFont(Font f)
setFont
in class JComponent
f
- The desired Font
for this componentComponent.getFont()
|
Copyright © 2004 Quest Software Inc.. All rights reserved. |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |