org.apache.myfaces.trinidadinternal.image.painter
Interface PaintContext

All Known Implementing Classes:
PaintContextProxy

public interface PaintContext

This interface provides painters and fills with enough context to draw themselves.

Version:
$Name: $ ($Revision: adfrt/faces/adf-faces-impl/src/main/java/oracle/adfinternal/view/faces/image/painter/PaintContext.java#0 $) $Date: 10-nov-2005.19:05:00 $
Author:
The Oracle ADF Faces Team
See Also:
Painter

Field Summary
static java.lang.Object BUTTON_BOTTOM_BACKGROUND_IMAGE_KEY
          Key used with getPaintData() to retrieve the buttonBottomBackground Image.
static java.lang.Object BUTTON_END_IMAGE_KEY
          Key used with getPaintData() to retrieve the buttonEnd Image.
static java.lang.Object BUTTON_START_IMAGE_KEY
          Key used with getPaintData() to retrieve the buttonStart Image.
static java.lang.Object BUTTON_TOP_BACKGROUND_IMAGE_KEY
          Key used with getPaintData() to retrieve the buttonTopBackground Image.
static java.lang.Object ICON_KEY
          Key used with getPaintData() to retrieve the main Icon Object, if any, from the PaintContext.
static java.lang.Object IMAGE_KEY
          Key used with getPaintData() to retrieve the main Image Object, if any, from the PaintContext.
static java.lang.Object IMAGESET_KEY
          Key used with getPaintData() to retrieve the main ImageSet Object, if any, from the PaintContext.
static java.lang.Object LABEL_KEY
          Key used with getPaintData() to retrieve the label String Object, if any, from the PaintContext.
static java.lang.Object MNEMONIC_INDEX_KEY
          Key used with getPaintData() to retrieve the mnemonic index, if any, from the PaintContext.
static int STATE_ARMED
          State constant for an object that is currently pressed.
static int STATE_BACKGROUND_NOT_FILLED
          State constant for the context not wanting the background filled =-=AEW It might be better to just report getPaintBackground() == null, but that forces code to understand this issue.
static int STATE_DISABLED
          State constant for a disabled object.
static int STATE_FOCUSED
          State constant for the context having the keyboard focus
static int STATE_INACTIVE
          State constant for an inactive object.
static int STATE_ISDEFAULT
          State constant for the context being the input default
static int STATE_MOUSE_OVER
          State constant for an object that has the mouse over it.
static int STATE_SELECTED
          State constant for the context having the selection
static int STATE_SET
          State constant for an object that is in the set state
 
Method Summary
 java.awt.FontMetrics getFontMetrics(java.awt.Font font)
          Returns a font metrics object for the specified font.
 ImageContext getImageContext()
          Returns the ImageContext for this render.
 java.awt.image.ImageObserver getImageObserver()
          Returns an image observer object that can be used to monitor progress in loading images.
 float getInteriorAlignmentX()
          Returns the horizontal interior alignment of the PaintContext.
 float getInteriorAlignmentY()
          Returns the vertical interior alignment of the PaintContext.
 java.awt.Color getPaintBackground()
          Returns the background color of the PaintContext.
 java.lang.Object getPaintData(java.lang.Object key)
          Returns the data Object for the specified key.
 java.awt.Font getPaintFont()
          Returns the font of the PaintContext.
 java.awt.Color getPaintForeground()
          Returns the foreground color of the PaintContext.
 java.awt.Graphics getPaintGraphics()
           
 java.util.Locale getPaintLocale()
          Returns the Locale of the PaintContext.
 int getPaintState()
          Returns a mask for the current state.
 int getReadingDirection()
          Returns the reading direction of the PaintContext.
 java.awt.Color getSurroundingColor()
          Returns the color surrounding the Object to be painted with the PaintContext.
 void setResponseProperty(java.lang.Object key, java.lang.Object value)
          Sets a property on the response dictionary
 

Field Detail

IMAGE_KEY

static final java.lang.Object IMAGE_KEY
Key used with getPaintData() to retrieve the main Image Object, if any, from the PaintContext.

See Also:
getPaintData(java.lang.Object)

IMAGESET_KEY

static final java.lang.Object IMAGESET_KEY
Key used with getPaintData() to retrieve the main ImageSet Object, if any, from the PaintContext.

See Also:
getPaintData(java.lang.Object)

ICON_KEY

static final java.lang.Object ICON_KEY
Key used with getPaintData() to retrieve the main Icon Object, if any, from the PaintContext.

Although this key is currently defined as a String, clients should not depend on this.

See Also:
getPaintData(java.lang.Object)

LABEL_KEY

static final java.lang.Object LABEL_KEY
Key used with getPaintData() to retrieve the label String Object, if any, from the PaintContext.

Although this key is currently defined as a String, clients should not depend on this.

See Also:
getPaintData(java.lang.Object)

MNEMONIC_INDEX_KEY

static final java.lang.Object MNEMONIC_INDEX_KEY
Key used with getPaintData() to retrieve the mnemonic index, if any, from the PaintContext.

Although this key is currently defined as a String, clients should not depend on this.

See Also:
getPaintData(java.lang.Object)

BUTTON_START_IMAGE_KEY

static final java.lang.Object BUTTON_START_IMAGE_KEY
Key used with getPaintData() to retrieve the buttonStart Image.

See Also:
getPaintData(java.lang.Object)

BUTTON_END_IMAGE_KEY

static final java.lang.Object BUTTON_END_IMAGE_KEY
Key used with getPaintData() to retrieve the buttonEnd Image.

See Also:
getPaintData(java.lang.Object)

BUTTON_TOP_BACKGROUND_IMAGE_KEY

static final java.lang.Object BUTTON_TOP_BACKGROUND_IMAGE_KEY
Key used with getPaintData() to retrieve the buttonTopBackground Image.

See Also:
getPaintData(java.lang.Object)

BUTTON_BOTTOM_BACKGROUND_IMAGE_KEY

static final java.lang.Object BUTTON_BOTTOM_BACKGROUND_IMAGE_KEY
Key used with getPaintData() to retrieve the buttonBottomBackground Image.

See Also:
getPaintData(java.lang.Object)

STATE_DISABLED

static final int STATE_DISABLED
State constant for a disabled object.

See Also:
getPaintState(), Constant Field Values

STATE_ARMED

static final int STATE_ARMED
State constant for an object that is currently pressed.

See Also:
getPaintState(), Constant Field Values

STATE_INACTIVE

static final int STATE_INACTIVE
State constant for an inactive object.

See Also:
getPaintState(), Constant Field Values

STATE_SET

static final int STATE_SET
State constant for an object that is in the set state

See Also:
getPaintState(), Constant Field Values

STATE_MOUSE_OVER

static final int STATE_MOUSE_OVER
State constant for an object that has the mouse over it.

See Also:
getPaintState(), Constant Field Values

STATE_SELECTED

static final int STATE_SELECTED
State constant for the context having the selection

See Also:
getPaintState(), Constant Field Values

STATE_FOCUSED

static final int STATE_FOCUSED
State constant for the context having the keyboard focus

See Also:
getPaintState(), Constant Field Values

STATE_ISDEFAULT

static final int STATE_ISDEFAULT
State constant for the context being the input default

See Also:
getPaintState(), Constant Field Values

STATE_BACKGROUND_NOT_FILLED

static final int STATE_BACKGROUND_NOT_FILLED
State constant for the context not wanting the background filled =-=AEW It might be better to just report getPaintBackground() == null, but that forces code to understand this issue.

See Also:
getPaintState(), Constant Field Values
Method Detail

setResponseProperty

void setResponseProperty(java.lang.Object key,
                         java.lang.Object value)
Sets a property on the response dictionary


getPaintGraphics

java.awt.Graphics getPaintGraphics()

getPaintState

int getPaintState()
Returns a mask for the current state.

Returns:
A bitmask indicating the current state of the PaintContext.

getImageContext

ImageContext getImageContext()
Returns the ImageContext for this render.


getPaintForeground

java.awt.Color getPaintForeground()
Returns the foreground color of the PaintContext.

Returns:
The foreground color of the PaintContext.

getPaintBackground

java.awt.Color getPaintBackground()
Returns the background color of the PaintContext.

Returns:
The background color of the PaintContext.

getSurroundingColor

java.awt.Color getSurroundingColor()
Returns the color surrounding the Object to be painted with the PaintContext.

Returns:
The Color surrounding the Object to be painted.

getPaintFont

java.awt.Font getPaintFont()
Returns the font of the PaintContext.

Returns:
The Font of the PaintContext.

getFontMetrics

java.awt.FontMetrics getFontMetrics(java.awt.Font font)
Returns a font metrics object for the specified font.

Parameters:
font - Font object to return FontMetrics of.

Returns:
The FontMetrics of the specified Font.

getImageObserver

java.awt.image.ImageObserver getImageObserver()
Returns an image observer object that can be used to monitor progress in loading images.

Returns:
The ImageObserver of the PaintContext.

getPaintLocale

java.util.Locale getPaintLocale()
Returns the Locale of the PaintContext.

Returns:
The Locale of the PaintContext.

getPaintData

java.lang.Object getPaintData(java.lang.Object key)
Returns the data Object for the specified key. This is the method that Painters use to retrieve their data. In addition to the two constants defined in this Interface for retrieving data, several abstract UI's specify the constants supported by their implementations for use by Painters. Further, implementors should interpret the passing of the key value null to indicate that their default data Object be returned by this method.

Parameters:
key - The key specifying which data Object the PaintContext should return.

Returns:
The data Object specified by key or null if no Object for that key is supported.

getInteriorAlignmentX

float getInteriorAlignmentX()
Returns the horizontal interior alignment of the PaintContext.

Returns:
The horizontal interior alignment of the PaintContext as a floating point number where 0.0 should be interpreted as left aligned, 0.5 as center aligned, and 1.0 as right aligned.

getInteriorAlignmentY

float getInteriorAlignmentY()
Returns the vertical interior alignment of the PaintContext.

Returns:
The vertical interior alignment of the PaintContext as a floating point number where 0.0 should be interpreted as top aligned, 0.5 as center aligned, and 1.0 as bottom aligned.

getReadingDirection

int getReadingDirection()
Returns the reading direction of the PaintContext.

Returns:
The reading direction of the PaintContext.

See Also:
LocaleUtils


Copyright © 2001-2007 Apache Software Foundation. All Rights Reserved.