public class Container extends Div implements Navigatable
asyncRemoveAll, children, renderNode
deferredLayout, deferredRender, deferredUpdate, effects, height, styleId, visibility, width, x, y, zIndex
Constructor and Description |
---|
Container()
Constructor.
|
Container(float x,
float y,
float width,
float height)
Constructor
|
Container(java.lang.String id)
Constructor
|
Container(java.lang.String id,
float x,
float y,
float width,
float height)
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
clearGamePadHotkeys()
Unmaps all gamepad hotkeys
|
void |
clearHotkeys()
Unmaps all hotkeys
|
void |
clearKeyboardHotkeys()
Unmaps all keyboard hotkeys
|
protected ParentRenderNode<?,?> |
createRenderNode(ParentRenderNode<?,?> parent)
Creates the
ParentRenderNode for this UiElement |
UiNavigation |
getNavigation()
Returns the
UiNavigation currently being navigated |
StyleRule |
getStyleRule() |
ActionableRenderNode |
hotkey(GamePadButton button)
Returns the corresponding
ActionableRenderNode mapped to a GamePadButton hotkey |
ActionableRenderNode |
hotkey(int keycode)
Returns the corresponding
ActionableRenderNode mapped to a keyboard hotkey |
ActionableRenderNode |
navigate(int keycode)
Triggers a navigation and returns the newly highlighted
ActionableRenderNode |
void |
setHotkey(GamePadButton button,
Actionable actionable)
Maps a
GamePadButton to a Actionable |
void |
setHotkey(int keycode,
Actionable actionable)
Maps a keyboard button to a
Actionable |
void |
setNavigation(UiNavigation navigation) |
void |
syncWithUpdate(UiContainerRenderTree rootNode)
Syncs data between the
UiElement and RenderNode during update |
void |
unsetHotkey(GamePadButton button)
Unmaps a
GamePadButton hotkey |
void |
unsetHotkey(int keycode)
Unmaps a keyboard hotkey
|
withElements, withElements
add, add, attach, detach, get, getChild, getElementById, getFlexLayout, getRenderHeight, getRenderWidth, getRenderX, getRenderY, getTotalChildren, invokeBeginHover, invokeEndHover, isFlexLayout, isInitialLayoutOccurred, isInitialUpdateOccurred, isOverflowClipped, isRenderNodeDirty, remove, remove, removeAll, removeAllAsync, setFlex, setFlexLayout, setHeightFlex, setOverflowClipped, setRenderNodeDirty, setStyleId, setVisibility, setWidthFlex, setXFlex, setXYFlex, setYFlex, setZIndex, shrinkToContents, shrinkToContents
addEffectListener, addHoverListener, addNodeStateListener, alignAbove, alignBelow, alignEdgeToEdge, alignLeftOf, alignRightOf, applyEffect, deferUntilLayout, deferUntilLayout, deferUntilRender, deferUntilRender, deferUntilUpdate, deferUntilUpdate, deferUntilUpdate, deferUntilUpdate, equals, getContentHeight, getContentWidth, getHeight, getId, getMarginBottom, getMarginLeft, getMarginRight, getMarginTop, getPaddingBottom, getPaddingLeft, getPaddingRight, getPaddingTop, getStyleId, getVisibility, getWidth, getX, getY, getZIndex, hashCode, isDebugEnabled, isInitialised, notifyEffectListenersOnFinished, notifyHoverListenersOnBeginHover, notifyHoverListenersOnEndHover, notifyNodeStateListeners, removeEffectListener, removeHoverListener, removeNodeStateListener, set, setContentHeight, setContentWidth, setDebugEnabled, setHeight, setHeightToContentHeightOf, setHeightToHeightOf, setWidth, setWidthToContentWidthOf, setWidthToWidthOf, setX, setXY, setY, snapTo, snapTo, syncWithLayout, syncWithRender
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
getId
public Container()
Container
public Container(java.lang.String id)
id
- The unique ID for the Container
public Container(float x, float y, float width, float height)
x
- The x coordinate of this element relative to its parenty
- The y coordinate of this element relative to its parentwidth
- The width of this elementheight
- The height of this elementpublic Container(java.lang.String id, float x, float y, float width, float height)
id
- The unique ID for this element (if null an ID will be generated)x
- The x coordinate of this element relative to its parenty
- The y coordinate of this element relative to its parentwidth
- The width of this elementheight
- The height of this elementpublic void syncWithUpdate(UiContainerRenderTree rootNode)
UiElement
UiElement
and RenderNode
during updatesyncWithUpdate
in class ParentUiElement
protected ParentRenderNode<?,?> createRenderNode(ParentRenderNode<?,?> parent)
ParentUiElement
ParentRenderNode
for this UiElement
createRenderNode
in class Div
parent
- The parent of this nodeParentRenderNode
public ActionableRenderNode navigate(int keycode)
Navigatable
ActionableRenderNode
navigate
in interface Navigatable
keycode
- The navigation Input.Keys
valueUiNavigation
is availablepublic ActionableRenderNode hotkey(int keycode)
Navigatable
ActionableRenderNode
mapped to a keyboard hotkeyhotkey
in interface Navigatable
keycode
- The Input.Keys
keycode that is the hotkeypublic ActionableRenderNode hotkey(GamePadButton button)
Navigatable
ActionableRenderNode
mapped to a GamePadButton
hotkeyhotkey
in interface Navigatable
button
- The GamePadButton
that is the hotkeypublic void setHotkey(GamePadButton button, Actionable actionable)
Navigatable
GamePadButton
to a Actionable
setHotkey
in interface Navigatable
button
- The GamePadButton
that is the hotkeyactionable
- The Actionable
to trigger when the hotkey is pressedpublic void setHotkey(int keycode, Actionable actionable)
Navigatable
Actionable
setHotkey
in interface Navigatable
keycode
- The Input.Keys
keycode that is the hotkeyactionable
- The Actionable
to trigger when the key is pressedpublic void unsetHotkey(GamePadButton button)
Navigatable
GamePadButton
hotkeyunsetHotkey
in interface Navigatable
button
- The GamePadButton
that is the hotkeypublic void unsetHotkey(int keycode)
Navigatable
unsetHotkey
in interface Navigatable
keycode
- The Input.Keys
keycode that is the hotkeypublic void clearGamePadHotkeys()
Navigatable
clearGamePadHotkeys
in interface Navigatable
public void clearKeyboardHotkeys()
Navigatable
clearKeyboardHotkeys
in interface Navigatable
public void clearHotkeys()
Navigatable
clearHotkeys
in interface Navigatable
public UiNavigation getNavigation()
Navigatable
UiNavigation
currently being navigatedgetNavigation
in interface Navigatable
public void setNavigation(UiNavigation navigation)
public StyleRule getStyleRule()
getStyleRule
in class Div