|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.threerings.opengl.gui.Component
com.threerings.opengl.gui.Container
com.threerings.opengl.gui.Window
public class Window
A window defines the top-level of a component hierarchy. It must be created with a stylesheet and layout manager.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class com.threerings.opengl.gui.Container |
|---|
Container.ChildOp |
| Field Summary | |
|---|---|
protected int |
_layer
The "layer" in the window stack occupied by this window. |
protected boolean |
_modal
Whether or not this window steals input from other windows further down the hierarchy. |
protected Window |
_parentWindow
Used to associate this window with a parent window. |
protected Root |
_root
The root node that connects us into the JME system. |
protected Component |
_savedFocus
Stores a reference to our focus when this window is no longer the top-most window. |
| Fields inherited from class com.threerings.opengl.gui.Container |
|---|
_children, _layout |
| 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 |
| Constructor Summary | |
|---|---|
Window(GlContext ctx,
LayoutManager layout)
|
|
| Method Summary | |
|---|---|
void |
center()
Positions this window in the center of the display. |
int |
compareTo(Window other)
|
void |
dismiss()
Detaches this window from the root node and removes it from the display. |
protected String |
getDefaultStyleConfig()
Returns the name of the default config to be used for all instances of this component. |
int |
getLayer()
Returns the layer occupied by this window. |
Window |
getParentWindow()
Returne the parent window. |
Root |
getRoot()
Returns the root node that manages this window. |
protected void |
gotFocus()
Called when this window gets the focus after a window on the hierarchy has been removed. |
void |
invalidate()
Marks this component as invalid and needing a relayout. |
boolean |
isAdded()
Returns true if this component is added to a hierarchy of components that culminates in a top-level window. |
boolean |
isModal()
Returns whether or not this window is modal. |
boolean |
isOverlay()
Returns whether or not this window is an overlay, in which case its children will not receive input focus by default. |
void |
pack()
Sizes this window to its preferred size. |
void |
pack(int whint,
int hhint)
Sizes this window to its preferred size, accounting for the specified width or height hints. |
protected void |
requestFocus(Component component)
Requests that the specified component be given the input focus. |
void |
setBounds(int x,
int y,
int width,
int height)
Sets the bounds of this component in screen coordinates. |
void |
setLayer(int layer)
Configures the "layer" occupied by this window. |
void |
setModal(boolean modal)
Configures this window to be modal which causes it to "steal" all mouse and keyboard input while it is added to the interface hierarchy. |
void |
setParent(Container parent)
Informs this component of its parent in the interface heirarchy. |
void |
setParentWindow(Window parentWindow)
Set the parent window. |
protected void |
setRoot(Root root)
Configures this window with its root node. |
boolean |
shouldShadeBehind()
Returns whether this window should have shading applied beneath it. |
| 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 java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected Root _root
protected boolean _modal
protected int _layer
protected Component _savedFocus
protected Window _parentWindow
| Constructor Detail |
|---|
public Window(GlContext ctx,
LayoutManager layout)
| Method Detail |
|---|
public void pack()
public void pack(int whint,
int hhint)
public void center()
pack()).
public void setModal(boolean modal)
public boolean isModal()
setModal(boolean) for more information on
modality.
public boolean shouldShadeBehind()
public boolean isOverlay()
public Root getRoot()
public int getLayer()
setLayer(int) for more details.
public void setLayer(int layer)
public void dismiss()
public int compareTo(Window other)
compareTo in interface Comparable<Window>public void setParent(Container parent)
Component
setParent in class Componentpublic void invalidate()
Component
invalidate in class Component
public void setBounds(int x,
int y,
int width,
int height)
Component
setBounds in class ComponentComponent.setLocation(int, int),
Component.setSize(int, int)public boolean isAdded()
Component
isAdded in class Componentpublic void setParentWindow(Window parentWindow)
public Window getParentWindow()
protected String getDefaultStyleConfig()
Component
getDefaultStyleConfig in class Containerprotected void setRoot(Root root)
Root.addWindow(com.threerings.opengl.gui.Window).
protected void requestFocus(Component component)
protected void gotFocus()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||