001: /*
002: * ====================================================================
003: * The JRefactory License, Version 1.0
004: *
005: * Copyright (c) 2001 JRefactory. All rights reserved.
006: *
007: * Redistribution and use in source and binary forms, with or without
008: * modification, are permitted provided that the following conditions
009: * are met:
010: *
011: * 1. Redistributions of source code must retain the above copyright
012: * notice, this list of conditions and the following disclaimer.
013: *
014: * 2. Redistributions in binary form must reproduce the above copyright
015: * notice, this list of conditions and the following disclaimer in
016: * the documentation and/or other materials provided with the
017: * distribution.
018: *
019: * 3. The end-user documentation included with the redistribution,
020: * if any, must include the following acknowledgment:
021: * "This product includes software developed by the
022: * JRefactory (http://www.sourceforge.org/projects/jrefactory)."
023: * Alternately, this acknowledgment may appear in the software itself,
024: * if and wherever such third-party acknowledgments normally appear.
025: *
026: * 4. The names "JRefactory" must not be used to endorse or promote
027: * products derived from this software without prior written
028: * permission. For written permission, please contact seguin@acm.org.
029: *
030: * 5. Products derived from this software may not be called "JRefactory",
031: * nor may "JRefactory" appear in their name, without prior written
032: * permission of Chris Seguin.
033: *
034: * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
035: * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
036: * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
037: * DISCLAIMED. IN NO EVENT SHALL THE CHRIS SEGUIN OR
038: * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
039: * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
040: * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
041: * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
042: * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
043: * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
044: * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
045: * SUCH DAMAGE.
046: * ====================================================================
047: *
048: * This software consists of voluntary contributions made by many
049: * individuals on behalf of JRefactory. For more information on
050: * JRefactory, please see
051: * <http://www.sourceforge.org/projects/jrefactory>.
052: */
053: package org.acm.seguin.tools.install;
054:
055: import java.awt.Dimension;
056: import java.awt.GridBagConstraints;
057: import java.awt.GridBagLayout;
058: import java.awt.Insets;
059: import java.util.ArrayList;
060: import java.util.Iterator;
061:
062: /**
063: * Description of the Class
064: *
065: *@author Chris Seguin
066: *@created September 12, 2001
067: */
068: public class SpacingGroup extends SettingGroup {
069:
070: /**
071: * Constructor for the SpacingGroup object
072: */
073: public SpacingGroup() {
074: super ("Spacing");
075:
076: setLayout(new GridBagLayout());
077:
078: GridBagConstraints constraints = new GridBagConstraints();
079: constraints.gridx = 0;
080: constraints.gridy = 0;
081: constraints.gridwidth = 1;
082: constraints.gridheight = 1;
083: constraints.weightx = 1.0;
084: constraints.weighty = 1.0;
085: constraints.anchor = constraints.WEST;
086: constraints.fill = constraints.NONE;
087: constraints.insets = new Insets(5, 5, 5, 5);
088: constraints.ipadx = 0;
089: constraints.ipady = 0;
090: add(new IndentPanel(), constraints);
091:
092: constraints.gridy++;
093: add(createDivider(), constraints);
094:
095: constraints.gridy++;
096: add(new IndentCharPanel(), constraints);
097:
098: constraints.gridy++;
099: add(createDivider(), constraints);
100:
101: constraints.gridy++;
102: add(new ExprSpacePanel(), constraints);
103:
104: constraints.gridy++;
105: add(createDivider(), constraints);
106:
107: constraints.gridy++;
108: add(new LinesBetweenPanel(), constraints);
109:
110: constraints.gridy++;
111: add(createDivider(), constraints);
112:
113: constraints.gridy++;
114: add(new CastSpacePanel(), constraints);
115:
116: constraints.gridy++;
117: add(createDivider(), constraints);
118:
119: constraints.gridy++;
120: add(new CastForceNospacePanel(), constraints);
121:
122: constraints.gridy++;
123: add(createDivider(), constraints);
124:
125: constraints.gridy++;
126: add(new SurpriseReturnPanel(), constraints);
127:
128: constraints.gridy++;
129: add(createDivider(), constraints);
130:
131: constraints.gridy++;
132: add(new ThrowsNewlinePanel(), constraints);
133:
134: constraints.gridy++;
135: add(createDivider(), constraints);
136:
137: constraints.gridy++;
138: add(new CatchStartLinePanel(), constraints);
139:
140: constraints.gridy++;
141: add(createDivider(), constraints);
142:
143: constraints.gridy++;
144: add(new ElseStartLinePanel(), constraints);
145:
146: constraints.gridy++;
147: add(createDivider(), constraints);
148:
149: constraints.gridy++;
150: add(new FieldNameIndentPanel(), constraints);
151:
152: constraints.gridy++;
153: add(createDivider(), constraints);
154:
155: constraints.gridy++;
156: add(new EndLinePanel(), constraints);
157:
158: constraints.gridy++;
159: add(createDivider(), constraints);
160:
161: constraints.gridy++;
162: add(new VariableSpacingPanel(), constraints);
163:
164: constraints.gridy++;
165: add(createDivider(), constraints);
166:
167: constraints.gridy++;
168: add(new DynamicVariableSpacingPanel(), constraints);
169:
170: constraints.gridy++;
171: add(createDivider(), constraints);
172:
173: constraints.gridy++;
174: add(new VariableAlignWithBlockPanel(), constraints);
175:
176: constraints.gridy++;
177: add(createDivider(), constraints);
178:
179: constraints.gridy++;
180: add(new CaseIndentPanel(), constraints);
181:
182: constraints.gridy++;
183: add(createDivider(), constraints);
184:
185: constraints.gridy++;
186: add(new KeywordSpacePanel(), constraints);
187:
188: constraints.gridy++;
189: add(createDivider(), constraints);
190:
191: constraints.gridy++;
192: add(new SpaceAroundLocalVariablesPanel(), constraints);
193:
194: constraints.gridy++;
195: add(createDivider(), constraints);
196:
197: constraints.gridy++;
198: add(new PackageLinesPanel(), constraints);
199:
200: constraints.gridy++;
201: add(createDivider(), constraints);
202:
203: constraints.gridy++;
204: add(new MaintainImportNewlinesPanel(), constraints);
205:
206: constraints.gridy++;
207: add(createDivider(), constraints);
208:
209: constraints.gridy++;
210: add(new ClassLinesPanel(), constraints);
211:
212: constraints.gridy++;
213: add(createDivider(), constraints);
214:
215: constraints.gridy++;
216: add(new IndentInInitializerPanel(), constraints);
217:
218: constraints.gridy++;
219: add(createDivider(), constraints);
220:
221: constraints.gridy++;
222: add(new BangSpacePanel(), constraints);
223:
224: constraints.gridy++;
225: add(createDivider(), constraints);
226:
227: constraints.gridy++;
228: add(new MethodSpacePanel(), constraints);
229:
230: constraints.gridy++;
231: add(createDivider(), constraints);
232:
233: constraints.gridy++;
234: add(new SpaceInsideCastPanel(), constraints);
235:
236: constraints.gridy++;
237: add(createDivider(), constraints);
238:
239: constraints.gridy++;
240: add(new SpaceAroundOperations(), constraints);
241:
242: constraints.gridy++;
243: add(createDivider(), constraints);
244:
245: constraints.gridy++;
246: add(new SpaceBeforeExtendsPanel(), constraints);
247:
248: constraints.gridy++;
249: add(createDivider(), constraints);
250:
251: constraints.gridy++;
252: add(new ExtendsIndentPanel(), constraints);
253:
254: constraints.gridy++;
255: add(createDivider(), constraints);
256:
257: constraints.gridy++;
258: add(new SpaceBeforeImplementsPanel(), constraints);
259:
260: constraints.gridy++;
261: add(createDivider(), constraints);
262:
263: constraints.gridy++;
264: add(new ImplementsIndentPanel(), constraints);
265:
266: constraints.gridy++;
267: add(createDivider(), constraints);
268:
269: constraints.gridy++;
270: add(new SpaceBeforeMultilineMethodPanel(), constraints);
271:
272: constraints.gridy++;
273: add(createDivider(), constraints);
274:
275: constraints.gridy++;
276: add(new IndentInitializerBlockPanel(), constraints);
277:
278: updateDividers();
279: }
280: }
|