org.gnu.gnome
Class DateEdit

java.lang.Object
  extended byorg.gnu.glib.Struct
      extended byorg.gnu.glib.GObject
          extended byorg.gnu.gtk.GtkObject
              extended byorg.gnu.gtk.Widget
                  extended byorg.gnu.gtk.Container
                      extended byorg.gnu.gtk.Box
                          extended byorg.gnu.gtk.HBox
                              extended byorg.gnu.gnome.DateEdit

public class DateEdit
extends org.gnu.gtk.HBox

A control which allows the user to select a date.


Constructor Summary
DateEdit(java.util.Date date, boolean timeDisplay, boolean use24fmt)
          Creates a new DateEdit control initialized to the given date.
DateEdit(org.gnu.glib.Handle handle)
          Construct a new DateEdit from a handle to a native resource.
 
Method Summary
 void addListener(DateEditListener listener)
          Register an object to handle DateEdit events.
 boolean get24HourFormat()
          Returns true if the control shows the time in the 24 hour format.
 java.lang.Class getEventListenerClass(java.lang.String signal)
           
 org.gnu.glib.EventType getEventType(java.lang.String signal)
           
 java.util.Date getInitialTime()
           
 java.util.Date getTime()
          Get the date/time indicated in the DateEdit control.
 boolean getTimeDisplay()
          Returns true if the control shows the time as well as date.
static org.gnu.glib.Type getType()
          Retrieve the runtime type used by the GLib library.
 void removeListener(DateEditListener listener)
          Removes a listener
 void set24HourFormat(boolean enabled)
          Change the way the time display is formated.
 void setPopupRange(int lowHour, int upHour)
           
 void setTime(java.util.Date date)
          Set the date/time indicated in the DateEdit control.
 void setTimeDisplay(boolean enabled)
          Enabled/Disable the functionallity which shows time as well as date.
 
Methods inherited from class org.gnu.gtk.HBox
getHBox
 
Methods inherited from class org.gnu.gtk.Box
getHomogeneous, getSpacing, packEnd, packEnd, packStart, packStart, reorderChild, setHomogeneous, setSpacing
 
Methods inherited from class org.gnu.gtk.Container
add, addListener, getBorderWidth, getChildren, getResizeMode, remove, removeListener, resizeChildren, setBorderWidth, setResizeMode
 
Methods inherited from class org.gnu.gtk.Widget
activate, addAccelerator, addEvents, addListener, addListener, addListener, addListener, addListener, addListener, addListener, addListener, addListener, addListener, addListener, canActivateAccel, createContext, createLayout, draw, drawArea, drawArea, finish, getAccessible, getColormap, getContext, getData, getDisplay, getDragData, getExtensionEvents, getModifierStyle, getName, getParent, getParentWindow, getPointer, getRootWindow, getScreen, getSensitive, getStyle, getToplevel, getWidget, getWindow, grabDefault, grabFocus, hasFocus, hasScreen, hide, hideAll, highlight, highlight, intersect, isAncestor, makeWidget, modifyStyle, popColormap, pushColormap, realize, removeAccelerator, removeListener, removeListener, removeListener, removeListener, removeListener, removeListener, removeListener, removeListener, removeListener, removeListener, removeListener, reparent, setBackgroundColor, setBaseColor, setColormap, setDoubleBuffered, setDragDestination, setDragIcon, setDragIconPixbuf, setDragIconStock, setDragSource, setEvents, setExtensionEvents, setFont, setForegroundColor, setMinimumSize, setName, setNoDragDestination, setNoDragSource, setSensitive, setTextColor, shapeCombineMask, show, showAll, unHighlight, unHighlight
 
Methods inherited from class org.gnu.gtk.GtkObject
destroy, sink
 
Methods inherited from class org.gnu.glib.GObject
addEventHandler, addEventHandler, addEventHandler, addEventHandler, addEventHandler, addEventHandler, addListener, collect, freezeNotify, getBooleanProperty, getData, getDoubleProperty, getFloatProperty, getGObjectFromHandle, getIntProperty, getJavaObjectProperty, getLongProperty, getPixbufProperty, getProperty, getStringProperty, hasProperty, notify, removeEventHandler, removeListener, setBooleanProperty, setData, setDoubleProperty, setFloatProperty, setIntProperty, setJavaObjectProperty, setLongProperty, setPixbufProperty, setProperty, setStringProperty, thawNotify
 
Methods inherited from class org.gnu.glib.Struct
equals, getHandle, getNullHandle, hashCode
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DateEdit

public DateEdit(java.util.Date date,
                boolean timeDisplay,
                boolean use24fmt)
Creates a new DateEdit control initialized to the given date.

Parameters:
date - The date to which the control should be initilized.
timeDisplay - True if the time should be shown. False if the date only should be shown.
use24fmt - True if the control should display time in the 24 hour format. False if the 24 hour format should not be used.

DateEdit

public DateEdit(org.gnu.glib.Handle handle)
Construct a new DateEdit from a handle to a native resource.

Method Detail

get24HourFormat

public boolean get24HourFormat()
Returns true if the control shows the time in the 24 hour format.

Returns:
True if time is being shown in the 24 hour format. Flase if the time is being shown in the 12 hour format.

getInitialTime

public java.util.Date getInitialTime()

getTime

public java.util.Date getTime()
Get the date/time indicated in the DateEdit control.

Returns:
the date/time.

getTimeDisplay

public boolean getTimeDisplay()
Returns true if the control shows the time as well as date.

Returns:
True if time is being shown. Flase if the date only is being shown.

setPopupRange

public void setPopupRange(int lowHour,
                          int upHour)

setTime

public void setTime(java.util.Date date)
Set the date/time indicated in the DateEdit control.

Parameters:
date - The date/time to display.

set24HourFormat

public void set24HourFormat(boolean enabled)
Change the way the time display is formated.

Parameters:
enabled - True if time should be shown in 24 hour format. Flase if the date should be shown in 12 hour format.

setTimeDisplay

public void setTimeDisplay(boolean enabled)
Enabled/Disable the functionallity which shows time as well as date.

Parameters:
enabled - True if time should be shown. Flase if the date only should be shown.

getType

public static org.gnu.glib.Type getType()
Retrieve the runtime type used by the GLib library.


addListener

public void addListener(DateEditListener listener)
Register an object to handle DateEdit events.

See Also:
DateEditListener

removeListener

public void removeListener(DateEditListener listener)
Removes a listener

See Also:
addListener(DateEditListener)

getEventListenerClass

public java.lang.Class getEventListenerClass(java.lang.String signal)

getEventType

public org.gnu.glib.EventType getEventType(java.lang.String signal)