public class Container extends AbstractUIObject
SCROLL_DIR_ALL, SCROLL_DIR_BOTTOM, SCROLL_DIR_HORIZONTAL, SCROLL_DIR_LEFT, SCROLL_DIR_NONE, SCROLL_DIR_RIGHT, SCROLL_DIR_TOP, SCROLL_DIR_VERTICAL, SCROLLBAR_MODE_ACTIVE, SCROLLBAR_MODE_AUTO, SCROLLBAR_MODE_OFF, SCROLLBAR_MODE_ON, STATE_CHECKED, STATE_DEFAULT, STATE_DISABLED, STATE_SCROLLED
ALIGN_BOTTOM, ALIGN_CENTER, ALIGN_DEFAULT, ALIGN_LEFT, ALIGN_RIGHT, ALIGN_TOP, objImpl, SIDE_BOTTOM, SIDE_FULL, SIDE_LEFT, SIDE_RIGHT, SIDE_TOP, SIZE_CONTENT, TEXT_DECOR_NONE, TEXT_DECOR_STRIKETHROUGH, TEXT_DECOR_UNDERLINE
Modifier | Constructor and Description |
---|---|
|
Container()
Constructs a container
|
protected |
Container(boolean root) |
Modifier and Type | Method and Description |
---|---|
void |
addContainer(Container container)
Adds a sub container.
|
void |
addObject(UIObject obj)
Adds a child UIObject
|
void |
addWidget(Widget widget)
Adds a widget.
|
Container |
getContainer()
Returns parent container
|
UIObject |
getObject(int index)
Returns the child UIObjects with specified index
|
int |
getObjectCount()
Returns the count of child UIObjects
|
UIObject[] |
getObjects()
Gets all of the UIObjects in the Container, include Containers and
Widgets
|
void |
move(UIObject obj,
int newIndex)
Moves the child UIObject to the specified index.
|
void |
removeAll()
Removes all child UIObjects
|
void |
removeContainer(Container container)
Removes the specified sub container.
|
void |
removeObject(UIObject obj)
Removes a child UIObject
|
void |
removeWidget(Widget widget)
Removes the specified widget.
|
void |
updateLayout(Layout layout)
Sets a layout for the Container
|
getObjectOfState, getScrollbar, getScrollbarMode, getScrollbarOfState, getScrollBottom, getScrollDirection, getScrollLeft, getScrollRight, getScrollTop, getScrollX, getScrollY, isChecked, isClickable, isDisabled, isFloating, isHidden, isIgnoreLayout, isScrollable, isScrolled, resetAllListeners, scrollToView, scrollToView, scrollToX, scrollToX, scrollToY, scrollToY, setCancelListener, setChecked, setClickable, setClickedListener, setDisabled, setFloating, setHidden, setIgnoreLayout, setReadyListener, setScrollable, setScrollbarMode, setScrollDirection, setScrollListener, setValueChangedListener
enableClipCorner, forceNewTrack, getBackgroundColor, getBorderColor, getBorderWidth, getColumnPadding, getCoordinates, getFlexGrow, getHeight, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getName, getPadding, getParent, getPropertyBooleanValue, getPropertyIntValue, getRadius, getRowPadding, getShadowColor, getShadowOffsetX, getShadowOffsetY, getShadowWidth, getTextColor, getTextLetterSpace, getTextLineSpace, getTranslateX, getTranslateY, getUserData, getWidth, getX, getY, isClipCornerEnabled, setAlign, setBackgroundColor, setBorderColor, setBorderWidth, setColumnPadding, setFlexGrow, setHeight, setMaxHeight, setMaxWidth, setMinHeight, setMinWidth, setName, setPadding, setPadding, setParent, setPos, setPropertyValue, setPropertyValue, setPropertyValue, setPropertyValue, setRadius, setRecolor, setRowPadding, setShadowColor, setShadowOffsetX, setShadowOffsetY, setShadowWidth, setSize, setTextAlign, setTextColor, setTextDecor, setTextFont, setTextLetterSpace, setTextLineSpace, setTranslateX, setTranslateY, setUserData, setWidth, setX, setY
public Container()
protected Container(boolean root)
public void addContainer(Container container)
container
- child UIObject to addpublic void removeContainer(Container container)
container
- child UIObject to removepublic void addWidget(Widget widget)
widget
- child UIObject to addpublic void removeWidget(Widget widget)
widget
- child UIObject to removepublic void addObject(UIObject obj)
obj
- child UIObject to addpublic void removeObject(UIObject obj)
obj
- child UIObject to removepublic void removeAll()
public Container getContainer()
public int getObjectCount()
public UIObject getObject(int index)
index
- the position at which to get the UIObject frompublic UIObject[] getObjects()
public void move(UIObject obj, int newIndex)
obj
- child UIObjectnewIndex
- new positionpublic void updateLayout(Layout layout)
layout
- layout object, such like Flex.