ij.gui
Class Overlay

java.lang.Object
  extended by ij.gui.Overlay

public class Overlay
extends java.lang.Object

An Overlay is a list of Rois that can be drawn non-destructively on an Image.


Constructor Summary
Overlay()
          Constructs an empty Overlay.
Overlay(Roi roi)
          Constructs an Overlay and adds the specified Roi.
 
Method Summary
 void add(Roi roi)
          Adds an Roi to this Overlay.
 void addElement(Roi roi)
          Adds an Roi to this Overlay.
 void clear()
          Removes all the Rois in this Overlay.
 void drawLabels(boolean b)
           
 Overlay duplicate()
          Returns a clone of this Overlay.
 Roi get(int index)
          Returns the Roi with the specified index.
 void remove(int index)
          Removes the Roi with the specified index from this Overlay.
 void remove(Roi roi)
          Removes the specified Roi from this Overlay.
 void setFillColor(java.awt.Color color)
          Sets the fill color of all the Rois in this overlay.
 void setStrokeColor(java.awt.Color color)
          Sets the stroke color of all the Rois in this overlay.
 int size()
          Returns the number of Rois in this Overlay.
 void temporarilyHide(int index1, int index2)
           
 Roi[] toArray()
          Returns on array containing the Rois in this Overlay.
 java.lang.String toString()
           
 void translate(int dx, int dy)
          Moves all the Rois in this overlay.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Overlay

public Overlay()
Constructs an empty Overlay.


Overlay

public Overlay(Roi roi)
Constructs an Overlay and adds the specified Roi.

Method Detail

add

public void add(Roi roi)
Adds an Roi to this Overlay.


addElement

public void addElement(Roi roi)
Adds an Roi to this Overlay.


remove

public void remove(int index)
Removes the Roi with the specified index from this Overlay.


remove

public void remove(Roi roi)
Removes the specified Roi from this Overlay.


clear

public void clear()
Removes all the Rois in this Overlay.


get

public Roi get(int index)
Returns the Roi with the specified index.


size

public int size()
Returns the number of Rois in this Overlay.


toArray

public Roi[] toArray()
Returns on array containing the Rois in this Overlay.


setStrokeColor

public void setStrokeColor(java.awt.Color color)
Sets the stroke color of all the Rois in this overlay.


setFillColor

public void setFillColor(java.awt.Color color)
Sets the fill color of all the Rois in this overlay.


translate

public void translate(int dx,
                      int dy)
Moves all the Rois in this overlay.


duplicate

public Overlay duplicate()
Returns a clone of this Overlay.


toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

drawLabels

public void drawLabels(boolean b)

temporarilyHide

public void temporarilyHide(int index1,
                            int index2)