jsky.catalog.gui
Class CatalogHistoryItem

java.lang.Object
  extended by javax.swing.AbstractAction
      extended by jsky.catalog.gui.CatalogHistoryItem
All Implemented Interfaces:
java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action

public class CatalogHistoryItem
extends javax.swing.AbstractAction
implements java.io.Serializable

Local class used to store information about previously viewed catalogs or query results. During a given session, the display component is saved and can be redisplayed if needed. If the application is restarted, the URL can be used instead.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
 
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON
 
Constructor Summary
CatalogHistoryItem(java.lang.String name, java.net.URL url, javax.swing.JComponent queryComponent)
          Create a catalog history item with the given name (for display), URL string (for catalog files), and display component.
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent evt)
          Display the catalog
 java.lang.String getName()
          Return the catalogs's name.
 javax.swing.JComponent getQueryComponent()
          Return the component displaying the catalog or query results (used in this session).
 java.lang.String getURLStr()
          Return the URL of the catalog, table or FITS file, if known, otherwise null.
 
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CatalogHistoryItem

public CatalogHistoryItem(java.lang.String name,
                          java.net.URL url,
                          javax.swing.JComponent queryComponent)
Create a catalog history item with the given name (for display), URL string (for catalog files), and display component. The component is used during this session, otherwise the name or URL are used.

Parameters:
name - The catalogs's name
url - The URL of the catalog, table or FITS file, if known, otherwise null
queryComponent - The component displaying the catalog or query results (used in this session).
Method Detail

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent evt)
Display the catalog

Specified by:
actionPerformed in interface java.awt.event.ActionListener

getURLStr

public java.lang.String getURLStr()
Return the URL of the catalog, table or FITS file, if known, otherwise null.


getName

public java.lang.String getName()
Return the catalogs's name.


getQueryComponent

public javax.swing.JComponent getQueryComponent()
Return the component displaying the catalog or query results (used in this session).