com.threerings.opengl.gui
Class PopupWindow
java.lang.Object
com.threerings.opengl.gui.Component
com.threerings.opengl.gui.Container
com.threerings.opengl.gui.Window
com.threerings.opengl.gui.PopupWindow
- All Implemented Interfaces:
- ConfigUpdateListener<ManagedConfig>, Comparable<Window>
- Direct Known Subclasses:
- PopupMenu
public class PopupWindow
- extends Window
A window that is popped up to display something like a menu or a
tooltip or some other temporary, modal overlaid display.
| Fields inherited from class com.threerings.opengl.gui.Component |
_alpha, _backgrounds, _borders, _colors, _ctx, _cursor, _enabled, _height, _hover, _hoverable, _insets, _listeners, _parent, _preferredSize, _properties, _rect, _styleConfigs, _tipmouse, _tiptext, _tooltipStyle, _transferHandler, _valid, _visible, _width, _x, _y, DEFAULT, DISABLED, HOVER, STATE_COUNT, STATE_PCLASSES |
|
Method Summary |
protected String |
getDefaultStyleConfig()
Returns the name of the default config to be used for all instances of this component. |
protected void |
packAndFit(int x,
int y,
boolean above)
Called after we have been added to the display hierarchy to pack and
position this popup window. |
void |
popup(int x,
int y,
boolean above)
Sizes the window to its preferred size and then displays it at the
specified coordinates extending either above the location or below
as specified. |
boolean |
shouldShadeBehind()
Returns whether this window should have shading applied beneath it. |
| Methods inherited from class com.threerings.opengl.gui.Window |
center, compareTo, dismiss, getLayer, getParentWindow, getRoot, gotFocus, invalidate, isAdded, isModal, isOverlay, pack, pack, requestFocus, setBounds, setLayer, setModal, setParent, setParentWindow, setRoot |
| Methods inherited from class com.threerings.opengl.gui.Container |
add, add, add, add, applyOperation, computePreferredSize, getComponent, getComponentCount, getComponentIndex, getFirstDescendantFocus, getHitComponent, getLastDescendantFocus, getLayoutManager, getNextFocus, getPreviousFocus, layout, remove, remove, removeAll, renderComponent, replace, setAlpha, setEnabled, setHoverable, setLayoutManager, validate, wasAdded, wasRemoved |
| Methods inherited from class com.threerings.opengl.gui.Component |
acceptsFocus, addListener, boundsToString, changeCursor, configUpdated, contains, createDefaultTooltipComponent, createDefaultTooltipComponent, createTooltipComponent, dispatchEvent, emitEvent, getAbsoluteX, getAbsoluteY, getAlpha, getBackground, getBorder, getBounds, getColor, getContext, getCursor, getFallbackState, getFocusTarget, getHeight, getInsets, getNextFocus, getParent, getPreferredSize, getPreviousFocus, getProperty, getState, getStateCount, getStatePseudoClass, getStyleConfigs, getTooltipText, getTooltipTimeout, getTooltipWindowStyle, getTransferHandler, getWidth, getWindow, getX, getY, hasFocus, intersectScissor, isEnabled, isHoverable, isShowing, isTooltipRelativeToMouse, isValid, isVisible, removeAllListeners, removeAllListeners, removeListener, render, renderBackground, renderBorder, requestFocus, scrollRectToVisible, scrollRectToVisible, setBackground, setCursor, setLocation, setPreferredSize, setPreferredSize, setProperty, setSize, setStyleConfig, setStyleConfig, setStyleConfig, setStyleConfigs, setTooltipRelativeToMouse, setTooltipText, setTransferHandler, setVisible, stateDidChange, updateCursor, updateFromStyleConfig, updateFromStyleConfig |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PopupWindow
public PopupWindow(GlContext ctx,
Window parent,
LayoutManager layout)
shouldShadeBehind
public boolean shouldShadeBehind()
- Description copied from class:
Window
- Returns whether this window should have shading applied beneath it.
- Overrides:
shouldShadeBehind in class Window
popup
public void popup(int x,
int y,
boolean above)
- Sizes the window to its preferred size and then displays it at the
specified coordinates extending either above the location or below
as specified. The window position may be adjusted if it does not
fit on the screen at the specified coordinates.
packAndFit
protected void packAndFit(int x,
int y,
boolean above)
- Called after we have been added to the display hierarchy to pack and
position this popup window.
getDefaultStyleConfig
protected String getDefaultStyleConfig()
- Description copied from class:
Component
- Returns the name of the default config to be used for all instances of this component.
Derived classes will likely want to override this method and set up a default config for
their type of component.
- Overrides:
getDefaultStyleConfig in class Window