Package com.privatejgoodies.forms.layout
Class ConstantSize.Unit
- java.lang.Object
-
- com.privatejgoodies.forms.layout.ConstantSize.Unit
-
- All Implemented Interfaces:
java.io.Serializable
- Enclosing class:
- ConstantSize
public static final class ConstantSize.Unit extends java.lang.Object implements java.io.Serializable
An ordinal-based serializable typesafe enumeration for units as used in instances ofConstantSize
.- See Also:
- Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
abbreviation()
Returns the first character of this Unit's name.java.lang.String
encode()
Returns a parseable string representation of this unit.java.lang.String
toString()
Returns a string representation of this unit object.
-
-
-
Method Detail
-
toString
public java.lang.String toString()
Returns a string representation of this unit object. Note: This implementation may change at any time. It is intended for debugging purposes. For parsing, useencode()
instead.- Overrides:
toString
in classjava.lang.Object
- Returns:
- a string representation of the constant size
-
encode
public java.lang.String encode()
Returns a parseable string representation of this unit.- Returns:
- a String that can be parsed by the Forms parser
- Since:
- 1.2
-
abbreviation
public java.lang.String abbreviation()
Returns the first character of this Unit's name. Used to identify it in short format strings.- Returns:
- the first character of this Unit's name.
-
-