/[debian]/libjgraph-java/trunk/doc/api/org/jgraph/graph/GraphModel.html
ViewVC logotype

Contents of /libjgraph-java/trunk/doc/api/org/jgraph/graph/GraphModel.html

Parent Directory Parent Directory | Revision Log Revision Log


Revision 816 - (show annotations)
Fri Aug 3 13:14:15 2007 UTC (13 years, 10 months ago) by gregoa
File MIME type: text/html
File size: 46155 byte(s)
* New upstream release.
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2 <!--NewPage-->
3 <HTML>
4 <HEAD>
5 <!-- Generated by javadoc (build 1.4.2_11) on Mon Jul 30 10:14:31 BST 2007 -->
6 <TITLE>
7 GraphModel (JGraph v5.10.1.4 API Specification)
8 </TITLE>
9
10 <META NAME="keywords" CONTENT="org.jgraph.graph.GraphModel interface">
11
12 <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
13
14 <SCRIPT type="text/javascript">
15 function windowTitle()
16 {
17 parent.document.title="GraphModel (JGraph v5.10.1.4 API Specification)";
18 }
19 </SCRIPT>
20
21 </HEAD>
22
23 <BODY BGCOLOR="white" onload="windowTitle();">
24
25
26 <!-- ========= START OF TOP NAVBAR ======= -->
27 <A NAME="navbar_top"><!-- --></A>
28 <A HREF="#skip-navbar_top" title="Skip navigation links"></A>
29 <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
30 <TR>
31 <TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
32 <A NAME="navbar_top_firstrow"><!-- --></A>
33 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
34 <TR ALIGN="center" VALIGN="top">
35 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
36 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
37 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
38 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/GraphModel.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
39 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
40 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
41 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
42 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
43 </TR>
44 </TABLE>
45 </TD>
46 <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
47 <p><b>JGraph</b><br>v5.10.1.4</p></EM>
48 </TD>
49 </TR>
50
51 <TR>
52 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
53 &nbsp;<A HREF="../../../org/jgraph/graph/GraphCellEditor.html" title="interface in org.jgraph.graph"><B>PREV CLASS</B></A>&nbsp;
54 &nbsp;<A HREF="../../../org/jgraph/graph/GraphSelectionModel.html" title="interface in org.jgraph.graph"><B>NEXT CLASS</B></A></FONT></TD>
55 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
56 <A HREF="../../../index.html" target="_top"><B>FRAMES</B></A> &nbsp;
57 &nbsp;<A HREF="GraphModel.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
58 &nbsp;<SCRIPT type="text/javascript">
59 <!--
60 if(window==top) {
61 document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
62 }
63 //-->
64 </SCRIPT>
65 <NOSCRIPT>
66 <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
67 </NOSCRIPT>
68
69 </FONT></TD>
70 </TR>
71 <TR>
72 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
73 SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
74 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
75 DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
76 </TR>
77 </TABLE>
78 <A NAME="skip-navbar_top"></A>
79 <!-- ========= END OF TOP NAVBAR ========= -->
80
81 <HR>
82 <!-- ======== START OF CLASS DATA ======== -->
83 <H2>
84 <FONT SIZE="-1">
85 org.jgraph.graph</FONT>
86 <BR>
87 Interface GraphModel</H2>
88 <DL>
89 <DT><B>All Known Implementing Classes:</B> <DD><A HREF="../../../org/jgraph/graph/DefaultGraphModel.html" title="class in org.jgraph.graph">DefaultGraphModel</A></DD>
90 </DL>
91 <HR>
92 <DL>
93 <DT>public interface <B>GraphModel</B></DL>
94
95 <P>
96 The interface that defines a suitable data model for a JGraph.
97 <P>
98
99 <P>
100 <HR>
101
102 <P>
103 <!-- ======== NESTED CLASS SUMMARY ======== -->
104
105
106 <!-- =========== FIELD SUMMARY =========== -->
107
108
109 <!-- ======== CONSTRUCTOR SUMMARY ======== -->
110
111
112 <!-- ========== METHOD SUMMARY =========== -->
113
114 <A NAME="method_summary"><!-- --></A>
115 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
116 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
117 <TD COLSPAN=2><FONT SIZE="+2">
118 <B>Method Summary</B></FONT></TD>
119 </TR>
120 <TR BGCOLOR="white" CLASS="TableRowColor">
121 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
122 <CODE>&nbsp;boolean</CODE></FONT></TD>
123 <TD><CODE><B><A HREF="../../../org/jgraph/graph/GraphModel.html#acceptsSource(java.lang.Object, java.lang.Object)">acceptsSource</A></B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A>&nbsp;edge,
124 <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A>&nbsp;port)</CODE>
125
126 <BR>
127 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns <code>true</code> if <code>port</code> is a valid source for
128 <code>edge</code>.</TD>
129 </TR>
130 <TR BGCOLOR="white" CLASS="TableRowColor">
131 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
132 <CODE>&nbsp;boolean</CODE></FONT></TD>
133 <TD><CODE><B><A HREF="../../../org/jgraph/graph/GraphModel.html#acceptsTarget(java.lang.Object, java.lang.Object)">acceptsTarget</A></B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A>&nbsp;edge,
134 <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A>&nbsp;port)</CODE>
135
136 <BR>
137 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns <code>true</code> if <code>port</code> is a valid target for
138 <code>edge</code>.</TD>
139 </TR>
140 <TR BGCOLOR="white" CLASS="TableRowColor">
141 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
142 <CODE>&nbsp;void</CODE></FONT></TD>
143 <TD><CODE><B><A HREF="../../../org/jgraph/graph/GraphModel.html#addGraphModelListener(org.jgraph.event.GraphModelListener)">addGraphModelListener</A></B>(<A HREF="../../../org/jgraph/event/GraphModelListener.html" title="interface in org.jgraph.event">GraphModelListener</A>&nbsp;l)</CODE>
144
145 <BR>
146 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Adds a listener for the GraphModelEvent posted after the model changes.</TD>
147 </TR>
148 <TR BGCOLOR="white" CLASS="TableRowColor">
149 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
150 <CODE>&nbsp;void</CODE></FONT></TD>
151 <TD><CODE><B><A HREF="../../../org/jgraph/graph/GraphModel.html#addUndoableEditListener(javax.swing.event.UndoableEditListener)">addUndoableEditListener</A></B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/javax/swing/event/UndoableEditListener.html" title="class or interface in javax.swing.event">UndoableEditListener</A>&nbsp;listener)</CODE>
152
153 <BR>
154 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Adds an undo listener for notification of any changes.</TD>
155 </TR>
156 <TR BGCOLOR="white" CLASS="TableRowColor">
157 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
158 <CODE>&nbsp;void</CODE></FONT></TD>
159 <TD><CODE><B><A HREF="../../../org/jgraph/graph/GraphModel.html#beginUpdate()">beginUpdate</A></B>()</CODE>
160
161 <BR>
162 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Indicates the start of one level of an executable change</TD>
163 </TR>
164 <TR BGCOLOR="white" CLASS="TableRowColor">
165 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
166 <CODE>&nbsp;<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/util/Map.html" title="class or interface in java.util">Map</A></CODE></FONT></TD>
167 <TD><CODE><B><A HREF="../../../org/jgraph/graph/GraphModel.html#cloneCells(java.lang.Object[])">cloneCells</A></B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A>[]&nbsp;cells)</CODE>
168
169 <BR>
170 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a map of (cell, clone)-pairs for all <code>cells</code> and
171 their children.</TD>
172 </TR>
173 <TR BGCOLOR="white" CLASS="TableRowColor">
174 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
175 <CODE>&nbsp;boolean</CODE></FONT></TD>
176 <TD><CODE><B><A HREF="../../../org/jgraph/graph/GraphModel.html#contains(java.lang.Object)">contains</A></B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A>&nbsp;node)</CODE>
177
178 <BR>
179 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns <code>true</code> if <code>node</code> or one of its
180 ancestors is in the model.</TD>
181 </TR>
182 <TR BGCOLOR="white" CLASS="TableRowColor">
183 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
184 <CODE>&nbsp;<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/util/Iterator.html" title="class or interface in java.util">Iterator</A></CODE></FONT></TD>
185 <TD><CODE><B><A HREF="../../../org/jgraph/graph/GraphModel.html#edges(java.lang.Object)">edges</A></B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A>&nbsp;port)</CODE>
186
187 <BR>
188 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns an iterator of the edges connected to <code>port</code>.</TD>
189 </TR>
190 <TR BGCOLOR="white" CLASS="TableRowColor">
191 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
192 <CODE>&nbsp;void</CODE></FONT></TD>
193 <TD><CODE><B><A HREF="../../../org/jgraph/graph/GraphModel.html#edit(java.util.Map, org.jgraph.graph.ConnectionSet, org.jgraph.graph.ParentMap, javax.swing.undo.UndoableEdit[])">edit</A></B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/util/Map.html" title="class or interface in java.util">Map</A>&nbsp;attributes,
194 <A HREF="../../../org/jgraph/graph/ConnectionSet.html" title="class in org.jgraph.graph">ConnectionSet</A>&nbsp;cs,
195 <A HREF="../../../org/jgraph/graph/ParentMap.html" title="class in org.jgraph.graph">ParentMap</A>&nbsp;pm,
196 <A HREF="http://java.sun.com/j2se/1.4/docs/api/javax/swing/undo/UndoableEdit.html" title="class or interface in javax.swing.undo">UndoableEdit</A>[]&nbsp;e)</CODE>
197
198 <BR>
199 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Applies the <code>propertyMap</code> and the connection changes to the
200 model.</TD>
201 </TR>
202 <TR BGCOLOR="white" CLASS="TableRowColor">
203 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
204 <CODE>&nbsp;void</CODE></FONT></TD>
205 <TD><CODE><B><A HREF="../../../org/jgraph/graph/GraphModel.html#endUpdate()">endUpdate</A></B>()</CODE>
206
207 <BR>
208 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Indicates the end of the current level of an executable change</TD>
209 </TR>
210 <TR BGCOLOR="white" CLASS="TableRowColor">
211 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
212 <CODE>&nbsp;void</CODE></FONT></TD>
213 <TD><CODE><B><A HREF="../../../org/jgraph/graph/GraphModel.html#execute(org.jgraph.graph.ExecutableChange)">execute</A></B>(<A HREF="../../../org/jgraph/graph/ExecutableChange.html" title="class in org.jgraph.graph">ExecutableChange</A>&nbsp;change)</CODE>
214
215 <BR>
216 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Executes the specified executable change on this graph model</TD>
217 </TR>
218 <TR BGCOLOR="white" CLASS="TableRowColor">
219 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
220 <CODE>&nbsp;<A HREF="../../../org/jgraph/graph/AttributeMap.html" title="class in org.jgraph.graph">AttributeMap</A></CODE></FONT></TD>
221 <TD><CODE><B><A HREF="../../../org/jgraph/graph/GraphModel.html#getAttributes(java.lang.Object)">getAttributes</A></B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A>&nbsp;node)</CODE>
222
223 <BR>
224 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a <code>AttributeMap</code> that represents the properties for
225 the specified cell.</TD>
226 </TR>
227 <TR BGCOLOR="white" CLASS="TableRowColor">
228 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
229 <CODE>&nbsp;<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></CODE></FONT></TD>
230 <TD><CODE><B><A HREF="../../../org/jgraph/graph/GraphModel.html#getChild(java.lang.Object, int)">getChild</A></B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A>&nbsp;parent,
231 int&nbsp;index)</CODE>
232
233 <BR>
234 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the child of <I>parent </I> at index <I>index </I> in the
235 parent's child array.</TD>
236 </TR>
237 <TR BGCOLOR="white" CLASS="TableRowColor">
238 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
239 <CODE>&nbsp;int</CODE></FONT></TD>
240 <TD><CODE><B><A HREF="../../../org/jgraph/graph/GraphModel.html#getChildCount(java.lang.Object)">getChildCount</A></B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A>&nbsp;parent)</CODE>
241
242 <BR>
243 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the number of children of <I>parent </I>.</TD>
244 </TR>
245 <TR BGCOLOR="white" CLASS="TableRowColor">
246 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
247 <CODE>&nbsp;int</CODE></FONT></TD>
248 <TD><CODE><B><A HREF="../../../org/jgraph/graph/GraphModel.html#getIndexOfChild(java.lang.Object, java.lang.Object)">getIndexOfChild</A></B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A>&nbsp;parent,
249 <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A>&nbsp;child)</CODE>
250
251 <BR>
252 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the index of child in parent.</TD>
253 </TR>
254 <TR BGCOLOR="white" CLASS="TableRowColor">
255 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
256 <CODE>&nbsp;int</CODE></FONT></TD>
257 <TD><CODE><B><A HREF="../../../org/jgraph/graph/GraphModel.html#getIndexOfRoot(java.lang.Object)">getIndexOfRoot</A></B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A>&nbsp;root)</CODE>
258
259 <BR>
260 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the index of <code>root</code> in the model.</TD>
261 </TR>
262 <TR BGCOLOR="white" CLASS="TableRowColor">
263 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
264 <CODE>&nbsp;<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></CODE></FONT></TD>
265 <TD><CODE><B><A HREF="../../../org/jgraph/graph/GraphModel.html#getParent(java.lang.Object)">getParent</A></B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A>&nbsp;child)</CODE>
266
267 <BR>
268 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the parent of <I>child </I> in the model.</TD>
269 </TR>
270 <TR BGCOLOR="white" CLASS="TableRowColor">
271 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
272 <CODE>&nbsp;<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></CODE></FONT></TD>
273 <TD><CODE><B><A HREF="../../../org/jgraph/graph/GraphModel.html#getRootAt(int)">getRootAt</A></B>(int&nbsp;index)</CODE>
274
275 <BR>
276 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the root at index <I>index </I> in the model.</TD>
277 </TR>
278 <TR BGCOLOR="white" CLASS="TableRowColor">
279 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
280 <CODE>&nbsp;int</CODE></FONT></TD>
281 <TD><CODE><B><A HREF="../../../org/jgraph/graph/GraphModel.html#getRootCount()">getRootCount</A></B>()</CODE>
282
283 <BR>
284 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the number of roots in the model.</TD>
285 </TR>
286 <TR BGCOLOR="white" CLASS="TableRowColor">
287 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
288 <CODE>&nbsp;<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></CODE></FONT></TD>
289 <TD><CODE><B><A HREF="../../../org/jgraph/graph/GraphModel.html#getSource(java.lang.Object)">getSource</A></B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A>&nbsp;edge)</CODE>
290
291 <BR>
292 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the source of <code>edge</code>.</TD>
293 </TR>
294 <TR BGCOLOR="white" CLASS="TableRowColor">
295 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
296 <CODE>&nbsp;<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></CODE></FONT></TD>
297 <TD><CODE><B><A HREF="../../../org/jgraph/graph/GraphModel.html#getTarget(java.lang.Object)">getTarget</A></B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A>&nbsp;edge)</CODE>
298
299 <BR>
300 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the target of <code>edge</code>.</TD>
301 </TR>
302 <TR BGCOLOR="white" CLASS="TableRowColor">
303 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
304 <CODE>&nbsp;<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></CODE></FONT></TD>
305 <TD><CODE><B><A HREF="../../../org/jgraph/graph/GraphModel.html#getValue(java.lang.Object)">getValue</A></B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A>&nbsp;node)</CODE>
306
307 <BR>
308 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the user object for the specified cell.</TD>
309 </TR>
310 <TR BGCOLOR="white" CLASS="TableRowColor">
311 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
312 <CODE>&nbsp;void</CODE></FONT></TD>
313 <TD><CODE><B><A HREF="../../../org/jgraph/graph/GraphModel.html#insert(java.lang.Object[], java.util.Map, org.jgraph.graph.ConnectionSet, org.jgraph.graph.ParentMap, javax.swing.undo.UndoableEdit[])">insert</A></B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A>[]&nbsp;roots,
314 <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/util/Map.html" title="class or interface in java.util">Map</A>&nbsp;attributes,
315 <A HREF="../../../org/jgraph/graph/ConnectionSet.html" title="class in org.jgraph.graph">ConnectionSet</A>&nbsp;cs,
316 <A HREF="../../../org/jgraph/graph/ParentMap.html" title="class in org.jgraph.graph">ParentMap</A>&nbsp;pm,
317 <A HREF="http://java.sun.com/j2se/1.4/docs/api/javax/swing/undo/UndoableEdit.html" title="class or interface in javax.swing.undo">UndoableEdit</A>[]&nbsp;e)</CODE>
318
319 <BR>
320 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Inserts the <code>cells</code> and connections into the model, and
321 passes <code>attributes</code> to the views.</TD>
322 </TR>
323 <TR BGCOLOR="white" CLASS="TableRowColor">
324 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
325 <CODE>&nbsp;boolean</CODE></FONT></TD>
326 <TD><CODE><B><A HREF="../../../org/jgraph/graph/GraphModel.html#isEdge(java.lang.Object)">isEdge</A></B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A>&nbsp;edge)</CODE>
327
328 <BR>
329 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns <code>true</code> if <code>edge</code> is a valid edge.</TD>
330 </TR>
331 <TR BGCOLOR="white" CLASS="TableRowColor">
332 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
333 <CODE>&nbsp;boolean</CODE></FONT></TD>
334 <TD><CODE><B><A HREF="../../../org/jgraph/graph/GraphModel.html#isLeaf(java.lang.Object)">isLeaf</A></B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A>&nbsp;node)</CODE>
335
336 <BR>
337 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns whether the specified node is a leaf node.</TD>
338 </TR>
339 <TR BGCOLOR="white" CLASS="TableRowColor">
340 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
341 <CODE>&nbsp;boolean</CODE></FONT></TD>
342 <TD><CODE><B><A HREF="../../../org/jgraph/graph/GraphModel.html#isPort(java.lang.Object)">isPort</A></B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A>&nbsp;port)</CODE>
343
344 <BR>
345 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns <code>true</code> if <code>port</code> is a valid port,
346 possibly supporting edge connection.</TD>
347 </TR>
348 <TR BGCOLOR="white" CLASS="TableRowColor">
349 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
350 <CODE>&nbsp;void</CODE></FONT></TD>
351 <TD><CODE><B><A HREF="../../../org/jgraph/graph/GraphModel.html#remove(java.lang.Object[])">remove</A></B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A>[]&nbsp;roots)</CODE>
352
353 <BR>
354 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Removes <code>cells</code> from the model.</TD>
355 </TR>
356 <TR BGCOLOR="white" CLASS="TableRowColor">
357 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
358 <CODE>&nbsp;void</CODE></FONT></TD>
359 <TD><CODE><B><A HREF="../../../org/jgraph/graph/GraphModel.html#removeGraphModelListener(org.jgraph.event.GraphModelListener)">removeGraphModelListener</A></B>(<A HREF="../../../org/jgraph/event/GraphModelListener.html" title="interface in org.jgraph.event">GraphModelListener</A>&nbsp;l)</CODE>
360
361 <BR>
362 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Removes a listener previously added with <B>addGraphModelListener() </B>.</TD>
363 </TR>
364 <TR BGCOLOR="white" CLASS="TableRowColor">
365 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
366 <CODE>&nbsp;void</CODE></FONT></TD>
367 <TD><CODE><B><A HREF="../../../org/jgraph/graph/GraphModel.html#removeUndoableEditListener(javax.swing.event.UndoableEditListener)">removeUndoableEditListener</A></B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/javax/swing/event/UndoableEditListener.html" title="class or interface in javax.swing.event">UndoableEditListener</A>&nbsp;listener)</CODE>
368
369 <BR>
370 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Removes an undo listener.</TD>
371 </TR>
372 <TR BGCOLOR="white" CLASS="TableRowColor">
373 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
374 <CODE>&nbsp;void</CODE></FONT></TD>
375 <TD><CODE><B><A HREF="../../../org/jgraph/graph/GraphModel.html#toBack(java.lang.Object[])">toBack</A></B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A>[]&nbsp;cells)</CODE>
376
377 <BR>
378 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sends <code>cells</code> to back.</TD>
379 </TR>
380 <TR BGCOLOR="white" CLASS="TableRowColor">
381 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
382 <CODE>&nbsp;void</CODE></FONT></TD>
383 <TD><CODE><B><A HREF="../../../org/jgraph/graph/GraphModel.html#toFront(java.lang.Object[])">toFront</A></B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A>[]&nbsp;cells)</CODE>
384
385 <BR>
386 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Brings <code>cells</code> to front.</TD>
387 </TR>
388 <TR BGCOLOR="white" CLASS="TableRowColor">
389 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
390 <CODE>&nbsp;<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></CODE></FONT></TD>
391 <TD><CODE><B><A HREF="../../../org/jgraph/graph/GraphModel.html#valueForCellChanged(java.lang.Object, java.lang.Object)">valueForCellChanged</A></B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A>&nbsp;cell,
392 <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A>&nbsp;newValue)</CODE>
393
394 <BR>
395 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Messaged when the value of the cell has changed, eg from within the edit
396 method.</TD>
397 </TR>
398 </TABLE>
399 &nbsp;
400 <P>
401
402 <!-- ============ FIELD DETAIL =========== -->
403
404
405 <!-- ========= CONSTRUCTOR DETAIL ======== -->
406
407
408 <!-- ============ METHOD DETAIL ========== -->
409
410 <A NAME="method_detail"><!-- --></A>
411 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
412 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
413 <TD COLSPAN=1><FONT SIZE="+2">
414 <B>Method Detail</B></FONT></TD>
415 </TR>
416 </TABLE>
417
418 <A NAME="getRootCount()"><!-- --></A><H3>
419 getRootCount</H3>
420 <PRE>
421 public int <B>getRootCount</B>()</PRE>
422 <DL>
423 <DD>Returns the number of roots in the model. Returns 0 if the model is
424 empty.
425 <P>
426 <DD><DL>
427
428 <DT><B>Returns:</B><DD>the number of roots in the model</DL>
429 </DD>
430 </DL>
431 <HR>
432
433 <A NAME="getRootAt(int)"><!-- --></A><H3>
434 getRootAt</H3>
435 <PRE>
436 public <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> <B>getRootAt</B>(int&nbsp;index)</PRE>
437 <DL>
438 <DD>Returns the root at index <I>index </I> in the model. This should not
439 return null if <i>index </i> is a valid index for the model (that is
440 <i>index </i>>= 0 && <i>index </i>< getRootCount()).
441 <P>
442 <DD><DL>
443
444 <DT><B>Returns:</B><DD>the root of at index <I>index </I></DL>
445 </DD>
446 </DL>
447 <HR>
448
449 <A NAME="getIndexOfRoot(java.lang.Object)"><!-- --></A><H3>
450 getIndexOfRoot</H3>
451 <PRE>
452 public int <B>getIndexOfRoot</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A>&nbsp;root)</PRE>
453 <DL>
454 <DD>Returns the index of <code>root</code> in the model. If root is
455 <code>null</code>, returns -1.
456 <P>
457 <DD><DL>
458 <DT><B>Parameters:</B><DD><CODE>root</CODE> - a root in the model, obtained from this data source
459 <DT><B>Returns:</B><DD>the index of the root in the model, or -1 if the parent is
460 <code>null</code></DL>
461 </DD>
462 </DL>
463 <HR>
464
465 <A NAME="contains(java.lang.Object)"><!-- --></A><H3>
466 contains</H3>
467 <PRE>
468 public boolean <B>contains</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A>&nbsp;node)</PRE>
469 <DL>
470 <DD>Returns <code>true</code> if <code>node</code> or one of its
471 ancestors is in the model.
472 <P>
473 <DD><DL>
474
475 <DT><B>Returns:</B><DD><code>true</code> if <code>node</code> is in the model</DL>
476 </DD>
477 </DL>
478 <HR>
479
480 <A NAME="getAttributes(java.lang.Object)"><!-- --></A><H3>
481 getAttributes</H3>
482 <PRE>
483 public <A HREF="../../../org/jgraph/graph/AttributeMap.html" title="class in org.jgraph.graph">AttributeMap</A> <B>getAttributes</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A>&nbsp;node)</PRE>
484 <DL>
485 <DD>Returns a <code>AttributeMap</code> that represents the properties for
486 the specified cell.
487 <P>
488 <DD><DL>
489
490 <DT><B>Returns:</B><DD>properties of <code>node</code> as a <code>Map</code></DL>
491 </DD>
492 </DL>
493 <HR>
494
495 <A NAME="getValue(java.lang.Object)"><!-- --></A><H3>
496 getValue</H3>
497 <PRE>
498 public <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> <B>getValue</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A>&nbsp;node)</PRE>
499 <DL>
500 <DD>Returns the user object for the specified cell.
501 <P>
502 <DD><DL>
503
504 <DT><B>Returns:</B><DD>userobject of <code>node</code></DL>
505 </DD>
506 </DL>
507 <HR>
508
509 <A NAME="getSource(java.lang.Object)"><!-- --></A><H3>
510 getSource</H3>
511 <PRE>
512 public <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> <B>getSource</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A>&nbsp;edge)</PRE>
513 <DL>
514 <DD>Returns the source of <code>edge</code>. <I>edge </I> must be an
515 object previously obtained from this data source.
516 <P>
517 <DD><DL>
518
519 <DT><B>Returns:</B><DD><code>Object</code> that represents the source of <i>edge </i></DL>
520 </DD>
521 </DL>
522 <HR>
523
524 <A NAME="getTarget(java.lang.Object)"><!-- --></A><H3>
525 getTarget</H3>
526 <PRE>
527 public <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> <B>getTarget</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A>&nbsp;edge)</PRE>
528 <DL>
529 <DD>Returns the target of <code>edge</code>. <I>edge </I> must be an
530 object previously obtained from this data source.
531 <P>
532 <DD><DL>
533
534 <DT><B>Returns:</B><DD><code>Object</code> that represents the target of <i>edge </i></DL>
535 </DD>
536 </DL>
537 <HR>
538
539 <A NAME="acceptsSource(java.lang.Object, java.lang.Object)"><!-- --></A><H3>
540 acceptsSource</H3>
541 <PRE>
542 public boolean <B>acceptsSource</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A>&nbsp;edge,
543 <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A>&nbsp;port)</PRE>
544 <DL>
545 <DD>Returns <code>true</code> if <code>port</code> is a valid source for
546 <code>edge</code>. <I>edge </I> and <I>port </I> must be objects
547 previously obtained from this data source.
548 <P>
549 <DD><DL>
550
551 <DT><B>Returns:</B><DD><code>true</code> if <code>port</code> is a valid source for
552 <code>edge</code>.</DL>
553 </DD>
554 </DL>
555 <HR>
556
557 <A NAME="acceptsTarget(java.lang.Object, java.lang.Object)"><!-- --></A><H3>
558 acceptsTarget</H3>
559 <PRE>
560 public boolean <B>acceptsTarget</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A>&nbsp;edge,
561 <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A>&nbsp;port)</PRE>
562 <DL>
563 <DD>Returns <code>true</code> if <code>port</code> is a valid target for
564 <code>edge</code>. <I>edge </I> and <I>port </I> must be objects
565 previously obtained from this data source.
566 <P>
567 <DD><DL>
568
569 <DT><B>Returns:</B><DD><code>true</code> if <code>port</code> is a valid target for
570 <code>edge</code>.</DL>
571 </DD>
572 </DL>
573 <HR>
574
575 <A NAME="edges(java.lang.Object)"><!-- --></A><H3>
576 edges</H3>
577 <PRE>
578 public <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/util/Iterator.html" title="class or interface in java.util">Iterator</A> <B>edges</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A>&nbsp;port)</PRE>
579 <DL>
580 <DD>Returns an iterator of the edges connected to <code>port</code>.
581 <I>port </I> must be a object previously obtained from this data source.
582 This method never returns null.
583 <P>
584 <DD><DL>
585 <DT><B>Parameters:</B><DD><CODE>port</CODE> - a port in the graph, obtained from this data source
586 <DT><B>Returns:</B><DD><code>Iterator</code> that represents the connected edges</DL>
587 </DD>
588 </DL>
589 <HR>
590
591 <A NAME="isEdge(java.lang.Object)"><!-- --></A><H3>
592 isEdge</H3>
593 <PRE>
594 public boolean <B>isEdge</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A>&nbsp;edge)</PRE>
595 <DL>
596 <DD>Returns <code>true</code> if <code>edge</code> is a valid edge.
597 <P>
598 <DD><DL>
599
600 <DT><B>Returns:</B><DD><code>true</code> if <code>edge</code> is a valid edge.</DL>
601 </DD>
602 </DL>
603 <HR>
604
605 <A NAME="isPort(java.lang.Object)"><!-- --></A><H3>
606 isPort</H3>
607 <PRE>
608 public boolean <B>isPort</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A>&nbsp;port)</PRE>
609 <DL>
610 <DD>Returns <code>true</code> if <code>port</code> is a valid port,
611 possibly supporting edge connection.
612 <P>
613 <DD><DL>
614
615 <DT><B>Returns:</B><DD><code>true</code> if <code>port</code> is a valid port.</DL>
616 </DD>
617 </DL>
618 <HR>
619
620 <A NAME="getParent(java.lang.Object)"><!-- --></A><H3>
621 getParent</H3>
622 <PRE>
623 public <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> <B>getParent</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A>&nbsp;child)</PRE>
624 <DL>
625 <DD>Returns the parent of <I>child </I> in the model. <I>child </I> must be a
626 node previously obtained from this data source. This returns null if
627 <i>child </i> is a root in the model.
628 <P>
629 <DD><DL>
630 <DT><B>Parameters:</B><DD><CODE>child</CODE> - a node in the graph, obtained from this data source
631 <DT><B>Returns:</B><DD>the parent of <I>child </I></DL>
632 </DD>
633 </DL>
634 <HR>
635
636 <A NAME="getIndexOfChild(java.lang.Object, java.lang.Object)"><!-- --></A><H3>
637 getIndexOfChild</H3>
638 <PRE>
639 public int <B>getIndexOfChild</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A>&nbsp;parent,
640 <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A>&nbsp;child)</PRE>
641 <DL>
642 <DD>Returns the index of child in parent. If either the parent or child is
643 <code>null</code>, returns -1.
644 <P>
645 <DD><DL>
646 <DT><B>Parameters:</B><DD><CODE>parent</CODE> - a note in the tree, obtained from this data source<DD><CODE>child</CODE> - the node we are interested in
647 <DT><B>Returns:</B><DD>the index of the child in the parent, or -1 if either the parent
648 or the child is <code>null</code></DL>
649 </DD>
650 </DL>
651 <HR>
652
653 <A NAME="getChild(java.lang.Object, int)"><!-- --></A><H3>
654 getChild</H3>
655 <PRE>
656 public <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> <B>getChild</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A>&nbsp;parent,
657 int&nbsp;index)</PRE>
658 <DL>
659 <DD>Returns the child of <I>parent </I> at index <I>index </I> in the
660 parent's child array. <I>parent </I> must be a node previously obtained
661 from this data source. This should not return null if <i>index </i> is a
662 valid index for <i>parent </i> (that is <i>index </i>>= 0 && <i>index
663 </i>< getChildCount( <i>parent </i>)).
664 <P>
665 <DD><DL>
666 <DT><B>Parameters:</B><DD><CODE>parent</CODE> - a node in the tree, obtained from this data source
667 <DT><B>Returns:</B><DD>the child of <I>parent </I> at index <I>index </I></DL>
668 </DD>
669 </DL>
670 <HR>
671
672 <A NAME="getChildCount(java.lang.Object)"><!-- --></A><H3>
673 getChildCount</H3>
674 <PRE>
675 public int <B>getChildCount</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A>&nbsp;parent)</PRE>
676 <DL>
677 <DD>Returns the number of children of <I>parent </I>. Returns 0 if the node
678 is a leaf or if it has no children. <I>parent </I> must be a node
679 previously obtained from this data source.
680 <P>
681 <DD><DL>
682 <DT><B>Parameters:</B><DD><CODE>parent</CODE> - a node in the tree, obtained from this data source
683 <DT><B>Returns:</B><DD>the number of children of the node <I>parent </I></DL>
684 </DD>
685 </DL>
686 <HR>
687
688 <A NAME="isLeaf(java.lang.Object)"><!-- --></A><H3>
689 isLeaf</H3>
690 <PRE>
691 public boolean <B>isLeaf</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A>&nbsp;node)</PRE>
692 <DL>
693 <DD>Returns whether the specified node is a leaf node. The way the test is
694 performed depends on the <code>askAllowsChildren</code> setting.
695 <P>
696 <DD><DL>
697 <DT><B>Parameters:</B><DD><CODE>node</CODE> - the node to check
698 <DT><B>Returns:</B><DD>true if the node is a leaf node</DL>
699 </DD>
700 </DL>
701 <HR>
702
703 <A NAME="insert(java.lang.Object[], java.util.Map, org.jgraph.graph.ConnectionSet, org.jgraph.graph.ParentMap, javax.swing.undo.UndoableEdit[])"><!-- --></A><H3>
704 insert</H3>
705 <PRE>
706 public void <B>insert</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A>[]&nbsp;roots,
707 <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/util/Map.html" title="class or interface in java.util">Map</A>&nbsp;attributes,
708 <A HREF="../../../org/jgraph/graph/ConnectionSet.html" title="class in org.jgraph.graph">ConnectionSet</A>&nbsp;cs,
709 <A HREF="../../../org/jgraph/graph/ParentMap.html" title="class in org.jgraph.graph">ParentMap</A>&nbsp;pm,
710 <A HREF="http://java.sun.com/j2se/1.4/docs/api/javax/swing/undo/UndoableEdit.html" title="class or interface in javax.swing.undo">UndoableEdit</A>[]&nbsp;e)</PRE>
711 <DL>
712 <DD>Inserts the <code>cells</code> and connections into the model, and
713 passes <code>attributes</code> to the views. Notifies the model- and
714 undo listeners of the change.
715 <P>
716 <DD><DL>
717 </DL>
718 </DD>
719 </DL>
720 <HR>
721
722 <A NAME="remove(java.lang.Object[])"><!-- --></A><H3>
723 remove</H3>
724 <PRE>
725 public void <B>remove</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A>[]&nbsp;roots)</PRE>
726 <DL>
727 <DD>Removes <code>cells</code> from the model. If
728 <code>removeChildren</code> is <code>true</code>, the children are
729 also removed. Notifies the model- and undo listeners of the change.
730 <P>
731 <DD><DL>
732 </DL>
733 </DD>
734 </DL>
735 <HR>
736
737 <A NAME="edit(java.util.Map, org.jgraph.graph.ConnectionSet, org.jgraph.graph.ParentMap, javax.swing.undo.UndoableEdit[])"><!-- --></A><H3>
738 edit</H3>
739 <PRE>
740 public void <B>edit</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/util/Map.html" title="class or interface in java.util">Map</A>&nbsp;attributes,
741 <A HREF="../../../org/jgraph/graph/ConnectionSet.html" title="class in org.jgraph.graph">ConnectionSet</A>&nbsp;cs,
742 <A HREF="../../../org/jgraph/graph/ParentMap.html" title="class in org.jgraph.graph">ParentMap</A>&nbsp;pm,
743 <A HREF="http://java.sun.com/j2se/1.4/docs/api/javax/swing/undo/UndoableEdit.html" title="class or interface in javax.swing.undo">UndoableEdit</A>[]&nbsp;e)</PRE>
744 <DL>
745 <DD>Applies the <code>propertyMap</code> and the connection changes to the
746 model. The initial <code>edits</code> that triggered the call are
747 considered to be part of this transaction. Notifies the model- and undo
748 listeners of the change. <strong>Note: </strong> If only
749 <code>edits</code> is non-null, the edits are directly passed to the
750 UndoableEditListeners.
751 <P>
752 <DD><DL>
753 </DL>
754 </DD>
755 </DL>
756 <HR>
757
758 <A NAME="beginUpdate()"><!-- --></A><H3>
759 beginUpdate</H3>
760 <PRE>
761 public void <B>beginUpdate</B>()</PRE>
762 <DL>
763 <DD>Indicates the start of one level of an executable change
764 <P>
765 <DD><DL>
766 </DL>
767 </DD>
768 </DL>
769 <HR>
770
771 <A NAME="endUpdate()"><!-- --></A><H3>
772 endUpdate</H3>
773 <PRE>
774 public void <B>endUpdate</B>()</PRE>
775 <DL>
776 <DD>Indicates the end of the current level of an executable change
777 <P>
778 <DD><DL>
779 </DL>
780 </DD>
781 </DL>
782 <HR>
783
784 <A NAME="execute(org.jgraph.graph.ExecutableChange)"><!-- --></A><H3>
785 execute</H3>
786 <PRE>
787 public void <B>execute</B>(<A HREF="../../../org/jgraph/graph/ExecutableChange.html" title="class in org.jgraph.graph">ExecutableChange</A>&nbsp;change)</PRE>
788 <DL>
789 <DD>Executes the specified executable change on this graph model
790 <P>
791 <DD><DL>
792 <DT><B>Parameters:</B><DD><CODE>change</CODE> - the change to be executed</DL>
793 </DD>
794 </DL>
795 <HR>
796
797 <A NAME="cloneCells(java.lang.Object[])"><!-- --></A><H3>
798 cloneCells</H3>
799 <PRE>
800 public <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/util/Map.html" title="class or interface in java.util">Map</A> <B>cloneCells</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A>[]&nbsp;cells)</PRE>
801 <DL>
802 <DD>Returns a map of (cell, clone)-pairs for all <code>cells</code> and
803 their children. Special care should be taken to replace references
804 between cells.
805 <P>
806 <DD><DL>
807 </DL>
808 </DD>
809 </DL>
810 <HR>
811
812 <A NAME="valueForCellChanged(java.lang.Object, java.lang.Object)"><!-- --></A><H3>
813 valueForCellChanged</H3>
814 <PRE>
815 public <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> <B>valueForCellChanged</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A>&nbsp;cell,
816 <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A>&nbsp;newValue)</PRE>
817 <DL>
818 <DD>Messaged when the value of the cell has changed, eg from within the edit
819 method.
820 <P>
821 <DD><DL>
822 </DL>
823 </DD>
824 </DL>
825 <HR>
826
827 <A NAME="toBack(java.lang.Object[])"><!-- --></A><H3>
828 toBack</H3>
829 <PRE>
830 public void <B>toBack</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A>[]&nbsp;cells)</PRE>
831 <DL>
832 <DD>Sends <code>cells</code> to back.
833 <P>
834 <DD><DL>
835 </DL>
836 </DD>
837 </DL>
838 <HR>
839
840 <A NAME="toFront(java.lang.Object[])"><!-- --></A><H3>
841 toFront</H3>
842 <PRE>
843 public void <B>toFront</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A>[]&nbsp;cells)</PRE>
844 <DL>
845 <DD>Brings <code>cells</code> to front.
846 <P>
847 <DD><DL>
848 </DL>
849 </DD>
850 </DL>
851 <HR>
852
853 <A NAME="addGraphModelListener(org.jgraph.event.GraphModelListener)"><!-- --></A><H3>
854 addGraphModelListener</H3>
855 <PRE>
856 public void <B>addGraphModelListener</B>(<A HREF="../../../org/jgraph/event/GraphModelListener.html" title="interface in org.jgraph.event">GraphModelListener</A>&nbsp;l)</PRE>
857 <DL>
858 <DD>Adds a listener for the GraphModelEvent posted after the model changes.
859 <P>
860 <DD><DL>
861 </DL>
862 </DD>
863 </DL>
864 <HR>
865
866 <A NAME="removeGraphModelListener(org.jgraph.event.GraphModelListener)"><!-- --></A><H3>
867 removeGraphModelListener</H3>
868 <PRE>
869 public void <B>removeGraphModelListener</B>(<A HREF="../../../org/jgraph/event/GraphModelListener.html" title="interface in org.jgraph.event">GraphModelListener</A>&nbsp;l)</PRE>
870 <DL>
871 <DD>Removes a listener previously added with <B>addGraphModelListener() </B>.
872 <P>
873 <DD><DL>
874 </DL>
875 </DD>
876 </DL>
877 <HR>
878
879 <A NAME="addUndoableEditListener(javax.swing.event.UndoableEditListener)"><!-- --></A><H3>
880 addUndoableEditListener</H3>
881 <PRE>
882 public void <B>addUndoableEditListener</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/javax/swing/event/UndoableEditListener.html" title="class or interface in javax.swing.event">UndoableEditListener</A>&nbsp;listener)</PRE>
883 <DL>
884 <DD>Adds an undo listener for notification of any changes. Undo/Redo
885 operations performed on the <code>UndoableEdit</code> will cause the
886 appropriate ModelEvent to be fired to keep the view(s) in sync with the
887 model.
888 <P>
889 <DD><DL>
890 </DL>
891 </DD>
892 </DL>
893 <HR>
894
895 <A NAME="removeUndoableEditListener(javax.swing.event.UndoableEditListener)"><!-- --></A><H3>
896 removeUndoableEditListener</H3>
897 <PRE>
898 public void <B>removeUndoableEditListener</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/javax/swing/event/UndoableEditListener.html" title="class or interface in javax.swing.event">UndoableEditListener</A>&nbsp;listener)</PRE>
899 <DL>
900 <DD>Removes an undo listener.
901 <P>
902 <DD><DL>
903 </DL>
904 </DD>
905 </DL>
906 <!-- ========= END OF CLASS DATA ========= -->
907 <HR>
908
909
910 <!-- ======= START OF BOTTOM NAVBAR ====== -->
911 <A NAME="navbar_bottom"><!-- --></A>
912 <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
913 <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
914 <TR>
915 <TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
916 <A NAME="navbar_bottom_firstrow"><!-- --></A>
917 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
918 <TR ALIGN="center" VALIGN="top">
919 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
920 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
921 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
922 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/GraphModel.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
923 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
924 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
925 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
926 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
927 </TR>
928 </TABLE>
929 </TD>
930 <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
931 <p><b>JGraph</b><br>v5.10.1.4</p></EM>
932 </TD>
933 </TR>
934
935 <TR>
936 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
937 &nbsp;<A HREF="../../../org/jgraph/graph/GraphCellEditor.html" title="interface in org.jgraph.graph"><B>PREV CLASS</B></A>&nbsp;
938 &nbsp;<A HREF="../../../org/jgraph/graph/GraphSelectionModel.html" title="interface in org.jgraph.graph"><B>NEXT CLASS</B></A></FONT></TD>
939 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
940 <A HREF="../../../index.html" target="_top"><B>FRAMES</B></A> &nbsp;
941 &nbsp;<A HREF="GraphModel.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
942 &nbsp;<SCRIPT type="text/javascript">
943 <!--
944 if(window==top) {
945 document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
946 }
947 //-->
948 </SCRIPT>
949 <NOSCRIPT>
950 <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
951 </NOSCRIPT>
952
953 </FONT></TD>
954 </TR>
955 <TR>
956 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
957 SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
958 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
959 DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
960 </TR>
961 </TABLE>
962 <A NAME="skip-navbar_bottom"></A>
963 <!-- ======== END OF BOTTOM NAVBAR ======= -->
964
965 <HR>
966 <font size=1>Copyright (C) 2001-2006 <a href="http://www.jgraph.com/"
967 target="_blank">Gaudenz Alder</a>. All rights reserved.</font>
968 </BODY>
969 </HTML>

  ViewVC Help
Powered by ViewVC 1.1.26