jsky.image.gui
Class DivaGraphicsImageDisplay

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by diva.canvas.JCanvas
                  extended by jsky.image.gui.DivaGraphicsImageDisplay
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.awt.print.Printable, java.io.Serializable, BasicImageReadableProcessor, BasicImageDisplay, GraphicsImageDisplay
Direct Known Subclasses:
DivaMainImageDisplay

public class DivaGraphicsImageDisplay
extends diva.canvas.JCanvas
implements GraphicsImageDisplay

Implements a JAI based image display window with extra support for 2D graphics, based on the Diva package. This class is derived from the Diva JCanvas class. The image is painted on the background of the canvas while graphics can be drawn on the foreground using methods preovided here.

Any JAI PlanarImage can be displayed. Grayscale images may be displayed with false colors, depending on the ImageProcessor options specified.

This class also provides methods for converting image coordinates. See the CoordinateConverter interface for details. World coordinates are supported if the information is present in the header (for FITS files).

Version:
$Revision: 1.3 $
Author:
Allan Brighton
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
 
Fields inherited from class javax.swing.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 java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.print.Printable
NO_SUCH_PAGE, PAGE_EXISTS
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
DivaGraphicsImageDisplay()
          Construct an image display widget.
DivaGraphicsImageDisplay(diva.canvas.GraphicsPane pane, ImageProcessor imageProcessor, java.lang.String name)
          Construct an image display widget with the given graphics pane and name to display the output of the given image processor.
DivaGraphicsImageDisplay(ImageProcessor imageProcessor, java.lang.String name)
          Construct an image display widget with the given name to display the output of the given image processor.
DivaGraphicsImageDisplay(java.lang.String name)
          Construct an image display widget with the given name.
 
Method Summary
 void addImageGraphicsHandler(ImageGraphicsHandler igh)
          Register as an image graphics handler.
 void blankImage(double ra, double dec)
          Display a blank image with the given center coordinates (15' * 60 seconds/minutes).
protected  void centerImage(javax.media.jai.PlanarImage im)
          If a new image was just loaded, center the image in it's window, otherwise only center it if it is smaller than the display window.
 void clear()
          Clear the image display.
protected  java.awt.geom.AffineTransform getAffineTransform()
          Return an AffineTransform based on the current transformations.
 javax.swing.JComponent getCanvas()
          Return the image canvas component.
 CanvasGraphics getCanvasGraphics()
          Return an object to be used for drawing persistent graphics over the image
 CoordinateConverter getCoordinateConverter()
          Return the object used to convert coordinates.
 javax.media.jai.PlanarImage getDisplayImage()
          Return the image being displayed (after image processing).
 FITSImage getFitsImage()
          If the current image is in FITS format, return the FITSImage object managing it, otherwise return null.
 javax.media.jai.PlanarImage getImage()
          Return the source image (before processing).
 int getImageHeight()
          Return the height of the source image in pixels
 ImageProcessor getImageProcessor()
          Return the image processor object.
 int getImageWidth()
          Return the width of the source image in pixels
 javax.media.jai.Interpolation getInterpolation()
          Return the interpolation object used to scale the image
 java.awt.geom.Point2D.Double getOrigin()
          Return the origin of the displayed image in canvas coordinates.
 float getPixelValue(java.awt.geom.Point2D.Double p, int band)
          Return the value of the pixel in the given band at the given user coordinates
 float[] getPixelValues(java.awt.Rectangle region, int band)
          Return an array containing the values of the pixels in the given band in the given user coordinates region.
 float getScale()
          Return the current scale (zoom factor) for the image.
 java.awt.RenderingHints getScaleHints()
          Return the optional rendering hints used for the image scale operation
 java.awt.geom.Rectangle2D.Double getVisibleArea()
          Return a rectangle describing the visible area of the image (in user coordinates).
 WorldCoordinateConverter getWCS()
          Return the object used to convert between image and world coordinates, or null if none was set.
protected  void initWCS()
          Initialize the world coordinate system, if the image properties (keywords) support it
 boolean isAutoCenterImage()
          Return true if the image is automatically centered when it is smaller than the window.
 boolean isClear()
          Return true if the image has been cleared.
 boolean isImmediateMode()
          Return true if immediate mode is turned on.
 boolean isInitialized()
          Return true if this widget has been initialized and is displaying an image.
 boolean isPrescaled()
          Return true if the image has been prescaled
 boolean isWCS()
          Return true if the image supports world coordinates (has the necessary keywords in the header).
static void main(java.lang.String[] args)
          test main: usage: java DivaGraphicsImageDisplay .
protected  CanvasGraphics makeCanvasGraphics()
          Make and return the CanvasGraphics object.
protected  void newImage(boolean before)
          This method is called before and after loading a new image.
protected  void notifyGraphicsHandlers(java.awt.Graphics2D g)
          Notify any ImageGraphicsHandlers
 void paintLayer(java.awt.Graphics2D g2D, java.awt.geom.Rectangle2D region)
          Paint the image onto a Graphics object.
 void removeImageGraphicsHandler(ImageGraphicsHandler igh)
          Unregister as an image graphics handler.
protected  javax.media.jai.PlanarImage scale(javax.media.jai.PlanarImage im)
          Perform a translate/scale operation on the given image using the current settings and return the resulting image.
 void scaleToFit()
          Set the scaling factor so that the image will fit in the current window.
protected  void scaleToFit(int width, int height)
          Set the scaling factor so that the image will fit in a window of the given size.
 void setAutoCenterImage(boolean b)
          Set to true (default) to automatically center the image, if it is smaller than the window.
 void setImage(FITSImage fitsImage)
          Set the FITS image to display.
 void setImage(javax.media.jai.PlanarImage im)
          Set the image to display.
 void setImageProcessor(ImageProcessor imageProcessor)
          Set the image processor to use to get the image to display.
 void setImmediateMode(boolean b)
          Set to true if scrolling and other operations should update the image immediately, otherwise only on button release.
 void setInterpolation(javax.media.jai.Interpolation i)
          Set the interpolation object used to scale the image (a subclass of Interpolation, such as InterpolationNearest (default), or InterpolationBilinear (better, but slower)).
 void setOrigin(java.awt.geom.Point2D.Double origin)
          Set the origin of the image to display in canvas coordinates.
 void setPrescaled(boolean b)
          Set to true if the image being displayed has been prescaled (such as for a pan window or thumbnail image).
 void setScale(float scale)
          Set the scale (zoom factor) for the image.
 void setScaleHints(java.awt.RenderingHints hints)
          Set the optional rendering hints for the image scale operation
 void setWCS(WorldCoordinateConverter wcs)
          Set the object used to convert between image and world coordinates.
protected  void transformGraphics()
          Transform the graphics in the foreground layer according to the current image transformations.
protected  void transformGraphics(java.awt.geom.AffineTransform trans)
          Transform the image graphics using the given AffineTransform.
 void updateImage()
          Called when the image has changed to update the display
protected  void updateImage(javax.media.jai.PlanarImage im)
          This method updates the source image for this window, which is scaled to the correct magnification before displaying.
 
Methods inherited from class diva.canvas.JCanvas
getCanvasPane, getToolTipText, isFocusTraversable, paint, print, print, processMouseEvent, processMouseMotionEvent, repaint, setCanvasPane, setDoubleBuffered, setPreferredSize
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getAccessibleContext, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getTopLevelAncestor, getTransferHandler, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, paramString, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update, updateUI
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DivaGraphicsImageDisplay

public DivaGraphicsImageDisplay(diva.canvas.GraphicsPane pane,
                                ImageProcessor imageProcessor,
                                java.lang.String name)
Construct an image display widget with the given graphics pane and name to display the output of the given image processor.

Parameters:
pane - the Diva GraphicsPane to use (contains the layers used to display the image and graphics)
imageProcessor - Object managing the image
name - name to associate with this instance

DivaGraphicsImageDisplay

public DivaGraphicsImageDisplay(ImageProcessor imageProcessor,
                                java.lang.String name)
Construct an image display widget with the given name to display the output of the given image processor.

Parameters:
imageProcessor - Object managing the image
name - name to associate with this instance

DivaGraphicsImageDisplay

public DivaGraphicsImageDisplay(java.lang.String name)
Construct an image display widget with the given name.

Parameters:
name - name to associate with this instance

DivaGraphicsImageDisplay

public DivaGraphicsImageDisplay()
Construct an image display widget.

Method Detail

makeCanvasGraphics

protected CanvasGraphics makeCanvasGraphics()
Make and return the CanvasGraphics object.


getImage

public javax.media.jai.PlanarImage getImage()
Return the source image (before processing).

Specified by:
getImage in interface BasicImageDisplay

getDisplayImage

public javax.media.jai.PlanarImage getDisplayImage()
Return the image being displayed (after image processing).

Specified by:
getDisplayImage in interface BasicImageDisplay

getCoordinateConverter

public CoordinateConverter getCoordinateConverter()
Return the object used to convert coordinates.

Specified by:
getCoordinateConverter in interface BasicImageDisplay

getCanvasGraphics

public CanvasGraphics getCanvasGraphics()
Return an object to be used for drawing persistent graphics over the image

Specified by:
getCanvasGraphics in interface GraphicsImageDisplay

setImageProcessor

public void setImageProcessor(ImageProcessor imageProcessor)
Set the image processor to use to get the image to display.

Specified by:
setImageProcessor in interface BasicImageDisplay

getImageProcessor

public ImageProcessor getImageProcessor()
Return the image processor object.

Specified by:
getImageProcessor in interface BasicImageReadableProcessor
Specified by:
getImageProcessor in interface BasicImageDisplay
Returns:
The Object responsible for most image transformations that processes PlanarImages.
See Also:
PlanarImage

setImage

public void setImage(javax.media.jai.PlanarImage im)
Set the image to display.

Specified by:
setImage in interface BasicImageDisplay

setImage

public void setImage(FITSImage fitsImage)
Set the FITS image to display.


getImageWidth

public int getImageWidth()
Return the width of the source image in pixels

Specified by:
getImageWidth in interface BasicImageDisplay

getImageHeight

public int getImageHeight()
Return the height of the source image in pixels

Specified by:
getImageHeight in interface BasicImageDisplay

getFitsImage

public FITSImage getFitsImage()
If the current image is in FITS format, return the FITSImage object managing it, otherwise return null. (The FITSImage object is available via the "#fits_image" property from the FITS codec, which implements FITS support for JAI.)

Specified by:
getFitsImage in interface GraphicsImageDisplay

newImage

protected void newImage(boolean before)
This method is called before and after loading a new image.

Parameters:
before - If true, it is before loading the image, otherwise afterwards.

initWCS

protected void initWCS()
Initialize the world coordinate system, if the image properties (keywords) support it


isWCS

public boolean isWCS()
Return true if the image supports world coordinates (has the necessary keywords in the header).

Specified by:
isWCS in interface BasicImageDisplay

getWCS

public WorldCoordinateConverter getWCS()
Return the object used to convert between image and world coordinates, or null if none was set.

Specified by:
getWCS in interface BasicImageDisplay

setWCS

public void setWCS(WorldCoordinateConverter wcs)
Set the object used to convert between image and world coordinates.

Specified by:
setWCS in interface BasicImageDisplay

clear

public void clear()
Clear the image display.

Specified by:
clear in interface GraphicsImageDisplay

isClear

public boolean isClear()
Return true if the image has been cleared.

Specified by:
isClear in interface GraphicsImageDisplay

blankImage

public void blankImage(double ra,
                       double dec)
Display a blank image with the given center coordinates (15' * 60 seconds/minutes).

Specified by:
blankImage in interface GraphicsImageDisplay
Parameters:
ra - RA center coordinate in deg J2000
dec - Dec center coordinate in deg J2000

updateImage

public void updateImage()
Called when the image has changed to update the display

Specified by:
updateImage in interface BasicImageDisplay

updateImage

protected void updateImage(javax.media.jai.PlanarImage im)
This method updates the source image for this window, which is scaled to the correct magnification before displaying.


setAutoCenterImage

public void setAutoCenterImage(boolean b)
Set to true (default) to automatically center the image, if it is smaller than the window.

Specified by:
setAutoCenterImage in interface BasicImageDisplay

isAutoCenterImage

public boolean isAutoCenterImage()
Return true if the image is automatically centered when it is smaller than the window.

Specified by:
isAutoCenterImage in interface BasicImageDisplay

centerImage

protected void centerImage(javax.media.jai.PlanarImage im)
If a new image was just loaded, center the image in it's window, otherwise only center it if it is smaller than the display window.


paintLayer

public void paintLayer(java.awt.Graphics2D g2D,
                       java.awt.geom.Rectangle2D region)
Paint the image onto a Graphics object. The painting is performed tile-by-tile, and includes a grey region covering the unused portion of image tiles as well as the general background. At this point the image must be byte data.

Parameters:
g2D - the graphics context
region - if not null, the region to paint

addImageGraphicsHandler

public void addImageGraphicsHandler(ImageGraphicsHandler igh)
Register as an image graphics handler.

Specified by:
addImageGraphicsHandler in interface BasicImageDisplay

removeImageGraphicsHandler

public void removeImageGraphicsHandler(ImageGraphicsHandler igh)
Unregister as an image graphics handler.

Specified by:
removeImageGraphicsHandler in interface BasicImageDisplay

notifyGraphicsHandlers

protected void notifyGraphicsHandlers(java.awt.Graphics2D g)
Notify any ImageGraphicsHandlers


setOrigin

public void setOrigin(java.awt.geom.Point2D.Double origin)
Set the origin of the image to display in canvas coordinates.

Specified by:
setOrigin in interface BasicImageDisplay

getOrigin

public java.awt.geom.Point2D.Double getOrigin()
Return the origin of the displayed image in canvas coordinates.

Specified by:
getOrigin in interface BasicImageDisplay

getCanvas

public javax.swing.JComponent getCanvas()
Return the image canvas component.

Specified by:
getCanvas in interface BasicImageDisplay

setScale

public void setScale(float scale)
Set the scale (zoom factor) for the image. This also adjusts the origin so that the center of the image remains about the same.

Specified by:
setScale in interface BasicImageDisplay

getScale

public float getScale()
Return the current scale (zoom factor) for the image.

Specified by:
getScale in interface BasicImageDisplay

setInterpolation

public void setInterpolation(javax.media.jai.Interpolation i)
Set the interpolation object used to scale the image (a subclass of Interpolation, such as InterpolationNearest (default), or InterpolationBilinear (better, but slower)).

Specified by:
setInterpolation in interface BasicImageDisplay

getInterpolation

public javax.media.jai.Interpolation getInterpolation()
Return the interpolation object used to scale the image

Specified by:
getInterpolation in interface BasicImageDisplay

getPixelValue

public float getPixelValue(java.awt.geom.Point2D.Double p,
                           int band)
Return the value of the pixel in the given band at the given user coordinates

Specified by:
getPixelValue in interface BasicImageDisplay
Specified by:
getPixelValue in interface GraphicsImageDisplay
Parameters:
p - the user coordinates of the point to get
band - the bad of the image (0 for FITS files)

getPixelValues

public float[] getPixelValues(java.awt.Rectangle region,
                              int band)
Return an array containing the values of the pixels in the given band in the given user coordinates region. The pixel values are converted to float. Any pixels outside the image bounds are set to the mean image value, if known, otherwise 0.

Specified by:
getPixelValues in interface GraphicsImageDisplay
Parameters:
region - describes the region of the image to get in user coordinates
band - the band of the image to get

setPrescaled

public void setPrescaled(boolean b)
Set to true if the image being displayed has been prescaled (such as for a pan window or thumbnail image). If true, the scale value will only be used to calculate coordinate transformations, but the image will not actually be scaled.

Specified by:
setPrescaled in interface BasicImageDisplay

isPrescaled

public boolean isPrescaled()
Return true if the image has been prescaled

Specified by:
isPrescaled in interface BasicImageDisplay

setScaleHints

public void setScaleHints(java.awt.RenderingHints hints)
Set the optional rendering hints for the image scale operation

Specified by:
setScaleHints in interface BasicImageDisplay

getScaleHints

public java.awt.RenderingHints getScaleHints()
Return the optional rendering hints used for the image scale operation

Specified by:
getScaleHints in interface BasicImageDisplay

scale

protected javax.media.jai.PlanarImage scale(javax.media.jai.PlanarImage im)
Perform a translate/scale operation on the given image using the current settings and return the resulting image. The input image is assumed to be at mag 1.


transformGraphics

protected void transformGraphics()
Transform the graphics in the foreground layer according to the current image transformations.


transformGraphics

protected void transformGraphics(java.awt.geom.AffineTransform trans)
Transform the image graphics using the given AffineTransform.


getAffineTransform

protected java.awt.geom.AffineTransform getAffineTransform()
Return an AffineTransform based on the current transformations.


scaleToFit

protected void scaleToFit(int width,
                          int height)
Set the scaling factor so that the image will fit in a window of the given size.

Note that only integer scaling factors are used, for example 2, 1, 1/2, 1/3, etc., for performance reasons.


scaleToFit

public void scaleToFit()
Set the scaling factor so that the image will fit in the current window.

Note that only integer scaling factors are used, for example 2, 1, 1/2, 1/3, etc., for performance reasons.

Specified by:
scaleToFit in interface BasicImageDisplay

getVisibleArea

public java.awt.geom.Rectangle2D.Double getVisibleArea()
Return a rectangle describing the visible area of the image (in user coordinates).

Specified by:
getVisibleArea in interface BasicImageReadableProcessor
Specified by:
getVisibleArea in interface BasicImageDisplay
Returns:
User Coordinates of retangle. Note, this may be a a SuperRectangle if the PlanarImage is non-rectangular.

isInitialized

public boolean isInitialized()
Return true if this widget has been initialized and is displaying an image.

Specified by:
isInitialized in interface BasicImageDisplay

setImmediateMode

public void setImmediateMode(boolean b)
Set to true if scrolling and other operations should update the image immediately, otherwise only on button release.

Specified by:
setImmediateMode in interface BasicImageDisplay

isImmediateMode

public boolean isImmediateMode()
Return true if immediate mode is turned on.

Specified by:
isImmediateMode in interface BasicImageDisplay

main

public static void main(java.lang.String[] args)
test main: usage: java DivaGraphicsImageDisplay .