Package com.hybris.cockpitng.layout
Class ElementPlacement<T>
- java.lang.Object
-
- com.hybris.cockpitng.layout.ElementPlacement<T>
-
- Type Parameters:
T- Type of element
public class ElementPlacement<T> extends java.lang.ObjectClass is used to describe element's position.
-
-
Constructor Summary
Constructors Constructor Description ElementPlacement(Point p1, Point p2)ElementPlacement(T element, Point p1, Point p2)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancontains(int x, int y)Tels if given coordinates are inside element placement's coordinatestopLeftandbottomRightinclusively.booleanequals(java.lang.Object o)PointgetBottomRight()TgetElement()intgetHeight()PointgetTopLeft()intgetWidth()inthashCode()voidsetBottomRight(Point bottomRight)voidsetElement(T element)voidsetTopLeft(Point topLeft)java.lang.StringtoString()
-
-
-
Method Detail
-
contains
public boolean contains(int x, int y)Tels if given coordinates are inside element placement's coordinatestopLeftandbottomRightinclusively.- Parameters:
x- x coordinate.y- y coordinate.- Returns:
- true if coordinates are inside element placement.
-
getTopLeft
public Point getTopLeft()
-
setTopLeft
public void setTopLeft(Point topLeft)
-
getBottomRight
public Point getBottomRight()
-
setBottomRight
public void setBottomRight(Point bottomRight)
-
getElement
public T getElement()
-
setElement
public void setElement(T element)
-
getHeight
public int getHeight()
-
getWidth
public int getWidth()
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-