jsky.navigator
Class Navigator

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JPanel
                  extended by jsky.catalog.gui.CatalogNavigator
                      extended by jsky.navigator.Navigator
All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, CatalogNavigatorOpener, QueryResultDisplay, HTMLQueryResultHandler, GenericToolBarTarget

public class Navigator
extends CatalogNavigator
implements CatalogNavigatorOpener

Extends CatalogNavigator to include support for displaying images and plotting catalog data in images.

See Also:
Serialized Form

Nested Class Summary
protected  class Navigator.NavigatorImageLoader
          This local class is used to load an image in the event dispatching thread.
 
Nested classes/interfaces inherited from class jsky.catalog.gui.CatalogNavigator
CatalogNavigator.EmptyPanel
 
Nested classes/interfaces inherited from class javax.swing.JPanel
JPanel.AccessibleJPanel
 
Nested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BltBufferStrategy, 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.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
Navigator(Component parent, CatalogTree catalogTree, TablePlotter plotter)
          Construct a Navigator using the given CatalogTree widget (call setQueryResult to set the catalog or data to display).
Navigator(Component parent, CatalogTree catalogTree, TablePlotter plotter, MainImageDisplay imageDisplay)
          Construct a Navigator using the given CatalogTree widget (call setQueryResult to set the catalog or data to display).
 
Method Summary
 void addPickedObjectToTable(PickObjectStatistics stats, boolean isUpdate)
          Add the object described by stats to the currently displayed table, or create a new table if none is being displayed.
protected  void addRowForPickedObject(TableQueryResult table, TableDisplayTool tableDisplayTool, PickObjectStatistics stats, boolean isUpdate)
          Add a row to the given table with information from the given stats object.
protected  void cleanupHistoryList()
          This method is called after the history list is deserialized to remove any items in the list that can't be accessed.
static CatalogDirectory getCatalogDirectory()
          Return the top level catalog directory to use based on the value of the jsky.catalog.directory system property, which may be set to the name of the class implementing the CatalogDirectory interface.
 MainImageDisplay getImageDisplay()
          Used to display images
 Action getImageDisplayAction()
          Return the action to use to show the image window.
protected  void initSymbolPlotter()
          initialize the symbol plotter
protected  void loadImage(String filename, URL url)
          Load and display the given image file.
protected  void loadImage(URL url, String contentType)
          Download the given image URL to a temporary file and then display the image file when done.
protected  CatalogQueryTool makeCatalogQueryTool(Catalog catalog)
          Make a panel for querying a catalog (Redefined from the parent class to use a CatalogQueryTool subclass).
 JFileChooser makeFileChooser()
          Create and return a new file chooser to be used to select a local catalog file to open.
protected  void makeImageDisplayControlFrame()
          Make an ImageDisplayControlFrame or ...InternalFrame, depending on what type of frames are being used.
protected  TableQueryResult makePickObjectTable(PickObjectStatistics stats)
          Make a catalog table to use to hold the objects picked by the user and add the first row based on the given stats object.
protected  JComponent makeURLComponent(URL url, String contentType)
          Return a new JComponent displaying the contents of the given URL.
protected  void notifyNewImageDisplay()
          Notify any panels that need to know about the new image display window.
protected  void notifyNewImageDisplay(Stack stack)
          Notify any panels in the given stack that need to know about the new image display window.
 void openCatalogWindow()
          Open the catalog navigator window (in this case, it is already open).
 void openCatalogWindow(Catalog cat)
          Open the catalog navigator window and display the interface for the given catalog, if not null (in this case, the window is already open).
 void openCatalogWindow(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.
 void saveWithImage()
          Save the current table as a FITS table in the current FITS image.
 void showImageDisplay()
          Show the image display window.
 
Methods inherited from class jsky.catalog.gui.CatalogNavigator
_resultComponentChanged, addChangeListener, addHistoryMenuItems, addRow, addToHistory, addToHistory, back, cleanupHistoryStack, clear, clearHistory, close, deleteSelectedRows, displayHTMLPage, displayPlainText, exit, fireChange, forward, getAddRowAction, getBackAction, getBackStack, getCatalogTree, getDeleteSelectedRowsAction, getDesktop, getForwAction, getForwStack, getHistoryList, getMaxHistoryItems, getOpenAction, getParentFrame, getPlotter, getPrintAction, getProgressPanel, getQueryComponent, getQueryResult, getQuerySplitPane, getResultComponent, getResultSplitPane, getRootComponent, getSaveAsAction, getSaveAsHTMLAction, getSaveWithImageAction, isMainWindow, loadHistory, makeCatalogComponent, makeCatalogDirectoryComponent, makeCatalogHistoryItem, makeProgressPanel, makeQueryResultComponent, makeQueryResultComponent, makeTablePopupMenu, makeTableQueryResultComponent, makeUnknownURLComponent, makeURLComponent, mergeHistoryList, open, open, openURL, print, removeChangeListener, saveAs, saveAs, saveAsHTML, saveAsHTML, saveHistory, setAutoQuery, setComponent, setDesktop, setMainWindow, setMaxHistoryItems, setOrigURL, setPlotter, setQueryComponent, setQueryResult, setResultComponent, setTableCellsEditable, unplot, unplot, update, updateTreeSelection
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, 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, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, 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, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
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, isFocusTraversable, 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

Navigator

public Navigator(Component parent,
                 CatalogTree catalogTree,
                 TablePlotter plotter,
                 MainImageDisplay imageDisplay)
Construct a Navigator using the given CatalogTree widget (call setQueryResult to set the catalog or data to display).

Parameters:
parent - the parent component
catalogTree - a CatalogTree (normally a subclass of CatalogTree that knows about certain types of catalogs)
plotter - the object to use to plot catalog table data (when the plot button is pressed)
imageDisplay - optional widget to use to display images (if not specified, or null, a new window will be created)

Navigator

public Navigator(Component parent,
                 CatalogTree catalogTree,
                 TablePlotter plotter)
Construct a Navigator using the given CatalogTree widget (call setQueryResult to set the catalog or data to display).

Parameters:
parent - the parent component
catalogTree - a CatalogTree (normally a subclass of CatalogTree that knows about certain types of catalogs)
plotter - the object to use to plot catalog table data (when the plot button is pressed)
Method Detail

getCatalogDirectory

public static CatalogDirectory getCatalogDirectory()
Return the top level catalog directory to use based on the value of the jsky.catalog.directory system property, which may be set to the name of the class implementing the CatalogDirectory interface. The default is to use the AstroCatConfig class (The SkycatConfigFile class is another alternative). The static method in the given class named getDirectory() is called to return a reference to the top level CatalogDirectory.


getImageDisplay

public MainImageDisplay getImageDisplay()
Used to display images


getImageDisplayAction

public Action getImageDisplayAction()
Return the action to use to show the image window.


makeCatalogQueryTool

protected CatalogQueryTool makeCatalogQueryTool(Catalog catalog)
Make a panel for querying a catalog (Redefined from the parent class to use a CatalogQueryTool subclass).

Overrides:
makeCatalogQueryTool in class CatalogNavigator

makeImageDisplayControlFrame

protected void makeImageDisplayControlFrame()
Make an ImageDisplayControlFrame or ...InternalFrame, depending on what type of frames are being used.


loadImage

protected void loadImage(String filename,
                         URL url)
Load and display the given image file. The URL is only needed for the image history, in case the f/ile is deleted.


showImageDisplay

public void showImageDisplay()
Show the image display window.


loadImage

protected void loadImage(URL url,
                         String contentType)
                  throws IOException
Download the given image URL to a temporary file and then display the image file when done. This method is called in a background thread.

Throws:
IOException

notifyNewImageDisplay

protected void notifyNewImageDisplay()
Notify any panels that need to know about the new image display window.


notifyNewImageDisplay

protected void notifyNewImageDisplay(Stack stack)
Notify any panels in the given stack that need to know about the new image display window.


initSymbolPlotter

protected void initSymbolPlotter()
initialize the symbol plotter


makeURLComponent

protected JComponent makeURLComponent(URL url,
                                      String contentType)
                               throws IOException
Return a new JComponent displaying the contents of the given URL.

Overrides:
makeURLComponent in class CatalogNavigator
Throws:
IOException

openCatalogWindow

public void openCatalogWindow()
Open the catalog navigator window (in this case, it is already open).

Specified by:
openCatalogWindow in interface CatalogNavigatorOpener
See Also:
CatalogNavigatorOpener

openCatalogWindow

public void openCatalogWindow(Catalog cat)
Open the catalog navigator window and display the interface for the given catalog, if not null (in this case, the window is already open).

Specified by:
openCatalogWindow in interface CatalogNavigatorOpener
See Also:
CatalogNavigatorOpener

openCatalogWindow

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

Specified by:
openCatalogWindow in interface CatalogNavigatorOpener
See Also:
CatalogNavigatorOpener

openLocalCatalog

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

Specified by:
openLocalCatalog in interface CatalogNavigatorOpener
See Also:
CatalogNavigatorOpener

saveWithImage

public void saveWithImage()
Save the current table as a FITS table in the current FITS image.

Overrides:
saveWithImage in class CatalogNavigator

cleanupHistoryList

protected void cleanupHistoryList()
This method is called after the history list is deserialized to remove any items in the list that can't be accessed.

Overrides:
cleanupHistoryList in class CatalogNavigator

makeFileChooser

public JFileChooser makeFileChooser()
Create and return a new file chooser to be used to select a local catalog file to open.

Overrides:
makeFileChooser in class CatalogNavigator

addPickedObjectToTable

public void addPickedObjectToTable(PickObjectStatistics stats,
                                   boolean isUpdate)
Add the object described by stats to the currently displayed table, or create a new table if none is being displayed.

Parameters:
stats - describes the selected object
isUpdate - set to true if this is just an update of the previously selected position

makePickObjectTable

protected TableQueryResult makePickObjectTable(PickObjectStatistics stats)
Make a catalog table to use to hold the objects picked by the user and add the first row based on the given stats object.


addRowForPickedObject

protected void addRowForPickedObject(TableQueryResult table,
                                     TableDisplayTool tableDisplayTool,
                                     PickObjectStatistics stats,
                                     boolean isUpdate)
Add a row to the given table with information from the given stats object. The target table may or may not be compatible, so column names and types are checked.



Copyright © 2015 Central Laboratory of the Research Councils. All Rights Reserved.