|
1 // Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // ${file_name} |
|
15 // |
|
16 // |
|
17 |
|
18 package com.symbian.smt.gui.wizard; |
|
19 |
|
20 import java.util.List; |
|
21 |
|
22 import org.eclipse.jface.viewers.ISelection; |
|
23 import org.eclipse.jface.wizard.WizardPage; |
|
24 import org.eclipse.swt.SWT; |
|
25 import org.eclipse.swt.layout.FillLayout; |
|
26 import org.eclipse.swt.widgets.Composite; |
|
27 import org.eclipse.swt.widgets.TabFolder; |
|
28 import org.eclipse.swt.widgets.TabItem; |
|
29 |
|
30 import com.symbian.smt.gui.PersistentDataStore; |
|
31 import com.symbian.smt.gui.smtwidgets.AdvancedOptionsWidget; |
|
32 import com.symbian.smt.gui.smtwidgets.BuildControlWidget; |
|
33 import com.symbian.smt.gui.smtwidgets.FilterWidget; |
|
34 import com.symbian.smt.gui.smtwidgets.IgnoreWidget; |
|
35 import com.symbian.smt.gui.smtwidgets.ModelControlWidget; |
|
36 import com.symbian.smt.gui.smtwidgets.ModelLabelsWidget; |
|
37 import com.symbian.smt.gui.smtwidgets.ValidModelDefinedListener; |
|
38 import com.symbian.smt.gui.smtwidgets.ValidModelEvent; |
|
39 import com.symbian.smt.gui.smtwidgets.resources.ResourcesWidget; |
|
40 |
|
41 public class NewProjectWizardTabbedPropertiesPage extends WizardPage implements |
|
42 ValidModelDefinedListener { |
|
43 |
|
44 // Custom composite SWT widgets |
|
45 private ModelLabelsWidget modelLabelsWidget; |
|
46 private ResourcesWidget resourcesWidget; |
|
47 private ModelControlWidget modelControlWidget; |
|
48 private FilterWidget filterWidget; |
|
49 private IgnoreWidget ignoreWidget; |
|
50 private BuildControlWidget buildWidget; |
|
51 private AdvancedOptionsWidget advancedOptionsWidget; |
|
52 private TabFolder tabFolder; |
|
53 |
|
54 /** |
|
55 * Creates a wizard page for entering optional System Model information |
|
56 * |
|
57 * @return void |
|
58 */ |
|
59 protected NewProjectWizardTabbedPropertiesPage(ISelection selection) { |
|
60 super("wizardPage"); |
|
61 setTitle("System Model Manager Wizard"); |
|
62 setDescription("Enter any optional configuration information for the System Model Diagram"); |
|
63 } |
|
64 |
|
65 public void createControl(Composite parent) { |
|
66 Composite container = new Composite(parent, SWT.NULL); |
|
67 |
|
68 container.setLayout(new FillLayout(SWT.VERTICAL)); |
|
69 |
|
70 setControl(container); |
|
71 |
|
72 tabFolder = new TabFolder(container, SWT.NONE); |
|
73 |
|
74 final TabItem labelsTabItem = new TabItem(tabFolder, SWT.NONE); |
|
75 labelsTabItem.setText("Labels"); |
|
76 modelLabelsWidget = new ModelLabelsWidget(tabFolder, SWT.NONE); |
|
77 labelsTabItem.setControl(modelLabelsWidget); |
|
78 |
|
79 final TabItem resourcesTabItem = new TabItem(tabFolder, SWT.NONE); |
|
80 resourcesTabItem.setText("Resources"); |
|
81 resourcesWidget = new ResourcesWidget(tabFolder, SWT.NONE); |
|
82 resourcesTabItem.setControl(resourcesWidget); |
|
83 |
|
84 final TabItem modelControlTabItem = new TabItem(tabFolder, SWT.NONE); |
|
85 modelControlTabItem.setText("Model Control"); |
|
86 modelControlWidget = new ModelControlWidget(tabFolder, SWT.NONE); |
|
87 modelControlTabItem.setControl(modelControlWidget); |
|
88 |
|
89 final TabItem filtersTabItem = new TabItem(tabFolder, SWT.NONE); |
|
90 filtersTabItem.setText("Filters"); |
|
91 filterWidget = new FilterWidget(tabFolder, SWT.NONE); |
|
92 filtersTabItem.setControl(filterWidget); |
|
93 |
|
94 final TabItem ignoreListTabItem = new TabItem(tabFolder, SWT.NONE); |
|
95 ignoreListTabItem.setText("Ignore List"); |
|
96 ignoreWidget = new IgnoreWidget(tabFolder, SWT.NONE); |
|
97 ignoreListTabItem.setControl(ignoreWidget); |
|
98 |
|
99 final TabItem buildControlTabItem = new TabItem(tabFolder, SWT.NONE); |
|
100 buildControlTabItem.setText("Build Options"); |
|
101 buildWidget = new BuildControlWidget(tabFolder, SWT.NONE, false); |
|
102 buildControlTabItem.setControl(buildWidget); |
|
103 |
|
104 final TabItem advancedOptionsTabItem = new TabItem(tabFolder, SWT.NONE); |
|
105 advancedOptionsTabItem.setText("Advanced Options"); |
|
106 advancedOptionsWidget = new AdvancedOptionsWidget(tabFolder, SWT.NONE); |
|
107 advancedOptionsTabItem.setControl(advancedOptionsWidget); |
|
108 } |
|
109 |
|
110 @Override |
|
111 public void dispose() { |
|
112 if (buildWidget != null) { |
|
113 buildWidget.removeModelListener(this); |
|
114 } |
|
115 |
|
116 if (modelControlWidget != null) { |
|
117 modelControlWidget.removeModelListener(this); |
|
118 } |
|
119 |
|
120 super.dispose(); |
|
121 } |
|
122 |
|
123 /** |
|
124 * Returns the advanced options or an empty string array if no advanced |
|
125 * options have been specified |
|
126 * |
|
127 * @return String the advanced options |
|
128 */ |
|
129 public String[] getAdvancedOptions() { |
|
130 return advancedOptionsWidget.getAdvancedOptions(); |
|
131 } |
|
132 |
|
133 /** |
|
134 * Returns the shapes files or an empty string if no shapes file has been |
|
135 * specified |
|
136 * |
|
137 * @return String[] |
|
138 */ |
|
139 public String[] getBorderShapesFiles() { |
|
140 return resourcesWidget.getBorderShapesFiles(); |
|
141 } |
|
142 |
|
143 // Build Options |
|
144 |
|
145 /** |
|
146 * Returns the shapes files or an empty string if no shapes file has been |
|
147 * specified |
|
148 * |
|
149 * @return String[] |
|
150 */ |
|
151 public String[] getBorderStylesFiles() { |
|
152 return resourcesWidget.getBorderStylesFiles(); |
|
153 } |
|
154 |
|
155 // Model Labels Setters & Getters |
|
156 |
|
157 /** |
|
158 * Returns the shapes files or an empty string if no shapes file has been |
|
159 * specified |
|
160 * |
|
161 * @return String[] |
|
162 */ |
|
163 public String[] getColoursFiles() { |
|
164 return resourcesWidget.getColoursFiles(); |
|
165 } |
|
166 |
|
167 /** |
|
168 * Returns the copyright text from the Model Labels widget |
|
169 * |
|
170 * @return String |
|
171 */ |
|
172 public String getCopyrightText() { |
|
173 return modelLabelsWidget.getCopyrightText(); |
|
174 } |
|
175 |
|
176 /** |
|
177 * Returns the border shapes files or an empty string if no border shapes |
|
178 * file has been specified |
|
179 * |
|
180 * @return String |
|
181 */ |
|
182 public String[] getDefaultBorderShapesFiles() { |
|
183 return resourcesWidget.getSelectedBorderShapesFiles(); |
|
184 } |
|
185 |
|
186 /** |
|
187 * Returns the border styles files or an empty string if no border styles |
|
188 * file has been specified |
|
189 * |
|
190 * @return String[] |
|
191 */ |
|
192 public String[] getDefaultBorderStylesFiles() { |
|
193 return resourcesWidget.getSelectedBorderStylesFiles(); |
|
194 } |
|
195 |
|
196 /** |
|
197 * Returns the colours files or an empty string if no colours file has been |
|
198 * specified |
|
199 * |
|
200 * @return String |
|
201 */ |
|
202 public String[] getDefaultColoursFiles() { |
|
203 return resourcesWidget.getSelectedColoursFiles(); |
|
204 } |
|
205 |
|
206 /** |
|
207 * Returns the dependencies files or an empty string if no dependencies file |
|
208 * has been specified |
|
209 * |
|
210 * @return String[] |
|
211 */ |
|
212 public String[] getDefaultDependenciesFiles() { |
|
213 return resourcesWidget.getSelectedDependenciesFiles(); |
|
214 } |
|
215 |
|
216 /** |
|
217 * Returns the default distribution text value from the Model Labels widget |
|
218 * |
|
219 * @return String |
|
220 */ |
|
221 public String getDefaultDistributionText() { |
|
222 return modelLabelsWidget.getSelectedDistributionText(); |
|
223 } |
|
224 |
|
225 /** |
|
226 * Returns the levels files or an empty string if no levels file has been |
|
227 * specified |
|
228 * |
|
229 * @return String[] |
|
230 */ |
|
231 public String[] getDefaultLevelsFiles() { |
|
232 return resourcesWidget.getSelectedLevelsFiles(); |
|
233 } |
|
234 |
|
235 /** |
|
236 * Returns the localisation files or an empty string if no localisation file |
|
237 * has been specified |
|
238 * |
|
239 * @return String[] |
|
240 */ |
|
241 public String[] getDefaultLocalisationFiles() { |
|
242 return resourcesWidget.getSelectedLocalisationFiles(); |
|
243 } |
|
244 |
|
245 /** |
|
246 * Returns the default model version text value from the Model Label widget |
|
247 * |
|
248 * @return String |
|
249 */ |
|
250 public String getDefaultModelVersionText() { |
|
251 return modelLabelsWidget.getSelectedModelVersionText(); |
|
252 } |
|
253 |
|
254 /** |
|
255 * Returns the patterns files or an empty string if no patterns file has |
|
256 * been specified |
|
257 * |
|
258 * @return String[] |
|
259 */ |
|
260 public String[] getDefaultPatternsFiles() { |
|
261 return resourcesWidget.getSelectedPatternsFiles(); |
|
262 } |
|
263 |
|
264 /** |
|
265 * Returns the default printed DPI value from the Model Control widget |
|
266 * |
|
267 * @return String |
|
268 */ |
|
269 public String getDefaultPrintedDpi() { |
|
270 return modelControlWidget.getSelectedPrintedDpi(); |
|
271 } |
|
272 |
|
273 /** |
|
274 * Returns the S12 XML files or an empty string if no system info file has |
|
275 * been specified |
|
276 * |
|
277 * @return String[] |
|
278 */ |
|
279 public String[] getDefaultS12XmlFiles() { |
|
280 return resourcesWidget.getSelectedS12XmlFiles(); |
|
281 } |
|
282 |
|
283 /** |
|
284 * Returns the shapes files or an empty string if no shapes file has been |
|
285 * specified |
|
286 * |
|
287 * @return String[] |
|
288 */ |
|
289 public String[] getDefaultShapesFiles() { |
|
290 return resourcesWidget.getSelectedShapesFiles(); |
|
291 } |
|
292 |
|
293 /** |
|
294 * Returns the system info files or an empty string if no system info file |
|
295 * has been specified |
|
296 * |
|
297 * @return String[] |
|
298 */ |
|
299 public String[] getDefaultSystemInfoFiles() { |
|
300 return resourcesWidget.getSelectedSystemInfoFiles(); |
|
301 } |
|
302 |
|
303 /** |
|
304 * Returns the shapes files or an empty string if no shapes file has been |
|
305 * specified |
|
306 * |
|
307 * @return String[] |
|
308 */ |
|
309 public String[] getDependenciesFiles() { |
|
310 return resourcesWidget.getDependenciesFiles(); |
|
311 } |
|
312 |
|
313 // Model Control Setters & Getters |
|
314 |
|
315 /** |
|
316 * Returns the distribution text values from the Model Labels widget |
|
317 * |
|
318 * @return String[] |
|
319 */ |
|
320 public String[] getDistributionTexts() { |
|
321 return modelLabelsWidget.getDistributionTexts(); |
|
322 } |
|
323 |
|
324 /** |
|
325 * Returns the filter items from the Filter Widget |
|
326 * |
|
327 * @return String[] |
|
328 */ |
|
329 public String[] getFilterItems() { |
|
330 return filterWidget.getFilterItems(); |
|
331 } |
|
332 |
|
333 /** |
|
334 * Returns a boolean value from the Model Control widget indicating if the |
|
335 * Fix Item Size button has been selected |
|
336 * |
|
337 * @return a Boolean value specifying whether or not the item size is fixed. |
|
338 */ |
|
339 public Boolean getFixItemSize() { |
|
340 return modelControlWidget.getFixItemSize(); |
|
341 } |
|
342 |
|
343 /** |
|
344 * Returns a boolean value from the Model Control widget indicating if the |
|
345 * Highlight Core OS button has been selected |
|
346 * |
|
347 * @return Boolean |
|
348 */ |
|
349 public Boolean getHighlightCoreOS() { |
|
350 return modelControlWidget.getHighlightCoreOS(); |
|
351 } |
|
352 |
|
353 /** |
|
354 * Returns a list of the ignore items from the Ignore Items Widget |
|
355 * |
|
356 * @return List<String> |
|
357 */ |
|
358 public List<String[]> getIgnoreItems() { |
|
359 return ignoreWidget.getIgnoreItems(); |
|
360 } |
|
361 |
|
362 /** |
|
363 * Returns the level of detail from the Model Control widget |
|
364 * |
|
365 * @return String |
|
366 */ |
|
367 public String getLevelOfDetail() { |
|
368 return modelControlWidget.getLevelOfDetail(); |
|
369 } |
|
370 |
|
371 /** |
|
372 * Returns the levels files or an empty string if no shapes file has been |
|
373 * specified |
|
374 * |
|
375 * @return String[] |
|
376 */ |
|
377 public String[] getLevelsFiles() { |
|
378 return resourcesWidget.getLevelsFiles(); |
|
379 } |
|
380 |
|
381 /** |
|
382 * Returns the shapes files or an empty string if no shapes file has been |
|
383 * specified |
|
384 * |
|
385 * @return String[] |
|
386 */ |
|
387 public String[] getLocalisationFiles() { |
|
388 return resourcesWidget.getLocalisationFiles(); |
|
389 } |
|
390 |
|
391 /** |
|
392 * Returns the model name from the Model Labels widget |
|
393 * |
|
394 * @return String |
|
395 */ |
|
396 public String getModelName() { |
|
397 return modelLabelsWidget.getModelName(); |
|
398 } |
|
399 |
|
400 /** |
|
401 * Returns the text for the model version from the Model Labels widget |
|
402 * |
|
403 * @return String |
|
404 */ |
|
405 public String getModelVersion() { |
|
406 return modelLabelsWidget.getModelVersion(); |
|
407 } |
|
408 |
|
409 /** |
|
410 * Returns the model version text values from the Model Labels widget |
|
411 * |
|
412 * @return String[] |
|
413 */ |
|
414 public String[] getModelVersionTexts() { |
|
415 return modelLabelsWidget.getModelVersionTexts(); |
|
416 } |
|
417 |
|
418 public String getOutputFilename() { |
|
419 return buildWidget.getOutputFilename(); |
|
420 } |
|
421 |
|
422 /** |
|
423 * Returns the shapes files or an empty string if no shapes file has been |
|
424 * specified |
|
425 * |
|
426 * @return String[] |
|
427 */ |
|
428 public String[] getPatternsFiles() { |
|
429 return resourcesWidget.getPatternsFiles(); |
|
430 } |
|
431 |
|
432 /** |
|
433 * Returns the printed DPI values from the Model Control widget |
|
434 * |
|
435 * @return String |
|
436 */ |
|
437 public String[] getPrintedDpis() { |
|
438 return modelControlWidget.getPrintedDpis(); |
|
439 } |
|
440 |
|
441 /** |
|
442 * Returns the S12 XML files or an empty string if no shapes file has been |
|
443 * specified |
|
444 * |
|
445 * @return String[] |
|
446 */ |
|
447 public String[] getS12XmlFiles() { |
|
448 return resourcesWidget.getS12XmlFiles(); |
|
449 } |
|
450 |
|
451 /** |
|
452 * Returns the selected distribution text value from the Model Labels widget |
|
453 * |
|
454 * @return String |
|
455 */ |
|
456 public String getSelectedDistributionText() { |
|
457 return modelLabelsWidget.getSelectedDistributionText(); |
|
458 } |
|
459 |
|
460 /** |
|
461 * Returns the selected model version text value from the Model Label widget |
|
462 * |
|
463 * @return String |
|
464 */ |
|
465 public String getSelectedModelVersionText() { |
|
466 return modelLabelsWidget.getSelectedModelVersionText(); |
|
467 } |
|
468 |
|
469 /** |
|
470 * Returns the selected printed DPI value from the Model Control widget |
|
471 * |
|
472 * @return String |
|
473 */ |
|
474 public String getSelectedPrintedDpi() { |
|
475 return modelControlWidget.getSelectedPrintedDpi(); |
|
476 } |
|
477 |
|
478 // Resources Setters & Getters |
|
479 |
|
480 /** |
|
481 * Returns the shapes files or an empty string if no shapes file has been |
|
482 * specified |
|
483 * |
|
484 * @return String[] |
|
485 */ |
|
486 public String[] getShapesFiles() { |
|
487 return resourcesWidget.getShapesFiles(); |
|
488 } |
|
489 |
|
490 /** |
|
491 * Returns a boolean value indicating if the Suppress Mouseover Effects |
|
492 * button has been selected |
|
493 * |
|
494 * @return Boolean |
|
495 */ |
|
496 public Boolean getSuppressMouseOverEffect() { |
|
497 return modelControlWidget.getSuppressMouseOverEffect(); |
|
498 } |
|
499 |
|
500 /** |
|
501 * Returns the shapes files or an empty string if no shapes file has been |
|
502 * specified |
|
503 * |
|
504 * @return String[] |
|
505 */ |
|
506 public String[] getSystemInfoFiles() { |
|
507 return resourcesWidget.getSystemInfoFiles(); |
|
508 } |
|
509 |
|
510 /** |
|
511 * Returns the system name from the Model Labels widget |
|
512 * |
|
513 * @return String |
|
514 */ |
|
515 public String getSystemName() { |
|
516 return modelLabelsWidget.getSystemName(); |
|
517 } |
|
518 |
|
519 /** |
|
520 * Returns the text for the system version from the Model Labels widget |
|
521 * |
|
522 * @return String |
|
523 */ |
|
524 public String getSystemVersion() { |
|
525 return modelLabelsWidget.getSystemVersion(); |
|
526 } |
|
527 |
|
528 /** |
|
529 * This method is for PDE JUnit testing purposes. |
|
530 * |
|
531 * @return the tabFolder |
|
532 */ |
|
533 public TabFolder getTabFolder() { |
|
534 return tabFolder; |
|
535 } |
|
536 |
|
537 public void initialize(PersistentDataStore store) { |
|
538 filterWidget.setFilterItems(store.getFilterHasItems()); |
|
539 |
|
540 ignoreWidget.setIgnoreItems(store.getIgnoreItems()); |
|
541 |
|
542 // Model Control |
|
543 modelControlWidget.initialisePrintedDpi(store); |
|
544 modelControlWidget.setLevelOfDetail(store.getLevelOfDetail()); |
|
545 modelControlWidget.setHighlightCoreOS(store.getHighlightCoreOS()); |
|
546 modelControlWidget.setSuppressMouseOverEffect(store |
|
547 .getSuppressMouseOverEffect()); |
|
548 modelControlWidget.setFixItemSize(store.getFixItemSize()); |
|
549 |
|
550 // Model Labels |
|
551 modelLabelsWidget.initialiseModelVersionText(store); |
|
552 modelLabelsWidget.initialiseDistributionText(store); |
|
553 modelLabelsWidget.setModelVersion(store.getModelVersion()); |
|
554 modelLabelsWidget.setSystemVersion(store.getSystemVersion()); |
|
555 modelLabelsWidget.setCopyrightText(store.getCopyrightText()); |
|
556 modelLabelsWidget.setModelName(store.getModelName()); |
|
557 modelLabelsWidget.setSystemName(store.getSystemName()); |
|
558 |
|
559 // All files |
|
560 resourcesWidget.setBorderShapesFiles(store.getBorderShapesFiles()); |
|
561 resourcesWidget.setBorderStylesFiles(store.getBorderStylesFiles()); |
|
562 resourcesWidget.setColoursFiles(store.getColoursFiles()); |
|
563 resourcesWidget.setDependenciesFiles(store.getDependenciesFiles()); |
|
564 resourcesWidget.setLevelsFiles(store.getLevelsFiles()); |
|
565 resourcesWidget.setLocalisationFiles(store.getLocalisationFiles()); |
|
566 resourcesWidget.setPatternsFiles(store.getPatternsFiles()); |
|
567 resourcesWidget.setShapesFiles(store.getShapesFiles()); |
|
568 resourcesWidget.setSystemInfoFiles(store.getSystemInfoFiles()); |
|
569 resourcesWidget.setS12XmlFiles(store.getS12XmlFiles()); |
|
570 |
|
571 // Default files |
|
572 resourcesWidget.setSelectedBorderShapesFiles(store |
|
573 .getSelectedBorderShapesFiles()); |
|
574 resourcesWidget.setSelectedBorderStylesFiles(store |
|
575 .getSelectedBorderStylesFiles()); |
|
576 resourcesWidget |
|
577 .setSelectedColoursFiles(store.getSelectedColoursFiles()); |
|
578 resourcesWidget.setSelectedDependenciesFiles(store |
|
579 .getSelectedDependenciesFiles()); |
|
580 resourcesWidget.setSelectedLevelsFiles(store.getSelectedLevelsFiles()); |
|
581 resourcesWidget.setSelectedLocalisationFiles(store |
|
582 .getSelectedLocalisationFiles()); |
|
583 resourcesWidget.setSelectedPatternsFiles(store |
|
584 .getSelectedPatternsFiles()); |
|
585 resourcesWidget.setSelectedShapesFiles(store.getSelectedShapesFiles()); |
|
586 resourcesWidget.setSelectedSystemInfoFiles(store |
|
587 .getSelectedSystemInfoFiles()); |
|
588 resourcesWidget.setSelectedS12XmlFiles(store.getSelectedS12XmlFiles()); |
|
589 |
|
590 // Advanced Options |
|
591 advancedOptionsWidget.setAdvancedOptions(store.getAdvancedOptions()); |
|
592 |
|
593 buildWidget.setOutputFilename(store.getOutputFilename()); |
|
594 |
|
595 // Adding this class as listener of model valid events |
|
596 buildWidget.addModelListener(this); |
|
597 modelControlWidget.addModelListener(this); |
|
598 } |
|
599 |
|
600 public void setAdvancedOptions(String[] options) { |
|
601 advancedOptionsWidget.setAdvancedOptions(options); |
|
602 } |
|
603 |
|
604 public void setBorderShapesFiles(String[] filenames) { |
|
605 resourcesWidget.setBorderShapesFiles(filenames); |
|
606 } |
|
607 |
|
608 public void setBorderStylesFiles(String[] filenames) { |
|
609 resourcesWidget.setBorderStylesFiles(filenames); |
|
610 } |
|
611 |
|
612 public void setColoursFiles(String[] filenames) { |
|
613 resourcesWidget.setColoursFiles(filenames); |
|
614 } |
|
615 |
|
616 /** |
|
617 * Sets the text for the copyright text in the Model Labels widget |
|
618 * |
|
619 * @param copyrightText |
|
620 * String to be used for the copyright text |
|
621 * @return void |
|
622 */ |
|
623 public void setCopyrightText(String copyrightText) { |
|
624 modelLabelsWidget.setCopyrightText(copyrightText); |
|
625 } |
|
626 |
|
627 public void setDefaultBorderShapesFiles(String[] filenames) { |
|
628 resourcesWidget.setSelectedBorderShapesFiles(filenames); |
|
629 } |
|
630 |
|
631 public void setDefaultBorderStylesFiles(String[] filenames) { |
|
632 resourcesWidget.setSelectedBorderStylesFiles(filenames); |
|
633 } |
|
634 |
|
635 public void setDefaultColoursFiles(String[] filenames) { |
|
636 resourcesWidget.setSelectedColoursFiles(filenames); |
|
637 } |
|
638 |
|
639 public void setDefaultDependenciesFiles(String[] filenames) { |
|
640 resourcesWidget.setSelectedDependenciesFiles(filenames); |
|
641 } |
|
642 |
|
643 /** |
|
644 * Sets the default distribution text value in the Model Labels widget |
|
645 * |
|
646 * @param distributionText |
|
647 * The default distribution text value to set. |
|
648 * @return void |
|
649 */ |
|
650 public void setDefaultDistributionText(String distributionText) { |
|
651 modelLabelsWidget.setSelectedDistributionText(distributionText); |
|
652 } |
|
653 |
|
654 public void setDefaultLevelsFiles(String[] filenames) { |
|
655 resourcesWidget.setSelectedLevelsFiles(filenames); |
|
656 } |
|
657 |
|
658 public void setDefaultLocalisationFiles(String[] filenames) { |
|
659 resourcesWidget.setSelectedLocalisationFiles(filenames); |
|
660 } |
|
661 |
|
662 /** |
|
663 * Sets the default model version text value in the Model Label widget |
|
664 * |
|
665 * @param modelVersionText |
|
666 * The default model version text value to set. |
|
667 * @return void |
|
668 */ |
|
669 public void setDefaultModelVersionText(String modelVersionText) { |
|
670 modelLabelsWidget.setSelectedModelVersionText(modelVersionText); |
|
671 } |
|
672 |
|
673 public void setDefaultPatternsFiles(String[] filenames) { |
|
674 resourcesWidget.setSelectedPatternsFiles(filenames); |
|
675 } |
|
676 |
|
677 /** |
|
678 * Sets the default printed DPI value in the Model Control widget |
|
679 * |
|
680 * @param dpi |
|
681 * The default printed DPI value to set. |
|
682 * @return void |
|
683 */ |
|
684 public void setDefaultPrintedDpi(String dpi) { |
|
685 modelControlWidget.setSelectedPrintedDpi(dpi); |
|
686 } |
|
687 |
|
688 public void setDefaultS12XmlFiles(String[] filenames) { |
|
689 resourcesWidget.setSelectedS12XmlFiles(filenames); |
|
690 } |
|
691 |
|
692 public void setDefaultShapesFiles(String[] filenames) { |
|
693 resourcesWidget.setSelectedShapesFiles(filenames); |
|
694 } |
|
695 |
|
696 public void setDefaultSystemInfoFiles(String[] filenames) { |
|
697 resourcesWidget.setSelectedSystemInfoFiles(filenames); |
|
698 } |
|
699 |
|
700 public void setDependenciesFiles(String[] filenames) { |
|
701 resourcesWidget.setDependenciesFiles(filenames); |
|
702 } |
|
703 |
|
704 /** |
|
705 * Sets the distribution text values in the Model Labels widget |
|
706 * |
|
707 * @param distributionTexts |
|
708 * The distribution text values to set. |
|
709 * @return void |
|
710 */ |
|
711 public void setDistributionTexts(String[] distributionTexts) { |
|
712 modelLabelsWidget.setDistributionTexts(distributionTexts); |
|
713 } |
|
714 |
|
715 /** |
|
716 * Sets the filter items in the the Filter Widget |
|
717 * |
|
718 * @param filterItems |
|
719 * A list containing filters. |
|
720 * @return void |
|
721 */ |
|
722 public void setFilterItems(String[] filterItems) { |
|
723 filterWidget.setFilterItems(filterItems); |
|
724 } |
|
725 |
|
726 /** |
|
727 * Sets the value for the Fix Item Size button in the Model Control widget |
|
728 * |
|
729 * @param value |
|
730 * Boolean value indicating if the item size is fixed or not |
|
731 * @return void |
|
732 */ |
|
733 public void setFixItemSize(Boolean value) { |
|
734 modelControlWidget.setFixItemSize(value); |
|
735 } |
|
736 |
|
737 /** |
|
738 * Sets the value for the Highlight Core OS button in the Model Control |
|
739 * widget |
|
740 * |
|
741 * @param HighlightCoreOS |
|
742 * Boolean value indicating if the Core OS section is to be |
|
743 * highlighted |
|
744 * @return void |
|
745 */ |
|
746 public void setHighlightCoreOS(Boolean value) { |
|
747 modelControlWidget.setHighlightCoreOS(value); |
|
748 } |
|
749 |
|
750 /** |
|
751 * Sets the ignore items in the Ignore Items Widget |
|
752 * |
|
753 * @param ignoreItems |
|
754 * an List containing 2 element lists. The first element contains |
|
755 * the item type and the second element contains the item text. |
|
756 * @return void |
|
757 */ |
|
758 public void setIgnoreItems(List<String[]> ignoreItems) { |
|
759 ignoreWidget.setIgnoreItems(ignoreItems); |
|
760 } |
|
761 |
|
762 /** |
|
763 * Sets the level of detail in the Model Control widget |
|
764 * |
|
765 * @param level |
|
766 * The level of detail to set. |
|
767 * @return void |
|
768 */ |
|
769 public void setLevelOfDetail(String level) { |
|
770 modelControlWidget.setLevelOfDetail(level); |
|
771 } |
|
772 |
|
773 public void setLevelsFiles(String[] filenames) { |
|
774 resourcesWidget.setLevelsFiles(filenames); |
|
775 } |
|
776 |
|
777 public void setLocalisationFiles(String[] filenames) { |
|
778 resourcesWidget.setLocalisationFiles(filenames); |
|
779 } |
|
780 |
|
781 /** |
|
782 * Sets the text for the model name in the Model Labels widget |
|
783 * |
|
784 * @param modelName |
|
785 * String to be used for the model name |
|
786 * @return void |
|
787 */ |
|
788 public void setModelName(String modelName) { |
|
789 modelLabelsWidget.setModelName(modelName); |
|
790 } |
|
791 |
|
792 /** |
|
793 * Sets the text for the model version in the Model Labels widget |
|
794 * |
|
795 * @param modelVersion |
|
796 * String to be used for the model version |
|
797 * @return void |
|
798 */ |
|
799 public void setModelVersion(String modelVersion) { |
|
800 modelLabelsWidget.setModelVersion(modelVersion); |
|
801 } |
|
802 |
|
803 /** |
|
804 * Sets the values for the model version text in the Model Labels widget |
|
805 * |
|
806 * @param modelVersionTexts |
|
807 * String array to be used for the model version text values |
|
808 * @return void |
|
809 */ |
|
810 public void setModelVersionTexts(String[] modelVersionTexts) { |
|
811 modelLabelsWidget.setModelVersionTexts(modelVersionTexts); |
|
812 } |
|
813 |
|
814 public void setPatternsFiles(String[] filenames) { |
|
815 resourcesWidget.setPatternsFiles(filenames); |
|
816 } |
|
817 |
|
818 /** |
|
819 * Sets the printed DPI values in the Model Control widget |
|
820 * |
|
821 * @param dpi |
|
822 * The printed DPI values to set. |
|
823 * @return void |
|
824 */ |
|
825 public void setPrintedDpis(String[] dpis) { |
|
826 modelControlWidget.setPrintedDpis(dpis); |
|
827 } |
|
828 |
|
829 public void setS12XmlFiles(String[] filenames) { |
|
830 resourcesWidget.setS12XmlFiles(filenames); |
|
831 } |
|
832 |
|
833 /** |
|
834 * Sets the selected distribution text value in the Model Labels widget |
|
835 * |
|
836 * @param distributionText |
|
837 * The selected distribution text value to set. |
|
838 * @return void |
|
839 */ |
|
840 public void setSelectedDistributionText(String distributionText) { |
|
841 modelLabelsWidget.setSelectedDistributionText(distributionText); |
|
842 } |
|
843 |
|
844 /** |
|
845 * Sets the selected model version text value in the Model Label widget |
|
846 * |
|
847 * @param modelVersionText |
|
848 * The selected model version text value to set. |
|
849 * @return void |
|
850 */ |
|
851 public void setSelectedModelVersionText(String modelVersionText) { |
|
852 modelLabelsWidget.setSelectedModelVersionText(modelVersionText); |
|
853 } |
|
854 |
|
855 // Filter Items Getters & Setters |
|
856 |
|
857 /** |
|
858 * Sets the selected printed DPI value in the Model Control widget |
|
859 * |
|
860 * @param dpi |
|
861 * The selected printed DPI value to set. |
|
862 * @return void |
|
863 */ |
|
864 public void setSelectedPrintedDpi(String dpi) { |
|
865 modelControlWidget.setSelectedPrintedDpi(dpi); |
|
866 } |
|
867 |
|
868 public void setShapesFiles(String[] filenames) { |
|
869 resourcesWidget.setShapesFiles(filenames); |
|
870 } |
|
871 |
|
872 // Ignore Items Getters & Setters |
|
873 |
|
874 /** |
|
875 * Sets the value for the Suppress Mouseover Effects button |
|
876 * |
|
877 * @param suppressMouseOverEffect |
|
878 * Boolean value indicating if the Suppress Mouseover Effects is |
|
879 * it be used when generating the diagram |
|
880 * @return void |
|
881 */ |
|
882 public void setSuppressMouseOverEffect(Boolean suppressMouseOverEffect) { |
|
883 modelControlWidget.setSuppressMouseOverEffect(suppressMouseOverEffect); |
|
884 } |
|
885 |
|
886 public void setSystemInfoFiles(String[] filenames) { |
|
887 resourcesWidget.setSystemInfoFiles(filenames); |
|
888 } |
|
889 |
|
890 /** |
|
891 * Sets the text for the system name in the Model Labels widget |
|
892 * |
|
893 * @param systemName |
|
894 * String to be used for the system name |
|
895 * @return void |
|
896 */ |
|
897 public void setSystemName(String systemName) { |
|
898 modelLabelsWidget.setSystemName(systemName); |
|
899 } |
|
900 |
|
901 /** |
|
902 * Sets the text for the system version in the Model Labels widget |
|
903 * |
|
904 * @param systemVersion |
|
905 * String to be used for the system version |
|
906 * @return void |
|
907 */ |
|
908 public void setSystemVersion(String systemVersion) { |
|
909 modelLabelsWidget.setSystemVersion(systemVersion); |
|
910 } |
|
911 |
|
912 /** |
|
913 * This is called by the observed object when a change is made and controls |
|
914 * wizard flow |
|
915 * |
|
916 * @param event |
|
917 * the ValidModelEvent object created by the observer object and |
|
918 * indicating if the wizard page is complete |
|
919 * @return void |
|
920 */ |
|
921 public void validModelDefined(ValidModelEvent event) { |
|
922 Boolean isValid = event.isValid(); |
|
923 |
|
924 setPageComplete(isValid); |
|
925 |
|
926 if (isValid) { |
|
927 setErrorMessage(null); |
|
928 } else { |
|
929 setErrorMessage(event.getMessage()); |
|
930 } |
|
931 } |
|
932 } |