Package jade.gui
Class TimeChooser
- java.lang.Object
-
- jade.gui.TimeChooser
-
- All Implemented Interfaces:
ActionListener,EventListener
public class TimeChooser extends Object implements ActionListener
TheTimeChooserclass can be used to let the user define a certain point in time by means of a dialog window.- Version:
- $Date$ $Revision$
- Author:
- Giovanni Rimassa - Universita' di Parma
-
-
Constructor Summary
Constructors Constructor Description TimeChooser()Default constructor.TimeChooser(Date d)Create a time chooser set at the given time instant.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidactionPerformed(ActionEvent e)DategetDate()Retrieve the time instant this time chooser is set to.voidsetDate(Date d)Set the time instant for thistime chooser.intshowEditTimeDlg(JFrame parent)Allow the user to manipulate a time instant through this dialog.voidshowViewTimeDlg(JFrame parent)Allow the user to view a time instant through a read-only version of this dialog.
-
-
-
Field Detail
-
ABSOLUTE
public static final int ABSOLUTE
- See Also:
- Constant Field Values
-
RELATIVE
public static final int RELATIVE
- See Also:
- Constant Field Values
-
OK
public static final int OK
- See Also:
- Constant Field Values
-
CANCEL
public static final int CANCEL
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
TimeChooser
public TimeChooser()
Default constructor.
-
TimeChooser
public TimeChooser(Date d)
Create a time chooser set at the given time instant.- Parameters:
d- The initial time instant for this time chooser.
-
-
Method Detail
-
showEditTimeDlg
public int showEditTimeDlg(JFrame parent)
Allow the user to manipulate a time instant through this dialog.- Parameters:
parent- The parent component for this dialog.
-
showViewTimeDlg
public void showViewTimeDlg(JFrame parent)
Allow the user to view a time instant through a read-only version of this dialog.- Parameters:
parent- The parent component of this dialog.
-
actionPerformed
public void actionPerformed(ActionEvent e)
- Specified by:
actionPerformedin interfaceActionListener
-
getDate
public Date getDate()
Retrieve the time instant this time chooser is set to.- Returns:
- The selected time instant.
-
setDate
public void setDate(Date d)
Set the time instant for thistime chooser.- Parameters:
d- The time instant for this chooser to point to.
-
-