KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > nightlabs > editor2d > figures > ISmartUpdateFigure


1 /*
2  * Created on 05.06.2005
3  */

4 package com.nightlabs.editor2d.figures;
5
6 import java.awt.Graphics2D JavaDoc;
7
8 import org.eclipse.draw2d.Figure;
9 import org.eclipse.draw2d.Graphics;
10 import org.eclipse.draw2d.geometry.Rectangle;
11
12 /**
13  * Interface used for optimized painting.
14  *
15  * @author Alexander Bieber <alex[AT]nightlabs[DOT]de>
16  */

17 public interface ISmartUpdateFigure {
18     /**
19      * Paint region on Draw2D Graphics
20      *
21      * @param graphics The graphics to draw on
22      * @param region The region to draw
23      */

24     public void paintRegion(Graphics graphics, Rectangle region);
25     /**
26      * Paint region on Swing Graphics2D
27      *
28      * @param graphics The graphics to draw on
29      * @param region The region to draw
30      */

31     public void paintRegion(Graphics2D JavaDoc graphics, Rectangle region);
32     
33     /**
34      * Rebuild the information
35      * used for optimized painting.
36      */

37     public void refresh();
38
39     /**
40      * Rebuild the information used
41      * for optimized painting concerning
42      * the given Figure.
43      *
44      * @param figure The Figure that has changed
45      */

46     public void refresh(Figure figure);
47 }
48
Popular Tags