jsky.image
Class ImageChangeEvent

java.lang.Object
  extended by java.util.EventObject
      extended by javax.swing.event.ChangeEvent
          extended by jsky.image.ImageChangeEvent
All Implemented Interfaces:
java.io.Serializable

public class ImageChangeEvent
extends javax.swing.event.ChangeEvent

Used to describe image change events such as loading a new image, setting a new origin or scale.

Version:
$Revision: 1.1 $
Author:
Allan Brighton
See Also:
Serialized Form

Field Summary
protected static int BEFORE
          Bit set before a new image is loaded and cleared afterwards
protected static int EDIT_STATE_CHANGED
          Bit set if the image file was edited (such as adding or deleting a FITS table)
protected static int IMAGE_DATA_CHANGED
          Bit set if the image data was modified so that the image display should be updated
protected static int NEW_ANGLE
          Bit set if a new rotation angle value was set
protected static int NEW_COLORMAP
          Bit set if a new colormap was set
protected static int NEW_CUT_LEVELS
          Bit set if new cut levels were set
protected static int NEW_IMAGE
          Bit set if a new image was (or will be) loaded
protected static int NEW_ORIGIN
          Bit set if the origin changed
protected static int NEW_SCALE
          Bit set if a new scale value was set
protected  int val
          Bitmask for boolean values
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
ImageChangeEvent(java.lang.Object source)
          Create a new image change event.
 
Method Summary
 boolean isBefore()
          Used with isNewImage(), returns true if a new image will be loaded, and false if it was already loaded.
 boolean isEditStateChanged()
          Return true if the edited state of the image file changed
 boolean isImageDataChanged()
          Return true if the image data was changed
 boolean isNewAngle()
          Return true if the image rotation angle was changed
 boolean isNewColormap()
          Return true if the image colormap changed
 boolean isNewCutLevels()
          Return true if the image cut levels changed
 boolean isNewImage()
          Return true if a new image was (or will be) loaded.
 boolean isNewOrigin()
          Return true if the visible image origin changed (by panning)
 boolean isNewScale()
          Return true if the image scale (magnification) was changed
 void reset()
          Reset all fields to the default values
 void setBefore(boolean b)
           
 void setEditStateChanged(boolean b)
           
 void setImageDataChanged(boolean b)
           
 void setNewAngle(boolean b)
           
 void setNewColormap(boolean b)
           
 void setNewCutLevels(boolean b)
           
 void setNewImage(boolean b)
           
 void setNewOrigin(boolean b)
           
 void setNewScale(boolean b)
           
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

val

protected int val
Bitmask for boolean values


NEW_IMAGE

protected static final int NEW_IMAGE
Bit set if a new image was (or will be) loaded

See Also:
Constant Field Values

BEFORE

protected static final int BEFORE
Bit set before a new image is loaded and cleared afterwards

See Also:
Constant Field Values

NEW_SCALE

protected static final int NEW_SCALE
Bit set if a new scale value was set

See Also:
Constant Field Values

NEW_ANGLE

protected static final int NEW_ANGLE
Bit set if a new rotation angle value was set

See Also:
Constant Field Values

NEW_ORIGIN

protected static final int NEW_ORIGIN
Bit set if the origin changed

See Also:
Constant Field Values

NEW_COLORMAP

protected static final int NEW_COLORMAP
Bit set if a new colormap was set

See Also:
Constant Field Values

NEW_CUT_LEVELS

protected static final int NEW_CUT_LEVELS
Bit set if new cut levels were set

See Also:
Constant Field Values

EDIT_STATE_CHANGED

protected static final int EDIT_STATE_CHANGED
Bit set if the image file was edited (such as adding or deleting a FITS table)

See Also:
Constant Field Values

IMAGE_DATA_CHANGED

protected static final int IMAGE_DATA_CHANGED
Bit set if the image data was modified so that the image display should be updated

See Also:
Constant Field Values
Constructor Detail

ImageChangeEvent

public ImageChangeEvent(java.lang.Object source)
Create a new image change event.

Parameters:
source - the source (sending) object.
Method Detail

isNewImage

public boolean isNewImage()
Return true if a new image was (or will be) loaded. If isBefore() returns true, it is before loading the image, otherwise after.


isBefore

public boolean isBefore()
Used with isNewImage(), returns true if a new image will be loaded, and false if it was already loaded.


isNewScale

public boolean isNewScale()
Return true if the image scale (magnification) was changed


isNewAngle

public boolean isNewAngle()
Return true if the image rotation angle was changed


isNewOrigin

public boolean isNewOrigin()
Return true if the visible image origin changed (by panning)


isNewColormap

public boolean isNewColormap()
Return true if the image colormap changed


isNewCutLevels

public boolean isNewCutLevels()
Return true if the image cut levels changed


isEditStateChanged

public boolean isEditStateChanged()
Return true if the edited state of the image file changed


isImageDataChanged

public boolean isImageDataChanged()
Return true if the image data was changed


setNewImage

public void setNewImage(boolean b)

setBefore

public void setBefore(boolean b)

setNewScale

public void setNewScale(boolean b)

setNewAngle

public void setNewAngle(boolean b)

setNewOrigin

public void setNewOrigin(boolean b)

setNewColormap

public void setNewColormap(boolean b)

setNewCutLevels

public void setNewCutLevels(boolean b)

setEditStateChanged

public void setEditStateChanged(boolean b)

setImageDataChanged

public void setImageDataChanged(boolean b)

reset

public void reset()
Reset all fields to the default values