| |
|
| org.geotools.gui.swing.ZoomPane org.geotools.gui.swing.image.ImagePane
ImagePane | public class ImagePane extends ZoomPane implements Runnable(Code) | | A simple image viewer. This widget accepts either
or
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.
since: 2.3 version: $Id: ImagePane.java 20883 2006-08-07 13:48:09Z jgarnett $ author: Martin Desruisseaux |
Constructor Summary | |
public | ImagePane() Constructs an initially empty image pane with a default rendered image size. | public | ImagePane(int renderedSize) Constructs an initially empty image pane with the specified rendered image size.
The
renderedSize argument is the maximum width and height for
. |
Method Summary | |
public Rectangle2D | getArea() Returns the image bounds, or
null if none. | protected void | paintComponent(Graphics2D graphics) Paint the image. | public void | reset() Reset the default zoom. | public void | run() Creates a
view of the
image and notifies
ZoomPane when the result is ready. | public void | setImage(RenderableImage image) Sets the source renderable image. | public void | setImage(RenderedImage image) Sets the source rendered image. |
ImagePane | public ImagePane()(Code) | | Constructs an initially empty image pane with a default rendered image size.
|
ImagePane | public ImagePane(int renderedSize)(Code) | | Constructs an initially empty image pane with the specified rendered image size.
The
renderedSize argument is the maximum width and height for
. Images greater than this value will be
scaled down for faster rendering.
|
getArea | public Rectangle2D getArea()(Code) | | Returns the image bounds, or
null if none. This is used by
ZoomPane in order to set the initial zoom.
|
paintComponent | protected void paintComponent(Graphics2D graphics)(Code) | | Paint the image. If the image was a
RenderableImage , then a
RenderedImage will be computed in a background thread when this method is first invoked.
|
reset | public void reset()(Code) | | Reset the default zoom. This method overrides the default implementation in
order to keep the y axis in its Java2D direction (y
value increasing down), which is the usual direction of most image.
|
run | public void run()(Code) | | Creates a
view of the
image and notifies
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.
|
setImage | public void setImage(RenderableImage image)(Code) | | Sets the source renderable image.
|
setImage | public void setImage(RenderedImage image)(Code) | | Sets the source rendered image.
|
|
|
|