Minimum and maximum split amounts can be set to limit the motion of the resizing handle. The handle position is also prevented
from shrinking the children below their minimum sizes. If these limits over-constrain the handle, it will be locked and placed
at an averaged location, resulting in cropped children. The minimum child size can be ignored (allowing dynamic cropping) by
wrapping the child in a Container with a minimum size of 0 and fill() set, or by
overriding clampSplitAmount().
The preferred size of a SplitPane is that of the child widgets and the size of the SplitPaneStyle#handle. The widgets
are sized depending on the SplitPane size and the split position.
| Modifier and Type | Class and Description |
|---|---|
| public static class | SplitPane.
The style for a splitpane, see |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv boolean | |
| private Actor | |
| private final Rectangle | |
| pack-priv final Rectangle | |
| pack-priv Vector2 | |
| pack-priv Vector2 | |
| pack-priv float | |
| pack-priv float | |
| private Actor | |
| private final Rectangle | |
| pack-priv float | |
| pack-priv SplitPane. | |
| private final Rectangle | |
| pack-priv boolean |
| Access | Constructor and Description |
|---|---|
| public | |
| public | |
| public | SplitPane(Actor
May be null. firstWidget, Actor May be null. secondWidget, boolean vertical, SplitPane.
|
| Modifier and Type | Method and Description |
|---|---|
| public void | addActor(Actor actor)
Overrides com. Adds an actor as a child of this group, removing it from its previous parent. |
| public void | addActorAt(int index, Actor actor)
Overrides com. Adds an actor as a child of this group at a specific index, removing it from its previous parent. |
| public void | addActorBefore(Actor actorBefore, Actor actor)
Overrides com. Adds an actor as a child of this group immediately before another child actor, removing it from its previous parent. |
| private void | |
| private void | |
| protected void | |
| public void | draw(Batch batch, float parentAlpha)
Overrides com. If this method is overridden, the super method or |
| public float | |
| public float | |
| public float | |
| public float | |
| public float | |
| public float | |
| public float | |
| public SplitPane. | getStyle()
Implements com. Returns the split pane's style. |
| private void | |
| public boolean | |
| public boolean | |
| public void | layout()
Overrides com. Implements com. Computes and caches any information needed for drawing and, if this actor has children, positions and sizes each child,
calls |
| public boolean | removeActor(Actor actor)
Overrides com. Removes an actor from this group and unfocuses it. |
| public boolean | removeActor(Actor actor, boolean unfocus)
Overrides com. Removes an actor from this group. |
| public Actor | removeActorAt(int index, boolean unfocus)
Overrides com. Removes an actor from this group. |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | setSplitAmount(float
The split amount between the min and max amount. This parameter is clamped during layout. See
splitAmount)clampSplitAmount().
|
| public void | setStyle(SplitPane.
Implements com. Set the current style of the actor |
| public void |
| cursorOverHandle | back to summary |
|---|---|
| pack-priv boolean cursorOverHandle | |
| firstWidget | back to summary |
|---|---|
| private Actor firstWidget
| |
| firstWidgetBounds | back to summary |
|---|---|
| private final Rectangle firstWidgetBounds | |
| handleBounds | back to summary |
|---|---|
| pack-priv final Rectangle handleBounds | |
| handlePosition | back to summary |
|---|---|
| pack-priv Vector2 handlePosition | |
| lastPoint | back to summary |
|---|---|
| pack-priv Vector2 lastPoint | |
| maxAmount | back to summary |
|---|---|
| pack-priv float maxAmount | |
| minAmount | back to summary |
|---|---|
| pack-priv float minAmount | |
| secondWidget | back to summary |
|---|---|
| private Actor secondWidget
| |
| secondWidgetBounds | back to summary |
|---|---|
| private final Rectangle secondWidgetBounds | |
| splitAmount | back to summary |
|---|---|
| pack-priv float splitAmount | |
| style | back to summary |
|---|---|
| pack-priv SplitPane. | |
| tempScissors | back to summary |
|---|---|
| private final Rectangle tempScissors | |
| vertical | back to summary |
|---|---|
| pack-priv boolean vertical | |
| SplitPane | back to summary |
|---|---|
| public SplitPane(Actor firstWidget, Actor secondWidget, boolean vertical, Skin skin) | |
| SplitPane | back to summary |
|---|---|
| public SplitPane(Actor firstWidget, Actor secondWidget, boolean vertical, Skin skin, String styleName) | |
| SplitPane | back to summary |
|---|---|
| public SplitPane(Actor firstWidget, Actor secondWidget, boolean vertical, SplitPane. | |
| addActor | back to summary |
|---|---|
| public void addActor(Actor actor) Overrides com. Doc from com. Adds an actor as a child of this group, removing it from its previous parent. If the actor is already a child of this group, no changes are made. | |
| addActorAt | back to summary |
|---|---|
| public void addActorAt(int index, Actor actor) Overrides com. Doc from com. Adds an actor as a child of this group at a specific index, removing it from its previous parent. If the actor is already a child of this group, no changes are made. | |
| addActorBefore | back to summary |
|---|---|
| public void addActorBefore(Actor actorBefore, Actor actor) Overrides com. Doc from com. Adds an actor as a child of this group immediately before another child actor, removing it from its previous parent. If the actor is already a child of this group, no changes are made. | |
| calculateHorizBoundsAndPositions | back to summary |
|---|---|
| private void calculateHorizBoundsAndPositions() | |
| calculateVertBoundsAndPositions | back to summary |
|---|---|
| private void calculateVertBoundsAndPositions() | |
| clampSplitAmount | back to summary |
|---|---|
| protected void clampSplitAmount() Called during layout to clamp the | |
| draw | back to summary |
|---|---|
| public void draw(Batch batch, float parentAlpha) Overrides com. Doc from com. If this method is overridden, the super method or | |
| getMaxSplitAmount | back to summary |
|---|---|
| public float getMaxSplitAmount() | |
| getMinHeight | back to summary |
|---|---|
| public float getMinHeight() Overrides com. Implements com. | |
| getMinSplitAmount | back to summary |
|---|---|
| public float getMinSplitAmount() | |
| getMinWidth | back to summary |
|---|---|
| public float getMinWidth() Overrides com. Implements com. | |
| getPrefHeight | back to summary |
|---|---|
| public float getPrefHeight() Overrides com. Implements com. | |
| getPrefWidth | back to summary |
|---|---|
| public float getPrefWidth() Overrides com. Implements com. | |
| getSplitAmount | back to summary |
|---|---|
| public float getSplitAmount() | |
| getStyle | back to summary |
|---|---|
| public SplitPane. Implements com. Returns the split pane's style. Modifying the returned style may not have an effect until | |
| initialize | back to summary |
|---|---|
| private void initialize() | |
| isCursorOverHandle | back to summary |
|---|---|
| public boolean isCursorOverHandle() | |
| isVertical | back to summary |
|---|---|
| public boolean isVertical() | |
| layout | back to summary |
|---|---|
| public void layout() Overrides com. Implements com. Doc from com. Computes and caches any information needed for drawing and, if this actor has children, positions and sizes each child,
calls | |
| removeActor | back to summary |
|---|---|
| public boolean removeActor(Actor actor) Overrides com. Doc from com. Removes an actor from this group and unfocuses it. Calls | |
| removeActor | back to summary |
|---|---|
| public boolean removeActor(Actor actor, boolean unfocus) Overrides com. Doc from com. Removes an actor from this group. Calls | |
| removeActorAt | back to summary |
|---|---|
| public Actor removeActorAt(int index, boolean unfocus) Overrides com. Doc from com. Removes an actor from this group. If the actor will not be used again and has actions, they should be
| |
| setFirstWidget | back to summary |
|---|---|
public void setFirstWidget(Actor widget)
| |
| setMaxSplitAmount | back to summary |
|---|---|
| public void setMaxSplitAmount(float maxAmount) | |
| setMinSplitAmount | back to summary |
|---|---|
| public void setMinSplitAmount(float minAmount) | |
| setSecondWidget | back to summary |
|---|---|
public void setSecondWidget(Actor widget)
| |
| setSplitAmount | back to summary |
|---|---|
public void setSplitAmount(float splitAmount)
| |
| setStyle | back to summary |
|---|---|
| public void setStyle(SplitPane. Implements com. Doc from com. Set the current style of the actor | |
| setVertical | back to summary |
|---|---|
| public void setVertical(boolean vertical) | |
SplitPane.
| Access | Constructor and Description |
|---|---|
| public | |
| public | |
| public |
| handle | back to summary |
|---|---|
| public Drawable handle | |
| SplitPaneStyle | back to summary |
|---|---|
| public SplitPaneStyle() | |
| SplitPaneStyle | back to summary |
|---|---|
| public SplitPaneStyle(Drawable handle) | |
| SplitPaneStyle | back to summary |
|---|---|
| public SplitPaneStyle(SplitPane. | |