Package com.prineside.tdi2.ui.actors
Class Window
java.lang.Object
com.prineside.tdi2.scene2d.Actor
com.prineside.tdi2.scene2d.Group
com.prineside.tdi2.scene2d.ui.WidgetGroup
com.prineside.tdi2.scene2d.ui.Table
com.prineside.tdi2.ui.actors.Window
- Direct Known Subclasses:
ListClassUsagesWindow,ListenerGroupViewer
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfacestatic classNested classes/interfaces inherited from class com.prineside.tdi2.scene2d.ui.Table
Table.Debug, Table.DebugRect -
Field Summary
FieldsModifier and TypeFieldDescriptionfloatfloatfloatfloatFields inherited from class com.prineside.tdi2.scene2d.ui.Table
backgroundBottom, backgroundLeft, backgroundRight, backgroundTop, debugActorColor, debugCellColor, debugTableColor -
Constructor Summary
ConstructorsConstructorDescriptionWindow()Window(Window.WindowStyle style) Will be automatically brought to front when shown. -
Method Summary
Modifier and TypeMethodDescriptionvoidact(float delta) Updates the actor based on time.voidaddListener(Window.WindowListener listener) voidalignToPoint(float x, float y, int align) voidbooleanvoidclose()Close the window.voidfitToContent(int cornerPivot, boolean horizontally, boolean vertically, boolean currentSizeIsMin) voidSame as fitToContent using current window align, both vertically and horizontally.voidflash()static RectanglegetContentBox(Rectangle out) intintfloatZero indicates no max height.floatZero indicates no max width.floatfloatgetStyle()getTitle()intbooleanbooleanstatic RectanglemoveIntoViewport(Rectangle rect, Vector2 viewportSize) voidvoidremoveListener(Window.WindowListener listener) voidsetAnimated(boolean animated) voidsetAppearAlign(int align) voidsetContents(Actor v) voidsetDraggable(boolean enabled) voidsetPosition(float x, float y) Sets the position of the actor's bottom left corner.voidsetPosition(float x, float y, int pivot) Sets the position using the specifiedalignment.voidsetPositionByCorner(int corner, float x, float y) voidsetResizeable(boolean enabled) voidsetSize(float width, float height) Sets the width and height.voidsetTitle(CharSequence str) Also updates names of the main inner actorsvoidshow()voidvoidshowAtPoint(float x, float y) voidshowAtPointAligned(float x, float y, int align) toString()Returns a description of the actor hierarchy, recursively.Methods inherited from class com.prineside.tdi2.scene2d.ui.Table
add, add, add, align, background, bottom, center, clearChildren, clip, clip, columnDefaults, debug, debug, debugActor, debugAll, debugCell, debugTable, defaults, draw, drawDebug, getAlign, getBackground, getCell, getCells, getClip, getColumnMinWidth, getColumnPrefWidth, getColumns, getColumnWidth, getPadBottom, getPadBottomValue, getPadLeft, getPadLeftValue, getPadRight, getPadRightValue, getPadTop, getPadTopValue, getPadX, getPadY, getPrefHeight, getPrefWidth, getRow, getRowHeight, getRowMinHeight, getRowPrefHeight, getRows, getTableDebug, hit, invalidate, layout, left, pad, pad, pad, pad, padBottom, padBottom, padLeft, padLeft, padRight, padRight, padTop, padTop, removeActor, removeActor, removeActorAt, reset, right, row, setBackground, setClip, setDebug, setRound, stack, topMethods inherited from class com.prineside.tdi2.scene2d.ui.WidgetGroup
getMaxHeightValue, getMaxWidthValue, getMinHeightValue, getMinWidthValue, getPrefHeightValue, getPrefWidthValue, 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.Group
addActor, addActorAfter, addActorAt, addActorBefore, clear, clear, clearChildren, findActor, getChild, getChildren, getCullingArea, hasChildren, isTransform, localToDescendantCoordinates, setCullingArea, setDebug, setTransform, swapActor, swapActorMethods inherited from class com.prineside.tdi2.scene2d.Actor
addAction, addCaptureListener, addListener, ancestorsVisible, ascendantsVisible, clearActions, clearListeners, clipBegin, clipBegin, clipEnd, 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, setHeight, setName, setOrigin, setOrigin, setOriginX, setOriginY, setRotation, setScale, setScale, setScaleX, setScaleY, setTouchable, setUserObject, setVisible, setX, setX, setY, setY, setZIndex, sizeBy, sizeBy, stageToLocalCoordinates, toBack, toFront
-
Field Details
-
headerLayout
-
title
-
main
-
minWidth
public float minWidth -
minHeight
public float minHeight -
maxWidth
public float maxWidth -
maxHeight
public float maxHeight
-
-
Constructor Details
-
Window
public Window() -
Window
Will be automatically brought to front when shown. UiLayer will be removed when this window is disposed - create new layer for every new window
-
-
Method Details
-
getScrollPane
-
setCloseHandler
-
getStyle
-
getHeaderHeight
public int getHeaderHeight() -
getContentHeight
public int getContentHeight() -
setContents
-
getContents
-
positionChanged
public void positionChanged() -
setResizeable
public void setResizeable(boolean enabled) -
setDraggable
public void setDraggable(boolean enabled) -
flash
public void flash() -
bringToFront
public void bringToFront() -
getBox
-
getBox
-
getContentBox
-
addListener
-
removeListener
-
getWindowListeners
-
setTitle
Also updates names of the main inner actors -
getTitle
-
setAnimated
public void setAnimated(boolean animated) -
isAnimated
public boolean isAnimated() -
isResizeable
public boolean isResizeable() -
setAppearAlign
public void setAppearAlign(int align) -
alignToPoint
public void alignToPoint(float x, float y, int align) -
showAtCursor
public void showAtCursor() -
show
public void show() -
showAtPoint
public void showAtPoint(float x, float y) -
showAtPointAligned
public void showAtPointAligned(float x, float y, int align) -
getWindowAlign
public int getWindowAlign() -
close
public void close()Close the window. The window will be hidden and won't be removed from the scene. If you want it to be removed, add a WindowListener (closed) and call window.remove() there. If closeHandler is set, it will be called first and may cancel the effect of close() -
fitToContentSimple
public void fitToContentSimple()Same as fitToContent using current window align, both vertically and horizontally. Current size is not treated as a min size. -
fitToContent
public void fitToContent(int cornerPivot, boolean horizontally, boolean vertically, boolean currentSizeIsMin) -
setPositionByCorner
public void setPositionByCorner(int corner, float x, float y) -
setPosition
public void setPosition(float x, float y, int pivot) Description copied from class:ActorSets the position using the specifiedalignment. Note this may set the position to non-integer coordinates.- Overrides:
setPositionin classActor
-
clampWindowPosition
public boolean clampWindowPosition() -
act
public void act(float delta) Description copied from class:ActorUpdates the actor based on time. Typically this is called each frame byStage.act(float).The default implementation calls
Action.act(float)on each action and removes actions that are complete. -
setPosition
public void setPosition(float x, float y) Description copied from class:ActorSets the position of the actor's bottom left corner.- Overrides:
setPositionin classActor
-
setSize
public void setSize(float width, float height) Description copied from class:ActorSets the width and height. -
getMinWidth
public float getMinWidth()- Specified by:
getMinWidthin interfaceLayout- Overrides:
getMinWidthin classTable
-
getMinHeight
public float getMinHeight()- Specified by:
getMinHeightin interfaceLayout- Overrides:
getMinHeightin classTable
-
getMaxWidth
public float getMaxWidth()Description copied from interface:LayoutZero indicates no max width.- Specified by:
getMaxWidthin interfaceLayout- Overrides:
getMaxWidthin classWidgetGroup
-
getMaxHeight
public float getMaxHeight()Description copied from interface:LayoutZero indicates no max height.- Specified by:
getMaxHeightin interfaceLayout- Overrides:
getMaxHeightin classWidgetGroup
-
toString
Description copied from class:GroupReturns a description of the actor hierarchy, recursively. -
moveIntoViewport
-