|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectComponent
Container
JComponent
ZoomPane
ImagePane
public class ImagePane
A simple image viewer. This widget accepts either rendered or renderable image. Rendered image are display immediately, while renderable image will be rendered in a background thread when first requested. This widget may scale down images for faster rendering. This is convenient for image previews, but should not be used as a "real" renderer for full precision images.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class JComponent |
---|
JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class Container |
---|
Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class Component |
---|
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary |
---|
Fields inherited from class ZoomPane |
---|
DEFAULT_ZOOM, RESET, ROTATE, SCALE_X, SCALE_Y, TRANSLATE_X, TRANSLATE_Y, UNIFORM_SCALE, zoom |
Fields inherited from class JComponent |
---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
ImagePane()
Constructs an initially empty image pane with a default rendered image size. |
|
ImagePane(int renderedSize)
Constructs an initially empty image pane with the specified rendered image size. |
Method Summary | |
---|---|
Rectangle2D |
getArea()
Returns the image bounds, or null if none. |
protected void |
paintComponent(Graphics2D graphics)
Paint the image. |
void |
reset()
Reset the default zoom. |
void |
run()
Creates a rendered view of the renderable image and notifies ZoomPane when the result is ready. |
void |
setImage(RenderableImage image)
Sets the source renderable image. |
void |
setImage(RenderedImage image)
Sets the source rendered image. |
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ImagePane()
public ImagePane(int renderedSize)
renderedSize
argument is the maximum width and height for
rendered image. Images greater than this value will be
scaled down for faster rendering.
Method Detail |
---|
public void setImage(RenderableImage image)
public void setImage(RenderedImage image)
public void reset()
reset
in class ZoomPane
public Rectangle2D getArea()
null
if none. This is used by
ZoomPane
in order to set the initial zoom.
getArea
in class ZoomPane
ZoomPane
. If this bounding box is unknown, then this method
can return null
(but this is not recommended).protected void paintComponent(Graphics2D graphics)
RenderableImage
, then a RenderedImage
will be computed in a background thread when this method is first invoked.
paintComponent
in class ZoomPane
public void run()
ZoomPane
when the result is ready. This method
is run in a background thread and should not be invoked directly, unless the user wants
to trig the RenderedImage
creation immediately.
run
in interface Runnable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |