org.gnu.gtk
Class CheckMenuItem

java.lang.Object
  |
  +--org.gnu.glib.GObject
        |
        +--org.gnu.gtk.GtkObject
              |
              +--org.gnu.gtk.Widget
                    |
                    +--org.gnu.gtk.Container
                          |
                          +--org.gnu.gtk.Bin
                                |
                                +--org.gnu.gtk.Item
                                      |
                                      +--org.gnu.gtk.MenuItem
                                            |
                                            +--org.gnu.gtk.CheckMenuItem
Direct Known Subclasses:
RadioMenuItem

public class CheckMenuItem
extends MenuItem

The CheckMenuItem is a menu item that maintains the state of a boolean value in addition to the MenuItem's usual role of activating applicaiton code.

A check box indicating the state of boolean value is displayed on the left side of the MenuItem. Activating the MenuItem toggles this value.


Constructor Summary
CheckMenuItem()
          Create a new CheckMenuItem
CheckMenuItem(int handle)
          Construct a CheckMenuItem using a handle to a native resource.
CheckMenuItem(java.lang.String label, boolean hasMnemonic)
          Create a new CheckMenuItem with the given label.
 
Method Summary
 boolean getActive()
          Returns whether the CheckMenuItem is active.
 boolean getInconsistent()
          Returns whether the CheckMenuItem is in the "inconsistent" state.
static Type getType()
          Retrieve the runtime type used by the GLib library.
 void setActive(boolean isActive)
          Sets the active state of the CheckMenuItem's check box.
 void setInconsistent(boolean isInconsistent)
          This method will turn on a third state that indicates that the widget is in an inconsistent state.
 
Methods inherited from class org.gnu.gtk.MenuItem
addListener, emitActivate, emitDeselect, getEventListenerClass, getEventType, removeListener, removeSubmenu, setLeftJustified, setRightJustified, setSubmenu
 
Methods inherited from class org.gnu.gtk.Item
deselect, select, toggle
 
Methods inherited from class org.gnu.gtk.Bin
getChild
 
Methods inherited from class org.gnu.gtk.Container
add, addListener, getBorderWidth, getResizeMode, remove, removeListener, resizeChildren, setBorderWidth, setResizeMode
 
Methods inherited from class org.gnu.gtk.Widget
activate, addListener, addListener, addListener, addListener, addListener, addListener, createContext, createLayout, destroy, draw, drawArea, drawArea, getAccessible, getColormap, getContext, getModifierStyle, getName, getParent, getParentWindow, getPointer, getSensitive, getStyle, getToplevel, grabDefault, grabFocus, hasFocus, hide, hideAll, intersect, isAncestor, makeWidget, modifyStyle, popColormap, pushColormap, realize, removeListener, removeListener, removeListener, removeListener, removeListener, removeListener, reparent, setBackgroundColor, setBaseColor, setColormap, setDoubleBuffered, setDragDestination, setDragSource, setFont, setForegroundColor, setMinimumSize, setName, setNoDragDestination, setNoDragSource, setSensitive, setTextColor, shapeCombineMask, show, showAll
 
Methods inherited from class org.gnu.glib.GObject
addEventHandler, addEventHandler, addEventHandler, addEventHandler, addEventHandler, addEventHandler, equals, getData, getHandle, removeEventHandler, setData
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CheckMenuItem

public CheckMenuItem()
Create a new CheckMenuItem


CheckMenuItem

public CheckMenuItem(int handle)
Construct a CheckMenuItem using a handle to a native resource.


CheckMenuItem

public CheckMenuItem(java.lang.String label,
                     boolean hasMnemonic)
Create a new CheckMenuItem with the given label.

Parameters:
label - The label to display for this CheckMenuItem.
Method Detail

setActive

public void setActive(boolean isActive)
Sets the active state of the CheckMenuItem's check box.

Parameters:
isActive - true if the check box is checked.

getActive

public boolean getActive()
Returns whether the CheckMenuItem is active.

Returns:
true if the check box is active.

setInconsistent

public void setInconsistent(boolean isInconsistent)
This method will turn on a third state that indicates that the widget is in an inconsistent state.

Parameters:
isInconsistent - true to display an "inconsistent" third state.

getInconsistent

public boolean getInconsistent()
Returns whether the CheckMenuItem is in the "inconsistent" state.

Returns:
true if the check box is inconsistent.

getType

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


Please send any bug reports, comments, or suggestions for the API or documentation to java-gnome-developer@lists.sf.net