|
Oracle UIX API Reference Release 2.1.22.0.0 B12196-01 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A Style object defines a set of visual (or aural) style properties. The Style interface exposes two method for retrieving properties: getProperty() and getParsedProperty(). getProperty() takes a String property name and returns a String property value. getParsedProperty() takes a key object (eg. FONT_WEIGHT_KEY) and returns the parsed, typed, Java object which represents the property value. The type of the returned object is key-specific, eg. for FONT_WEIGHT_KEY, an java.lang.Integer is returned. For BACKGROUND_KEY, a java.awt.Color is returned.
Field Summary | |
static ParsedPropertyKey |
BACKGROUND_KEY
Key for obtaining the Color object which corresponds to the style's "background-color" property. |
static java.lang.Object |
BOLD_FONT_WEIGHT
Constant for bold font weight. |
static ParsedPropertyKey |
FONT_FAMILIES_KEY
Key for obtaining the list of font family names for this style. |
static ParsedPropertyKey |
FONT_SIZE_KEY
This key is passed to Style.parseProperty() to obtain the font size for a Style. |
static ParsedPropertyKey |
FONT_STYLE_KEY
This key is passed to Style.parseProperty() to obtain the font style for a Style. |
static ParsedPropertyKey |
FONT_WEIGHT_KEY
This key is passed to Style.parseProperty() to obtain the font weight for a Style. |
static ParsedPropertyKey |
FOREGROUND_KEY
Key for obtaining the Color object which corresponds to the style's "color" property. |
static java.lang.Object |
ITALIC_FONT_STYLE
Constant for italic font style. |
static java.lang.Object |
PLAIN_FONT_STYLE
Constant for plain font style. |
static java.lang.Object |
PLAIN_FONT_WEIGHT
Constant for plain font weight. |
static ParsedPropertyKey |
TEXT_ANTIALIAS_KEY
This key is passed to Style.parseProperty() to obtain the text antialias style for a Style object. |
Method Summary | |
java.lang.Object |
getParsedProperty(ParsedPropertyKey key)
Returns a parsed Java object corresponding to the specified property key. |
java.lang.String |
getProperty(java.lang.String name)
Returns the value of the property with the specified name. |
java.util.Enumeration |
getPropertyNames()
Returns the names of the properties defined by this style. |
java.lang.String |
toInlineString()
Converts the style to a String suitable for use as an inline style attribute value. |
Field Detail |
public static final ParsedPropertyKey BACKGROUND_KEY
public static final ParsedPropertyKey FOREGROUND_KEY
public static final ParsedPropertyKey FONT_FAMILIES_KEY
public static final ParsedPropertyKey FONT_SIZE_KEY
public static final ParsedPropertyKey FONT_STYLE_KEY
public static final ParsedPropertyKey FONT_WEIGHT_KEY
public static final ParsedPropertyKey TEXT_ANTIALIAS_KEY
public static final java.lang.Object PLAIN_FONT_STYLE
public static final java.lang.Object ITALIC_FONT_STYLE
public static final java.lang.Object PLAIN_FONT_WEIGHT
public static final java.lang.Object BOLD_FONT_WEIGHT
Method Detail |
public java.util.Enumeration getPropertyNames()
public java.lang.String getProperty(java.lang.String name)
public java.lang.Object getParsedProperty(ParsedPropertyKey key) throws PropertyParseException
The type of object returned is dependent on the type of property requested. For example, when the FONT_SIZE_KEY is requested, an java.lang.Integer object is returned. When BACKGROUND_KEY or FOREGROUND_KEY is requested a java.awt.Color is returned. Null is returned if no value is defined for the specified property.
One
- of the KEY constants (eg. FONT_SIZE_KEY, BACKGROUND_KEY,
etc...) defined by the Style interface.PropertyParseException
- Thrown if the property value
can not be parsed.public java.lang.String toInlineString()
|
Oracle UIX API Reference Release 2.1.22.0.0 B12196-01 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |