Class Window
- java.lang.Object
-
- de.extio.spacecraft.shared.client.ui.Window
-
- All Implemented Interfaces:
HasPosition2
,HasPositionAndDimension2
,AutoCloseable
- Direct Known Subclasses:
EnhancedWindow
public class Window extends Object implements HasPositionAndDimension2, AutoCloseable
Helper to position, draw and manage virtual windows in the UI. I recommend to check for code examples in shipped groovy code to learn more about the usage of this helper and how to integrate in client modules.
-
-
Method Summary
-
-
-
Constructor Detail
-
Window
public Window(String name, boolean draggable)
-
-
Method Detail
-
intersectsAny
public static boolean intersectsAny(HasPositionAndDimension2 area)
-
reset
public void reset()
-
releaseDragging
public void releaseDragging()
-
drag
public boolean drag(CoordI2 coord)
-
move
public void move(CoordI2 delta)
-
updateArea
public void updateArea()
-
resizeCentered
public void resizeCentered(CoordI2 dimension)
-
intersects
public boolean intersects(CoordI2 coord)
-
render
public void render(List<RenderingBo> renderingBo)
-
render
public void render(List<RenderingBo> renderingBo, BiConsumer<List<RenderingBo>,RenderingBo> consumer)
-
close
public void close()
- Specified by:
close
in interfaceAutoCloseable
-
ensureBounds
protected void ensureBounds()
-
updateRelativeScreenPosition
protected void updateRelativeScreenPosition()
-
applyRelativeScreenPosition
protected void applyRelativeScreenPosition()
-
getX
public int getX()
-
setX
public void setX(int x)
-
getY
public int getY()
-
setY
public void setY(int y)
-
getWidth
public int getWidth()
-
setWidth
public void setWidth(int width)
-
getHeight
public int getHeight()
-
setHeight
public void setHeight(int height)
-
getPosition
public CoordI2 getPosition()
- Specified by:
getPosition
in interfaceHasPosition2
-
setPosition
public void setPosition(CoordI2 position)
-
getDimension
public CoordI2 getDimension()
- Specified by:
getDimension
in interfaceHasPositionAndDimension2
-
setDimension
public void setDimension(CoordI2 dimension)
-
getArea
public Area2 getArea()
-
isDragging
public boolean isDragging()
-
isDraggable
public boolean isDraggable()
-
setDraggable
public void setDraggable(boolean draggable)
-
getRenderingBoLayer
public RenderingBoLayer getRenderingBoLayer()
-
setRenderingBoLayer
public void setRenderingBoLayer(RenderingBoLayer renderingBoLayer)
-
getColor
public RgbaColor getColor()
-
setColor
public void setColor(RgbaColor color)
-
isDrawCloseButton
public boolean isDrawCloseButton()
-
setDrawCloseButton
public void setDrawCloseButton(boolean drawCloseButton)
-
-