Oracle UIX API Reference
Release 2.1.22.0.0
B12196-01

oracle.cabo.style
Class UserStyleSheet

java.lang.Object
  |
  +--oracle.cabo.style.UserStyleSheet

public class UserStyleSheet
extends java.lang.Object

The UserStyleSheet is used to specify user-specific style overrides which are merged with the styles defined by a StyleProvider.


Constructor Summary
UserStyleSheet(java.lang.String id, java.util.Dictionary styles, java.util.Dictionary namedStyles)
          Creates a UserStyleSheet.
UserStyleSheet(java.lang.String id, UserStyleSheet styleSheet1, UserStyleSheet styleSheet2)
          Creates a UserStyleSheet by merging styles from two different UserStyleSheets.
 
Method Summary
 boolean equals(java.lang.Object o)
          Tests for equality.
 java.lang.String getID()
          Returns the ID for this UserStyleSheet.
 Style getNamedStyle(java.lang.String name)
          Returns the named Style associated with the specified name.
 java.util.Enumeration getNames()
          Returns an Enumeration of the String names for the named Styles of this UserStyleSheet.
 java.util.Enumeration getSelectors()
          Returns an Enumeration of the String selectors for the Styles of this UserStyleSheet.
 Style getStyle(java.lang.String selector)
          Returns the Style associated with the specified selector.
static UserStyleSheet getUserStyleSheet(StyleContext context)
          Convenience method for retrieving a UserStyleSheet from a StyleContext.
 int hashCode()
          Returns the hash code.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UserStyleSheet

public UserStyleSheet(java.lang.String id,
                      java.util.Dictionary styles,
                      java.util.Dictionary namedStyles)
Creates a UserStyleSheet.
Parameters:
id - A unique string which identifies this UserStyleSheet
styles - A Dictionary of Style objects, hashed by selector
namedStyles - A Dictionary or names Style objects, hashed by name

UserStyleSheet

public UserStyleSheet(java.lang.String id,
                      UserStyleSheet styleSheet1,
                      UserStyleSheet styleSheet2)
Creates a UserStyleSheet by merging styles from two different UserStyleSheets. When styles are defined in both style sheets, the properties in the first style sheet override the same properties in the second style sheet.
Parameters:
id - A unique string which identifies the new UserStyleSheet. If null, a unique name will be formed by concatenating the ids from styleSheet1 and styleSheet2.
styleSheet1 - The first style sheet from which styles should be obtained. Style properties defined in this style sheet take precedence over the same properties defined in styleSheet2.
styleSheet2 - The second style sheet from which styles should be obtained.
Method Detail

getUserStyleSheet

public static UserStyleSheet getUserStyleSheet(StyleContext context)
Convenience method for retrieving a UserStyleSheet from a StyleContext. Returns the StyleConstants.USER_STYLE_SHEET_PROPERTY if it is set. Otherwise, the UserStyleSheet is obtained from the context's Configuration object.

getID

public java.lang.String getID()
Returns the ID for this UserStyleSheet.

getSelectors

public java.util.Enumeration getSelectors()
Returns an Enumeration of the String selectors for the Styles of this UserStyleSheet. The Style object corresponding with each selector can be obtained by calling getStyle().
See Also:
getStyle(java.lang.String)

getNames

public java.util.Enumeration getNames()
Returns an Enumeration of the String names for the named Styles of this UserStyleSheet. The Style object corresponding with each name can be obtained by calling getNamedStyle().
See Also:
getNamedStyle(java.lang.String)

getStyle

public Style getStyle(java.lang.String selector)
Returns the Style associated with the specified selector.

getNamedStyle

public Style getNamedStyle(java.lang.String name)
Returns the named Style associated with the specified name.

equals

public boolean equals(java.lang.Object o)
Tests for equality.
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Returns the hash code.
Overrides:
hashCode in class java.lang.Object

Oracle UIX API Reference
Release 2.1.22.0.0
B12196-01

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