|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sourceforge.jeuclid.elements.support.attributes.AttributesHelper
public final class AttributesHelper
Class contains utility methods for working with elements attributes.
Field Summary | |
---|---|
static String |
COLOR_TRANSPARENT
Constant for "Transparent" color. |
static String |
INFINITY
Infinity. |
static String |
MEDIUMMATHSPACE
Width of mediummath space according to 3.3.4.2. |
static String |
PT
Unit for pt. |
static String |
THICKMATHSPACE
Width of tickmath space according to 3.3.4.2. |
static String |
THINMATHSPACE
Width of thinmath space according to 3.3.4.2. |
static String |
VERYTHICKMATHSPACE
Width of verytickmath space according to 3.3.4.2. |
static String |
VERYTHINMATHSPACE
Width of verythinmath space according to 3.3.4.2. |
static String |
VERYVERYTHICKMATHSPACE
Width of veryverytickmath space according to 3.3.4.2. |
static String |
VERYVERYTHINMATHSPACE
Width of veryverythinmath space according to 3.3.4.2. |
Method Summary | |
---|---|
static String |
colorTOsRGBString(Color color)
Creates a re-parsable string representation of the given color. |
static float |
convertSizeToPt(String sizeString,
LayoutContext context,
String defaultUnit)
Translates size into pt. |
static float |
parseRelativeSize(String sizeString,
LayoutContext context,
float relativeTo)
Parse a size that is relative to a given size. |
static Color |
stringToColor(String value,
Color defaultValue)
Creates a color from a given string. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String COLOR_TRANSPARENT
public static final String VERYVERYTHINMATHSPACE
public static final String VERYTHINMATHSPACE
public static final String THINMATHSPACE
public static final String MEDIUMMATHSPACE
public static final String THICKMATHSPACE
public static final String VERYTHICKMATHSPACE
public static final String VERYVERYTHICKMATHSPACE
public static final String PT
public static final String INFINITY
Method Detail |
---|
public static float parseRelativeSize(String sizeString, LayoutContext context, float relativeTo)
sizeString
- sizeString to parsecontext
- Context to use to calculate for absolute sizes.relativeTo
- This size is relative to the given size (must be in pt).
public static float convertSizeToPt(String sizeString, LayoutContext context, String defaultUnit)
sizeString
- string to convertcontext
- LayoutContext this size is relative to. This is usually the
context of the parent or the element itself.defaultUnit
- default Unit to use in this context. May be px, pt, em, etc.
public static Color stringToColor(String value, Color defaultValue)
This function supports a wide variety of inputs.
value
- the string to parse.defaultValue
- a default color to use in case of failure.
public static String colorTOsRGBString(Color color)
First, the color will be converted into the sRGB colorspace. It will then be printed as #rrggbb, or as #rrrggbbaa if an alpha value is present.
color
- the color to represent.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |