fi.hut.tml.xsmiles.csslayout
Class StyleGenerator
java.lang.Object
fi.hut.tml.xsmiles.csslayout.StyleGenerator
- public class StyleGenerator
- extends java.lang.Object
- Author:
- alessandro
|
Constructor Summary |
StyleGenerator()
Creates a new instance of styleGenerator |
|
Method Summary |
static void |
clearCaches()
|
static java.awt.Font |
getCSSFontObj(org.w3c.dom.css.CSSStyleDeclaration dec)
|
static java.awt.Font |
getCSSFontObj(org.w3c.dom.css.CSSStyleDeclaration dec,
double zoom)
|
static int |
getFontSize(org.w3c.dom.css.CSSValue sizeValue)
|
static java.lang.String |
getFontStyle(org.w3c.dom.css.CSSValue styleValue)
|
static int |
getFontWeight(org.w3c.dom.css.CSSValue weightValue)
|
static int |
getImageSize(int orig)
|
static int |
getMeasure(org.w3c.dom.css.CSSStyleDeclaration style,
java.lang.String what)
|
static int |
getMeasure(org.w3c.dom.css.CSSValue v)
|
static int |
getScaledSize(int orig)
|
static java.lang.String |
getStringValue(org.w3c.dom.css.CSSStyleDeclaration style,
java.lang.String what)
|
static java.awt.Color |
getTransparentColor()
|
static double |
getZoom()
|
static boolean |
isPercentageValue(org.w3c.dom.css.CSSStyleDeclaration style,
java.lang.String property)
|
static boolean |
isTransparent(java.awt.Color color)
|
static java.awt.Color |
parseColor(org.w3c.dom.css.CSSValue value)
|
static java.awt.Color |
parseColor(org.w3c.dom.css.CSSValue value,
java.awt.Color defaultColor)
|
static java.awt.Font |
setFontFamily(java.awt.Font f,
org.w3c.dom.css.CSSStyleDeclaration d)
|
static java.awt.Font |
setFontSize(java.awt.Font f,
org.w3c.dom.css.CSSStyleDeclaration d)
|
static java.awt.Font |
setFontSize(java.awt.Font f,
org.w3c.dom.css.CSSStyleDeclaration d,
double zoom)
|
static java.awt.Font |
setFontStyle(java.awt.Font f,
org.w3c.dom.css.CSSStyleDeclaration d)
|
static java.awt.Font |
setFontWeight(java.awt.Font f,
org.w3c.dom.css.CSSStyleDeclaration d)
|
static void |
setFontZoom(double zoom)
to set the zoom, for instance by the UI |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ATTRIBUTE_FONT_FAMILY
public static final java.lang.String ATTRIBUTE_FONT_FAMILY
- See Also:
- Constant Field Values
DEFAULT_FONT_STR
public static final java.lang.String DEFAULT_FONT_STR
- See Also:
- Constant Field Values
DEFAULT_FONT_SIZE
public static final int DEFAULT_FONT_SIZE
- See Also:
- Constant Field Values
DEFAULT_FONT_WEIGHT
public static final int DEFAULT_FONT_WEIGHT
- See Also:
- Constant Field Values
DEFAULT_FONT_STYLE
public static final java.lang.String DEFAULT_FONT_STYLE
- See Also:
- Constant Field Values
DEFAULT_FONT
public static final java.awt.Font DEFAULT_FONT
transparentColor
public static java.awt.Color transparentColor
StyleGenerator
public StyleGenerator()
- Creates a new instance of styleGenerator
clearCaches
public static void clearCaches()
setFontZoom
public static void setFontZoom(double zoom)
- to set the zoom, for instance by the UI
getZoom
public static double getZoom()
getCSSFontObj
public static java.awt.Font getCSSFontObj(org.w3c.dom.css.CSSStyleDeclaration dec)
getCSSFontObj
public static java.awt.Font getCSSFontObj(org.w3c.dom.css.CSSStyleDeclaration dec,
double zoom)
setFontFamily
public static java.awt.Font setFontFamily(java.awt.Font f,
org.w3c.dom.css.CSSStyleDeclaration d)
setFontSize
public static java.awt.Font setFontSize(java.awt.Font f,
org.w3c.dom.css.CSSStyleDeclaration d)
setFontSize
public static java.awt.Font setFontSize(java.awt.Font f,
org.w3c.dom.css.CSSStyleDeclaration d,
double zoom)
setFontWeight
public static java.awt.Font setFontWeight(java.awt.Font f,
org.w3c.dom.css.CSSStyleDeclaration d)
setFontStyle
public static java.awt.Font setFontStyle(java.awt.Font f,
org.w3c.dom.css.CSSStyleDeclaration d)
getFontSize
public static int getFontSize(org.w3c.dom.css.CSSValue sizeValue)
getFontWeight
public static int getFontWeight(org.w3c.dom.css.CSSValue weightValue)
getFontStyle
public static java.lang.String getFontStyle(org.w3c.dom.css.CSSValue styleValue)
parseColor
public static java.awt.Color parseColor(org.w3c.dom.css.CSSValue value,
java.awt.Color defaultColor)
isTransparent
public static boolean isTransparent(java.awt.Color color)
getTransparentColor
public static java.awt.Color getTransparentColor()
parseColor
public static java.awt.Color parseColor(org.w3c.dom.css.CSSValue value)
getStringValue
public static java.lang.String getStringValue(org.w3c.dom.css.CSSStyleDeclaration style,
java.lang.String what)
getMeasure
public static int getMeasure(org.w3c.dom.css.CSSValue v)
getMeasure
public static int getMeasure(org.w3c.dom.css.CSSStyleDeclaration style,
java.lang.String what)
getImageSize
public static int getImageSize(int orig)
getScaledSize
public static int getScaledSize(int orig)
isPercentageValue
public static boolean isPercentageValue(org.w3c.dom.css.CSSStyleDeclaration style,
java.lang.String property)
X-Smiles 1.2