| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sourceforge.jeuclid.elements.support.attributes.AttributesHelper
public final class AttributesHelper
Class contains utility methods for working with elements attributes.
| Field Summary | |
|---|---|
| static String | COLOR_TRANSPARENTConstant for "Transparent" color. | 
| static String | INFINITYInfinity. | 
| static String | MEDIUMMATHSPACEWidth of mediummath space according to 3.3.4.2. | 
| static String | PTUnit for pt. | 
| static String | THICKMATHSPACEWidth of tickmath space according to 3.3.4.2. | 
| static String | THINMATHSPACEWidth of thinmath space according to 3.3.4.2. | 
| static String | VERYTHICKMATHSPACEWidth of verytickmath space according to 3.3.4.2. | 
| static String | VERYTHINMATHSPACEWidth of verythinmath space according to 3.3.4.2. | 
| static String | VERYVERYTHICKMATHSPACEWidth of veryverytickmath space according to 3.3.4.2. | 
| static String | VERYVERYTHINMATHSPACEWidth 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 | |||||||||