|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
jsky.catalog.gui.CatalogNavigator
public abstract class CatalogNavigator
Used to navigate the catalog hierarchy. This class displays a tree of catalogs in one panel and the interface for searching the catalog, or the query results in the other panel.
The tree display is based on a top level catalog directory. The details must be defined in a derived class.
Nested Class Summary | |
---|---|
class |
CatalogNavigator.EmptyPanel
Used to identify an empty query or result panel |
Nested classes/interfaces inherited from class javax.swing.JPanel |
---|
javax.swing.JPanel.AccessibleJPanel |
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.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
CatalogNavigator(java.awt.Component parent,
CatalogTree catalogTree)
Construct a CatalogNavigator using the given CatalogTree widget (Call setQueryResult to set the root catalog to display). |
|
CatalogNavigator(java.awt.Component parent,
CatalogTree catalogTree,
TablePlotter plotter)
Construct a CatalogNavigator using the given CatalogTree widget and TablePlotter (Call setQueryResult to set the root catalog to display). |
Method Summary | |
---|---|
protected void |
_resultComponentChanged()
Called whenever the display component is changed |
void |
addChangeListener(javax.swing.event.ChangeListener l)
Register to receive change events from this object whenever a new query result is displayed. |
void |
addHistoryMenuItems(javax.swing.JMenu menu)
Add history items (for previously displayed components) to the given menu |
void |
addQueryMenuItems(javax.swing.JMenu menu,
java.awt.event.ActionListener l)
Add Query items (for previously stored queries) to the given menu, using the given listener, if supplied, otherwise the default (restore the query). |
void |
addRow()
If a table is being displayed, add an empty row in the table. |
protected void |
addToHistory()
Add the current catalog to the history stack, removing duplicates. |
void |
back()
Go back to the previous component in the history list |
void |
clear()
Clear the display. |
protected void |
clearHistory()
Clear out the history and back/forward stacks |
void |
clearQueryList()
Remove all items from the query list. |
void |
close()
Close the window |
void |
deleteQuery(java.lang.String name)
Delete the named query and display settings. |
void |
deleteSelectedRows()
If a table is being displayed, delete the selected rows. |
void |
displayHTMLPage(java.net.URL url)
Display the given HTML URL in a popup window containing a JEditorPane. |
void |
displayPlainText(java.net.URL url)
Display the text pointed to by the given URL. |
void |
exit()
Exit the application with the given status. |
protected void |
fireChange(javax.swing.event.ChangeEvent e)
Notify any listeners that a new query result is being displayed. |
void |
forward()
Go forward to the next component in the history list |
javax.swing.AbstractAction |
getAddRowAction()
|
javax.swing.AbstractAction |
getBackAction()
Return the action for "Back" |
protected java.util.Stack |
getBackStack()
Return the stack of CatalogHistoryItems, used to go back to a previous panel |
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. |
CatalogTree |
getCatalogTree()
Return the object displaying the catalog tree |
javax.swing.AbstractAction |
getDeleteAllQueryAction()
|
javax.swing.AbstractAction |
getDeleteSelectedRowsAction()
|
javax.swing.JDesktopPane |
getDesktop()
Return the JDesktopPane, if using internal frames, otherwise null |
javax.swing.JFileChooser |
getFileChooser()
Return |
javax.swing.AbstractAction |
getForwAction()
Return the action for "Forward" |
protected java.util.Stack |
getForwStack()
Return the stack of CatalogHistoryItems, used to go forward to the next panel |
javax.swing.AbstractAction |
getOpenAction()
Return the action for "Open" |
java.awt.Component |
getParentFrame()
Return the top level parent frame (or internal frame) for this window |
TablePlotter |
getPlotter()
Return the object used to plot table data, or null if none was defined. |
javax.swing.AbstractAction |
getPrintAction()
|
protected ProgressPanel |
getProgressPanel()
Return the panel used to display download progress information |
javax.swing.JComponent |
getQueryComponent()
Return the panel currently being displayed |
QueryResult |
getQueryResult()
|
protected javax.swing.JSplitPane |
getQuerySplitPane()
The pane dividing the catalog tree and the query panel |
javax.swing.JComponent |
getResultComponent()
Return the panel currently being displayed |
javax.swing.JSplitPane |
getResultSplitPane()
The pane dividing the query and the results panel |
java.awt.Component |
getRootComponent()
Return the top level parent frame (or internal frame) for this window |
javax.swing.AbstractAction |
getSaveAsAction()
|
javax.swing.AbstractAction |
getSaveAsHTMLAction()
|
javax.swing.AbstractAction |
getSaveWithImageAction()
|
javax.swing.AbstractAction |
getStoreNewQueryAction()
|
static boolean |
isMainWindow()
Return true if this is the main application window (enables exit menu item) |
protected javax.swing.JComponent |
makeCatalogComponent(Catalog catalog)
Return a new JComponent displaying the contents of (or the interface for searching) the given catalog |
protected javax.swing.JComponent |
makeCatalogDirectoryComponent(CatalogDirectory catalogDirectory)
Return a new JComponent displaying the contents of the given catalog directory |
protected CatalogHistoryItem |
makeCatalogHistoryItem()
Return a new CatalogHistoryItem for the currently displayed catalog. |
protected CatalogQueryTool |
makeCatalogQueryTool(Catalog catalog)
Make a panel for querying a catalog |
protected javax.swing.JFileChooser |
makeFileChooser()
Create and return a new file chooser to be used to select a local file to open. |
protected void |
makeProgressPanel()
If it does not already exist, make the panel used to display the progress of network access. |
protected javax.swing.JComponent |
makeQueryResultComponent()
Create and return a component displaying the given query result |
protected javax.swing.JComponent |
makeQueryResultComponent(QueryResult queryResult)
Create and return a JComponent displaying the given query result. |
protected javax.swing.JFileChooser |
makeSaveFileChooser()
Create and return a new file chooser to be used for saving to a file. |
protected void |
makeTablePopupMenu(TableDisplayTool t)
Add a popup menu to the given TableDisplayTool |
protected javax.swing.JComponent |
makeTableQueryResultComponent(TableQueryResult tableQueryResult)
Return a new JComponent displaying the contents of the given table query result. |
protected javax.swing.JComponent |
makeUnknownURLComponent(java.net.URL url,
java.lang.String contentType)
Return a new JComponent displaying the contents of the given URL. |
protected javax.swing.JComponent |
makeURLComponent(java.net.URL url)
Return a new JComponent displaying the contents of the given URL. |
protected javax.swing.JComponent |
makeURLComponent(java.net.URL url,
java.lang.String contentType)
Return a new JComponent displaying the contents of the given URL. |
void |
open()
Display a file chooser to select a local catalog file to open |
void |
open(java.lang.String fileOrUrl)
Open the given file or URL |
void |
openURL()
Display a dialog to enter a URL to display |
void |
print()
Pop up a dialog for printing the query results. |
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 current query result to the selected file. |
void |
saveAs(java.lang.String filename)
Save the current query result to the selected file. |
void |
saveAsHTML()
Pop up a dialog to ask the user for a file name, and then save the current query result to the selected file in HTML format. |
void |
saveAsHTML(java.lang.String filename)
Save the current query result to the selected file in HTML format. |
void |
saveWithImage()
Save the current table as a FITS table in the current FITS image (Should be defined in a derived class). |
void |
setAutoQuery(boolean b)
Set to true to query catalogs automatically when selected |
void |
setComponent(javax.swing.JComponent component)
Set the query or result component to display. |
void |
setDesktop(javax.swing.JDesktopPane desktop)
Set the JDesktopPane to use for top level windows, if using internal frames |
static void |
setMainWindow(boolean b)
Set to true if this is the main application window (enables exit menu item) |
void |
setOpenAction(javax.swing.AbstractAction openAction)
Override the default Open action. |
void |
setOrigURL(java.net.URL url)
Set the original URL for the current catalog or table. |
void |
setPlotter(TablePlotter tp)
Set the object used to plot table data. |
void |
setQueryComponent(javax.swing.JComponent component)
Set the query component to display |
void |
setQueryResult(QueryResult queryResult)
Display the given query result. |
void |
setResultComponent(javax.swing.JComponent component)
Set the result component to display |
void |
setTableCellsEditable(boolean b)
Set the editable state of the cells in the displayed table. |
void |
storeNewQuery()
Ask the user for a name, and then store the current query and display settings under that name for later use. |
void |
storeQuery(java.lang.String name)
Store the current query and display settings under the given name for later use. |
void |
unplot()
Remove any plot symbols or graphics managed by any of the display components |
protected void |
unplot(java.util.Stack stack)
Remove any plot symbols or graphics managed by any of the display components in the given stack |
protected void |
update()
Update the layout after a new component has been inserted |
protected void |
updateTreeSelection()
Select the node in the catalog directory tree corresponding to the current display component |
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 |
---|
public CatalogNavigator(java.awt.Component parent, CatalogTree catalogTree)
parent
- the parent componentcatalogTree
- a CatalogTree (normally a subclass of CatalogTree
that knows about certain types of catalogs)public CatalogNavigator(java.awt.Component parent, CatalogTree catalogTree, TablePlotter plotter)
parent
- the parent componentcatalogTree
- 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 |
---|
public static CatalogDirectory getCatalogDirectory()
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.
public CatalogTree getCatalogTree()
protected javax.swing.JSplitPane getQuerySplitPane()
public javax.swing.JSplitPane getResultSplitPane()
public javax.swing.JDesktopPane getDesktop()
public void setDesktop(javax.swing.JDesktopPane desktop)
public void setAutoQuery(boolean b)
public TablePlotter getPlotter()
public void setPlotter(TablePlotter tp)
public java.awt.Component getParentFrame()
public void setComponent(javax.swing.JComponent component)
public void setQueryComponent(javax.swing.JComponent component)
public javax.swing.JComponent getQueryComponent()
public void setResultComponent(javax.swing.JComponent component)
public javax.swing.JComponent getResultComponent()
protected void _resultComponentChanged()
public void addChangeListener(javax.swing.event.ChangeListener l)
public void removeChangeListener(javax.swing.event.ChangeListener l)
protected void fireChange(javax.swing.event.ChangeEvent e)
protected void addToHistory()
protected CatalogHistoryItem makeCatalogHistoryItem()
public void addHistoryMenuItems(javax.swing.JMenu menu)
protected void clearHistory()
public void setOrigURL(java.net.URL url)
url
- the URL of the catalog, table or FITS fileprotected void unplot(java.util.Stack stack)
public void unplot()
protected void update()
protected void updateTreeSelection()
public QueryResult getQueryResult()
public void setQueryResult(QueryResult queryResult)
setQueryResult
in interface QueryResultDisplay
protected void makeProgressPanel()
protected javax.swing.JComponent makeQueryResultComponent()
protected javax.swing.JComponent makeQueryResultComponent(QueryResult queryResult)
protected javax.swing.JComponent makeCatalogDirectoryComponent(CatalogDirectory catalogDirectory)
protected javax.swing.JComponent makeTableQueryResultComponent(TableQueryResult tableQueryResult)
protected void makeTablePopupMenu(TableDisplayTool t)
protected javax.swing.JComponent makeCatalogComponent(Catalog catalog)
protected CatalogQueryTool makeCatalogQueryTool(Catalog catalog)
protected javax.swing.JComponent makeURLComponent(java.net.URL url) throws java.io.IOException
java.io.IOException
protected javax.swing.JComponent makeURLComponent(java.net.URL url, java.lang.String contentType) throws java.io.IOException
java.io.IOException
public void displayHTMLPage(java.net.URL url)
displayHTMLPage
in interface HTMLQueryResultHandler
public void displayPlainText(java.net.URL url)
protected javax.swing.JComponent makeUnknownURLComponent(java.net.URL url, java.lang.String contentType)
public void open()
protected javax.swing.JFileChooser makeFileChooser()
public javax.swing.JFileChooser getFileChooser()
protected javax.swing.JFileChooser makeSaveFileChooser()
public void open(java.lang.String fileOrUrl)
public void exit()
public void close()
public void back()
public void forward()
public javax.swing.AbstractAction getOpenAction()
GenericToolBarTarget
getOpenAction
in interface GenericToolBarTarget
public void setOpenAction(javax.swing.AbstractAction openAction)
public javax.swing.AbstractAction getSaveAsAction()
public javax.swing.AbstractAction getSaveAsHTMLAction()
public javax.swing.AbstractAction getSaveWithImageAction()
public javax.swing.AbstractAction getPrintAction()
public javax.swing.AbstractAction getBackAction()
GenericToolBarTarget
getBackAction
in interface GenericToolBarTarget
public javax.swing.AbstractAction getForwAction()
GenericToolBarTarget
getForwAction
in interface GenericToolBarTarget
public javax.swing.AbstractAction getAddRowAction()
public javax.swing.AbstractAction getDeleteSelectedRowsAction()
public javax.swing.AbstractAction getStoreNewQueryAction()
public javax.swing.AbstractAction getDeleteAllQueryAction()
public java.awt.Component getRootComponent()
public void openURL()
public void clear()
public void saveAs()
public void saveAs(java.lang.String filename)
public void saveWithImage()
public void saveAsHTML()
public void saveAsHTML(java.lang.String filename)
public void print()
public void addRow()
public void deleteSelectedRows()
public void setTableCellsEditable(boolean b)
public static boolean isMainWindow()
public static void setMainWindow(boolean b)
protected ProgressPanel getProgressPanel()
protected java.util.Stack getBackStack()
protected java.util.Stack getForwStack()
public void storeNewQuery()
public void storeQuery(java.lang.String name)
public void deleteQuery(java.lang.String name)
public void clearQueryList()
public void addQueryMenuItems(javax.swing.JMenu menu, java.awt.event.ActionListener l)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |