jsky.image.gui
Class ImageHistoryItem

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

public class ImageHistoryItem
extends javax.swing.AbstractAction
implements javax.swing.event.ChangeListener, java.io.Serializable

Used to store information about previously viewed images. For downloaded files, the filename is the name of a temp file that can be accessed only in this session. If the application is restarted, the URL will have to be used instead.

See Also:
Serialized Form

Field Summary
protected  java.lang.String cmap
          Colormap used
protected  double dec
          The Dec coordinate of the image center (or Double.NaN if not known)
protected  java.lang.String filename
          Filename (may be a temp download file)
protected  double hcut
          Low cut
protected  java.lang.String itt
          Intensity table used
protected  double lcut
          High cut
protected  double ra
          The RA coordinate of the image center (or Double.NaN if not known)
protected  float scale
          magnification factor
protected  int scaleAlg
          Name of the image lookup scale algorithm
protected  java.lang.String title
          The title for this item
protected  java.net.URL url
          The origial image URL
protected  boolean userSetCutLevels
          True if user set the cut levels
 
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
ImageHistoryItem(MainImageDisplay imageDisplay, double ra, double dec, java.lang.String title, java.net.URL url, java.lang.String filename)
          Create an image history item based on the given arguments.
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent evt)
          Load the file if it exists, otherwise the URL, and arrange to restore the history settings once the image is loaded.
 boolean match(double ra, double dec)
          Return true if this entry matches the given coordinates
 void stateChanged(javax.swing.event.ChangeEvent ce)
          Called when the image is actually loaded, so we can restore the settings
 
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

title

protected java.lang.String title
The title for this item


ra

protected double ra
The RA coordinate of the image center (or Double.NaN if not known)


dec

protected double dec
The Dec coordinate of the image center (or Double.NaN if not known)


url

protected java.net.URL url
The origial image URL


filename

protected java.lang.String filename
Filename (may be a temp download file)


cmap

protected java.lang.String cmap
Colormap used


itt

protected java.lang.String itt
Intensity table used


hcut

protected double hcut
Low cut


lcut

protected double lcut
High cut


userSetCutLevels

protected boolean userSetCutLevels
True if user set the cut levels


scaleAlg

protected int scaleAlg
Name of the image lookup scale algorithm


scale

protected float scale
magnification factor

Constructor Detail

ImageHistoryItem

public ImageHistoryItem(MainImageDisplay imageDisplay,
                        double ra,
                        double dec,
                        java.lang.String title,
                        java.net.URL url,
                        java.lang.String filename)
Create an image history item based on the given arguments.

Parameters:
imageDisplay - the image display widget
ra - the image center RA coordinate
dec - the image center Dec coordinate
title - the title for the history menu
url - the URL for the original image
filename - the local filename, if downloaded
Method Detail

match

public boolean match(double ra,
                     double dec)
Return true if this entry matches the given coordinates


actionPerformed

public void actionPerformed(java.awt.event.ActionEvent evt)
Load the file if it exists, otherwise the URL, and arrange to restore the history settings once the image is loaded.

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

stateChanged

public void stateChanged(javax.swing.event.ChangeEvent ce)
Called when the image is actually loaded, so we can restore the settings

Specified by:
stateChanged in interface javax.swing.event.ChangeListener