KickJava   Java API By Example, From Geeks To Geeks.

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


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 org.jgraph.graph.DefaultPort;
29
30 /**
31  *
32  * @version 0.2
33  */

34 public class MyPort extends DefaultPort {
35     
36     /** The interface relative to the port*/
37     private Object JavaDoc itf;
38
39     /** The name of the port*/
40     private String JavaDoc name;
41
42     /** The type of the port : client/server/controller*/
43     private String JavaDoc type;
44
45     /** The creation number of the port on his parent vertex. It's used for locate the port graphics*/
46     private int number;
47     
48     /** Boolean that indicates if the port is generated or not*/
49     private boolean isGenerated;
50
51     public MyPort(Object JavaDoc itf, String JavaDoc name, String JavaDoc type, int number, boolean isGenerated) {
52         super();
53         this.name = name;
54         this.type = type;
55         this.number = number;
56         this.isGenerated = isGenerated;
57         this.itf = itf;
58     }
59
60     public String JavaDoc getName() {
61         return name;
62     }
63     
64     public boolean isGenerated(){
65         return isGenerated;
66     }
67
68     public String JavaDoc toString() {
69         return name;
70     }
71
72     public String JavaDoc getType() {
73         return type;
74     }
75
76     public int getNumber() {
77         return number;
78     }
79
80 }
Popular Tags