java-gnome version 4.0.19

org.gnome.gtk
Class Calendar

Object
  extended by org.freedesktop.bindings.Pointer
      extended by org.freedesktop.bindings.Proxy
          extended by org.gnome.glib.Object
              extended by org.gnome.gtk.Object
                  extended by org.gnome.gtk.Widget
                      extended by org.gnome.gtk.Calendar

public class Calendar
extends Widget

Displays a monthly calendar with which users select a date.

Since:
4.0.3
Author:
Vreixo Formoso, Andrew Cowie

Nested Class Summary
static interface Calendar.DaySelected
          Signal emitted when the user selects on one of the days showing in the Calendar.
static interface Calendar.DaySelectedDoubleClick
          Signal emitted when the user double clicks on one of the days showing in the Calendar.
 
Nested classes/interfaces inherited from class org.gnome.gtk.Widget
Widget.ButtonPressEvent, Widget.ButtonReleaseEvent, Widget.EnterNotifyEvent, Widget.ExposeEvent, Widget.FocusInEvent, Widget.FocusOutEvent, Widget.Hide, Widget.KeyPressEvent, Widget.KeyReleaseEvent, Widget.LeaveNotifyEvent, Widget.MapEvent, Widget.MotionNotifyEvent, Widget.PopupMenu, Widget.ScrollEvent, Widget.UnmapEvent, Widget.VisibilityNotifyEvent
 
Nested classes/interfaces inherited from class org.gnome.gtk.Object
Object.Destroy
 
Constructor Summary
Calendar()
          Creates a new Calendar instance.
 
Method Summary
 void connect(Calendar.DaySelected handler)
          Hook up a handler for Calendar.DaySelected signals.
 void connect(Calendar.DaySelectedDoubleClick handler)
          Hook up a handler for Calendar.DaySelectedDoubleClick signals.
 int getDateDay()
          Get the day of the date currently selected in this Calendar.
 int getDateMonth()
          Get the month of the date currently selected in this Calendar.
 int getDateYear()
          Get the year of the date currently selected in this Calendar.
 CalendarDisplayOptions getDisplayOptions()
          Returns the Flags object describing the current options enabled in this Calendar.
 void selectDay(int day)
          Select the day showing on this Calendar.
 void selectMonth(int month, int year)
          Change the month (and year) showing on this Calendar.
 void setDisplayOptions(CalendarDisplayOptions flags)
          Sets the various options which control the details of how this Calendar is to be displayed.
 
Methods inherited from class org.gnome.gtk.Widget
activate, addEvents, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, getAllocation, getCanDefault, getCanFocus, getHasFocus, getName, getParent, getRequisition, getSensitive, getToplevel, getWindow, grabAdd, grabDefault, grabFocus, grabRemove, hide, isSensitive, modifyBackground, modifyBase, modifyFont, modifyText, queueDraw, queueDrawArea, realize, setCanDefault, setCanFocus, setColormap, setEvents, setName, setSensitive, setSizeRequest, setTooltipMarkup, setTooltipText, show, showAll
 
Methods inherited from class org.gnome.gtk.Object
connect, destroy
 
Methods inherited from class org.freedesktop.bindings.Pointer
toString
 
Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Calendar

public Calendar()
Creates a new Calendar instance.

Method Detail

connect

public void connect(Calendar.DaySelected handler)
Hook up a handler for Calendar.DaySelected signals.

Since:
4.0.6

connect

public void connect(Calendar.DaySelectedDoubleClick handler)
Hook up a handler for Calendar.DaySelectedDoubleClick signals.

Since:
4.0.6

getDateDay

public int getDateDay()
Get the day of the date currently selected in this Calendar. See companion methods getDateYear() and getDateMonth() for the other components of the date.

Since:
4.0.6

getDateMonth

public int getDateMonth()
Get the month of the date currently selected in this Calendar. See companion methods getDateYear() and getDateDay() for the other components of the date.

Returns:
the numerical month, from 1 to 12.
Since:
4.0.6

getDateYear

public int getDateYear()
Get the year of the date currently selected in this Calendar. See companion methods getDateMonth() and getDateDay() for the other components of the date.

Since:
4.0.6

getDisplayOptions

public CalendarDisplayOptions getDisplayOptions()
Returns the Flags object describing the current options enabled in this Calendar.


selectDay

public void selectDay(int day)
Select the day showing on this Calendar. See selectMonth() to change the month and year.

Parameters:
day - should be in the range of 1 to 31. Passing 0 will unselect the day.
Since:
4.0.6

selectMonth

public void selectMonth(int month,
                        int year)
Change the month (and year) showing on this Calendar. See selectDay() to change the day that is selected.

Parameters:
month - is in the range of 1 (January) to 12 (December).
year - a four-digit year.
Since:
4.0.6

setDisplayOptions

public void setDisplayOptions(CalendarDisplayOptions flags)
Sets the various options which control the details of how this Calendar is to be displayed. See the constants in CalendarDisplayOptions for details.



java-gnome