org.gnu.gtk
public class Calendar extends Widget
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 | |
---|---|
void | addListener(CalendarListener listener)
Register an object to handle calendar events.
|
void | clearMarks()
Remove all visual marks. |
void | freeze()
Locks the display of the Calendar until it is thawed with the
thaw() method.
|
static Calendar | getCalendar(Handle handle)
Internal static factory method to be used by Java-Gnome only. |
Calendar | getDate()
Gets the selected date from the Calendar widget.
|
CalendarDisplayOptions | getDisplayOptions()
Gets the display options (whether to display the heading and the month
headings. |
Class | getEventListenerClass(String signal) |
EventType | getEventType(String signal) |
static Type | getType()
Retrieve the runtime type used by the GLib library. |
int[] | getYearMonthDay()
Gets the selected date from a Calendar.
|
void | markDay(int day)
Places a visual marker on a particular day.
|
void | removeListener(CalendarListener listener)
Removes a listener
|
void | selectDay(int day)
Selects a day from the current month.
|
void | selectMonth(int month, int year)
Shifts the calendar to a different month.
|
void | setDisplayOptions(CalendarDisplayOptions displayOptions)
Sets the display options (whether to display the heading and the month
headings.
|
void | thaw()
Defrosts a Calendar. |
void | unmarkDay(int day)
Removes the visual marker from a particular day.
|
See Also: CalendarListener
Deprecated:
Locks the display of the Calendar until it is thawed with thethaw()
method.
Deprecated: the form returning java.util.Calendar is deprecated and will be replaced. Use {@link #getYearMonthDay()} as a workaround until libgtk-java 2.10, when getDate() will return an int[3] instead.
Gets the selected date from the Calendar widget.Returns: A Calendar object that represents the date selected in the widget.
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}).
Parameters: day The day number to mark between 1 and 31.
See Also: addListener
Parameters: day A day number between 1 and 31, or 0 to unselect the currently selected day.
Parameters: month The month to select. This value is zero based. year The year the month is in.
Parameters: displayOptions The options to set.
Deprecated:
Defrosts a Calendar. All changes made since the lastfreeze()
are displayed.
Parameters: day The day number to unmark between 1 and 31.