Package arc.scene.ui.layout
Class Collapser
java.lang.Object
arc.scene.Element
arc.scene.Group
arc.scene.ui.layout.WidgetGroup
arc.scene.ui.layout.Collapser
- All Implemented Interfaces:
Cullable
-
Field Summary
Fields inherited from class arc.scene.Group
children, cullingArea, transform
Fields inherited from class arc.scene.Element
color, cullable, fillParent, height, name, originX, originY, parent, parentAlpha, rotation, scaleX, scaleY, touchable, touchablility, translation, userObject, visibility, visible, width, x, y
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
act
(float delta) Updates the actor based on time.protected void
Called when actors are added to or removed from the group.void
draw()
If this method is overridden, the super method orWidgetGroup.validate()
should be called to ensure the widget group is laid out.float
float
float
float
boolean
void
layout()
Computes and caches any information needed for drawing and, if this actor has children, positions and sizes each child, callsElement.invalidate()
on any each child whose width or height has changed, and callsElement.validate()
on each child.void
setCollapsed
(boolean collapse) void
setCollapsed
(boolean collapse, boolean withAnimation) setCollapsed
(boolean autoAnimate, Boolp collapsed) setCollapsed
(Boolp collapsed) setDuration
(float seconds) void
void
toggle()
void
toggle
(boolean animated) Methods inherited from class arc.scene.ui.layout.WidgetGroup
invalidate, invalidateHierarchy, needsLayout, pack, setFillParent, setLayoutEnabled, sizeChanged, validate
Methods inherited from class arc.scene.Group
addChild, addChildAfter, addChildAt, addChildBefore, applyTransform, clear, clearChildren, computeTransform, drawChildren, fill, fill, fill, find, find, findVisible, forEach, getChildren, getCullingArea, hasChildren, hit, isTransform, localToDescendantCoordinates, removeChild, removeChild, resetTransform, setCullingArea, setScene, setTransform, swapActor, swapActor, toString
Methods inherited from class arc.scene.Element
actions, addAction, addCaptureListener, addListener, change, changed, clearActions, clearListeners, clicked, clicked, clicked, clicked, clipBegin, clipBegin, clipEnd, dragged, exited, fire, fireClick, getActions, getCaptureListeners, getHeight, getListeners, getMaxHeight, getMaxWidth, getRight, getRotation, getScene, getTop, getWidth, getX, getY, getZIndex, hasActions, hasKeyboard, hasMouse, hasParent, hasScroll, hovered, isAscendantOf, isDescendantOf, isDescendantOf, isTouchable, keepInStage, keyDown, keyDown, localToAscendantCoordinates, localToParentCoordinates, localToStageCoordinates, moveBy, notify, parentToLocalCoordinates, released, remove, removeAction, removeCaptureListener, removeListener, requestKeyboard, requestScroll, rotateBy, rotationChanged, scaleBy, scaleBy, screenToLocalCoordinates, scrolled, setBounds, setColor, setColor, setHeight, setOrigin, setOrigin, setPosition, setPosition, setRotation, setRotationOrigin, setScale, setScale, setSize, setSize, setTranslation, setWidth, setZIndex, sizeBy, sizeBy, stageToLocalCoordinates, tapped, toBack, toFront, touchable, update, updateVisibility, visible
-
Constructor Details
-
Collapser
-
Collapser
-
-
Method Details
-
setDuration
-
setCollapsed
-
setCollapsed
-
toggle
public void toggle() -
toggle
public void toggle(boolean animated) -
setCollapsed
public void setCollapsed(boolean collapse, boolean withAnimation) -
setCollapsed
public void setCollapsed(boolean collapse) -
isCollapsed
public boolean isCollapsed() -
draw
public void draw()Description copied from class:WidgetGroup
If this method is overridden, the super method orWidgetGroup.validate()
should be called to ensure the widget group is laid out.- Overrides:
draw
in classWidgetGroup
-
act
public void act(float delta) Description copied from class:Element
Updates the actor based on time. Typically this is called each frame byScene.act(float)
.The default implementation calls
Action.act(float)
on each action and removes actions that are complete. -
layout
public void layout()Description copied from class:Element
Computes and caches any information needed for drawing and, if this actor has children, positions and sizes each child, callsElement.invalidate()
on any each child whose width or height has changed, and callsElement.validate()
on each child. This method should almost never be called directly, insteadElement.validate()
should be used.- Overrides:
layout
in classWidgetGroup
-
getPrefWidth
public float getPrefWidth()- Overrides:
getPrefWidth
in classWidgetGroup
-
getPrefHeight
public float getPrefHeight()- Overrides:
getPrefHeight
in classWidgetGroup
-
setTable
-
getMinWidth
public float getMinWidth()- Overrides:
getMinWidth
in classWidgetGroup
-
getMinHeight
public float getMinHeight()- Overrides:
getMinHeight
in classWidgetGroup
-
childrenChanged
protected void childrenChanged()Description copied from class:Group
Called when actors are added to or removed from the group.- Overrides:
childrenChanged
in classWidgetGroup
-