public static class StyleParser.BoxInfo
- Object
- StyleParser.BoxInfo
Known subtypesStyleParser.MarginInfo, StyleParser.PaddingInfo
Base class for style values that consist of 4 scalar values, such as padding and margin.
Fields
protected StyleParser.ScalarValue[] values |
Constructors
public BoxInfo(StyleParser.ScalarValue[] values) | Creates a new box with the specified scalar values. |
Methods
public String toString() | Returns string of values in format. |
public String toString(int side) | Returns the string representation of one of the sides of the box. |
public StyleParser.ScalarValue[] getValues() | Gets the scalar values of this box as a 4-element array. |
public void setValues(StyleParser.ScalarValue[] values) | Sets the scalar values of this box as a 4-element array. |
public StyleParser.ScalarValue getValue(int side) | Gets a value for a side. |
Inherited methods
Field details
values
protected StyleParser.ScalarValue[] valuesConstructor details
BoxInfo
public BoxInfo(StyleParser.ScalarValue[] values)Creates a new box with the specified scalar values.
Parameters
valuesStyleParser.ScalarValue[]- A 4-element array of scalar values.
Method details
toString
public String toString()Returns string of values in format.
toString
public String toString(int side)Returns the string representation of one of the sides of the box.
Parameters
sideint- 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.
getValue
public StyleParser.ScalarValue getValue(int side)Gets a value for a side.
Parameters
sideint- One of
Component#TOP,Component#RIGHT,Component#BOTTOM,Component#LEFT.
Returns
The value portion of the scalar value.