|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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.Button | +--org.gnu.gtk.OptionMenu
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()
Create a new OptionMenu. |
|
OptionMenu(int handle)
Construct an OptionMenu using a handle to a native resource. |
Method Summary | |
void |
addListener(OptionMenuListener listener)
Register an object to handle optionMenu events. |
java.lang.Class |
getEventListenerClass(java.lang.String signal)
|
GtkEventType |
getEventType(java.lang.String signal)
|
int |
getHistory()
Retrieves the index of the currently selected menu item. |
Menu |
getMenu()
Returns the Menu associated with this OptionMenu. |
static Type |
getType()
Retrieve the runtime type used by the GLib library. |
void |
removeListener(OptionMenuListener listener)
Removes a listener |
void |
removeMenu()
Removes the Menu from the OptionMenu |
void |
setHistory(int index)
Selects the menu item specified by index making it the newly
selected value for the option menu. |
void |
setMenu(Menu menu)
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, getLabel, getRelief, getUseStock, getUseUnderline, leave, press, release, removeListener, setLabel, setRelief, setUseStock, setUseUnderline |
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.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 |
public OptionMenu()
public OptionMenu(int handle)
Method Detail |
public void setMenu(Menu menu)
menu
- The Menu to add to the OptionMenu.public Menu getMenu()
public void removeMenu()
public static Type getType()
public int getHistory()
public void setHistory(int index)
index
making it the newly
selected value for the option menu.
index
- the index of the menu item to select. Index values are
from 0 to n-1.public void addListener(OptionMenuListener listener)
OptionMenuListener
public void removeListener(OptionMenuListener listener)
addListener(OptionMenuListener)
public java.lang.Class getEventListenerClass(java.lang.String signal)
getEventListenerClass
in class Button
public GtkEventType getEventType(java.lang.String signal)
getEventType
in class Button
|
Please send any bug reports, comments, or suggestions for the API or documentation to java-gnome-developer@lists.sf.net | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |