Class Location


  • public class Location
    extends java.lang.Object
    A 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 Detail

      • getX

        public float getX()
      • getY

        public float getY()
      • toPoint

        public Point toPoint()
      • fixed

        public static Location fixed​(float x,
                                     float y)
      • left

        public static Location left​(Canvas canvas,
                                    float x,
                                    float y)
      • right

        public static Location right​(Canvas canvas,
                                     float x,
                                     float y)
      • top

        public static Location top​(Canvas canvas,
                                   float x,
                                   float y)
      • bottom

        public static Location bottom​(Canvas canvas,
                                      float x,
                                      float y)
      • bottomCenter

        public static Location bottomCenter​(Canvas canvas,
                                            float y)
      • bottomRight

        public static Location bottomRight​(Canvas canvas,
                                           float x,
                                           float y)