Class Scale9.Axis

java.lang.Object
tripleplay.ui.util.Scale9.Axis
Enclosing class:
Scale9

public static class Scale9.Axis extends Object
A horizontal or vertical axis, broken up into 3 chunks.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Axis(float length)
    Creates a new axis equally splitting the given length.
    Axis(float length, Scale9.Axis src)
    Creates a new axis with the given total length and 0th and 2nd lengths copied from a source axis.
  • Method Summary

    Modifier and Type
    Method
    Description
    float
    coord(int idx)
    Returns the coordinate of the given chunk, 0 - 2.
    resize(int idx, float size)
    Sets the size of the given chunk, shifting neighbors.
    set(int idx, float coord, float size)
    Sets the size and location of the given chunk, 0 - 2.
    float
    size(int idx)
    Returns the size of the given chunk, 0 - 2.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Axis

      public Axis(float length)
      Creates a new axis equally splitting the given length.
    • Axis

      public Axis(float length, Scale9.Axis src)
      Creates a new axis with the given total length and 0th and 2nd lengths copied from a source axis.
  • Method Details

    • coord

      public float coord(int idx)
      Returns the coordinate of the given chunk, 0 - 2.
    • size

      public float size(int idx)
      Returns the size of the given chunk, 0 - 2.
    • set

      public Scale9.Axis set(int idx, float coord, float size)
      Sets the size and location of the given chunk, 0 - 2.
    • resize

      public Scale9.Axis resize(int idx, float size)
      Sets the size of the given chunk, shifting neighbors.