jsky.catalog.gui
Class CatalogHistoryItem

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

public class CatalogHistoryItem
extends AbstractAction
implements 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
protected  String name
          The catalogs's name
protected  JComponent queryComponent
          The component displaying the catalog (used in this session).
protected  String urlStr
          The URL of the catalog, table or FITS file, if known, otherwise null.
 
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(String name, URL url, 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(ActionEvent evt)
          Display the catalog
 String getName()
          Return the catalogs's name.
 JComponent getQueryComponent()
          Return the component displaying the catalog or query results (used in this session).
 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
 

Field Detail

urlStr

protected String urlStr
The URL of the catalog, table or FITS file, if known, otherwise null.


name

protected String name
The catalogs's name


queryComponent

protected transient JComponent queryComponent
The component displaying the catalog (used in this session).

Constructor Detail

CatalogHistoryItem

public CatalogHistoryItem(String name,
                          URL url,
                          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(ActionEvent evt)
Display the catalog

Specified by:
actionPerformed in interface ActionListener

getURLStr

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


getName

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


getQueryComponent

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



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