KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > util > explorer > swing > graph > VertexGraphicsInterface


1 /*====================================================================
2
3  Objectweb Explorer Framework
4  Copyright (C) 2000-2004 INRIA - USTL - LIFL - GOAL
5  Contact: openccm@objectweb.org
6
7  This library is free software; you can redistribute it and/or
8  modify it under the terms of the GNU Lesser General Public
9  License as published by the Free Software Foundation; either
10  version 2.1 of the License, or any later version.
11
12  This library is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  Lesser General Public License for more details.
16
17  You should have received a copy of the GNU Lesser General Public
18  License along with this library; if not, write to the Free Software
19  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
20  USA
21
22  Initial developer(s): Laëtitia Lafeuille.
23  Contributor(s): ______________________________________.
24
25  ====================================================================*/

26 package org.objectweb.util.explorer.swing.graph;
27
28 import java.awt.Dimension JavaDoc;
29 import java.awt.Graphics JavaDoc;
30 import java.awt.Point JavaDoc;
31
32 /**
33  *
34  * @version 0.2
35  */

36 public interface VertexGraphicsInterface {
37
38     /** The size of the open composite (super composite) membrane*/
39     public final int COMPOSITE_MEMBRANE_SIZE = 5;
40
41     /** The size of the verteces inside the super composite */
42     public final int PRIMITIVE_MEMBRANE_SIZE = 2;
43
44     /** The location of the super composite label */
45     public final Point JavaDoc SUPER_COMPOSITE_NAME_LOCATION = new Point JavaDoc(
46             25 + COMPOSITE_MEMBRANE_SIZE, 25 + COMPOSITE_MEMBRANE_SIZE);
47
48     /** The origin of the super composite */
49     public final Point JavaDoc SUPER_COMPOSITE_ORIGIN = new Point JavaDoc(10, 10);
50
51     /** The origin of the first vertex when there isn't a super composite */
52     public final Point JavaDoc PRIMITIVE_ORIGIN = new Point JavaDoc(10, 10);
53
54     /** The first vertex location into the super composite */
55     public final Point JavaDoc FIRST_VETEX_LOCATION = new Point JavaDoc(
56             COMPOSITE_MEMBRANE_SIZE + 55, COMPOSITE_MEMBRANE_SIZE + 60);
57
58     /** The max width of a vertex */
59     public final int VERTEX_MAX_WIDTH = 300;
60
61     /** The width of the super composite label */
62     public final int COMPOSITE_NAME_WIDTH = 12;
63
64     /** The with of the verteces label inside the super composite */
65     public final int PRIMITIVE_NAME_WIDTH = 7;
66
67     /** The height of the verteces label inside the super composite */
68     public final int PRIMITIVE_NAME_HEIGHT = 4;
69
70     /** Returns the default size of a vertex */
71     Dimension JavaDoc getDefaultSize();
72
73     /** Returns the super composite size */
74     Dimension JavaDoc getSuperCompositeSize();
75
76     /** Draw the specific vertex into the specific graphics */
77     void drawVertex(Graphics JavaDoc g, String JavaDoc vertexType, Dimension JavaDoc d,
78             PrimitiveVertex vertex);
79
80 }
Popular Tags