01: /*************************************************************************
02: * *
03: * 1) This source code file, in unmodified form, and compiled classes *
04: * derived from it can be used and distributed without restriction, *
05: * including for commercial use. (Attribution is not required *
06: * but is appreciated.) *
07: * *
08: * 2) Modified versions of this file can be made and distributed *
09: * provided: the modified versions are put into a Java package *
10: * different from the original package, edu.hws; modified *
11: * versions are distributed under the same terms as the original; *
12: * and the modifications are documented in comments. (Modification *
13: * here does not include simply making subclasses that belong to *
14: * a package other than edu.hws, which can be done without any *
15: * restriction.) *
16: * *
17: * David J. Eck *
18: * Department of Mathematics and Computer Science *
19: * Hobart and William Smith Colleges *
20: * Geneva, New York 14456, USA *
21: * Email: eck@hws.edu WWW: http://math.hws.edu/eck/ *
22: * *
23: *************************************************************************/package edu.hws.jcm.draw;
24:
25: import java.awt.Graphics;
26:
27: /**
28: * An object that implements this interface can draw itself, using information
29: * from a CoordinateRect (in which it presumably appears). This interface is
30: * meant to be used with the method drawTemp() in edu.hws.jcm.draw.DisplayCanvas.
31: */
32: public interface DrawTemp extends java.io.Serializable {
33:
34: /**
35: * Draw this item in the specified graphics context, possibly using information
36: * from the specified CoordinateRect. Note that the drawTemp() method
37: * in class DisplayCanvas creates a new graphics context every time it
38: * is called, just for drawing this item.
39: */
40: public void draw(Graphics g, CoordinateRect coords);
41:
42: }
|