com.threerings.opengl.gui
Class PopupMenu
java.lang.Object
com.threerings.opengl.gui.Component
com.threerings.opengl.gui.Container
com.threerings.opengl.gui.Window
com.threerings.opengl.gui.PopupWindow
com.threerings.opengl.gui.PopupMenu
- All Implemented Interfaces:
- ConfigUpdateListener<ManagedConfig>, Comparable<Window>
public class PopupMenu
- extends PopupWindow
Displays a popup menu of items, one of which can be selected.
| Methods inherited from class com.threerings.opengl.gui.Window |
center, compareTo, dismiss, getLayer, getParentWindow, getRoot, invalidate, isAdded, isModal, isOverlay, pack, pack, setBounds, setLayer, setModal, setParent, setParentWindow |
| Methods inherited from class com.threerings.opengl.gui.Container |
add, add, add, add, getComponent, getComponentCount, getComponentIndex, getHitComponent, getLayoutManager, remove, remove, removeAll, replace, setAlpha, setEnabled, setHoverable, setLayoutManager, validate |
| Methods inherited from class com.threerings.opengl.gui.Component |
acceptsFocus, addListener, boundsToString, configUpdated, contains, createDefaultTooltipComponent, createDefaultTooltipComponent, getAbsoluteX, getAbsoluteY, getAlpha, getBackground, getBorder, getBounds, getColor, getContext, getCursor, getFocusTarget, getHeight, getInsets, getParent, getPreferredSize, getProperty, getState, getStyleConfigs, getTooltipText, getTooltipTimeout, getTooltipWindowStyle, getTransferHandler, getWidth, getX, getY, hasFocus, isEnabled, isHoverable, isShowing, isTooltipRelativeToMouse, isValid, isVisible, removeAllListeners, removeAllListeners, removeListener, render, requestFocus, scrollRectToVisible, setBackground, setCursor, setLocation, setPreferredSize, setPreferredSize, setProperty, setSize, setStyleConfig, setStyleConfig, setStyleConfig, setStyleConfigs, setTooltipRelativeToMouse, setTooltipText, setTransferHandler, setVisible |
PopupMenu
public PopupMenu(GlContext ctx,
Window parent)
PopupMenu
public PopupMenu(GlContext ctx,
Window parent,
boolean horizontal)
PopupMenu
public PopupMenu(GlContext ctx,
Window parent,
int rows,
int columns)
addMenuItem
public void addMenuItem(MenuItem item)
- Adds the supplied item to this menu.
setPreferredDimensions
public void setPreferredDimensions(int rows,
int columns)
- Sets the preferred number of rows and columns. Will relayout the existing menu items into
the preferred number of columns, but may add more columns if the menu will not fit in
the vertical space.
- Parameters:
rows - the number of rows to display at one time, or zero if unlimited.columns - the number of columns to display.
dispatchEvent
public boolean dispatchEvent(Event event)
- Description copied from class:
Component
- Instructs this component to process the supplied event. If the event is not processed, it
will be passed up to its parent component for processing. Derived classes should thus only
call
super.dispatchEvent for events that they did not "consume".
- Overrides:
dispatchEvent in class Component
- Returns:
- true if this event was consumed, false if not.
Copyright © 2011. All Rights Reserved.