|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.badlogic.gdx.scenes.scene2d.Actor
com.badlogic.gdx.scenes.scene2d.Group
com.badlogic.gdx.scenes.scene2d.ui.WidgetGroup
com.badlogic.gdx.scenes.scene2d.ui.VerticalGroup
public class VerticalGroup
A group that lays out its children on top of each other in a single column. This can be easier than using Table
when
actors need to be inserted in the middle of the group.
The preferred width is the largest preferred width of any child. The preferred height is the sum of the children's preferred heights, plus spacing between them if set. The min size is the preferred size and the max size is 0.
Constructor Summary | |
---|---|
VerticalGroup()
|
Method Summary | |
---|---|
VerticalGroup |
align(int align)
Sets the alignment of widgets within the vertical group. |
VerticalGroup |
center()
Sets the alignment of widgets within the vertical group to Align.center . |
VerticalGroup |
fill()
|
VerticalGroup |
fill(float fill)
|
int |
getAlign()
|
float |
getFill()
|
float |
getPadBottom()
|
float |
getPadLeft()
|
float |
getPadRight()
|
float |
getPadTop()
|
float |
getPrefHeight()
|
float |
getPrefWidth()
|
boolean |
getReverse()
|
float |
getSpace()
|
void |
invalidate()
Invalidates this actor's layout, causing Layout.layout() to happen the next time Layout.validate() is called. |
void |
layout()
Computes and caches any information needed for drawing and, if this actor has children, positions and sizes each child, calls Layout.invalidate() any each child whose width or height has changed, and calls Layout.validate() on each child. |
VerticalGroup |
left()
Sets Align.left and clears Align.right for the alignment of widgets within the vertical group. |
VerticalGroup |
pad(float pad)
Sets the padTop, padLeft, padBottom, and padRight to the specified value. |
VerticalGroup |
pad(float top,
float left,
float bottom,
float right)
|
VerticalGroup |
padBottom(float padBottom)
|
VerticalGroup |
padLeft(float padLeft)
|
VerticalGroup |
padRight(float padRight)
|
VerticalGroup |
padTop(float padTop)
|
VerticalGroup |
reverse()
The children will be ordered from bottom to top rather than the default top to bottom. |
VerticalGroup |
reverse(boolean reverse)
If true, the children will be ordered from bottom to top rather than the default top to bottom. |
VerticalGroup |
right()
Sets Align.right and clears Align.left for the alignment of widgets within the vertical group. |
void |
setRound(boolean round)
If true (the default), positions and sizes are rounded to integers. |
VerticalGroup |
space(float spacing)
Sets the space between children. |
Methods inherited from class com.badlogic.gdx.scenes.scene2d.ui.WidgetGroup |
---|
draw, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, invalidateHierarchy, needsLayout, pack, setFillParent, setLayoutEnabled, validate |
Methods inherited from class com.badlogic.gdx.scenes.scene2d.Group |
---|
act, addActor, addActorAfter, addActorAt, addActorBefore, clear, clearChildren, findActor, getChildren, hasChildren, hit, isTransform, localToDescendantCoordinates, print, removeActor, setCullingArea, setTransform, swapActor, swapActor |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public VerticalGroup()
Method Detail |
---|
public void invalidate()
Layout
Layout.layout()
to happen the next time Layout.validate()
is called. This
method should be called when state changes in the actor that requires a layout but does not change the minimum, preferred,
maximum, or actual size of the actor (meaning it does not affect the parent actor's layout).
invalidate
in interface Layout
invalidate
in class WidgetGroup
public void layout()
Layout
Layout.invalidate()
any each child whose width or height has changed, and calls Layout.validate()
on each child.
This method should almost never be called directly, instead Layout.validate()
should be used.
layout
in interface Layout
layout
in class WidgetGroup
public float getPrefWidth()
getPrefWidth
in interface Layout
getPrefWidth
in class WidgetGroup
public float getPrefHeight()
getPrefHeight
in interface Layout
getPrefHeight
in class WidgetGroup
public void setRound(boolean round)
public VerticalGroup reverse()
public VerticalGroup reverse(boolean reverse)
public boolean getReverse()
public VerticalGroup space(float spacing)
public float getSpace()
public VerticalGroup pad(float pad)
public VerticalGroup pad(float top, float left, float bottom, float right)
public VerticalGroup padTop(float padTop)
public VerticalGroup padLeft(float padLeft)
public VerticalGroup padBottom(float padBottom)
public VerticalGroup padRight(float padRight)
public float getPadTop()
public float getPadLeft()
public float getPadBottom()
public float getPadRight()
public VerticalGroup align(int align)
Align.center
, Align.top
,
Align.bottom
, Align.left
, Align.right
, or any combination of those.
public VerticalGroup center()
Align.center
. This clears any other alignment.
public VerticalGroup left()
Align.left
and clears Align.right
for the alignment of widgets within the vertical group.
public VerticalGroup right()
Align.right
and clears Align.left
for the alignment of widgets within the vertical group.
public int getAlign()
public VerticalGroup fill()
public VerticalGroup fill(float fill)
fill
- 0 will use pref width.public float getFill()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |