jsky.navigator
Class NavigatorImageDisplay

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
                      extended by jsky.image.gui.DivaMainImageDisplay
                          extended by jsky.navigator.NavigatorImageDisplay
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.awt.print.Printable, java.io.Serializable, CatalogNavigatorOpener, BasicImageReadableProcessor, BasicImageDisplay, GraphicsImageDisplay, MainImageDisplay, GenericToolBarTarget

public class NavigatorImageDisplay
extends DivaMainImageDisplay
implements CatalogNavigatorOpener

Extends the DivaMainImageDisplay class by adding support for browsing catalogs and plotting catalog symbols on the image.

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
NavigatorImageDisplay(java.awt.Component parent)
          Construct a NavigatorImageDisplay widget.
 
Method Summary
 void displayFITSTable(int hdu)
          Display the FITS table at the given HDU index.
 void dispose()
          Cleanup when the window is no longer needed.
 QueryResult filterQueryResult(QueryResult queryResult)
          Can be overridden in a derived class to filter the result of a catalog query.
 javax.swing.AbstractAction getCatalogBrowseAction()
           
 Navigator getNavigator()
          Return the instance of the catalog navigator used with this image display.
 NavigatorPane getNavigatorPane()
          Return the Diva pane containing the added catalog symbol layer.
protected  void makeNavigatorFrame()
          Make a NavigatorFrame or NavigatorInternalFrame, depending on what type of frames are being used.
protected  void newImage(boolean before)
          This method is called before and after a new image is loaded, each time with a different argument.
 java.awt.Component newWindow()
          Open up another window like this one and return a reference to it.
 void openCatalogWindow()
          Open the catalog navigator window.
 void openCatalogWindow(Catalog cat)
          Display the interface for the given catalog, if not null, otherwise just open the catalog navigator window.
 void openCatalogWindow(java.lang.String name)
          Open a catalog window for the named catalog, if found.
 void openLocalCatalog()
          Pop up a file browser to select a local catalog file to open.
protected  void pickedObject()
          Called when an object is selected in the Pick Object window.
 void saveCatalogOverlaysWithImage()
          Save any current catalog overlays as a FITS table in the image file.
 void saveFITSTable(TableQueryResult table)
          Save (or update) the given table as a FITS table in the current FITS image.
 void setNavigator(Navigator navigator)
          Set the instance of the catalog navigator to use with this image display.
protected  void showNavigatorFrame(Catalog cat)
          If the given catalog argument is null, display the catalog window ("Browse" mode), otherwise query the catalog using the default arguments for the current image.
protected  void transformGraphics(java.awt.geom.AffineTransform trans)
          Transform the image graphics using the given AffineTransform.
 
Methods inherited from class jsky.image.gui.DivaMainImageDisplay
addChangeListener, addHistoryMenuItems, addToHistory, addToHistory, back, blankImage, checkExtensions, checkSave, cleanupHistoryList, cleanupImageCache, clear, clearHistory, close, downloadImageToTempFile, editColors, editCutLevels, exit, fileInHistoryList, fireChange, forward, getBackAction, getBasePos, getCanvasDraw, getColorsAction, getCutLevelsAction, getDefaultSearchMagRange, getDefaultSearchRadius, getDesktop, getFilename, getFitsGraphics, getFitsHDUChooser, getFitsHDUChooserFrame, getFitsKeywordsFrame, getForwAction, getImageColorsFrame, getImageCutLevelsFrame, getImageHistoryItem, getImagePropertiesFrame, getMaxHistoryItems, getObjectName, getOpenAction, getParentFrame, getPickObjectFrame, getPickObjectPanel, getPrintAction, getPrintPreviewAction, getRootComponent, getSaveAction, getSaveAsAction, getTitle, getURL, initFITSImage, initProgressPanel, isJAIImageType, isMainWindow, isSaveNeeded, loadCachedImage, loadHistory, loadImageFromURL, makeImageFileChooser, makeImageHistoryItem, mergeHistoryList, open, openURL, paintImageAndGraphics, pickObject, print, printPreview, removeChangeListener, save, saveAs, saveAs, saveGraphicsWithImage, saveHistory, setDesktop, setDownloadState, setFilename, setFilename, setMaxHistoryItems, setOrigin, setParentFrame, setSaveNeeded, setScale, setTitle, setURL, updateEnabledStates, updateImage, updateImageData, updateTitle, viewFitsExtensions, viewFitsKeywords, viewImageProperties
 
Methods inherited from class jsky.image.gui.DivaGraphicsImageDisplay
addImageGraphicsHandler, centerImage, getAffineTransform, getCanvas, getCanvasGraphics, getCoordinateConverter, getDisplayImage, getFitsImage, getImage, getImageHeight, getImageProcessor, getImageWidth, getInterpolation, getOrigin, getPixelValue, getPixelValues, getScale, getScaleHints, getVisibleArea, getWCS, initWCS, isAutoCenterImage, isClear, isImmediateMode, isInitialized, isPrescaled, isWCS, main, makeCanvasGraphics, notifyGraphicsHandlers, paintLayer, removeImageGraphicsHandler, scale, scaleToFit, scaleToFit, setAutoCenterImage, setImage, setImage, setImageProcessor, setImmediateMode, setInterpolation, setPrescaled, setScaleHints, setWCS, transformGraphics, updateImage
 
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
 
Methods inherited from interface jsky.image.gui.GraphicsImageDisplay
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, setPrescaled, setScaleHints, setWCS, updateImage
 

Constructor Detail

NavigatorImageDisplay

public NavigatorImageDisplay(java.awt.Component parent)
Construct a NavigatorImageDisplay widget.

Parameters:
parent - the top level parent frame (or internal frame) used to close the window
Method Detail

getNavigatorPane

public NavigatorPane getNavigatorPane()
Return the Diva pane containing the added catalog symbol layer.


newWindow

public java.awt.Component newWindow()
Open up another window like this one and return a reference to it.

Note: derived classes should redefine this to return an instance of the correct class, which should be derived JFrame or JInternalFrame.

Overrides:
newWindow in class DivaMainImageDisplay

setNavigator

public void setNavigator(Navigator navigator)
Set the instance of the catalog navigator to use with this image display.


getNavigator

public Navigator getNavigator()
Return the instance of the catalog navigator used with this image display.


openCatalogWindow

public void openCatalogWindow()
Open the catalog navigator window.

Specified by:
openCatalogWindow in interface CatalogNavigatorOpener

openCatalogWindow

public void openCatalogWindow(Catalog cat)
Display the interface for the given catalog, if not null, otherwise just open the catalog navigator window.

Specified by:
openCatalogWindow in interface CatalogNavigatorOpener

openCatalogWindow

public void openCatalogWindow(java.lang.String name)
Open a catalog window for the named catalog, if found.

Specified by:
openCatalogWindow in interface CatalogNavigatorOpener

openLocalCatalog

public void openLocalCatalog()
Pop up a file browser to select a local catalog file to open.

Specified by:
openLocalCatalog in interface CatalogNavigatorOpener

displayFITSTable

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

Specified by:
displayFITSTable in interface MainImageDisplay
Overrides:
displayFITSTable in class DivaMainImageDisplay

saveFITSTable

public void saveFITSTable(TableQueryResult table)
Save (or update) the given table as a FITS table in the current FITS image.


showNavigatorFrame

protected void showNavigatorFrame(Catalog cat)
If the given catalog argument is null, display the catalog window ("Browse" mode), otherwise query the catalog using the default arguments for the current image.


makeNavigatorFrame

protected void makeNavigatorFrame()
Make a NavigatorFrame or NavigatorInternalFrame, depending on what type of frames are being used.


newImage

protected void newImage(boolean before)
This method is called before and after a new image is loaded, each time with a different argument.

Overrides:
newImage in class DivaMainImageDisplay
Parameters:
before - set to true before the image is loaded and false afterwards

dispose

public void dispose()
Cleanup when the window is no longer needed.

Overrides:
dispose in class DivaMainImageDisplay

transformGraphics

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

Overrides:
transformGraphics in class DivaGraphicsImageDisplay

saveCatalogOverlaysWithImage

public void saveCatalogOverlaysWithImage()
Save any current catalog overlays as a FITS table in the image file.


pickedObject

protected void pickedObject()
Called when an object is selected in the Pick Object window.

Add the currently selected object in the "Pick Object" window to the currently displayed table, or create a new table if none is being displayed.

Overrides:
pickedObject in class DivaMainImageDisplay

getCatalogBrowseAction

public javax.swing.AbstractAction getCatalogBrowseAction()

filterQueryResult

public QueryResult filterQueryResult(QueryResult queryResult)
Can be overridden in a derived class to filter the result of a catalog query.