|
||||||||||
| 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
public class Container
A user interface element that is meant to contain other interface elements.
| Field Summary |
|---|
| Fields inherited from class com.threerings.opengl.gui.Component |
|---|
DEFAULT, DISABLED, HOVER |
| Constructor Summary | |
|---|---|
Container(GlContext ctx)
Creates a container with no layout manager. |
|
Container(GlContext ctx,
LayoutManager layout)
Creates a container with the supplied layout manager. |
|
| Method Summary | |
|---|---|
void |
add(Component child)
Adds a child to this container. |
void |
add(Component child,
Object constraints)
Adds a child to this container with the specified layout constraints. |
void |
add(int index,
Component child)
Adds a child to this container at the specified position. |
void |
add(int index,
Component child,
Object constraints)
Adds a child to this container at the specified position, with the specified layout constraints. |
Component |
getComponent(int index)
Returns the indexth component from this container. |
int |
getComponentCount()
Returns the number of components contained in this container. |
int |
getComponentIndex(Component component)
Returns the index of the specified component in this container or -1 if the component count not be found. |
Component |
getHitComponent(int mx,
int my)
Returns the component "hit" by the specified mouse coordinates which might be this component or any of its children. |
LayoutManager |
getLayoutManager()
Returns the layout manager configured for this container. |
void |
remove(Component child)
Removes the specified child from this container. |
void |
remove(int index)
Removes the child at a specific position from this container. |
void |
removeAll()
Removes all children of this container. |
boolean |
replace(Component oldc,
Component newc)
Replaces a given old component with a new component (if the old component exits). |
void |
setAlpha(float alpha)
Sets the alpha level for this component. |
void |
setEnabled(boolean enabled)
Sets this components enabled state. |
void |
setHoverable(boolean hoverable)
Sets this component's hoverability state. |
void |
setLayoutManager(LayoutManager layout)
Configures this container with an entity that will set the size and position of its children. |
void |
validate()
Instructs this component to lay itself out and then mark itself as valid. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Container(GlContext ctx)
setLayoutManager(com.threerings.opengl.gui.layout.LayoutManager).
public Container(GlContext ctx,
LayoutManager layout)
| Method Detail |
|---|
public void setLayoutManager(LayoutManager layout)
public LayoutManager getLayoutManager()
public void add(Component child)
public void add(int index,
Component child)
public void add(Component child,
Object constraints)
public void add(int index,
Component child,
Object constraints)
public void remove(int index)
public boolean replace(Component oldc,
Component newc)
public void remove(Component child)
public int getComponentCount()
public Component getComponent(int index)
indexth component from this container.
public int getComponentIndex(Component component)
public void removeAll()
public void setAlpha(float alpha)
Component
setAlpha in class Componentpublic void setEnabled(boolean enabled)
Component
setEnabled in class Componentpublic void setHoverable(boolean hoverable)
Component
setHoverable in class Component
public Component getHitComponent(int mx,
int my)
Component
getHitComponent in class Componentpublic void validate()
Component
validate in class Component
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||