|
Oracle UIX API Reference Release 2.1.22.0.0 B12196-01 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--oracle.cabo.image.painter.AbstractPainter | +--oracle.cabo.image.painter.ImagePainter
A painter capable of painting an image.
Field Summary | |
static int |
DONT_SCALE
A scaling constant - the image will not be scaled at all. |
static int |
PRESERVE_ASPECT_RATIO
A scaling constant - the image will be scaled, but its aspect ratio will be maintained. |
static int |
SCALE_TO_FIT
A scaling constant - the image is scaled to fit the entire area. |
Fields inherited from interface oracle.cabo.image.painter.Painter |
STATE_ACTIVE_CHANGED, STATE_ARMED_CHANGED, STATE_BACKGROUND_CHANGED, STATE_ENABLED_CHANGED, STATE_FOCUSED_CHANGED, STATE_FONT_CHANGED, STATE_FOREGROUND_CHANGED, STATE_ISDEFAULT_CHANGED, STATE_MOUSE_OVER_CHANGED, STATE_READING_DIRECTION_CHANGED, STATE_SELECTED_CHANGED, STATE_SET_CHANGED, STATE_SIZE_CHANGED, STATE_XALIGNMENT_CHANGED, STATE_YALIGNMENT_CHANGED |
Constructor Summary | |
ImagePainter()
Creates an ImagePainter object, using the default Image Data Key, scaling the Image to fit the area to be drawn. |
|
ImagePainter(int scalingMode)
Creates an ImagePainter object, using the default Image Data Key and the specified scaling mode. |
|
ImagePainter(java.lang.Object dataKey)
Creates an ImagePainter object, using the specified data key to retrieve its Image from its PaintContext and scaling the image to fit. |
|
ImagePainter(java.lang.Object dataKey,
int scalingMode)
Creates an ImagePainter object, using the specified data key to retrieve its Image from its PaintContext and scaling mode to specify how it handles scaling. |
Method Summary | |
protected java.lang.Object |
getData(PaintContext context)
|
protected java.lang.Object |
getDataKey()
|
protected java.awt.Image |
getImageData(PaintContext context)
Typesafe method to return the Image to Paint. |
java.awt.Dimension |
getMinimumSize(PaintContext context)
Returns the minimum size of the ImagePainter. |
boolean |
getProgressiveLoading()
Returns whether the ImagePainter allows images to be progressively loaded. |
int |
getRepaintFlags(PaintContext context)
Returns the flags indicating the conditions under which the Painter must be repainted. |
java.awt.Dimension |
getSize(PaintContext context,
int availableWidth,
int availableHeight)
Returns the size of the Painter for the specified amount of availableWidth and availableHeight. |
boolean |
isTransparent(PaintContext context)
Returns true if the Painter doesn't paint all of its pixels. |
void |
paint(PaintContext context,
java.awt.Graphics g,
int x,
int y,
int width,
int height)
Paints the ImagePainter at the given location. |
void |
setProgressiveLoading(boolean progressive)
Sets whether the ImagePainter always forces images to be fully loaded, or whether it allows progressive loading. |
Methods inherited from class oracle.cabo.image.painter.AbstractPainter |
contains, getInvalidateFlags, getMaximumSize, getPainterAt, getPreferredSize |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int DONT_SCALE
public static final int PRESERVE_ASPECT_RATIO
public static final int SCALE_TO_FIT
Constructor Detail |
public ImagePainter()
public ImagePainter(int scalingMode)
public ImagePainter(java.lang.Object dataKey)
public ImagePainter(java.lang.Object dataKey, int scalingMode)
Method Detail |
public void setProgressiveLoading(boolean progressive)
progressive
- if true, uses progressive loadingpublic boolean getProgressiveLoading()
public java.awt.Dimension getSize(PaintContext context, int availableWidth, int availableHeight)
getSize
in class AbstractPainter
context
- Context for deterimining the size.availableWidth
- Amount of width available to the Painter.availableHeight
- Amount of height available to the Painter.
public java.awt.Dimension getMinimumSize(PaintContext context)
context
- Context for determining the minimum size.public void paint(PaintContext context, java.awt.Graphics g, int x, int y, int width, int height)
context
- Context for painting.g
- Graphics object to draw into.x
- X position to draw at.y
- Y position to draw at.width
- Width to draw into.height
- Height to draw into.public int getRepaintFlags(PaintContext context)
getRepaintFlags
in class AbstractPainter
context
- Context to use for determining the conditions under
which repainting is required.
public boolean isTransparent(PaintContext context)
isTransparent
in class AbstractPainter
context
- Context for determining transparency.
protected java.awt.Image getImageData(PaintContext context)
getData()
, as overriding getImageData()
directly is more efficient.
context
- PaintContext to use to retrieve the TextPainter's
Image data.
getData(oracle.cabo.image.painter.PaintContext)
protected java.lang.Object getDataKey()
getDataKey
in class AbstractPainter
protected java.lang.Object getData(PaintContext context)
getData
in class AbstractPainter
|
Oracle UIX API Reference Release 2.1.22.0.0 B12196-01 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |