|
UIX 2.2.16 | ||||||||
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. |
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. |
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 |
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 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 boolean isTransparent(PaintContext context)
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
|
UIX 2.2.16 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |