org.gnu.gtk
Class OptionMenu

java.lang.Object
  extended by org.gnu.glib.Struct
      extended by org.gnu.glib.GObject
          extended by org.gnu.gtk.GtkObject
              extended by org.gnu.gtk.Widget
                  extended by org.gnu.gtk.Container
                      extended by org.gnu.gtk.Bin
                          extended by org.gnu.gtk.Button
                              extended by org.gnu.gtk.OptionMenu

Deprecated. Replaced by ComboBox in gtk 2.3

public class OptionMenu
extends Button

deprecated menu widget replaced by ComboBox in gtk 2.3. An OptionMenu is a widget that allows the user to choose from a list of valid choices. When activated the OptionMenu displays a popup Menu which allows the user to make a new choice.


Constructor Summary
OptionMenu()
          Deprecated. Create a new OptionMenu.
OptionMenu(org.gnu.glib.Handle handle)
          Deprecated. Construct an OptionMenu using a handle to a native resource.
 
Method Summary
 void addListener(OptionMenuListener listener)
          Deprecated. Register an object to handle optionMenu events.
 java.lang.Class getEventListenerClass(java.lang.String signal)
          Deprecated.  
 EventType getEventType(java.lang.String signal)
          Deprecated.  
 int getHistory()
          Deprecated. Retrieves the index of the currently selected menu item.
 Menu getMenu()
          Deprecated. Returns the Menu associated with this OptionMenu.
static Type getType()
          Deprecated. Retrieve the runtime type used by the GLib library.
 void removeListener(OptionMenuListener listener)
          Deprecated. Removes a listener
 void removeMenu()
          Deprecated. Removes the Menu from the OptionMenu
 void setHistory(int index)
          Deprecated. Selects the menu item specified by index making it the newly selected value for the option menu.
 void setMenu(Menu menu)
          Deprecated. Provides the Menu that is popped up to allow the user to choose a new value.
 
Methods inherited from class org.gnu.gtk.Button
addListener, click, enter, getButton, getFocusOnClick, getImage, getLabel, getRelief, getUseStock, getUseUnderline, getXAlignment, getYAlignment, leave, press, release, removeListener, setAlignment, setFocusOnClick, setImage, setLabel, setRelief, setUseStock, setUseUnderline
 
Methods inherited from class org.gnu.gtk.Bin
getChild
 
Methods inherited from class org.gnu.gtk.Container
add, addListener, getBooleanChildProperty, getBorderWidth, getChildProperty, getChildren, getIntChildProperty, getResizeMode, remove, removeListener, resizeChildren, setBooleanChildProperty, setBorderWidth, setChildProperty, setIntChildProperty, setResizeMode
 
Methods inherited from class org.gnu.gtk.Widget
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, getExtensionEvents, getModifierStyle, getName, getParent, getParentWindow, getPointer, getRootWindow, getScreen, getSensitive, getStyle, getToplevel, 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
 
Methods inherited from class org.gnu.gtk.GtkObject
destroy, sink
 
Methods inherited from class org.gnu.glib.GObject
addEventHandler, addEventHandler, addEventHandler, addEventHandler, addEventHandler, addEventHandler, addEventHandler, addListener, collect, freezeNotify, getBooleanProperty, getData, getDoubleProperty, getFloatProperty, getGObjectFromHandle, getIntProperty, getJavaObjectProperty, getLongProperty, getPixbufProperty, getProperty, getStringProperty, hasProperty, notify, removeEventHandler, removeListener, setBooleanProperty, setData, setDoubleProperty, setFloatProperty, setIntProperty, setJavaObjectProperty, setLongProperty, setPixbufProperty, setProperty, setStringProperty, thawNotify
 
Methods inherited from class org.gnu.glib.Struct
equals, getHandle, getNullHandle, hashCode
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OptionMenu

public OptionMenu()
Deprecated. 
Create a new OptionMenu.


OptionMenu

public OptionMenu(org.gnu.glib.Handle handle)
Deprecated. 
Construct an OptionMenu using a handle to a native resource.

Method Detail

setMenu

public void setMenu(Menu menu)
Deprecated. 
Provides the Menu that is popped up to allow the user to choose a new value. You should provide a simple menu avoiding the use of tearoff menu items, submenus, and accelerators.

Parameters:
menu - The Menu to add to the OptionMenu.

getMenu

public Menu getMenu()
Deprecated. 
Returns the Menu associated with this OptionMenu.

Returns:
The Menu associated with this OptionMenu.

removeMenu

public void removeMenu()
Deprecated. 
Removes the Menu from the OptionMenu


getType

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


getHistory

public int getHistory()
Deprecated. 
Retrieves the index of the currently selected menu item. The menu items are numbered from top to bottom, starting with 0.

Returns:
index of the selected menu item, or -1 if there are no menu items

setHistory

public void setHistory(int index)
Deprecated. 
Selects the menu item specified by index making it the newly selected value for the option menu.

Parameters:
index - the index of the menu item to select. Index values are from 0 to n-1.

addListener

public void addListener(OptionMenuListener listener)
Deprecated. 
Register an object to handle optionMenu events.

See Also:
OptionMenuListener

removeListener

public void removeListener(OptionMenuListener listener)
Deprecated. 
Removes a listener

See Also:
addListener(OptionMenuListener)

getEventListenerClass

public java.lang.Class getEventListenerClass(java.lang.String signal)
Deprecated. 
Overrides:
getEventListenerClass in class Button

getEventType

public EventType getEventType(java.lang.String signal)
Deprecated. 
Overrides:
getEventType in class Button