KickJava   Java API By Example, From Geeks To Geeks.

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


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
31 /**
32  *
33  * @version 0.2
34  */

35 public interface PortGraphicsInterface {
36     
37     /** The width of a letter of a port label*/
38     public final int PORT_NAME_WIDTH = 6;
39
40     /** The lenght of a letter of a port label*/
41     public final int PORT_NAME_LENGHT = 14;
42
43     /** The y position of the first port (sever/client) into a vertex*/
44     public final int FIRST_PORT_Y = 25;
45
46     /** The y position of the controller port into a vertex*/
47     public final int CONTROLLER_PORT_Y = 15;
48
49     /** The width that separate two controller ports*/
50     public final int CONTROLLER_PORT_WIDTH = 30;
51
52     /** The width that separate two controller ports into the open composite (super composite)*/
53     public final int COMPOSITE_CONTROLLER_PORT_WIDTH = 40;
54
55     /** Method that returns the size of the specific port*/
56     Dimension JavaDoc getPortSize(String JavaDoc portType, boolean isInternal);
57
58     /** Method that serves to paint a specific port*/
59     void drawPort(Graphics JavaDoc g, String JavaDoc portName, String JavaDoc portType, boolean isInternal);
60
61 }
Popular Tags