Package com.prineside.tdi2.scene2d.ui
Class SplitPane
java.lang.Object
com.prineside.tdi2.scene2d.Actor
com.prineside.tdi2.scene2d.Group
com.prineside.tdi2.scene2d.ui.WidgetGroup
com.prineside.tdi2.scene2d.ui.SplitPane
A container that contains two widgets and is divided either horizontally or vertically. The user may resize the widgets. The
 child widgets are always sized to fill their side of the SplitPane.
 
 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 SplitPane.SplitPaneStyle.handle. The widgets
 are sized depending on the SplitPane size and the split position.
- Author:
- mzechner, Nathan Sweet
- 
Nested Class SummaryNested Classes
- 
Constructor SummaryConstructorsConstructorDescriptionSplitPane(Actor firstWidget, Actor secondWidget, boolean vertical, SplitPane.SplitPaneStyle style) 
- 
Method SummaryModifier and TypeMethodDescriptionvoidAdds an actor as a child of this group, removing it from its previous parent.voidaddActorAt(int index, Actor actor) Adds an actor as a child of this group at a specific index, removing it from its previous parent.voidaddActorBefore(Actor actorBefore, Actor actor) Adds an actor as a child of this group immediately before another child actor, removing it from its previous parent.voidIf this method is overridden, the super method orWidgetGroup.validate()should be called to ensure the widget group is laid out.floatfloatfloatfloatfloatfloatfloatgetStyle()Returns the split pane's style.booleanbooleanvoidlayout()Computes and caches any information needed for drawing and, if this actor has children, positions and sizes each child, callsLayout.invalidate()on any each child whose width or height has changed, and callsLayout.validate()on each child.booleanremoveActor(Actor actor) Removes an actor from this group and unfocuses it.booleanremoveActor(Actor actor, boolean unfocus) Removes an actor from this group.removeActorAt(int index, boolean unfocus) Removes an actor from this group.voidsetFirstWidget(Actor widget) voidsetMaxSplitAmount(float maxAmount) voidsetMinSplitAmount(float minAmount) voidsetSecondWidget(Actor widget) voidsetSplitAmount(float splitAmount) voidsetStyle(SplitPane.SplitPaneStyle style) voidsetVertical(boolean vertical) Methods inherited from class com.prineside.tdi2.scene2d.ui.WidgetGroupgetMaxHeight, getMaxHeightValue, getMaxWidth, getMaxWidthValue, getMinHeightValue, getMinWidthValue, getPrefHeightValue, getPrefWidthValue, hit, invalidate, invalidateHierarchy, needsLayout, pack, setFillParent, setLayoutEnabled, setMaxHeight, setMaxHeight, setMaxWidth, setMaxWidth, setMinHeight, setMinHeight, setMinWidth, setMinWidth, setPrefHeight, setPrefHeight, setPrefWidth, setPrefWidth, setWidth, validateMethods inherited from class com.prineside.tdi2.scene2d.Groupact, addActorAfter, clear, clear, clearChildren, clearChildren, debugAll, drawDebug, findActor, getChild, getChildren, getCullingArea, hasChildren, isTransform, localToDescendantCoordinates, setCullingArea, setDebug, setTransform, swapActor, swapActor, toStringMethods inherited from class com.prineside.tdi2.scene2d.ActoraddAction, addCaptureListener, addListener, ancestorsVisible, ascendantsVisible, clearActions, clearListeners, clipBegin, clipBegin, clipEnd, debug, fire, firstAscendant, getActions, getCaptureListeners, getColor, getDebug, getHeight, getListeners, getName, getOriginX, getOriginY, getParent, getRight, getRotation, getScaleX, getScaleY, getStage, getTop, getTouchable, getUserObject, getWidth, getX, getX, getY, getY, getZIndex, hasActions, hasKeyboardFocus, hasParent, hasScrollFocus, isAscendantOf, isDescendantOf, isTouchable, isTouchFocusListener, isTouchFocusTarget, isVisible, localToActorCoordinates, localToAscendantCoordinates, localToParentCoordinates, localToScreenCoordinates, localToStageCoordinates, moveBy, notify, parentToLocalCoordinates, remove, removeAction, removeCaptureListener, removeListener, rotateBy, scaleBy, scaleBy, screenToLocalCoordinates, setBounds, setColor, setColor, setDebug, setHeight, setName, setOrigin, setOrigin, setOriginX, setOriginY, setPosition, setPosition, setRotation, setScale, setScale, setScaleX, setScaleY, setSize, setTouchable, setUserObject, setVisible, setX, setX, setY, setY, setZIndex, sizeBy, sizeBy, stageToLocalCoordinates, toBack, toFront
- 
Constructor Details- 
SplitPanepublic SplitPane(@Null Actor firstWidget, @Null Actor secondWidget, boolean vertical, SplitPane.SplitPaneStyle style) - Parameters:
- firstWidget- May be null.
- secondWidget- May be null.
 
 
- 
- 
Method Details- 
setStyle
- 
getStyleReturns the split pane's style. Modifying the returned style may not have an effect untilsetStyle(SplitPaneStyle)is called.
- 
layoutpublic void layout()Description copied from interface:LayoutComputes and caches any information needed for drawing and, if this actor has children, positions and sizes each child, callsLayout.invalidate()on any each child whose width or height has changed, and callsLayout.validate()on each child. This method should almost never be called directly, insteadLayout.validate()should be used.- Specified by:
- layoutin interface- Layout
- Overrides:
- layoutin class- WidgetGroup
 
- 
getPrefWidthpublic float getPrefWidth()- Specified by:
- getPrefWidthin interface- Layout
- Overrides:
- getPrefWidthin class- WidgetGroup
 
- 
getPrefHeightpublic float getPrefHeight()- Specified by:
- getPrefHeightin interface- Layout
- Overrides:
- getPrefHeightin class- WidgetGroup
 
- 
getMinWidthpublic float getMinWidth()- Specified by:
- getMinWidthin interface- Layout
- Overrides:
- getMinWidthin class- WidgetGroup
 
- 
getMinHeightpublic float getMinHeight()- Specified by:
- getMinHeightin interface- Layout
- Overrides:
- getMinHeightin class- WidgetGroup
 
- 
setVerticalpublic void setVertical(boolean vertical) 
- 
isVerticalpublic boolean isVertical()
- 
drawDescription copied from class:WidgetGroupIf this method is overridden, the super method orWidgetGroup.validate()should be called to ensure the widget group is laid out.- Overrides:
- drawin class- WidgetGroup
- parentAlpha- The parent alpha, to be multiplied with this actor's alpha, allowing the parent's alpha to affect all children.
 
- 
setSplitAmountpublic void setSplitAmount(float splitAmount) - Parameters:
- splitAmount- The split amount between the min and max amount. This parameter is clamped during layout. See- clampSplitAmount().
 
- 
getSplitAmountpublic float getSplitAmount()
- 
getMinSplitAmountpublic float getMinSplitAmount()
- 
setMinSplitAmountpublic void setMinSplitAmount(float minAmount) 
- 
getMaxSplitAmountpublic float getMaxSplitAmount()
- 
setMaxSplitAmountpublic void setMaxSplitAmount(float maxAmount) 
- 
setFirstWidget- Parameters:
- widget- May be null.
 
- 
setSecondWidget- Parameters:
- widget- May be null.
 
- 
addActorDescription copied from class:GroupAdds 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.
- 
addActorAtDescription copied from class:GroupAdds 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.- Overrides:
- addActorAtin class- Group
- Parameters:
- index- May be greater than the number of children.
 
- 
addActorBeforeDescription copied from class:GroupAdds 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.- Overrides:
- addActorBeforein class- Group
 
- 
removeActorDescription copied from class:GroupRemoves an actor from this group and unfocuses it. CallsGroup.removeActor(Actor, boolean)with true.- Overrides:
- removeActorin class- Group
 
- 
removeActorDescription copied from class:GroupRemoves an actor from this group. CallsGroup.removeActorAt(int, boolean)with the actor's child index.- Overrides:
- removeActorin class- Group
 
- 
removeActorAtDescription copied from class:GroupRemoves an actor from this group. If the actor will not be used again and has actions, they should beclearedso the actions will be returned to theirpool, if any. This is not done automatically.- Overrides:
- removeActorAtin class- Group
- unfocus- If true,- Stage.unfocus(Actor)is called.
- Returns:
- the actor removed from this group.
 
- 
isCursorOverHandlepublic boolean isCursorOverHandle()
 
-