001: /*
002: The contents of this file are subject to the Common Public Attribution License
003: Version 1.0 (the "License"); you may not use this file except in compliance with
004: the License. You may obtain a copy of the License at
005: http://www.projity.com/license . The License is based on the Mozilla Public
006: License Version 1.1 but Sections 14 and 15 have been added to cover use of
007: software over a computer network and provide for limited attribution for the
008: Original Developer. In addition, Exhibit A has been modified to be consistent
009: with Exhibit B.
010:
011: Software distributed under the License is distributed on an "AS IS" basis,
012: WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the
013: specific language governing rights and limitations under the License. The
014: Original Code is OpenProj. The Original Developer is the Initial Developer and
015: is Projity, Inc. All portions of the code written by Projity are Copyright (c)
016: 2006, 2007. All Rights Reserved. Contributors Projity, Inc.
017:
018: Alternatively, the contents of this file may be used under the terms of the
019: Projity End-User License Agreeement (the Projity License), in which case the
020: provisions of the Projity License are applicable instead of those above. If you
021: wish to allow use of your version of this file only under the terms of the
022: Projity License and not to allow others to use your version of this file under
023: the CPAL, indicate your decision by deleting the provisions above and replace
024: them with the notice and other provisions required by the Projity License. If
025: you do not delete the provisions above, a recipient may use your version of this
026: file under either the CPAL or the Projity License.
027:
028: [NOTE: The text of this license may differ slightly from the text of the notices
029: in Exhibits A and B of the license at http://www.projity.com/license. You should
030: use the latest text at http://www.projity.com/license for your modifications.
031: You may not remove this license text from the source files.]
032:
033: Attribution Information: Attribution Copyright Notice: Copyright � 2006, 2007
034: Projity, Inc. Attribution Phrase (not exceeding 10 words): Powered by OpenProj,
035: an open source solution from Projity. Attribution URL: http://www.projity.com
036: Graphic Image as provided in the Covered Code as file: openproj_logo.png with
037: alternatives listed on http://www.projity.com/logo
038:
039: Display of Attribution Information is required in Larger Works which are defined
040: in the CPAL as a work which combines Covered Code or portions thereof with code
041: not governed by the terms of the CPAL. However, in addition to the other notice
042: obligations, all copies of the Covered Code in Executable and Source Code form
043: distributed must, as a form of attribution of the original author, include on
044: each user interface screen the "OpenProj" logo visible to all users. The
045: OpenProj logo should be located horizontally aligned with the menu bar and left
046: justified on the top left of the screen adjacent to the File menu. The logo
047: must be at least 100 x 25 pixels. When users click on the "OpenProj" logo it
048: must direct them back to http://www.projity.com.
049: */
050: package com.projity.graphic.configuration;
051:
052: import org.apache.commons.digester.Digester;
053:
054: import com.projity.configuration.Configuration;
055:
056: /**
057: *
058: */
059: public class GraphicConfiguration {
060: protected int columnHeaderHeight;
061: protected int printFooterHeight;
062: protected int rowHeaderWidth;
063: protected int rowChartHeaderWidth;
064: protected int rowHeight;
065: protected int ganttBarHeight;
066: protected int ganttBarYOffset;
067: protected int ganttBarAnnotationXOffset;
068: protected int ganttBarAnnotationYOffset;
069: protected int ganttProgressBarHeight;
070: protected int ganttBarMinWidth;
071: protected int baselineHeight;
072: protected int pertCellWidth;
073: protected int pertCellHeight;
074: protected int pertXOffset;
075: protected int pertYOffset;
076: protected int treeCellWidth;
077: protected int treeCellHeight;
078: protected int treeXOffset;
079: protected int treeYOffset;
080: protected int collapseLevel;
081: protected double selectionSquare;
082: protected double networkCellSelectionSquare;
083: protected double selectionProgress0;
084: protected double selectionProgress1;
085: protected double selectionResize0;
086: protected double selectionResize1;
087: protected double linkFlatness = 0;
088:
089: public static GraphicConfiguration getInstance() {
090: return Configuration.getInstance().getGraphicConfiguation();
091: }
092:
093: public static void addDigesterEvents(Digester digester) {
094: digester
095: .addObjectCreate("*/graphic",
096: "com.projity.graphic.configuration.GraphicConfiguration");
097: digester.addSetProperties("*/graphic");
098: digester
099: .addSetNext("*/graphic", "setGraphicConfiguation",
100: "com.projity.graphic.configuration.GraphicConfiguration");
101:
102: }
103:
104: /**
105: * @return Returns the columnHeaderHeight.
106: */
107: public int getColumnHeaderHeight() {
108: return columnHeaderHeight;
109: }
110:
111: /**
112: * @param columnHeaderHeight The columnHeaderHeight to set.
113: */
114: public void setColumnHeaderHeight(int columnHeaderHeight) {
115: this .columnHeaderHeight = columnHeaderHeight;
116: }
117:
118: public int getPrintFooterHeight() {
119: return printFooterHeight;
120: }
121:
122: public void setPrintFooterHeight(int printFooterHeight) {
123: this .printFooterHeight = printFooterHeight;
124: }
125:
126: public int getRowHeaderWidth() {
127: return rowHeaderWidth;
128: }
129:
130: public void setRowHeaderWidth(int rowHeaderWidth) {
131: this .rowHeaderWidth = rowHeaderWidth;
132: }
133:
134: /**
135: * @return Returns the rowChartHeaderWidth.
136: */
137: public int getRowChartHeaderWidth() {
138: return rowChartHeaderWidth;
139: }
140:
141: /**
142: * @param rowChartHeaderWidth The rowChartHeaderWidth to set.
143: */
144: public void setRowChartHeaderWidth(int rowChartHeaderWidth) {
145: this .rowChartHeaderWidth = rowChartHeaderWidth;
146: }
147:
148: /**
149: * @return Returns the rowHeight.
150: */
151: public int getRowHeight() {
152: return rowHeight;
153: }
154:
155: /**
156: * @param rowHeight The rowHeight to set.
157: */
158: public void setRowHeight(int rowHeight) {
159: this .rowHeight = rowHeight;
160: }
161:
162: /**
163: * @return Returns the ganttBarHeight.
164: */
165: public int getGanttBarHeight() {
166: return ganttBarHeight;
167: }
168:
169: /**
170: * @param ganttBarHeight The ganttBarHeight to set.
171: */
172: public void setGanttBarHeight(int ganttBarHeight) {
173: this .ganttBarHeight = ganttBarHeight;
174: }
175:
176: /**
177: * @return Returns the ganttProgressBarHeight.
178: */
179: public int getGanttProgressBarHeight() {
180: return ganttProgressBarHeight;
181: }
182:
183: /**
184: * @param ganttProgressBarHeight The ganttProgressBarHeight to set.
185: */
186: public void setGanttProgressBarHeight(int ganttProgressBarHeight) {
187: this .ganttProgressBarHeight = ganttProgressBarHeight;
188: }
189:
190: /**
191: * @return Returns the ganttBarYOffset.
192: */
193: public int getGanttBarYOffset() {
194: return ganttBarYOffset;
195: }
196:
197: /**
198: * @param ganttBarYOffset The ganttBarYOffset to set.
199: */
200: public void setGanttBarYOffset(int ganttBarYOffset) {
201: this .ganttBarYOffset = ganttBarYOffset;
202: }
203:
204: public int getBaselineHeight() {
205: return baselineHeight;
206: }
207:
208: public void setBaselineHeight(int baselineHeight) {
209: this .baselineHeight = baselineHeight;
210: }
211:
212: public int getPertCellHeight() {
213: return pertCellHeight;
214: }
215:
216: public void setPertCellHeight(int pertCellHeight) {
217: this .pertCellHeight = pertCellHeight;
218: }
219:
220: public int getPertCellWidth() {
221: return pertCellWidth;
222: }
223:
224: public void setPertCellWidth(int pertCellWidth) {
225: this .pertCellWidth = pertCellWidth;
226: }
227:
228: public int getPertXOffset() {
229: return pertXOffset;
230: }
231:
232: public void setPertXOffset(int pertXOffset) {
233: this .pertXOffset = pertXOffset;
234: }
235:
236: public int getPertYOffset() {
237: return pertYOffset;
238: }
239:
240: public void setPertYOffset(int pertYOffset) {
241: this .pertYOffset = pertYOffset;
242: }
243:
244: public int getTreeCellHeight() {
245: return treeCellHeight;
246: }
247:
248: public void setTreeCellHeight(int treeCellHeight) {
249: this .treeCellHeight = treeCellHeight;
250: }
251:
252: public int getTreeCellWidth() {
253: return treeCellWidth;
254: }
255:
256: public void setTreeCellWidth(int treeCellWidth) {
257: this .treeCellWidth = treeCellWidth;
258: }
259:
260: public int getTreeXOffset() {
261: return treeXOffset;
262: }
263:
264: public void setTreeXOffset(int treeXOffset) {
265: this .treeXOffset = treeXOffset;
266: }
267:
268: public int getTreeYOffset() {
269: return treeYOffset;
270: }
271:
272: public void setTreeYOffset(int treeYOffset) {
273: this .treeYOffset = treeYOffset;
274: }
275:
276: public int getCollapseLevel() {
277: return collapseLevel;
278: }
279:
280: public void setCollapseLevel(int collapseLevel) {
281: this .collapseLevel = collapseLevel;
282: }
283:
284: public double getSelectionSquare() {
285: return selectionSquare;
286: }
287:
288: public void setSelectionSquare(double selectionSquare) {
289: this .selectionSquare = selectionSquare;
290: }
291:
292: public double getLinkFlatness() {
293: return linkFlatness;
294: }
295:
296: public void setLinkFlatness(double linkFlatness) {
297: this .linkFlatness = linkFlatness;
298: }
299:
300: public double getSelectionProgress0() {
301: return selectionProgress0;
302: }
303:
304: public void setSelectionProgress0(double selectionProgress0) {
305: this .selectionProgress0 = selectionProgress0;
306: }
307:
308: public double getSelectionProgress1() {
309: return selectionProgress1;
310: }
311:
312: public void setSelectionProgress1(double selectionProgress1) {
313: this .selectionProgress1 = selectionProgress1;
314: }
315:
316: public double getSelectionResize0() {
317: return selectionResize0;
318: }
319:
320: public void setSelectionResize0(double selectionResize0) {
321: this .selectionResize0 = selectionResize0;
322: }
323:
324: public double getSelectionResize1() {
325: return selectionResize1;
326: }
327:
328: public void setSelectionResize1(double selectionResize1) {
329: this .selectionResize1 = selectionResize1;
330: }
331:
332: public double getNetworkCellSelectionSquare() {
333: return networkCellSelectionSquare;
334: }
335:
336: public void setNetworkCellSelectionSquare(
337: double networkCellSelectionSquare) {
338: this .networkCellSelectionSquare = networkCellSelectionSquare;
339: }
340:
341: public int getGanttBarAnnotationXOffset() {
342: return ganttBarAnnotationXOffset;
343: }
344:
345: public void setGanttBarAnnotationXOffset(
346: int ganttBarAnnotationXOffset) {
347: this .ganttBarAnnotationXOffset = ganttBarAnnotationXOffset;
348: }
349:
350: public int getGanttBarAnnotationYOffset() {
351: return ganttBarAnnotationYOffset;
352: }
353:
354: public void setGanttBarAnnotationYOffset(
355: int ganttBarAnnotationYOffset) {
356: this .ganttBarAnnotationYOffset = ganttBarAnnotationYOffset;
357: }
358:
359: public int getGanttBarMinWidth() {
360: return ganttBarMinWidth;
361: }
362:
363: public void setGanttBarMinWidth(int ganttBarMinWidth) {
364: this.ganttBarMinWidth = ganttBarMinWidth;
365: }
366:
367: }
|