jade.gui
Class TimeChooser

java.lang.Object
  extended by jade.gui.TimeChooser
All Implemented Interfaces:
java.awt.event.ActionListener, java.util.EventListener

public class TimeChooser
extends java.lang.Object
implements java.awt.event.ActionListener

The TimeChooser class can be used to let the user define a certain point in time by means of a dialog window.

Version:
$Date: 2010-04-15 11:26:09 +0200 (gio, 15 apr 2010) $ $Revision: 6311 $
Author:
Giovanni Rimassa - Universita' di Parma

Field Summary
static int ABSOLUTE
           
static int CANCEL
           
static int OK
           
static int RELATIVE
           
 
Constructor Summary
TimeChooser()
          Default constructor.
TimeChooser(java.util.Date d)
          Create a time chooser set at the given time instant.
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
           
 java.util.Date getDate()
          Retrieve the time instant this time chooser is set to.
 void setDate(java.util.Date d)
          Set the time instant for thistime chooser.
 int showEditTimeDlg(javax.swing.JFrame parent)
          Allow the user to manipulate a time instant through this dialog.
 void showViewTimeDlg(javax.swing.JFrame parent)
          Allow the user to view a time instant through a read-only version of this dialog.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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(java.util.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(javax.swing.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(javax.swing.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(java.awt.event.ActionEvent e)
Specified by:
actionPerformed in interface java.awt.event.ActionListener

getDate

public java.util.Date getDate()
Retrieve the time instant this time chooser is set to.

Returns:
The selected time instant.

setDate

public void setDate(java.util.Date d)
Set the time instant for thistime chooser.

Parameters:
d - The time instant for this chooser to point to.