|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
java.awt.Window
java.awt.Dialog
javax.swing.JDialog
DateChooser
Custom dialog box to enter dates. The DateChooser
class presents a calendar and allows the user to visually select a
day, month and year so that it is impossible to enter an invalid
date.
Nested Class Summary |
Nested classes inherited from class javax.swing.JDialog |
JDialog.AccessibleJDialog |
Nested classes inherited from class java.awt.Dialog |
Dialog.AccessibleAWTDialog |
Nested classes inherited from class java.awt.Window |
Window.AccessibleAWTWindow |
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 |
Fields inherited from class javax.swing.JDialog |
accessibleContext, rootPane, rootPaneCheckingEnabled |
Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface javax.swing.WindowConstants |
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, EXIT_ON_CLOSE, HIDE_ON_CLOSE |
Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
DateChooser(Dialog owner)
Constructs a new DateChooser . |
|
DateChooser(Dialog owner,
String title)
Constructs a new DateChooser with the given title. |
|
DateChooser(Frame owner)
Constructs a new DateChooser . |
|
DateChooser(Frame owner,
String title)
Constructs a new DateChooser with the given title. |
Method Summary | |
void |
actionPerformed(ActionEvent e)
Called when the "Ok" button is pressed. |
void |
focusGained(FocusEvent e)
Called when the calendar gains the focus. |
void |
focusLost(FocusEvent e)
Called when the calendar loses the focus. |
void |
itemStateChanged(ItemEvent e)
Called when a new month or year is selected. |
void |
keyPressed(KeyEvent e)
Called when a key is pressed and the calendar has the focus. |
void |
keyReleased(KeyEvent e)
|
void |
keyTyped(KeyEvent e)
|
void |
mouseClicked(MouseEvent e)
Called when the mouse is clicked on a day in the calendar. |
void |
mouseEntered(MouseEvent e)
|
void |
mouseExited(MouseEvent e)
|
void |
mousePressed(MouseEvent e)
|
void |
mouseReleased(MouseEvent e)
|
Date |
select()
Selects new date. |
Date |
select(Date date)
Selects a date. |
Methods inherited from class java.awt.Dialog |
addNotify, dispose, getTitle, hide, isModal, isResizable, isUndecorated, setModal, setResizable, setTitle, setUndecorated, show |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public DateChooser(Dialog owner, String title)
DateChooser
with the given title.
owner
- owner dialogtitle
- dialog titlepublic DateChooser(Dialog owner)
DateChooser
.
owner
- owner dialogpublic DateChooser(Frame owner, String title)
DateChooser
with the given title.
owner
- owner frametitle
- dialog titlepublic DateChooser(Frame owner)
DateChooser
.
owner
- owner frameMethod Detail |
public void actionPerformed(ActionEvent e)
actionPerformed
in interface ActionListener
public void focusGained(FocusEvent e)
focusGained
in interface FocusListener
public void focusLost(FocusEvent e)
focusLost
in interface FocusListener
public void itemStateChanged(ItemEvent e)
itemStateChanged
in interface ItemListener
public void keyPressed(KeyEvent e)
keyPressed
in interface KeyListener
public void mouseClicked(MouseEvent e)
mouseClicked
in interface MouseListener
public void keyReleased(KeyEvent e)
keyReleased
in interface KeyListener
public void keyTyped(KeyEvent e)
keyTyped
in interface KeyListener
public void mouseEntered(MouseEvent e)
mouseEntered
in interface MouseListener
public void mouseExited(MouseEvent e)
mouseExited
in interface MouseListener
public void mousePressed(MouseEvent e)
mousePressed
in interface MouseListener
public void mouseReleased(MouseEvent e)
mouseReleased
in interface MouseListener
public Date select(Date date)
date
- initial date
null
if the user
press "Cancel" or closes the dialog boxpublic Date select()
select(Date)
with the
system date as the parameter.
select(Date)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |