org.gnu.gtk

Class Calendar

public class Calendar extends Widget

Deprecated: This class is part of the java-gnome 2.x family of libraries, which, due to their inefficiency and complexity, are no longer being maintained and have been abandoned by the java-gnome project. This class may in the future have an equivalent in java-gnome 4.0, try looking for org.gnome.gtk.Calendar. You should be aware that there is a considerably different API in the new library: the architecture is completely different and most notably internals are no longer exposed to public view.

A Calendar is a widget that displays a calendar one month at a time.
Constructor Summary
Calendar()
Create a new Calendar object with the current date selected.
Calendar(Handle handle)
Construct a calendar using a handle to a native resource.
Method Summary
voidaddListener(CalendarListener listener)
Register an object to handle calendar events.
voidclearMarks()
Remove all visual marks.
voidfreeze()
Locks the display of the Calendar until it is thawed with the thaw() method.
static CalendargetCalendar(Handle handle)
Internal static factory method to be used by Java-Gnome only.
int[]getDate()
Gets the selected date from a Calendar.
CalendarDisplayOptionsgetDisplayOptions()
Gets the display options (whether to display the heading and the month headings.
ClassgetEventListenerClass(String signal)
EventTypegetEventType(String signal)
static TypegetType()
Retrieve the runtime type used by the GLib library.
voidmarkDay(int day)
Places a visual marker on a particular day.
voidremoveListener(CalendarListener listener)
Removes a listener
voidselectDay(int day)
Selects a day from the current month.
voidselectMonth(int month, int year)
Shifts the calendar to a different month.
voidsetDisplayOptions(CalendarDisplayOptions displayOptions)
Sets the display options (whether to display the heading and the month headings.
voidthaw()
Defrosts a Calendar.
voidunmarkDay(int day)
Removes the visual marker from a particular day.

Constructor Detail

Calendar

public Calendar()

Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Create a new Calendar object with the current date selected.

Calendar

public Calendar(Handle handle)

Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Construct a calendar using a handle to a native resource.

Method Detail

addListener

public void addListener(CalendarListener listener)

Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Register an object to handle calendar events.

See Also: CalendarListener

clearMarks

public void clearMarks()

Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Remove all visual marks.

freeze

public void freeze()

Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Locks the display of the Calendar until it is thawed with the thaw() method.

getCalendar

public static Calendar getCalendar(Handle handle)

Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Internal static factory method to be used by Java-Gnome only.

getDate

public int[] getDate()

Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Gets the selected date from a Calendar.

Historical note: getDate() used to return java.util.Calendar. This caused some class library implementations to fault in their entire TimeZone subsystems which led to a very deep bug on some architectures. This method was therefore changed as of libgtk-java 2.10 to the int[3] implementation here.

Returns: a three wide array of integers: the array at [0] is the year (4 digits), the array at [1] is the month (range from 1-12), and the array at [2] is the numeric day (range from 1-{28,29,30,31}).

Since: 2.10

getDisplayOptions

public CalendarDisplayOptions getDisplayOptions()

Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Gets the display options (whether to display the heading and the month headings.

getEventListenerClass

public Class getEventListenerClass(String signal)

getEventType

public EventType getEventType(String signal)

getType

public static Type getType()

Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Retrieve the runtime type used by the GLib library.

markDay

public void markDay(int day)

Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Places a visual marker on a particular day.

Parameters: day The day number to mark between 1 and 31.

removeListener

public void removeListener(CalendarListener listener)

Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Removes a listener

See Also: addListener

selectDay

public void selectDay(int day)

Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Selects a day from the current month.

Parameters: day A day number between 1 and 31, or 0 to unselect the currently selected day.

selectMonth

public void selectMonth(int month, int year)

Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Shifts the calendar to a different month.

Parameters: month The month to select. This value is zero based. year The year the month is in.

setDisplayOptions

public void setDisplayOptions(CalendarDisplayOptions displayOptions)

Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Sets the display options (whether to display the heading and the month headings.

Parameters: displayOptions The options to set.

thaw

public void thaw()

Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Defrosts a Calendar. All changes made since the last freeze() are displayed.

unmarkDay

public void unmarkDay(int day)

Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Removes the visual marker from a particular day.

Parameters: day The day number to unmark between 1 and 31.