Oracle UIX API Reference
Release 2.1.22.0.0
B12196-01

oracle.cabo.style.util
Class NameUtils

java.lang.Object
  |
  +--oracle.cabo.style.util.NameUtils

public class NameUtils
extends java.lang.Object

Utilities for converting between variant names and ids


Method Summary
static int getBrowser(java.lang.String browserName)
          Returns the id of the browser with the specified name
static java.lang.String getBrowserName(int browser)
          Returns the name of the specified browser id
static java.lang.String getContextName(StyleContext context)
          Returns name for the specified context, suitable for inclusion in a file name.
static java.lang.String getContextName(StyleContext context, StyleSheetDocument document)
          Returns name for the specified context, based on the actual matching style sheets in the document.
static int getDirection(java.lang.String directionName)
          Returns the direction value for the specified name.
static java.lang.String getDirectionName(int direction)
          Returns the name of the specified direction
static int getPlatform(java.lang.String platformName)
          Returns the platform with the specified name
static java.lang.String getPlatformName(int platform)
          Returns the name of the specified platform
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getBrowser

public static int getBrowser(java.lang.String browserName)
Returns the id of the browser with the specified name

getBrowserName

public static java.lang.String getBrowserName(int browser)
Returns the name of the specified browser id

getDirection

public static int getDirection(java.lang.String directionName)
Returns the direction value for the specified name.

getDirectionName

public static java.lang.String getDirectionName(int direction)
Returns the name of the specified direction

getPlatform

public static int getPlatform(java.lang.String platformName)
Returns the platform with the specified name

getPlatformName

public static java.lang.String getPlatformName(int platform)
Returns the name of the specified platform

getContextName

public static java.lang.String getContextName(StyleContext context)
Returns name for the specified context, suitable for inclusion in a file name.

This utility method generates the context-specific portion of a style sheet file name. It combines that locale, direction, agent and color scheme information provided by the context, and returns a name which can be embedded in a file name - eg. "en_US-ltr-ie-4-windows-red".

Parameters:
context - The context for which a name is generated.

getContextName

public static java.lang.String getContextName(StyleContext context,
                                              StyleSheetDocument document)
Returns name for the specified context, based on the actual matching style sheets in the document.

Like getContextName(StyleContext), this utility method generates the context-specific portion of a style sheet file name. However, getContextName(StyleContext) always returns a fully specified name. This version of getContextName() returns a partially specified name - only those variants which match the underlying style sheets are included in the returned name.

So, where getContextName(StyleContext) might return a name with placeholders for unknown variants, eg:

styles-en_US-ie-0-0-0-default.css

This method would return the partially specified name:

styles-en_US-ie-default.css

Parameters:
context - The context for which a name is generated.

Oracle UIX API Reference
Release 2.1.22.0.0
B12196-01

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