Oracle UIX API Reference
Release 2.1.22.0.0
B12196-01

oracle.cabo.style
Class BaseStyle

java.lang.Object
  |
  +--oracle.cabo.style.BaseStyle
All Implemented Interfaces:
Style
Direct Known Subclasses:
CSSStyle

public abstract class BaseStyle
extends java.lang.Object
implements Style

Base class for Style implementations


Fields inherited from interface oracle.cabo.style.Style
BACKGROUND_KEY, BOLD_FONT_WEIGHT, FONT_FAMILIES_KEY, FONT_SIZE_KEY, FONT_STYLE_KEY, FONT_WEIGHT_KEY, FOREGROUND_KEY, ITALIC_FONT_STYLE, PLAIN_FONT_STYLE, PLAIN_FONT_WEIGHT, TEXT_ANTIALIAS_KEY
 
Constructor Summary
BaseStyle()
          Creates an empty BaseStyle.
BaseStyle(java.util.Dictionary properties)
          Creates a BaseStyle with the specified properties
BaseStyle(Style style)
          Creates a BaseStyle from an arbitrary 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.
protected abstract  java.lang.Object parseProperty(java.lang.Object key)
          Parses the property for the specified key.
 void setProperty(java.lang.String name, java.lang.String value)
          Sets the specified property value.
abstract  java.lang.String toInlineString()
          Converts the style to a String suitable for use as an inline style attribute value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BaseStyle

public BaseStyle()
Creates an empty BaseStyle.

BaseStyle

public BaseStyle(java.util.Dictionary properties)
Creates a BaseStyle with the specified properties
Parameters:
properties - The properties of this style. The values must be Strings.

BaseStyle

public BaseStyle(Style style)
Creates a BaseStyle from an arbitrary Style object.
Method Detail

getPropertyNames

public java.util.Enumeration getPropertyNames()
Returns the names of the properties defined by this style.

The property names can be any valid property name.

Specified by:
getPropertyNames in interface Style

getProperty

public java.lang.String getProperty(java.lang.String name)
Returns the value of the property with the specified name.
Specified by:
getProperty in interface Style

getParsedProperty

public java.lang.Object getParsedProperty(ParsedPropertyKey key)
                                   throws PropertyParseException
Returns a parsed Java object corresponding to the specified property key.
Specified by:
getParsedProperty in interface Style
Following copied from interface: oracle.cabo.style.Style
Parameters:
One - of the KEY constants (eg. FONT_SIZE_KEY, BACKGROUND_KEY, etc...) defined by the Style interface.
Throws:
PropertyParseException - Thrown if the property value can not be parsed.

setProperty

public void setProperty(java.lang.String name,
                        java.lang.String value)
Sets the specified property value.

toInlineString

public abstract java.lang.String toInlineString()
Converts the style to a String suitable for use as an inline style attribute value.
Specified by:
toInlineString in interface Style

parseProperty

protected abstract java.lang.Object parseProperty(java.lang.Object key)
                                           throws PropertyParseException
Parses the property for the specified key. Subclasses should implement this method to perform style sheet language-specific parsing.

Oracle UIX API Reference
Release 2.1.22.0.0
B12196-01

Copyright © 2002,2003, Oracle. All Rights Reserved.