UIX 2.2.16

oracle.cabo.ui.laf
Class LookAndFeel

java.lang.Object
  |
  +--oracle.cabo.ui.laf.LookAndFeel
Direct Known Subclasses:
LookAndFeelExtension

public abstract class LookAndFeel
extends java.lang.Object

Defines the components which are used to implement a particular look and feel (for example, the Browser Look And Feel). The LookAndFeel can vary on a per-request basis, to allow rendering to vary based on the target Agent or a user preference.

See Also:
LookAndFeelManager, RenderingContext.getLookAndFeel()

Constructor Summary
LookAndFeel()
           
 
Method Summary
 Agent getAgent(Agent baseAgent, java.lang.String facet)
          Modifies the agent to account for a facet, if necessary.
 java.lang.String getBundleName(java.lang.String namespace)
          Returns the name of the ResourceBundle that has been registered for the specified namespace.
abstract  java.lang.String getContentType(java.lang.String[] acceptedTypes)
          Returns the content type.
 java.lang.String getFamily()
          Returns the name of the look and feel "family" for this look and feel.
 Icon getIcon(java.lang.String namespace, java.lang.String iconName)
          Returns an Icon object that can be used to produce an icon URI for the icon identified with the specified name.
 java.lang.String getId()
          Returns an string identifier which uniquely identies this LookAndFeel implementation.
abstract  ImageTypeManager getImageTypeManager()
          Returns the ImageTypeManager for this LookAndFeel.
abstract  OutputMethod getOutputMethod(java.io.PrintWriter outWriter, java.io.OutputStream stream, java.lang.String contentType, java.lang.String characterEncoding, ErrorLog log)
          Returns the output method that should be used for this look-and-feel.
 java.lang.Object getProperty(java.lang.Object key)
          Retrieves a property that was set via a call to setProperty().
abstract  RendererManager getRendererManager()
          Returns the default RendererManager for this LookAndFeel.
 RendererManager getRendererManager(java.lang.String facet)
          Returns the RendererManager for a particular facet of this LookAndFeel.
 StyleSheetDocument getStyleSheetDocument(StyleContext context)
          Returns the StyleSheetDocument object which defines all of the styles for this LookAndFeel, including any styles that are contributed by UIExtensions.
abstract  java.lang.String getStyleSheetName()
          Returns the name of the XSS style sheet for this LookAndFeel.
 java.util.Enumeration getSupportedFacets()
          Returns an enumeration of all supported facets.
 java.lang.String getTranslatedString(LocaleContext lContext, java.lang.String key)
          Returns a translated String in the LocaleContext's translation Locale.
 java.lang.Object getTranslatedValue(LocaleContext lContext, java.lang.String key)
          Returns a translated value in the LocaleContext's translation Locale.
 java.lang.Object getTranslatedValue(LocaleContext lContext, java.lang.String namespace, java.lang.String key)
          Returns a translated value in the LocaleContext's translation Locale.
 void registerBundle(java.lang.String namespace, java.lang.String bundleName)
          Registers a ResourceBundle to be used for obtaining translations for the specified component namespace.
 void registerIcon(java.lang.String namespace, java.lang.String iconName, Icon icon)
          Registers an Icon for the specified namespace/icon name.
 void registerStyleSheet(java.lang.String namespace, java.lang.String styleSheetName)
          Registers a style sheet which defines UIExtension-specific styles.
 void setProperty(java.lang.Object key, java.lang.Object value)
          Sets a value for the specified property key.
 boolean supportsFacet(java.lang.String facet)
          Returns true if a given facet is supported.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LookAndFeel

public LookAndFeel()
Method Detail

getId

public java.lang.String getId()
Returns an string identifier which uniquely identies this LookAndFeel implementation. LookAndFeel implementations can be retrieved by id via LookAndFeelManager.getLookAndFeelById().
See Also:
LookAndFeelManager.getLookAndFeelById(java.lang.String)

getFamily

public java.lang.String getFamily()
Returns the name of the look and feel "family" for this look and feel. The family name is used when specifying a preferred look and feel. This provides a way to refer to a group of related look and feel implementations while allowing the particular look and feel instance to be selected based on the current agent.

getRendererManager

public abstract RendererManager getRendererManager()
Returns the default RendererManager for this LookAndFeel.
See Also:
RendererManager

getRendererManager

public RendererManager getRendererManager(java.lang.String facet)
Returns the RendererManager for a particular facet of this LookAndFeel. By default, all LookAndFeels support only UIConstants.FACET_DEFAULT; if the requested facet is not found, this default facet will be used instead.
See Also:
RendererManager, supportsFacet(java.lang.String)

getAgent

public Agent getAgent(Agent baseAgent,
                      java.lang.String facet)
Modifies the agent to account for a facet, if necessary.

getSupportedFacets

public java.util.Enumeration getSupportedFacets()
Returns an enumeration of all supported facets. This must be a non-empty enumeration, and must always include at least UIConstants.FACET_DEFAULT.
See Also:
supportsFacet(java.lang.String)

supportsFacet

public boolean supportsFacet(java.lang.String facet)
Returns true if a given facet is supported.
See Also:
getSupportedFacets()

getImageTypeManager

public abstract ImageTypeManager getImageTypeManager()
Returns the ImageTypeManager for this LookAndFeel.
See Also:
ImageTypeManager

getStyleSheetName

public abstract java.lang.String getStyleSheetName()
Returns the name of the XSS style sheet for this LookAndFeel.

getTranslatedString

public java.lang.String getTranslatedString(LocaleContext lContext,
                                            java.lang.String key)
                                     throws java.util.MissingResourceException
Returns a translated String in the LocaleContext's translation Locale.

getTranslatedValue

public java.lang.Object getTranslatedValue(LocaleContext lContext,
                                           java.lang.String key)
                                    throws java.util.MissingResourceException
Returns a translated value in the LocaleContext's translation Locale. This value may or may not be a String, and developers should avoid calling toString() unless absolutely necessary.

getContentType

public abstract java.lang.String getContentType(java.lang.String[] acceptedTypes)
Returns the content type. If no acceptable type can be found, the default type preferred by this look-and-feel will be used.
Parameters:
acceptedTypes - the list of accepted types identified by the agent. This parameter may be null.

getOutputMethod

public abstract OutputMethod getOutputMethod(java.io.PrintWriter outWriter,
                                             java.io.OutputStream stream,
                                             java.lang.String contentType,
                                             java.lang.String characterEncoding,
                                             ErrorLog log)
                                      throws java.io.IOException
Returns the output method that should be used for this look-and-feel.

getTranslatedValue

public java.lang.Object getTranslatedValue(LocaleContext lContext,
                                           java.lang.String namespace,
                                           java.lang.String key)
                                    throws java.util.MissingResourceException
Returns a translated value in the LocaleContext's translation Locale. This value may or may not be a String, and developers should avoid calling toString() unless absolutely necessary.
Parameters:
lContext - The LocaleContext which provides the translation Locale
namespace - The namespace of the UIExtension which provides the translation
key - The key of the translation to retrieve.

getBundleName

public java.lang.String getBundleName(java.lang.String namespace)
Returns the name of the ResourceBundle that has been registered for the specified namespace.
Parameters:
namespace - The namespace of a UIExtension which has registered a bundle with this LookAndFeel.
See Also:
registerBundle(java.lang.String, java.lang.String)

registerBundle

public void registerBundle(java.lang.String namespace,
                           java.lang.String bundleName)
Registers a ResourceBundle to be used for obtaining translations for the specified component namespace. UIExtensions that want to allow their translations to be customized should call this method to register the UIExtension bundle with the LookAndFeel.
Parameters:
namespace - The namespace of the UIExtension which provides this bundle.
bundleName - The fully-qualified class name of the bundle.

getIcon

public Icon getIcon(java.lang.String namespace,
                    java.lang.String iconName)
Returns an Icon object that can be used to produce an icon URI for the icon identified with the specified name.
Parameters:
namespace - The namespace of the component/UIExtension which provides the icon.
iconName - The name of the icon to retrieve

registerIcon

public void registerIcon(java.lang.String namespace,
                         java.lang.String iconName,
                         Icon icon)
Registers an Icon for the specified namespace/icon name.
Parameters:
namespace - The namespace of the icon.
iconName - The name of the icon.
icon - The Icon to register.

registerStyleSheet

public void registerStyleSheet(java.lang.String namespace,
                               java.lang.String styleSheetName)
Registers a style sheet which defines UIExtension-specific styles. The styles specified by this style sheet will be merged with the LookAndFeel's own styles. The full set of styles can be obtained by calling getStyleSheetDocument().
Parameters:
namespace - The namespace of the UIExtension which provides this style sheet.
styleSheetName - The name of the style sheet which defines the UIExtension's styles. This style sheet should be installed under the directory specified by Configuration.STYLES_DIRECTORY path.
See Also:
getStyleSheetDocument(oracle.cabo.style.StyleContext)

getStyleSheetDocument

public StyleSheetDocument getStyleSheetDocument(StyleContext context)
Returns the StyleSheetDocument object which defines all of the styles for this LookAndFeel, including any styles that are contributed by UIExtensions.

getProperty

public java.lang.Object getProperty(java.lang.Object key)
Retrieves a property that was set via a call to setProperty(). Some Renderer implementations may store properties on the LookAndFeel instance to avoid having to re-compute LookAndFeel-specific values on each render.

setProperty

public void setProperty(java.lang.Object key,
                        java.lang.Object value)
Sets a value for the specified property key.

UIX 2.2.16