|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.threerings.opengl.gui.layout.LayoutManager
com.threerings.opengl.gui.layout.AnchorLayout
public class AnchorLayout
Lays out components based on anchors that match a point on the child component to a point on the parent.
| Nested Class Summary | |
|---|---|
static class |
AnchorLayout.Anchor
Represents the location of an anchor binding a point of the child component to a point on the parent. |
| Field Summary | |
|---|---|
static AnchorLayout.Anchor |
CENTER
Anchors the center of the component to the center of the container. |
static AnchorLayout.Anchor |
EAST
Anchors the right-center of the component to the right-center of the container. |
static AnchorLayout.Anchor |
NORTH
Anchors the upper-center of the component to the upper-center of the container. |
static AnchorLayout.Anchor |
NORTHEAST
Anchors the upper-right of the component to the upper-right of the container. |
static AnchorLayout.Anchor |
NORTHWEST
Anchors the upper-left of the component to the upper-left of the container. |
static AnchorLayout.Anchor |
SOUTH
Anchors the lower-center of the component to the lower-center of the container. |
static AnchorLayout.Anchor |
SOUTHEAST
Anchors the lower-right of the component to the lower-right of the container. |
static AnchorLayout.Anchor |
SOUTHWEST
Anchors the lower-left of the component to the lower-left of the container. |
static AnchorLayout.Anchor |
WEST
Anchors the left-center of the component to the left-center of the container. |
| Constructor Summary | |
|---|---|
AnchorLayout()
|
|
| Method Summary | |
|---|---|
void |
addLayoutComponent(Component comp,
Object constraints)
Components added to a container will result in a call to this method, informing the layout manager of said constraints. |
Dimension |
computePreferredSize(Container target,
int whint,
int hhint)
Computes the preferred size for the supplied container, based on the preferred sizes of its children and the layout policy implemented by this manager. |
Object |
getConstraints(Component comp)
Returns a reference to the constraints associated with the specified component, or null for none. |
void |
layoutContainer(Container target)
Effects the layout policy of this manager on the supplied target, adjusting the size and position of its children based on the size and position of the target at the time of this call. |
void |
removeLayoutComponent(Component comp)
Components removed to a container for which a layout manager has been configured will result in a call to this method. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final AnchorLayout.Anchor SOUTHWEST
public static final AnchorLayout.Anchor SOUTH
public static final AnchorLayout.Anchor SOUTHEAST
public static final AnchorLayout.Anchor EAST
public static final AnchorLayout.Anchor NORTHEAST
public static final AnchorLayout.Anchor NORTH
public static final AnchorLayout.Anchor NORTHWEST
public static final AnchorLayout.Anchor WEST
public static final AnchorLayout.Anchor CENTER
| Constructor Detail |
|---|
public AnchorLayout()
| Method Detail |
|---|
public void addLayoutComponent(Component comp,
Object constraints)
LayoutManager
addLayoutComponent in class LayoutManagerpublic void removeLayoutComponent(Component comp)
LayoutManager
removeLayoutComponent in class LayoutManagerpublic Object getConstraints(Component comp)
LayoutManagernull for none. The default implementation always returns null.
getConstraints in class LayoutManager
public Dimension computePreferredSize(Container target,
int whint,
int hhint)
LayoutManager
computePreferredSize in class LayoutManagerpublic void layoutContainer(Container target)
LayoutManager
layoutContainer in class LayoutManager
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||