Back to index

moin  1.9.0~rc2
FigureChangeEvent.java
Go to the documentation of this file.
00001 /*
00002  * @(#)FigureChangeEvent.java 5.1
00003  *
00004  */
00005 
00006 package CH.ifa.draw.framework;
00007 
00008 import java.awt.Rectangle;
00009 import java.util.EventObject;
00010 
00015 public class FigureChangeEvent extends EventObject {
00016 
00017     private Rectangle fRectangle;
00018     private static final Rectangle  fgEmptyRectangle = new Rectangle(0, 0, 0, 0);
00019 
00024     public FigureChangeEvent(Figure source, Rectangle r) {
00025         super(source);
00026         fRectangle = r;
00027     }
00028 
00029     public FigureChangeEvent(Figure source) {
00030         super(source);
00031         fRectangle = fgEmptyRectangle;
00032     }
00033 
00037     public Figure getFigure() {
00038         return (Figure)getSource();
00039     }
00040 
00044     public Rectangle getInvalidatedRectangle() {
00045         return fRectangle;
00046     }
00047 }