
/**
 * StreakROIData.java
 * This object stores ROI data
 *
 * Created: October 26, 2004
 *
 * @author Nathan Stevens
 * @version 0.1 10/27/04
 */
import java.io.*;
import java.awt.*;

public class StreakROIData implements Serializable {
  private String parent = null; // The name SpectraData from which this ROI was obtained
  private String name = null;  // The name of this ROI
  private int direction = 0; // The direction of the roi; horizontal = 0; vertical = 1
  private SpectraData roi2D = null;  // the 2D roi
  private SpectraData roi3D = null; // the 3D roi
  private Rectangle rectangle = null; // a rectangle so that this roi can be painted
  private String notes = null;  // This is used to stored any notes about this object
  
  // The default constructor
  public StreakROIData() { }
  
  // The main constructor
  public StreakROIData(String parent, String name, int direction, SpectraData roi2D, 
    SpectraData roi3D, Rectangle rectangle) {
    
    this.parent = parent;
    this.name = name;
    this.direction = direction;
    this.roi2D = roi2D;
    this.roi3D = roi3D;
    this.rectangle = rectangle;
  }
  
  // Method to get the parent SpectraData object
  public String getParent() {
    return parent;
  }
  
  // gets the direction of the roi;
  // horizontal  is 0, and vertical is 1
  public int getDirection() {
    return direction;
  }
  
  // Method to return the 2D ROI
  public SpectraData getROI2D() {
    return roi2D;
  }
  
  // Method to return the 3D ROI
  public SpectraData getROI3D() {
    return roi3D;
  }
  
  // Method to return a rectangle used for drawing purposes
  public Rectangle getRectangle() {
    return rectangle;
  }
  
  // Method to set the notes for this roi data. stores fitting info more than likely
  public void setNotes(String notes) {
    this.notes = notes;
  }
  
  // Method to return a rectangle used for drawing purposes
  public String getNotes() {
    return notes;
  }
  
  // Method to return the name of this object
  public String toString() {
    return name;
  }
}//--end class StreakROIData
