Oracle UIX API Reference
Release 2.1.22.0.0
B12196-01

oracle.cabo.image.painter
Interface PaintContext

All Known Implementing Classes:
PaintContextProxy

public interface PaintContext

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

See Also:
Painter

Field Summary
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

public 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

public 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

public 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

public 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

public 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)

STATE_DISABLED

public static final int STATE_DISABLED
State constant for a disabled object.

See Also:
getPaintState()

STATE_ARMED

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

See Also:
getPaintState()

STATE_INACTIVE

public static final int STATE_INACTIVE
State constant for an inactive object.

See Also:
getPaintState()

STATE_SET

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

See Also:
getPaintState()

STATE_MOUSE_OVER

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

See Also:
getPaintState()

STATE_SELECTED

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

See Also:
getPaintState()

STATE_FOCUSED

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

See Also:
getPaintState()

STATE_ISDEFAULT

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

See Also:
getPaintState()

STATE_BACKGROUND_NOT_FILLED

public 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()
Method Detail

setResponseProperty

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

getPaintGraphics

public java.awt.Graphics getPaintGraphics()

getPaintState

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

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

getImageContext

public ImageContext getImageContext()
Returns the ImageContext for this render.

getPaintForeground

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

Returns:
The foreground color of the PaintContext.

getPaintBackground

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

Returns:
The background color of the PaintContext.

getSurroundingColor

public 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

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

Returns:
The Font of the PaintContext.

getFontMetrics

public 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

public 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

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

Returns:
The Locale of the PaintContext.

getPaintData

public 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

public 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

public 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

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

Returns:
The reading direction of the PaintContext.

See Also:
LocaleUtils

Oracle UIX API Reference
Release 2.1.22.0.0
B12196-01

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