Interface Element
-
- All Superinterfaces:
be.yildizgames.common.util.Registerable
- All Known Subinterfaces:
Button,ButtonList,CheckBox,Container,ContainerChild,Image,InputBox,ProgressBar,ProgressBarTimer,TextArea,TextLine,TimeTextLine,Widget
- All Known Implementing Classes:
AbstractIconElement,AbstractTextElement,BaseContainerChild,BaseElement,BaseWidget,SimpleContainer,TabContainer
public interface Element extends be.yildizgames.common.util.Registerable- Author:
- Grégory Van den Borre
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classElement.AlignmentAlignment value to set the widgets positions.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddToLeft(int value)voidaddToPosition(int xValue, int yValue)voidaddToTop(int value)Move the element to the top or bottom.intgetBottom()be.yildizgames.module.coordinate.BaseCoordinategetCoordinates()intgetHeight()intgetLeft()intgetRight()intgetTop()intgetWidth()Elementhide()Set the element invisible on screen.booleanisVisible()voidresetVirtualHeight()voidsetCoordinates(be.yildizgames.module.coordinate.BaseCoordinate coordinates)voidsetHeight(int height)Set the element height.ElementsetLeft(int left)Set the element left position.ElementsetLeft(Element other, PositionRelativeLeft relative)ElementsetLeft(Element other, PositionRelativeLeft relative, int diff)ElementsetLeft(Element other, PositionRelativeLeft left, be.yildizgames.module.coordinate.Relative relativeDiff)ElementsetPosition(int left, int top)Set the element position.ElementsetPosition(Element other)voidsetSize(int newWidth, int newHeight)voidsetSize(be.yildizgames.module.coordinate.Size size)ElementsetTop(int top)Set the element top position.ElementsetTop(Element other, PositionRelativeTop relative)ElementsetTop(Element other, PositionRelativeTop relative, int diff)ElementsetTop(Element other, PositionRelativeTop top, be.yildizgames.module.coordinate.Relative relativeDiff)voidsetVirtualHeight(int height)ElementsetVisible(boolean visible)Show or hide the element.voidsetWidth(int width)Set the element width.Elementshow()Set the element visible on screen.
-
-
-
Method Detail
-
hide
Element hide()
Set the element invisible on screen.- Returns:
- This.
-
show
Element show()
Set the element visible on screen.- Returns:
- This.
-
setTop
Element setTop(Element other, PositionRelativeTop relative, int diff)
-
setTop
Element setTop(Element other, PositionRelativeTop top, be.yildizgames.module.coordinate.Relative relativeDiff)
-
setTop
Element setTop(Element other, PositionRelativeTop relative)
-
setLeft
Element setLeft(Element other, PositionRelativeLeft relative)
-
setLeft
Element setLeft(Element other, PositionRelativeLeft relative, int diff)
-
setLeft
Element setLeft(Element other, PositionRelativeLeft left, be.yildizgames.module.coordinate.Relative relativeDiff)
-
getLeft
int getLeft()
- Returns:
- The element left position.
-
setLeft
Element setLeft(int left)
Set the element left position.- Parameters:
left- New widget left position in pixels.- Returns:
- This.
-
getTop
int getTop()
- Returns:
- The element top position.
-
setTop
Element setTop(int top)
Set the element top position.- Parameters:
top- New widget top position in pixels.- Returns:
- This.
-
addToPosition
void addToPosition(int xValue, int yValue)
-
addToLeft
void addToLeft(int value)
-
addToTop
void addToTop(int value)
Move the element to the top or bottom.- Parameters:
value- Move the element to y pixel to the bottom, negative value will move to the top.
-
setPosition
Element setPosition(int left, int top)
Set the element position.- Parameters:
left- Element X position.top- Element Y position.- Returns:
- This object for chaining.
-
getWidth
int getWidth()
- Returns:
- The element width.
-
setWidth
void setWidth(int width)
Set the element width.- Parameters:
width- New width.
-
getHeight
int getHeight()
- Returns:
- The element height.
-
setHeight
void setHeight(int height)
Set the element height.- Parameters:
height- New height.
-
getBottom
int getBottom()
-
setSize
void setSize(be.yildizgames.module.coordinate.Size size)
-
getCoordinates
be.yildizgames.module.coordinate.BaseCoordinate getCoordinates()
-
setCoordinates
void setCoordinates(be.yildizgames.module.coordinate.BaseCoordinate coordinates)
-
isVisible
boolean isVisible()
-
setVisible
Element setVisible(boolean visible)
Show or hide the element.- Parameters:
visible-trueto show the element,falseto hide it.- Returns:
- This object for chaining.
-
setSize
void setSize(int newWidth, int newHeight)
-
getRight
int getRight()
-
setVirtualHeight
void setVirtualHeight(int height)
-
resetVirtualHeight
void resetVirtualHeight()
-
-