Class StyleParser.BoxInfo

java.lang.Object
com.codename1.ui.plaf.StyleParser.BoxInfo
Direct Known Subclasses:
StyleParser.MarginInfo, StyleParser.PaddingInfo
Enclosing class:
StyleParser

public static class StyleParser.BoxInfo extends Object
Base class for style values that consist of 4 scalar values, such as padding and margin.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates a new box with the specified scalar values.
  • Method Summary

    Modifier and Type
    Method
    Description
    getValue(int side)
    Gets a value for a side.
    Gets the scalar values of this box as a 4-element array.
    void
    Sets the scalar values of this box as a 4-element array.
    Returns string of values in format.
    toString(int side)
    Returns the string representation of one of the sides of the box.

    Methods inherited from class Object

    clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    Modifier and Type
    Method
    Description
    protected Object
     
    boolean
    Indicates whether some other object is "equal to" this one.
    final Class
    Returns the runtime class of an object.
    int
    Returns a hash code value for the object.
    final void
    Wakes up a single thread that is waiting on this object's monitor.
    final void
    Wakes up all threads that are waiting on this object's monitor.
    final void
    Causes current thread to wait until another thread invokes the method or the method for this object.
    final void
    wait(long timeout)
    Causes current thread to wait until either another thread invokes the method or the method for this object, or a specified amount of time has elapsed.
    final void
    wait(long timeout, int nanos)
    Causes current thread to wait until another thread invokes the method or the method for this object, or some other thread interrupts the current thread, or a certain amount of real time has elapsed.
  • Field Details

  • Constructor Details

    • BoxInfo

      public BoxInfo(StyleParser.ScalarValue[] values)

      Creates a new box with the specified scalar values.

      Parameters
      • values: A 4-element array of scalar values.
  • Method Details

    • toString

      public String toString()
      Returns string of values in format.
      Overrides:
      toString in class Object
    • toString

      public String toString(int side)

      Returns the string representation of one of the sides of the box.

      Parameters
      • side: One of Component#TOP, Component#RIGHT, Component#BOTTOM, Component#LEFT.
    • getValues

      public StyleParser.ScalarValue[] getValues()
      Gets the scalar values of this box as a 4-element array.
    • setValues

      public void setValues(StyleParser.ScalarValue[] values)

      Sets the scalar values of this box as a 4-element array.

      Parameters
      • values
    • getValue

      public StyleParser.ScalarValue getValue(int side)

      Gets a value for a side.

      Parameters
      • side: One of Component#TOP, Component#RIGHT, Component#BOTTOM, Component#LEFT.
      Returns

      The value portion of the scalar value.