001/** 002 * 003 */ 004package icy.sequence.edit; 005 006import icy.roi.ROI; 007import icy.sequence.Sequence; 008 009import java.awt.Image; 010 011/** 012 * Abstract ROI sequence undoable edit. 013 * 014 * @author Stephane 015 */ 016public class AbstractROISequenceEdit extends AbstractSequenceEdit 017{ 018 ROI roi; 019 020 public AbstractROISequenceEdit(Sequence sequence, ROI roi, String name, Image icon) 021 { 022 super(sequence, name, icon); 023 024 this.roi = roi; 025 } 026 027 public AbstractROISequenceEdit(Sequence sequence, ROI roi, String name) 028 { 029 this(sequence, roi, name, roi.getIcon()); 030 } 031 032 public AbstractROISequenceEdit(Sequence sequence, ROI roi) 033 { 034 this(sequence, roi, "ROI changed", roi.getIcon()); 035 } 036 037 public ROI getROI() 038 { 039 return roi; 040 } 041 042 @Override 043 public void die() 044 { 045 super.die(); 046 047 roi = null; 048 } 049}