jsky.image.gui
Interface MainImageDisplay

All Superinterfaces:
BasicImageDisplay, BasicImageReadableProcessor, GenericToolBarTarget, GraphicsImageDisplay
All Known Implementing Classes:
DivaMainImageDisplay, NavigatorImageDisplay

public interface MainImageDisplay
extends GraphicsImageDisplay, GenericToolBarTarget

This defines the interface for a main application image display window.

Version:
$Revision: 1.2 $
Author:
Allan Brighton

Method Summary
 void addChangeListener(javax.swing.event.ChangeListener l)
          register to receive change events from this object whenever the image or cut levels are changed.
 void displayFITSTable(int hdu)
          Display the FITS table at the given HDU index (if supported).
 WorldCoords getBasePos()
          Return the base or center position in world coordinates.
 double[] getDefaultSearchMagRange()
          Return the default min and max magnitude values to use for catalog searches, or null if there is no default.
 double[] getDefaultSearchRadius(WorldCoords centerPos, boolean useImageSize)
          Return the default min and max search radius values to use for catalog searches, in arcmin.
 java.lang.String getFilename()
          Return the image file name, if there is one.
 java.lang.String getObjectName()
          Return the name of the object being displayed, if known, otherwise null.
 java.awt.Component getRootComponent()
          Return the top level parent frame (or internal frame) (Used to open and close the window displaying image).
 java.net.URL getURL()
          Return the image URL, if there is one, otherwise null.
 void paintImageAndGraphics(java.awt.Graphics2D g2D)
          Paint the image and graphics to the given graphics object (for save and print features)
 void print()
          Pop up a dialog for printing the image.
 void removeChangeListener(javax.swing.event.ChangeListener l)
          Stop receiving change events from this object.
 void saveAs()
          Pop up a dialog to ask the user for a file name, and then save the image to the selected file.
 void saveAs(java.lang.String filename)
          Save the current image to the given file, using an image format based on the file suffix, which should be one of ".fits", ".jpg", ".png", or ".tif".
 void setFilename(java.lang.String fileOrUrl)
          Set the image file to display.
 void setFilename(java.lang.String fileOrUrl, java.net.URL url)
          Set the image file to display, and indicate that the file was downloaded from the given URL (for image history recording).
 void setSaveNeeded(boolean b)
          Set to true if the image has been modified and needs saving.
 void setURL(java.net.URL theURL)
          Set the URL for the image to display.
 void updateImageData()
          Update the display to show the contents of the currently loaded image file.
 
Methods inherited from interface jsky.image.gui.GraphicsImageDisplay
blankImage, clear, getCanvasGraphics, getFitsImage, getPixelValue, getPixelValues, isClear
 
Methods inherited from interface jsky.image.gui.BasicImageDisplay
addImageGraphicsHandler, getCanvas, getCoordinateConverter, getDisplayImage, getImage, getImageHeight, getImageProcessor, getImageWidth, getInterpolation, getOrigin, getScale, getScaleHints, getVisibleArea, getWCS, isAutoCenterImage, isImmediateMode, isInitialized, isPrescaled, isWCS, removeImageGraphicsHandler, scaleToFit, setAutoCenterImage, setImage, setImageProcessor, setImmediateMode, setInterpolation, setOrigin, setPrescaled, setScale, setScaleHints, setWCS, updateImage
 
Methods inherited from interface jsky.util.gui.GenericToolBarTarget
getBackAction, getForwAction, getOpenAction
 

Method Detail

setFilename

void setFilename(java.lang.String fileOrUrl)
Set the image file to display.


setFilename

void setFilename(java.lang.String fileOrUrl,
                 java.net.URL url)
Set the image file to display, and indicate that the file was downloaded from the given URL (for image history recording).


getFilename

java.lang.String getFilename()
Return the image file name, if there is one.


setURL

void setURL(java.net.URL theURL)
Set the URL for the image to display.


getURL

java.net.URL getURL()
Return the image URL, if there is one, otherwise null.


updateImageData

void updateImageData()
Update the display to show the contents of the currently loaded image file.


displayFITSTable

void displayFITSTable(int hdu)
Display the FITS table at the given HDU index (if supported).


getObjectName

java.lang.String getObjectName()
Return the name of the object being displayed, if known, otherwise null.


paintImageAndGraphics

void paintImageAndGraphics(java.awt.Graphics2D g2D)
Paint the image and graphics to the given graphics object (for save and print features)


addChangeListener

void addChangeListener(javax.swing.event.ChangeListener l)
register to receive change events from this object whenever the image or cut levels are changed.


removeChangeListener

void removeChangeListener(javax.swing.event.ChangeListener l)
Stop receiving change events from this object.


getRootComponent

java.awt.Component getRootComponent()
Return the top level parent frame (or internal frame) (Used to open and close the window displaying image).


setSaveNeeded

void setSaveNeeded(boolean b)
Set to true if the image has been modified and needs saving.


saveAs

void saveAs()
Pop up a dialog to ask the user for a file name, and then save the image to the selected file.


saveAs

void saveAs(java.lang.String filename)
Save the current image to the given file, using an image format based on the file suffix, which should be one of ".fits", ".jpg", ".png", or ".tif".


print

void print()
Pop up a dialog for printing the image.


getBasePos

WorldCoords getBasePos()
Return the base or center position in world coordinates. If there is no base position, this method returns the center point of the image. If the image does not support WCS, this method returns (0,0). The position returned here should be used as the base position for any catalog or image server requests.


getDefaultSearchRadius

double[] getDefaultSearchRadius(WorldCoords centerPos,
                                boolean useImageSize)
Return the default min and max search radius values to use for catalog searches, in arcmin.

Parameters:
centerPos - the center position for the radius
useImageSize - if true, use the image size to get the search radius
Returns:
an array containing the min and max radius values

getDefaultSearchMagRange

double[] getDefaultSearchMagRange()
Return the default min and max magnitude values to use for catalog searches, or null if there is no default.

Returns:
an array containing the min and max mag values