UIX 2.2.16

oracle.cabo.ui.laf.icon
Class BaseImageIcon

java.lang.Object
  |
  +--oracle.cabo.ui.laf.icon.Icon
        |
        +--oracle.cabo.ui.laf.icon.BaseImageIcon
Direct Known Subclasses:
ConfigImageIcon, ContextImageIcon, ResourceImageIcon, URIImageIcon

public abstract class BaseImageIcon
extends Icon

A base class for ImageIcon implementations. The base class produces the full image URI by combining a subclass-specific base URI with an image URI that is specified when the BaseImageIcon instance is created. This allows subclasses to implement different strategies for determining the base image URI - eg. ContextImageIcon uses the servlet context path, ConfigImageIcon uses the Configuration.IMAGES_DIRECTORY URI. Subclasses must implement the getBaseURI() method, which provides the base URI to prepend to the image URI.


Constructor Summary
BaseImageIcon(java.lang.String uri, java.lang.String rtlURI, java.lang.Integer width, java.lang.Integer height, java.lang.String styleClass, Style inlineStyle)
          Creates an image Icon which has a different image URI depending on the reading direction.
 
Method Summary
protected abstract  java.lang.String getBaseURI(RenderingContext context)
          Returns the base URI to prepend to the icon name.
 java.lang.Integer getImageHeight(RenderingContext context)
          Implementation of ImageIcon.getImageHeight().
 java.lang.Object getImageURI(RenderingContext context)
          Implementation of ImageIcon.getImageURI().
 java.lang.Integer getImageWidth(RenderingContext context)
          Implementation of ImageIcon.getImageWidth().
protected  java.lang.String getRelativeURI(RenderingContext context)
          Returns the URI of the image relative to the base URI.
 void renderIcon(RenderingContext context, AttributeMap attrs)
          Implementation of Icon.renderIcon().
 
Methods inherited from class oracle.cabo.ui.laf.icon.Icon
getImageData
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BaseImageIcon

public BaseImageIcon(java.lang.String uri,
                     java.lang.String rtlURI,
                     java.lang.Integer width,
                     java.lang.Integer height,
                     java.lang.String styleClass,
                     Style inlineStyle)
Creates an image Icon which has a different image URI depending on the reading direction.
Parameters:
uri - The URI to the image to use when the reading direction is left-to-right.
rtlURI - The URI to the image to use when the reading direction is right-to-left.
width - The width of the image
width - The height of the image
styleClass - The style class for the image
inlineStyle - The inline style for the image
Method Detail

getImageURI

public java.lang.Object getImageURI(RenderingContext context)
Implementation of ImageIcon.getImageURI().
Overrides:
getImageURI in class Icon
Following copied from class: oracle.cabo.ui.laf.icon.Icon
Parameters:
RenderingContext - context The RenderingContext for the current request.

getImageWidth

public java.lang.Integer getImageWidth(RenderingContext context)
Implementation of ImageIcon.getImageWidth().
Overrides:
getImageWidth in class Icon
Following copied from class: oracle.cabo.ui.laf.icon.Icon
Parameters:
RenderingContext - context The RenderingContext for the current request.

getImageHeight

public java.lang.Integer getImageHeight(RenderingContext context)
Implementation of ImageIcon.getImageHeight().
Overrides:
getImageHeight in class Icon
Following copied from class: oracle.cabo.ui.laf.icon.Icon
Parameters:
RenderingContext - context The RenderingContext for the current request.

renderIcon

public void renderIcon(RenderingContext context,
                       AttributeMap attrs)
                throws java.io.IOException
Implementation of Icon.renderIcon().
Overrides:
renderIcon in class Icon
Following copied from class: oracle.cabo.ui.laf.icon.Icon
Parameters:
context - The RenderingContext for the current request.
attrs - An AttributeMap which which provides access to attribute values that might be useful to Icon implementations, such as ID_ATTR and SHORT_DESC_ATTR. Note that Icons are not allowed to modify values in the AttributeMap. Calling AttributeMap.setAttribute() will result in an UnsupportedOperationException.

getBaseURI

protected abstract java.lang.String getBaseURI(RenderingContext context)
Returns the base URI to prepend to the icon name. This base URI must be terminated with a trailing URI separator ('/').

getRelativeURI

protected java.lang.String getRelativeURI(RenderingContext context)
Returns the URI of the image relative to the base URI.

UIX 2.2.16