UIX 2.2.15

oracle.cabo.image.laf.browser
Class ButtonImageRenderer

java.lang.Object
  |
  +--oracle.cabo.image.AbstractImageRenderer
        |
        +--oracle.cabo.image.PainterImageRenderer
              |
              +--oracle.cabo.image.laf.browser.ButtonImageRenderer
All Implemented Interfaces:
ImageConstants, java.awt.image.ImageObserver, ImageRenderer

public class ButtonImageRenderer
extends PainterImageRenderer

ButtonImageRenderer is an ImageRenderer implementation which renders button images. The values of the following keys from the ImageConstants interface affect how the button is rendered:


Fields inherited from interface oracle.cabo.image.ImageConstants
ACCESS_KEY_KEY, BACKGROUND_KEY, BORDER_COLOR_KEY, BUTTON_BOTTOM_BACKGROUND_ICON_KEY, BUTTON_END_ICON_KEY, BUTTON_NAME, BUTTON_START_ICON_KEY, BUTTON_TOP_BACKGROUND_ICON_KEY, COLORIZED_ICON_NAME, COMPOSITE_BUTTON_NAME, DARK_ACCENT_COLOR_KEY, DARK_COLOR_KEY, DIRECTION_KEY, DISABLED_BACKGROUND_KEY, DISABLED_FONT_KEY, DISABLED_FOREGROUND_KEY, DISABLED_KEY, ENCODING_TYPE_KEY, END_ROUNDED_KEY, FLIPPED_ICON_NAME, FONT_KEY, FOREGROUND_KEY, GLOBAL_BUTTON_NAME, HEIGHT_RESPONSE_KEY, IMAGE_MAP_AREAS_RESPONSE_KEY, IMAGE_PROVIDER_PROPERTY, IMAGE_TYPE_MANAGER_PROPERTY, LAF_KEY, LOOK_AND_FEEL_ID_KEY, NAME_KEY, SELECTED_BACKGROUND_KEY, SELECTED_FONT_KEY, SELECTED_FOREGROUND_KEY, SELECTED_INDEX_KEY, SELECTED_KEY, SERVLET_URL_PROPERTY, SOURCE_INPUT_STREAM_PROVIDER_KEY, SOURCE_KEY, START_ROUNDED_KEY, SURROUNDING_COLOR_KEY, TAB_BAR_NAME, TABS_KEY, TECATE_NAMESPACE, TEXT_ANTIALIAS_KEY, TEXT_KEY, VERSION_KEY, WIDTH_RESPONSE_KEY

Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH

Constructor Summary
ButtonImageRenderer()

Method Summary
protected PaintContext createPaintContext(ImageContext imageContext, java.awt.image.BufferedImage image, java.util.Dictionary requestedProperties, java.util.Dictionary responseProperties)
protected java.awt.Color getPaintBackground(ImageContext context, java.util.Dictionary d)
Returns the background color to use when painting an image with the specified dictionary.
protected Painter getPainter(ImageContext imageContext, java.util.Dictionary requestedProperties)
Returns the Painter to use for the specified request.
protected java.awt.Font getPaintFont(java.util.Dictionary d)
Returns the font color to use when painting an image with the specified dictionary.
protected java.awt.Color getPaintForeground(ImageContext context, java.util.Dictionary d)
Returns the foreground color to use when painting an image with the specified dictionary.
protected boolean isRenderable(ImageContext imageContext, java.util.Dictionary requestedProperties)
Tests whether the requested image can be rendered.

Methods inherited from class oracle.cabo.image.PainterImageRenderer
disposePaintContext, getPaintData, getPainter, renderImage

Methods inherited from class oracle.cabo.image.AbstractImageRenderer
createImage, imageUpdate

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

ButtonImageRenderer

public ButtonImageRenderer()

Method Detail

getPainter

protected Painter getPainter(ImageContext imageContext,
                             java.util.Dictionary requestedProperties)
Description copied from class: PainterImageRenderer
Returns the Painter to use for the specified request.
Overrides:
getPainter in class PainterImageRenderer

isRenderable

protected boolean isRenderable(ImageContext imageContext,
                               java.util.Dictionary requestedProperties)
Description copied from class: PainterImageRenderer
Tests whether the requested image can be rendered. The default implementation of isRenderable() returns false if oracle.cabo.style.util.GraphicsUtils.isGraphicalEnvironment() returns false. Subclasses can override this to verify that all required properties are present in the requested properties dictionary. All overrides must either call super.isRenderable() or GraphicsUtils.isGraphicalEnvironment() to ensure that a graphical environment is available.
Overrides:
isRenderable in class PainterImageRenderer

createPaintContext

protected PaintContext createPaintContext(ImageContext imageContext,
                                          java.awt.image.BufferedImage image,
                                          java.util.Dictionary requestedProperties,
                                          java.util.Dictionary responseProperties)
Overrides:
createPaintContext in class PainterImageRenderer

getPaintForeground

protected java.awt.Color getPaintForeground(ImageContext context,
                                            java.util.Dictionary d)
Returns the foreground color to use when painting an image with the specified dictionary.
Overrides:
getPaintForeground in class PainterImageRenderer

getPaintBackground

protected java.awt.Color getPaintBackground(ImageContext context,
                                            java.util.Dictionary d)
Returns the background color to use when painting an image with the specified dictionary.
Overrides:
getPaintBackground in class PainterImageRenderer

getPaintFont

protected java.awt.Font getPaintFont(java.util.Dictionary d)
Returns the font color to use when painting an image with the specified dictionary.
Overrides:
getPaintFont in class PainterImageRenderer

UIX 2.2.15