001: /*
002: * The contents of this file are subject to the terms of the Common Development
003: * and Distribution License (the License). You may not use this file except in
004: * compliance with the License.
005: *
006: * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
007: * or http://www.netbeans.org/cddl.txt.
008: *
009: * When distributing Covered Code, include this CDDL Header Notice in each file
010: * and include the License file at http://www.netbeans.org/cddl.txt.
011: * If applicable, add the following below the CDDL Header, with the fields
012: * enclosed by brackets [] replaced by your own identifying information:
013: * "Portions Copyrighted [year] [name of copyright owner]"
014: *
015: * The Original Software is NetBeans. The Initial Developer of the Original
016: * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
017: * Microsystems, Inc. All Rights Reserved.
018: */
019:
020: package org.netbeans.modules.soa.mapper.common;
021:
022: import java.beans.PropertyChangeListener;
023: import java.util.List;
024:
025: /**
026: * <p>
027: *
028: * Title: </p> IMapperNode <p>
029: *
030: * Description: </p> Generic functionalities describes a basic mapper node.<p>
031: *
032: * Copyright: Copyright (c) 2002 </p> <p>
033: *
034: *
035: *
036: * @author Un Seng Leong
037: * @created December 4, 2002
038: * @version 1.0
039: */
040: public interface IMapperNode {
041: /**
042: * The property name of a change of this x coordination of the node.
043: */
044: public static final String X_CHANGE = "MNode.X";
045:
046: /**
047: * The property name of a change of this y coordination of the node.
048: */
049: public static final String Y_CHANGE = "MNode.Y";
050:
051: /**
052: * The property name of a change of the group node contains this node.
053: */
054: public static final String GROUPNODE_CHANGED = "MNode.GNodeChange";
055:
056: /**
057: * The property name of adding a link that connected to this node.
058: */
059: public static final String LINK_ADDED = "MNode.AddLink";
060:
061: /**
062: * The property name of removing a link that perviously connected to this
063: * node.
064: */
065: public static final String LINK_REMOVED = "MNode.RemoveLink";
066:
067: /**
068: * Return the x coordination of this node in a 2 dimension base view.
069: *
070: * @return an integer of x of this node.
071: */
072: public int getX();
073:
074: /**
075: * Sets the x coordination of this node in a 2 dimension base view.
076: *
077: * @param x an integer of x of this node.
078: */
079: public void setX(int x);
080:
081: /**
082: * Return the y coordination of this node in a 2 dimension base view.
083: *
084: * @return an integer of y of this node.
085: */
086: public int getY();
087:
088: /**
089: * Sets the y coordination of this node in a 2 dimension base view.
090: *
091: * @param y an integer of y of this node.
092: */
093: public void setY(int y);
094:
095: /**
096: * Return a list of links that connects to this node.
097: *
098: * @return a list of link that connects to this node.
099: */
100: public List getLinks();
101:
102: /**
103: * Add a link that is connected to this node.
104: *
105: * @param link the is connected to this node.
106: */
107: public void addLink(IMapperLink link);
108:
109: /**
110: * Remove a link that is no longer connected to this node.
111: *
112: * @param link the is no longer connected to this node.
113: */
114: public void removeLink(IMapperLink link);
115:
116: /**
117: * Retrun the number of links connected to this node.
118: *
119: * @return the number of links connected to this node.
120: */
121: public int getLinkCount();
122:
123: /**
124: * Return true if the specified link is connected to this node, false
125: * otherwise.
126: *
127: * @param link the specified to check
128: * @return true if specified link is one of the link connected to this
129: * node.
130: */
131: public boolean containsLink(IMapperLink link);
132:
133: /**
134: * Return a list of nodes that connects from this node.
135: *
136: * @return a list of nodes that connects from this node. The element of
137: * the list is IMapperNode.
138: */
139: public List getNextNodes();
140:
141: /**
142: * Return a list of nodes that connects to this node.
143: *
144: * @return a list of nodes that connects from this node. The element of
145: * the list is IMapperNode.
146: */
147: public List getPreviousNodes();
148:
149: /**
150: * Return the group node associate with this node.
151: *
152: * @return the group node associate with this node.
153: */
154: public IMapperGroupNode getGroupNode();
155:
156: /**
157: * Set the group node that contains this node.
158: *
159: * @param groupNode the group node contains this node
160: */
161: public void setGroupNode(IMapperGroupNode groupNode);
162:
163: /**
164: * Return the design object of this node in object repersentation.
165: *
166: * @return an object repsersenting this node in another form of object.
167: */
168: public Object getNodeObject();
169:
170: /**
171: * Set the object of this node in another object repersentation.
172: *
173: * @param nodeObject an object repsersenting this node in another form.
174: */
175: public void setNodeObject(Object nodeObject);
176:
177: /**
178: * Adds a PropertyChangeListener to the listener list.
179: *
180: * @param listener the PropertyChangeListener to be added
181: */
182: public void addPropertyChangeListener(
183: PropertyChangeListener listener);
184:
185: /**
186: * Removes a PropertyChangeListener from the listener list.
187: *
188: * @param listener the PropertyChangeListener to be added
189: */
190: public void removePropertyChangeListener(
191: PropertyChangeListener listener);
192:
193: /**
194: * Clone another mapper node.
195: *
196: * @return the cloned copy of this mapper node.
197: */
198: public Object clone();
199: }
|