public class SplitPane extends WidgetGroup
The preferred size of a splitpane is that of the child widgets and the size of the SplitPane.SplitPaneStyle.handle. The widgets
are sized depending on the splitpane's size and the split position.
| Modifier and Type | Class and Description |
|---|---|
static class |
SplitPane.SplitPaneStyle
The style for a splitpane, see
SplitPane. |
| Constructor and Description |
|---|
SplitPane(Actor firstWidget,
Actor secondWidget,
boolean vertical,
Skin skin) |
SplitPane(Actor firstWidget,
Actor secondWidget,
boolean vertical,
Skin skin,
java.lang.String styleName) |
SplitPane(Actor firstWidget,
Actor secondWidget,
boolean vertical,
SplitPane.SplitPaneStyle style) |
| Modifier and Type | Method and Description |
|---|---|
void |
addActor(Actor actor)
Adds an actor as a child of this group.
|
void |
addActorAt(int index,
Actor actor)
Adds an actor as a child of this group, at a specific index.
|
void |
addActorBefore(Actor actorBefore,
Actor actor)
Adds an actor as a child of this group, immediately before another child actor.
|
void |
draw(SpriteBatch batch,
float parentAlpha)
If this method is overridden, the super method or
WidgetGroup.validate() should be called to ensure the widget group is laid
out. |
float |
getMinHeight() |
float |
getMinWidth() |
float |
getPrefHeight() |
float |
getPrefWidth() |
float |
getSplit() |
SplitPane.SplitPaneStyle |
getStyle()
Returns the split pane's style.
|
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. |
boolean |
removeActor(Actor actor)
Removes an actor from this group.
|
void |
setFirstWidget(Actor widget) |
void |
setMaxSplitAmount(float maxAmount) |
void |
setMinSplitAmount(float minAmount) |
void |
setSecondWidget(Actor widget) |
void |
setSplitAmount(float split) |
void |
setStyle(SplitPane.SplitPaneStyle style) |
void |
setVertical(boolean vertical) |
childrenChanged, getMaxHeight, getMaxWidth, invalidate, invalidateHierarchy, needsLayout, pack, setFillParent, setLayoutEnabled, validateact, addActorAfter, applyTransform, clear, clearChildren, computeTransform, drawChildren, findActor, getChildren, hit, isTransform, localToDescendantCoordinates, resetTransform, setCullingArea, setStage, setTransform, swapActor, swapActoraddAction, addCaptureListener, addListener, clearActions, clearListeners, clipBegin, clipBegin, clipEnd, fire, getActions, getCaptureListeners, getColor, getHeight, getListeners, getName, getOriginX, getOriginY, getParent, getRight, getRotation, getScaleX, getScaleY, getStage, getTop, getTouchable, getWidth, getX, getY, getZIndex, hasParent, isAscendantOf, isDescendantOf, isVisible, localToAscendantCoordinates, localToParentCoordinates, localToStageCoordinates, notify, parentToLocalCoordinates, remove, removeAction, removeCaptureListener, removeListener, rotate, scale, scale, screenToLocalCoordinates, setBounds, setColor, setColor, setHeight, setName, setOrigin, setOriginX, setOriginY, setParent, setPosition, setRotation, setScale, setScale, setScaleX, setScaleY, setSize, setTouchable, setVisible, setWidth, setX, setY, setZIndex, size, size, stageToLocalCoordinates, toBack, toFront, toString, translatepublic SplitPane(Actor firstWidget, Actor secondWidget, boolean vertical, Skin skin)
firstWidget - May be null.secondWidget - May be null.public SplitPane(Actor firstWidget, Actor secondWidget, boolean vertical, Skin skin, java.lang.String styleName)
firstWidget - May be null.secondWidget - May be null.public SplitPane(Actor firstWidget, Actor secondWidget, boolean vertical, SplitPane.SplitPaneStyle style)
firstWidget - May be null.secondWidget - May be null.public void setStyle(SplitPane.SplitPaneStyle style)
public SplitPane.SplitPaneStyle getStyle()
setStyle(SplitPaneStyle)
is called.public void layout()
LayoutLayout.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 Layoutlayout in class WidgetGrouppublic float getPrefWidth()
getPrefWidth in interface LayoutgetPrefWidth in class WidgetGrouppublic float getPrefHeight()
getPrefHeight in interface LayoutgetPrefHeight in class WidgetGrouppublic float getMinWidth()
getMinWidth in interface LayoutgetMinWidth in class WidgetGrouppublic float getMinHeight()
getMinHeight in interface LayoutgetMinHeight in class WidgetGrouppublic void setVertical(boolean vertical)
public void draw(SpriteBatch batch, float parentAlpha)
WidgetGroupWidgetGroup.validate() should be called to ensure the widget group is laid
out.draw in class WidgetGroupparentAlpha - Should be multiplied with the actor's alpha, allowing a parent's alpha to affect all children.public void setSplitAmount(float split)
split - The split amount between the min and max amount.public float getSplit()
public void setMinSplitAmount(float minAmount)
public void setMaxSplitAmount(float maxAmount)
public void setFirstWidget(Actor widget)
widget - May be null.public void setSecondWidget(Actor widget)
widget - May be null.public void addActor(Actor actor)
GroupaddActor in class GroupActor.remove()public void addActorAt(int index,
Actor actor)
GroupaddActorAt in class Groupindex - May be greater than the number of children.public void addActorBefore(Actor actorBefore, Actor actor)
GroupaddActorBefore in class Grouppublic boolean removeActor(Actor actor)
Groupcleared so the actions will be returned to their
pool, if any. This is not done automatically.removeActor in class Group