Source code: com/port80/graph/IGraphShape.java
1 //
2 // Copyright(c) 2002, Chris Leung
3 //
4
5 package com.port80.graph;
6
7 import java.awt.*;
8 import java.awt.geom.*;
9 import java.util.*;
10
11 /** Graph shape interface.
12 *
13 * . A wrapper of a java.awt.Shape together with an enclosed unit
14 * square.
15 */
16 public interface IGraphShape extends Shape, Cloneable {
17
18 ////////////////////////////////////////////////////////////////////////
19
20 public String getName();
21 public Shape getShape();
22 public Shape getTemplateShape();
23 public Rectangle2D getClientRect();
24 public boolean isKeepRatio();
25 public Point2D getOrigin();
26 public double getBaseX();
27 public double getBaseY();
28 //
29 public void setOrigin(Point2D pt);
30 public void update(Graphics2D g2d, String label, Point2D pos,
31 int minwidth, int minheight,
32 Font font, IGraphStroke stroke,
33 Color fontcolor, Color bordercolor, Color fillcolor,
34 int exclude
35 );
36 public void render(Graphics2D g2d);
37 public void reshape(double xscale, double yscale, Point2D neworigin,
38 double textwidth, double textheight);
39 //
40 public Object clone();
41
42 ////////////////////////////////////////////////////////////////////////
43
44 }
45