|
|||||||||
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
javax.swing.JPanel
com.sciapp.editors.JDateChooser
public class JDateChooser
A date chooser that contains controls for specifying year, month, date and time.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JPanel |
---|
JPanel.AccessibleJPanel |
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.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary |
---|
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 | |
---|---|
JDateChooser()
Creates a new JDateChooser object. |
Method Summary | |
---|---|
void |
clearSelectionDate()
|
static JDialog |
createDialog(Component parent,
String title,
boolean modal,
JDateChooser dateChooser,
ActionListener okListener,
ActionListener cancelListener)
Creates and returns a new dialog containing the JDateChooser object and buttons for controlling the dialog. |
Calendar |
getDateFromGUI()
Returns a calendar object which is initialized to the selected values shown on the datechooser panel. |
Calendar |
getSelectedDate()
Returns a calendar object which is initialized to the selected date. |
void |
loadCurrentDate()
Positions the date chooser to the current date. |
void |
loadDate(Calendar calendar)
Positions the date chooser to the date specified by calendar . |
void |
loadDate(Date date)
Positions the date chooser to the date specified by date . |
void |
setSelectedDate(Date date)
Selects and positions the date chooser to the specified date. |
void |
updateUI()
Resets the UI property with a value from the current look and feel. |
Methods inherited from class javax.swing.JPanel |
---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public JDateChooser()
Method Detail |
---|
public void clearSelectionDate()
public static JDialog createDialog(Component parent, String title, boolean modal, JDateChooser dateChooser, ActionListener okListener, ActionListener cancelListener)
The "OK" button hides the dialog and stores the selected date.
The "Cancel" button hides the dialog without storing the selected date.
The "Reset" button resets the date chooser to the date which was set when the dialog was invoked.
Furthermore, the user can supply his own ActionListeners that will be invoked when the "OK" or "Cancel" buttons are pressed.
parent
- the parent component for the dialogtitle
- the title for the dialogmodal
- boolean specifying whether the dialog is modaldateChooser
- the date chooser to be placed inside the dialogokListener
- the ActionListener invoked when "OK" is pressedcancelListener
- the ActionListener invoked when "Cancel" is pressed
public Calendar getDateFromGUI()
public Calendar getSelectedDate()
public void loadCurrentDate()
public void loadDate(Calendar calendar)
calendar
.
calendar
- the calendar object which the date chooser will show.public void loadDate(Date date)
date
.
date
- the date which the date chooser will show.public void setSelectedDate(Date date)
date
- the date which this chooser will show.public void updateUI()
updateUI
in class JPanel
JComponent.updateUI()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |