source: other-projects/trunk/gs3-webservices-democlient/docs/GS3DemoClient/org/greenstone/gs3client/GraphPaperLayout.html@ 15490

Last change on this file since 15490 was 15490, checked in by ak19, 16 years ago

Updated docs significantly

File size: 31.3 KB
Line 
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.5.0_10) on Thu May 15 13:34:17 NZST 2008 -->
6<TITLE>
7GraphPaperLayout
8</TITLE>
9
10<META NAME="keywords" CONTENT="org.greenstone.gs3client.GraphPaperLayout class">
11
12<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
13
14<SCRIPT type="text/javascript">
15function windowTitle()
16{
17 parent.document.title="GraphPaperLayout";
18}
19</SCRIPT>
20<NOSCRIPT>
21</NOSCRIPT>
22
23</HEAD>
24
25<BODY BGCOLOR="white" onload="windowTitle();">
26
27
28<!-- ========= START OF TOP NAVBAR ======= -->
29<A NAME="navbar_top"><!-- --></A>
30<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
31<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
32<TR>
33<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
34<A NAME="navbar_top_firstrow"><!-- --></A>
35<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
36 <TR ALIGN="center" VALIGN="top">
37 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
38 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
39 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
40 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
41 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
42 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
43 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
44 </TR>
45</TABLE>
46</TD>
47<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
48</EM>
49</TD>
50</TR>
51
52<TR>
53<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
54&nbsp;<A HREF="../../../org/greenstone/gs3client/Displays.PopupListener.AssocFilePopupItem.html" title="class in org.greenstone.gs3client"><B>PREV CLASS</B></A>&nbsp;
55&nbsp;<A HREF="../../../org/greenstone/gs3client/GS3JavaClient.html" title="class in org.greenstone.gs3client"><B>NEXT CLASS</B></A></FONT></TD>
56<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
57 <A HREF="../../../index.html?org/greenstone/gs3client/GraphPaperLayout.html" target="_top"><B>FRAMES</B></A> &nbsp;
58&nbsp;<A HREF="GraphPaperLayout.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
59&nbsp;<SCRIPT type="text/javascript">
60 <!--
61 if(window==top) {
62 document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
63 }
64 //-->
65</SCRIPT>
66<NOSCRIPT>
67 <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
68</NOSCRIPT>
69
70
71</FONT></TD>
72</TR>
73<TR>
74<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
75 SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
76<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
77DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
78</TR>
79</TABLE>
80<A NAME="skip-navbar_top"></A>
81<!-- ========= END OF TOP NAVBAR ========= -->
82
83<HR>
84<!-- ======== START OF CLASS DATA ======== -->
85<H2>
86<FONT SIZE="-1">
87org.greenstone.gs3client</FONT>
88<BR>
89Class GraphPaperLayout</H2>
90<PRE>
91java.lang.Object
92 <IMG SRC="../../../resources/inherit.gif" ALT="extended by "><B>org.greenstone.gs3client.GraphPaperLayout</B>
93</PRE>
94<DL>
95<DT><B>All Implemented Interfaces:</B> <DD>java.awt.LayoutManager, java.awt.LayoutManager2</DD>
96</DL>
97<HR>
98<DL>
99<DT><PRE>public class <B>GraphPaperLayout</B><DT>extends java.lang.Object<DT>implements java.awt.LayoutManager2</DL>
100</PRE>
101
102<P>
103The <code>GraphPaperLayout</code> class is a layout manager that
104 lays out a container's components in a rectangular grid, similar
105 to GridLayout. Unlike GridLayout, however, components can take
106 up multiple rows and/or columns. The layout manager acts as a
107 sheet of graph paper. When a component is added to the layout
108 manager, the location and relative size of the component are
109 simply supplied by the constraints as a Rectangle.
110 <p><code><pre>
111 import java.awt.*;
112 import java.applet.Applet;
113 public class ButtonGrid extends Applet {
114 public void init() {
115 setLayout(new GraphPaperLayout(new Dimension(5,5)));
116 // Add a 1x1 Rect at (0,0)
117 add(new Button("1"), new Rectangle(0,0,1,1));
118 // Add a 2x1 Rect at (2,0)
119 add(new Button("2"), new Rectangle(2,0,2,1));
120 // Add a 1x2 Rect at (1,1)
121 add(new Button("3"), new Rectangle(1,1,1,2));
122 // Add a 2x2 Rect at (3,2)
123 add(new Button("4"), new Rectangle(3,2,2,2));
124 // Add a 1x1 Rect at (0,4)
125 add(new Button("5"), new Rectangle(0,4,1,1));
126 // Add a 1x2 Rect at (2,3)
127 add(new Button("6"), new Rectangle(2,3,1,2));
128 }
129 }
130 </pre></code>
131<P>
132
133<P>
134<DL>
135<DT><B>Author:</B></DT>
136 <DD>Michael Martak</DD>
137</DL>
138<HR>
139
140<P>
141<!-- =========== FIELD SUMMARY =========== -->
142
143<A NAME="field_summary"><!-- --></A>
144<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
145<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
146<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
147<B>Field Summary</B></FONT></TH>
148</TR>
149<TR BGCOLOR="white" CLASS="TableRowColor">
150<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
151<CODE>(package private) &nbsp;java.util.Hashtable</CODE></FONT></TD>
152<TD><CODE><B><A HREF="../../../org/greenstone/gs3client/GraphPaperLayout.html#compTable">compTable</A></B></CODE>
153
154<BR>
155&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
156</TR>
157<TR BGCOLOR="white" CLASS="TableRowColor">
158<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
159<CODE>(package private) &nbsp;java.awt.Dimension</CODE></FONT></TD>
160<TD><CODE><B><A HREF="../../../org/greenstone/gs3client/GraphPaperLayout.html#gridSize">gridSize</A></B></CODE>
161
162<BR>
163&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
164</TR>
165<TR BGCOLOR="white" CLASS="TableRowColor">
166<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
167<CODE>(package private) &nbsp;int</CODE></FONT></TD>
168<TD><CODE><B><A HREF="../../../org/greenstone/gs3client/GraphPaperLayout.html#hgap">hgap</A></B></CODE>
169
170<BR>
171&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
172</TR>
173<TR BGCOLOR="white" CLASS="TableRowColor">
174<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
175<CODE>(package private) &nbsp;int</CODE></FONT></TD>
176<TD><CODE><B><A HREF="../../../org/greenstone/gs3client/GraphPaperLayout.html#vgap">vgap</A></B></CODE>
177
178<BR>
179&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
180</TR>
181</TABLE>
182&nbsp;
183<!-- ======== CONSTRUCTOR SUMMARY ======== -->
184
185<A NAME="constructor_summary"><!-- --></A>
186<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
187<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
188<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
189<B>Constructor Summary</B></FONT></TH>
190</TR>
191<TR BGCOLOR="white" CLASS="TableRowColor">
192<TD><CODE><B><A HREF="../../../org/greenstone/gs3client/GraphPaperLayout.html#GraphPaperLayout()">GraphPaperLayout</A></B>()</CODE>
193
194<BR>
195&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a graph paper layout with a default of a 1 x 1 graph, with no
196 vertical or horizontal padding.</TD>
197</TR>
198<TR BGCOLOR="white" CLASS="TableRowColor">
199<TD><CODE><B><A HREF="../../../org/greenstone/gs3client/GraphPaperLayout.html#GraphPaperLayout(java.awt.Dimension)">GraphPaperLayout</A></B>(java.awt.Dimension&nbsp;gridSize)</CODE>
200
201<BR>
202&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a graph paper layout with the given grid size, with no vertical
203 or horizontal padding.</TD>
204</TR>
205<TR BGCOLOR="white" CLASS="TableRowColor">
206<TD><CODE><B><A HREF="../../../org/greenstone/gs3client/GraphPaperLayout.html#GraphPaperLayout(java.awt.Dimension, int, int)">GraphPaperLayout</A></B>(java.awt.Dimension&nbsp;gridSize,
207 int&nbsp;hgap,
208 int&nbsp;vgap)</CODE>
209
210<BR>
211&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a graph paper layout with the given grid size and padding.</TD>
212</TR>
213</TABLE>
214&nbsp;
215<!-- ========== METHOD SUMMARY =========== -->
216
217<A NAME="method_summary"><!-- --></A>
218<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
219<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
220<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
221<B>Method Summary</B></FONT></TH>
222</TR>
223<TR BGCOLOR="white" CLASS="TableRowColor">
224<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
225<CODE>&nbsp;void</CODE></FONT></TD>
226<TD><CODE><B><A HREF="../../../org/greenstone/gs3client/GraphPaperLayout.html#addLayoutComponent(java.awt.Component, java.lang.Object)">addLayoutComponent</A></B>(java.awt.Component&nbsp;comp,
227 java.lang.Object&nbsp;constraints)</CODE>
228
229<BR>
230&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Adds the specified component to the layout, using the specified
231 constraint object.</TD>
232</TR>
233<TR BGCOLOR="white" CLASS="TableRowColor">
234<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
235<CODE>&nbsp;void</CODE></FONT></TD>
236<TD><CODE><B><A HREF="../../../org/greenstone/gs3client/GraphPaperLayout.html#addLayoutComponent(java.lang.String, java.awt.Component)">addLayoutComponent</A></B>(java.lang.String&nbsp;name,
237 java.awt.Component&nbsp;comp)</CODE>
238
239<BR>
240&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Adds the specified component with the specified name to
241 the layout.</TD>
242</TR>
243<TR BGCOLOR="white" CLASS="TableRowColor">
244<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
245<CODE>&nbsp;java.awt.Dimension</CODE></FONT></TD>
246<TD><CODE><B><A HREF="../../../org/greenstone/gs3client/GraphPaperLayout.html#getGridSize()">getGridSize</A></B>()</CODE>
247
248<BR>
249&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
250</TR>
251<TR BGCOLOR="white" CLASS="TableRowColor">
252<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
253<CODE>protected &nbsp;java.awt.Dimension</CODE></FONT></TD>
254<TD><CODE><B><A HREF="../../../org/greenstone/gs3client/GraphPaperLayout.html#getLargestCellSize(java.awt.Container, boolean)">getLargestCellSize</A></B>(java.awt.Container&nbsp;parent,
255 boolean&nbsp;isPreferred)</CODE>
256
257<BR>
258&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Algorithm for calculating the largest minimum or preferred cell size.</TD>
259</TR>
260<TR BGCOLOR="white" CLASS="TableRowColor">
261<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
262<CODE>&nbsp;float</CODE></FONT></TD>
263<TD><CODE><B><A HREF="../../../org/greenstone/gs3client/GraphPaperLayout.html#getLayoutAlignmentX(java.awt.Container)">getLayoutAlignmentX</A></B>(java.awt.Container&nbsp;target)</CODE>
264
265<BR>
266&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the alignment along the x axis.</TD>
267</TR>
268<TR BGCOLOR="white" CLASS="TableRowColor">
269<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
270<CODE>&nbsp;float</CODE></FONT></TD>
271<TD><CODE><B><A HREF="../../../org/greenstone/gs3client/GraphPaperLayout.html#getLayoutAlignmentY(java.awt.Container)">getLayoutAlignmentY</A></B>(java.awt.Container&nbsp;target)</CODE>
272
273<BR>
274&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the alignment along the y axis.</TD>
275</TR>
276<TR BGCOLOR="white" CLASS="TableRowColor">
277<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
278<CODE>protected &nbsp;java.awt.Dimension</CODE></FONT></TD>
279<TD><CODE><B><A HREF="../../../org/greenstone/gs3client/GraphPaperLayout.html#getLayoutSize(java.awt.Container, boolean)">getLayoutSize</A></B>(java.awt.Container&nbsp;parent,
280 boolean&nbsp;isPreferred)</CODE>
281
282<BR>
283&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Algorithm for calculating layout size (minimum or preferred).</TD>
284</TR>
285<TR BGCOLOR="white" CLASS="TableRowColor">
286<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
287<CODE>&nbsp;void</CODE></FONT></TD>
288<TD><CODE><B><A HREF="../../../org/greenstone/gs3client/GraphPaperLayout.html#invalidateLayout(java.awt.Container)">invalidateLayout</A></B>(java.awt.Container&nbsp;target)</CODE>
289
290<BR>
291&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Invalidates the layout, indicating that if the layout manager
292 has cached information it should be discarded.</TD>
293</TR>
294<TR BGCOLOR="white" CLASS="TableRowColor">
295<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
296<CODE>&nbsp;void</CODE></FONT></TD>
297<TD><CODE><B><A HREF="../../../org/greenstone/gs3client/GraphPaperLayout.html#layoutContainer(java.awt.Container)">layoutContainer</A></B>(java.awt.Container&nbsp;parent)</CODE>
298
299<BR>
300&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Lays out the container in the specified container.</TD>
301</TR>
302<TR BGCOLOR="white" CLASS="TableRowColor">
303<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
304<CODE>&nbsp;java.awt.Dimension</CODE></FONT></TD>
305<TD><CODE><B><A HREF="../../../org/greenstone/gs3client/GraphPaperLayout.html#maximumLayoutSize(java.awt.Container)">maximumLayoutSize</A></B>(java.awt.Container&nbsp;target)</CODE>
306
307<BR>
308&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the maximum size of this component.</TD>
309</TR>
310<TR BGCOLOR="white" CLASS="TableRowColor">
311<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
312<CODE>&nbsp;java.awt.Dimension</CODE></FONT></TD>
313<TD><CODE><B><A HREF="../../../org/greenstone/gs3client/GraphPaperLayout.html#minimumLayoutSize(java.awt.Container)">minimumLayoutSize</A></B>(java.awt.Container&nbsp;parent)</CODE>
314
315<BR>
316&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Calculates the minimum size dimensions for the specified
317 panel given the components in the specified parent container.</TD>
318</TR>
319<TR BGCOLOR="white" CLASS="TableRowColor">
320<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
321<CODE>&nbsp;java.awt.Dimension</CODE></FONT></TD>
322<TD><CODE><B><A HREF="../../../org/greenstone/gs3client/GraphPaperLayout.html#preferredLayoutSize(java.awt.Container)">preferredLayoutSize</A></B>(java.awt.Container&nbsp;parent)</CODE>
323
324<BR>
325&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Calculates the preferred size dimensions for the specified
326 panel given the components in the specified parent container.</TD>
327</TR>
328<TR BGCOLOR="white" CLASS="TableRowColor">
329<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
330<CODE>&nbsp;void</CODE></FONT></TD>
331<TD><CODE><B><A HREF="../../../org/greenstone/gs3client/GraphPaperLayout.html#removeLayoutComponent(java.awt.Component)">removeLayoutComponent</A></B>(java.awt.Component&nbsp;comp)</CODE>
332
333<BR>
334&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Removes the specified component from the layout.</TD>
335</TR>
336<TR BGCOLOR="white" CLASS="TableRowColor">
337<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
338<CODE>&nbsp;void</CODE></FONT></TD>
339<TD><CODE><B><A HREF="../../../org/greenstone/gs3client/GraphPaperLayout.html#setConstraints(java.awt.Component, java.awt.Rectangle)">setConstraints</A></B>(java.awt.Component&nbsp;comp,
340 java.awt.Rectangle&nbsp;constraints)</CODE>
341
342<BR>
343&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
344</TR>
345<TR BGCOLOR="white" CLASS="TableRowColor">
346<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
347<CODE>&nbsp;void</CODE></FONT></TD>
348<TD><CODE><B><A HREF="../../../org/greenstone/gs3client/GraphPaperLayout.html#setGridSize(java.awt.Dimension)">setGridSize</A></B>(java.awt.Dimension&nbsp;d)</CODE>
349
350<BR>
351&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the size of the graph paper in logical units (n x m)</TD>
352</TR>
353<TR BGCOLOR="white" CLASS="TableRowColor">
354<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
355<CODE>&nbsp;void</CODE></FONT></TD>
356<TD><CODE><B><A HREF="../../../org/greenstone/gs3client/GraphPaperLayout.html#setGridSize(int, int)">setGridSize</A></B>(int&nbsp;width,
357 int&nbsp;height)</CODE>
358
359<BR>
360&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the size of the graph paper in logical units (n x m)</TD>
361</TR>
362</TABLE>
363&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
364<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
365<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
366<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
367</TR>
368<TR BGCOLOR="white" CLASS="TableRowColor">
369<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
370</TR>
371</TABLE>
372&nbsp;
373<P>
374
375<!-- ============ FIELD DETAIL =========== -->
376
377<A NAME="field_detail"><!-- --></A>
378<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
379<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
380<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
381<B>Field Detail</B></FONT></TH>
382</TR>
383</TABLE>
384
385<A NAME="hgap"><!-- --></A><H3>
386hgap</H3>
387<PRE>
388int <B>hgap</B></PRE>
389<DL>
390<DL>
391</DL>
392</DL>
393<HR>
394
395<A NAME="vgap"><!-- --></A><H3>
396vgap</H3>
397<PRE>
398int <B>vgap</B></PRE>
399<DL>
400<DL>
401</DL>
402</DL>
403<HR>
404
405<A NAME="gridSize"><!-- --></A><H3>
406gridSize</H3>
407<PRE>
408java.awt.Dimension <B>gridSize</B></PRE>
409<DL>
410<DL>
411</DL>
412</DL>
413<HR>
414
415<A NAME="compTable"><!-- --></A><H3>
416compTable</H3>
417<PRE>
418java.util.Hashtable <B>compTable</B></PRE>
419<DL>
420<DL>
421</DL>
422</DL>
423
424<!-- ========= CONSTRUCTOR DETAIL ======== -->
425
426<A NAME="constructor_detail"><!-- --></A>
427<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
428<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
429<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
430<B>Constructor Detail</B></FONT></TH>
431</TR>
432</TABLE>
433
434<A NAME="GraphPaperLayout()"><!-- --></A><H3>
435GraphPaperLayout</H3>
436<PRE>
437public <B>GraphPaperLayout</B>()</PRE>
438<DL>
439<DD>Creates a graph paper layout with a default of a 1 x 1 graph, with no
440 vertical or horizontal padding.
441<P>
442</DL>
443<HR>
444
445<A NAME="GraphPaperLayout(java.awt.Dimension)"><!-- --></A><H3>
446GraphPaperLayout</H3>
447<PRE>
448public <B>GraphPaperLayout</B>(java.awt.Dimension&nbsp;gridSize)</PRE>
449<DL>
450<DD>Creates a graph paper layout with the given grid size, with no vertical
451 or horizontal padding.
452<P>
453</DL>
454<HR>
455
456<A NAME="GraphPaperLayout(java.awt.Dimension, int, int)"><!-- --></A><H3>
457GraphPaperLayout</H3>
458<PRE>
459public <B>GraphPaperLayout</B>(java.awt.Dimension&nbsp;gridSize,
460 int&nbsp;hgap,
461 int&nbsp;vgap)</PRE>
462<DL>
463<DD>Creates a graph paper layout with the given grid size and padding.
464<P>
465<DL>
466<DT><B>Parameters:</B><DD><CODE>gridSize</CODE> - size of the graph paper in logical units (n x m)<DD><CODE>hgap</CODE> - horizontal padding<DD><CODE>vgap</CODE> - vertical padding</DL>
467</DL>
468
469<!-- ============ METHOD DETAIL ========== -->
470
471<A NAME="method_detail"><!-- --></A>
472<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
473<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
474<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
475<B>Method Detail</B></FONT></TH>
476</TR>
477</TABLE>
478
479<A NAME="getGridSize()"><!-- --></A><H3>
480getGridSize</H3>
481<PRE>
482public java.awt.Dimension <B>getGridSize</B>()</PRE>
483<DL>
484<DD><DL>
485</DL>
486</DD>
487<DD><DL>
488
489<DT><B>Returns:</B><DD>the size of the graph paper in logical units (n x m)</DL>
490</DD>
491</DL>
492<HR>
493
494<A NAME="setGridSize(java.awt.Dimension)"><!-- --></A><H3>
495setGridSize</H3>
496<PRE>
497public void <B>setGridSize</B>(java.awt.Dimension&nbsp;d)</PRE>
498<DL>
499<DD>Set the size of the graph paper in logical units (n x m)
500<P>
501<DD><DL>
502</DL>
503</DD>
504<DD><DL>
505</DL>
506</DD>
507</DL>
508<HR>
509
510<A NAME="setGridSize(int, int)"><!-- --></A><H3>
511setGridSize</H3>
512<PRE>
513public void <B>setGridSize</B>(int&nbsp;width,
514 int&nbsp;height)</PRE>
515<DL>
516<DD>Set the size of the graph paper in logical units (n x m)
517<P>
518<DD><DL>
519</DL>
520</DD>
521<DD><DL>
522</DL>
523</DD>
524</DL>
525<HR>
526
527<A NAME="setConstraints(java.awt.Component, java.awt.Rectangle)"><!-- --></A><H3>
528setConstraints</H3>
529<PRE>
530public void <B>setConstraints</B>(java.awt.Component&nbsp;comp,
531 java.awt.Rectangle&nbsp;constraints)</PRE>
532<DL>
533<DD><DL>
534</DL>
535</DD>
536<DD><DL>
537</DL>
538</DD>
539</DL>
540<HR>
541
542<A NAME="addLayoutComponent(java.lang.String, java.awt.Component)"><!-- --></A><H3>
543addLayoutComponent</H3>
544<PRE>
545public void <B>addLayoutComponent</B>(java.lang.String&nbsp;name,
546 java.awt.Component&nbsp;comp)</PRE>
547<DL>
548<DD>Adds the specified component with the specified name to
549 the layout. This does nothing in GraphPaperLayout, since constraints
550 are required.
551<P>
552<DD><DL>
553<DT><B>Specified by:</B><DD><CODE>addLayoutComponent</CODE> in interface <CODE>java.awt.LayoutManager</CODE></DL>
554</DD>
555<DD><DL>
556</DL>
557</DD>
558</DL>
559<HR>
560
561<A NAME="removeLayoutComponent(java.awt.Component)"><!-- --></A><H3>
562removeLayoutComponent</H3>
563<PRE>
564public void <B>removeLayoutComponent</B>(java.awt.Component&nbsp;comp)</PRE>
565<DL>
566<DD>Removes the specified component from the layout.
567<P>
568<DD><DL>
569<DT><B>Specified by:</B><DD><CODE>removeLayoutComponent</CODE> in interface <CODE>java.awt.LayoutManager</CODE></DL>
570</DD>
571<DD><DL>
572<DT><B>Parameters:</B><DD><CODE>comp</CODE> - the component to be removed</DL>
573</DD>
574</DL>
575<HR>
576
577<A NAME="preferredLayoutSize(java.awt.Container)"><!-- --></A><H3>
578preferredLayoutSize</H3>
579<PRE>
580public java.awt.Dimension <B>preferredLayoutSize</B>(java.awt.Container&nbsp;parent)</PRE>
581<DL>
582<DD>Calculates the preferred size dimensions for the specified
583 panel given the components in the specified parent container.
584<P>
585<DD><DL>
586<DT><B>Specified by:</B><DD><CODE>preferredLayoutSize</CODE> in interface <CODE>java.awt.LayoutManager</CODE></DL>
587</DD>
588<DD><DL>
589<DT><B>Parameters:</B><DD><CODE>parent</CODE> - the component to be laid out<DT><B>See Also:</B><DD><A HREF="../../../org/greenstone/gs3client/GraphPaperLayout.html#minimumLayoutSize(java.awt.Container)"><CODE>minimumLayoutSize(java.awt.Container)</CODE></A></DL>
590</DD>
591</DL>
592<HR>
593
594<A NAME="minimumLayoutSize(java.awt.Container)"><!-- --></A><H3>
595minimumLayoutSize</H3>
596<PRE>
597public java.awt.Dimension <B>minimumLayoutSize</B>(java.awt.Container&nbsp;parent)</PRE>
598<DL>
599<DD>Calculates the minimum size dimensions for the specified
600 panel given the components in the specified parent container.
601<P>
602<DD><DL>
603<DT><B>Specified by:</B><DD><CODE>minimumLayoutSize</CODE> in interface <CODE>java.awt.LayoutManager</CODE></DL>
604</DD>
605<DD><DL>
606<DT><B>Parameters:</B><DD><CODE>parent</CODE> - the component to be laid out<DT><B>See Also:</B><DD><A HREF="../../../org/greenstone/gs3client/GraphPaperLayout.html#preferredLayoutSize(java.awt.Container)"><CODE>preferredLayoutSize(java.awt.Container)</CODE></A></DL>
607</DD>
608</DL>
609<HR>
610
611<A NAME="getLayoutSize(java.awt.Container, boolean)"><!-- --></A><H3>
612getLayoutSize</H3>
613<PRE>
614protected java.awt.Dimension <B>getLayoutSize</B>(java.awt.Container&nbsp;parent,
615 boolean&nbsp;isPreferred)</PRE>
616<DL>
617<DD>Algorithm for calculating layout size (minimum or preferred).
618 <p>
619 The width of a graph paper layout is the largest cell width
620 (calculated in <code>getLargestCellSize()</code> times the number of
621 columns, plus the horizontal padding times the number of columns
622 plus one, plus the left and right insets of the target container.
623 <p>
624 The height of a graph paper layout is the largest cell height
625 (calculated in <code>getLargestCellSize()</code> times the number of
626 rows, plus the vertical padding times the number of rows
627 plus one, plus the top and bottom insets of the target container.
628<P>
629<DD><DL>
630</DL>
631</DD>
632<DD><DL>
633<DT><B>Parameters:</B><DD><CODE>parent</CODE> - the container in which to do the layout.<DD><CODE>isPreferred</CODE> - true for calculating preferred size, false for
634 calculating minimum size.
635<DT><B>Returns:</B><DD>the dimensions to lay out the subcomponents of the specified
636 container.<DT><B>See Also:</B><DD><A HREF="../../../org/greenstone/gs3client/GraphPaperLayout.html#getLargestCellSize(java.awt.Container, boolean)"><CODE>getLargestCellSize(java.awt.Container, boolean)</CODE></A></DL>
637</DD>
638</DL>
639<HR>
640
641<A NAME="getLargestCellSize(java.awt.Container, boolean)"><!-- --></A><H3>
642getLargestCellSize</H3>
643<PRE>
644protected java.awt.Dimension <B>getLargestCellSize</B>(java.awt.Container&nbsp;parent,
645 boolean&nbsp;isPreferred)</PRE>
646<DL>
647<DD>Algorithm for calculating the largest minimum or preferred cell size.
648 <p>
649 Largest cell size is calculated by getting the applicable size of each
650 component and keeping the maximum value, dividing the component's width
651 by the number of columns it is specified to occupy and dividing the
652 component's height by the number of rows it is specified to occupy.
653<P>
654<DD><DL>
655</DL>
656</DD>
657<DD><DL>
658<DT><B>Parameters:</B><DD><CODE>parent</CODE> - the container in which to do the layout.<DD><CODE>isPreferred</CODE> - true for calculating preferred size, false for
659 calculating minimum size.
660<DT><B>Returns:</B><DD>the largest cell size required.</DL>
661</DD>
662</DL>
663<HR>
664
665<A NAME="layoutContainer(java.awt.Container)"><!-- --></A><H3>
666layoutContainer</H3>
667<PRE>
668public void <B>layoutContainer</B>(java.awt.Container&nbsp;parent)</PRE>
669<DL>
670<DD>Lays out the container in the specified container.
671<P>
672<DD><DL>
673<DT><B>Specified by:</B><DD><CODE>layoutContainer</CODE> in interface <CODE>java.awt.LayoutManager</CODE></DL>
674</DD>
675<DD><DL>
676<DT><B>Parameters:</B><DD><CODE>parent</CODE> - the component which needs to be laid out</DL>
677</DD>
678</DL>
679<HR>
680
681<A NAME="addLayoutComponent(java.awt.Component, java.lang.Object)"><!-- --></A><H3>
682addLayoutComponent</H3>
683<PRE>
684public void <B>addLayoutComponent</B>(java.awt.Component&nbsp;comp,
685 java.lang.Object&nbsp;constraints)</PRE>
686<DL>
687<DD>Adds the specified component to the layout, using the specified
688 constraint object.
689<P>
690<DD><DL>
691<DT><B>Specified by:</B><DD><CODE>addLayoutComponent</CODE> in interface <CODE>java.awt.LayoutManager2</CODE></DL>
692</DD>
693<DD><DL>
694<DT><B>Parameters:</B><DD><CODE>comp</CODE> - the component to be added<DD><CODE>constraints</CODE> - where/how the component is added to the layout.</DL>
695</DD>
696</DL>
697<HR>
698
699<A NAME="maximumLayoutSize(java.awt.Container)"><!-- --></A><H3>
700maximumLayoutSize</H3>
701<PRE>
702public java.awt.Dimension <B>maximumLayoutSize</B>(java.awt.Container&nbsp;target)</PRE>
703<DL>
704<DD>Returns the maximum size of this component.
705<P>
706<DD><DL>
707<DT><B>Specified by:</B><DD><CODE>maximumLayoutSize</CODE> in interface <CODE>java.awt.LayoutManager2</CODE></DL>
708</DD>
709<DD><DL>
710<DT><B>See Also:</B><DD><CODE>Component.getMinimumSize()</CODE>,
711<CODE>Component.getPreferredSize()</CODE>,
712<CODE>LayoutManager</CODE></DL>
713</DD>
714</DL>
715<HR>
716
717<A NAME="getLayoutAlignmentX(java.awt.Container)"><!-- --></A><H3>
718getLayoutAlignmentX</H3>
719<PRE>
720public float <B>getLayoutAlignmentX</B>(java.awt.Container&nbsp;target)</PRE>
721<DL>
722<DD>Returns the alignment along the x axis. This specifies how
723 the component would like to be aligned relative to other
724 components. The value should be a number between 0 and 1
725 where 0 represents alignment along the origin, 1 is aligned
726 the furthest away from the origin, 0.5 is centered, etc.
727<P>
728<DD><DL>
729<DT><B>Specified by:</B><DD><CODE>getLayoutAlignmentX</CODE> in interface <CODE>java.awt.LayoutManager2</CODE></DL>
730</DD>
731<DD><DL>
732</DL>
733</DD>
734</DL>
735<HR>
736
737<A NAME="getLayoutAlignmentY(java.awt.Container)"><!-- --></A><H3>
738getLayoutAlignmentY</H3>
739<PRE>
740public float <B>getLayoutAlignmentY</B>(java.awt.Container&nbsp;target)</PRE>
741<DL>
742<DD>Returns the alignment along the y axis. This specifies how
743 the component would like to be aligned relative to other
744 components. The value should be a number between 0 and 1
745 where 0 represents alignment along the origin, 1 is aligned
746 the furthest away from the origin, 0.5 is centered, etc.
747<P>
748<DD><DL>
749<DT><B>Specified by:</B><DD><CODE>getLayoutAlignmentY</CODE> in interface <CODE>java.awt.LayoutManager2</CODE></DL>
750</DD>
751<DD><DL>
752</DL>
753</DD>
754</DL>
755<HR>
756
757<A NAME="invalidateLayout(java.awt.Container)"><!-- --></A><H3>
758invalidateLayout</H3>
759<PRE>
760public void <B>invalidateLayout</B>(java.awt.Container&nbsp;target)</PRE>
761<DL>
762<DD>Invalidates the layout, indicating that if the layout manager
763 has cached information it should be discarded.
764<P>
765<DD><DL>
766<DT><B>Specified by:</B><DD><CODE>invalidateLayout</CODE> in interface <CODE>java.awt.LayoutManager2</CODE></DL>
767</DD>
768<DD><DL>
769</DL>
770</DD>
771</DL>
772<!-- ========= END OF CLASS DATA ========= -->
773<HR>
774
775
776<!-- ======= START OF BOTTOM NAVBAR ====== -->
777<A NAME="navbar_bottom"><!-- --></A>
778<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
779<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
780<TR>
781<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
782<A NAME="navbar_bottom_firstrow"><!-- --></A>
783<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
784 <TR ALIGN="center" VALIGN="top">
785 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
786 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
787 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
788 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
789 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
790 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
791 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
792 </TR>
793</TABLE>
794</TD>
795<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
796</EM>
797</TD>
798</TR>
799
800<TR>
801<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
802&nbsp;<A HREF="../../../org/greenstone/gs3client/Displays.PopupListener.AssocFilePopupItem.html" title="class in org.greenstone.gs3client"><B>PREV CLASS</B></A>&nbsp;
803&nbsp;<A HREF="../../../org/greenstone/gs3client/GS3JavaClient.html" title="class in org.greenstone.gs3client"><B>NEXT CLASS</B></A></FONT></TD>
804<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
805 <A HREF="../../../index.html?org/greenstone/gs3client/GraphPaperLayout.html" target="_top"><B>FRAMES</B></A> &nbsp;
806&nbsp;<A HREF="GraphPaperLayout.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
807&nbsp;<SCRIPT type="text/javascript">
808 <!--
809 if(window==top) {
810 document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
811 }
812 //-->
813</SCRIPT>
814<NOSCRIPT>
815 <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
816</NOSCRIPT>
817
818
819</FONT></TD>
820</TR>
821<TR>
822<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
823 SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
824<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
825DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
826</TR>
827</TABLE>
828<A NAME="skip-navbar_bottom"></A>
829<!-- ======== END OF BOTTOM NAVBAR ======= -->
830
831<HR>
832
833</BODY>
834</HTML>
Note: See TracBrowser for help on using the repository browser.