org.gnu.gtk
Class Calendar
A Calendar is a widget that displays a calendar one month at a time.
Calendar() - Create a new Calendar object with the current date selected.
|
Calendar(Handle handle) - Construct a calendar using a handle to a native resource.
|
activate , addAccelerator , addEvents , addListener , addListener , addListener , addListener , addListener , addListener , addListener , addListener , addListener , addListener , addListener , canActivateAccel , createContext , createLayout , draw , drawArea , drawArea , finish , getAccessible , getAllocation , getCanFocus , getColormap , getContext , getData , getDisplay , getDragData , getEventListenerClass , getEventType , getExtensionEvents , getModifierStyle , getName , getParent , getParentWindow , getPointer , getRootWindow , getScreen , getSensitive , getStyle , getToplevel , getType , 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 , setCanFocus , setColormap , setDoubleBuffered , setDragDestination , setDragIcon , setDragIconPixbuf , setDragIconStock , setDragSource , setEvents , setExtensionEvents , setFont , setForegroundColor , setMinimumSize , setName , setNoDragDestination , setNoDragSource , setSensitive , setTextColor , shapeCombineMask , show , showAll , unHighlight , unHighlight |
Calendar
public Calendar()
Create a new Calendar object with the current date selected.
Calendar
public Calendar(Handle handle)
Construct a calendar using a handle to a native resource.
addListener
public void addListener(CalendarListener listener)
Register an object to handle calendar events.
clearMarks
public void clearMarks()
Remove all visual marks.
freeze
public void freeze()
Locks the display of the Calendar until it is thawed with the
thaw()
method.
getCalendar
public static Calendar getCalendar(Handle handle)
Internal static factory method to be used by Java-Gnome only.
getDate
public int[] getDate()
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.
- 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}).
getDisplayOptions
public CalendarDisplayOptions getDisplayOptions()
Gets the display options (whether to display the heading and the month
headings.
getType
public static Type getType()
Retrieve the runtime type used by the GLib library.
- getType in interface Widget
markDay
public void markDay(int day)
Places a visual marker on a particular day.
day
- The day number to mark between 1 and 31.
removeListener
public void removeListener(CalendarListener listener)
Removes a listener
selectDay
public void selectDay(int day)
Selects a day from the current month.
day
- A day number between 1 and 31, or 0 to unselect the currently
selected day.
selectMonth
public void selectMonth(int month,
int year)
Shifts the calendar to a different month.
month
- The month to select. This value is zero based.year
- The year the month is in.
setDisplayOptions
public void setDisplayOptions(CalendarDisplayOptions displayOptions)
Sets the display options (whether to display the heading and the month
headings.
displayOptions
- The options to set.
thaw
public void thaw()
Defrosts a Calendar. All changes made since the last
freeze()
are displayed.
unmarkDay
public void unmarkDay(int day)
Removes the visual marker from a particular day.
day
- The day number to unmark between 1 and 31.