Class Location
- java.lang.Object
-
- nl.colorize.multimedialib.scene.ui.Location
-
public class Location extends java.lang.ObjectA point that does not use absolute coordinates, but is instead relative to the canvas borders. This is useful for user interface widgets, that tend to be positioned relative rather than absolute.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Locationbottom(Canvas canvas, float x, float y)static LocationbottomCenter(Canvas canvas, float y)static LocationbottomRight(Canvas canvas, float x, float y)static Locationcenter(Canvas canvas, float y)static Locationfixed(float x, float y)Creates a location at fixed coordinates that will not move when the canvas is resized.floatgetX()floatgetY()static Locationleft(Canvas canvas, float x, float y)LocationrelativeTo(float deltaX, float deltaY)Creates a new location that is positioned at an offset relative to this location.static Locationright(Canvas canvas, float x, float y)static Locationtop(Canvas canvas, float x, float y)Point2DtoPoint()java.lang.StringtoString()
-
-
-
Method Detail
-
getX
public float getX()
-
getY
public float getY()
-
toPoint
public Point2D toPoint()
-
relativeTo
public Location relativeTo(float deltaX, float deltaY)
Creates a new location that is positioned at an offset relative to this location.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
fixed
public static Location fixed(float x, float y)
Creates a location at fixed coordinates that will not move when the canvas is resized.
-
-