Statistics
| Revision:

svn-gvsig-desktop / trunk / frameworks / _fwAndami / src / com / iver / andami / plugins / config / generate / ToolBar.java @ 6431

History | View | Annotate | Download (20.6 KB)

1
/*
2
 * This class was automatically generated with 
3
 * <a href="http://www.castor.org">Castor 0.9.5.3</a>, using an XML
4
 * Schema.
5
 * $Id: ToolBar.java 6431 2006-07-19 10:41:35Z cesar $
6
 */
7

    
8
package com.iver.andami.plugins.config.generate;
9

    
10
  //---------------------------------/
11
 //- Imported classes and packages -/
12
//---------------------------------/
13

    
14
import java.io.IOException;
15
import java.io.Reader;
16
import java.io.Serializable;
17
import java.io.Writer;
18
import java.util.Enumeration;
19
import java.util.Vector;
20
import org.exolab.castor.xml.MarshalException;
21
import org.exolab.castor.xml.Marshaller;
22
import org.exolab.castor.xml.Unmarshaller;
23
import org.exolab.castor.xml.ValidationException;
24
import org.xml.sax.ContentHandler;
25

    
26
/**
27
 * Class ToolBar.
28
 * 
29
 * @version $Revision: 6431 $ $Date: 2006-07-19 12:41:35 +0200 (Wed, 19 Jul 2006) $
30
 */
31
public class ToolBar implements java.io.Serializable {
32

    
33

    
34
      //--------------------------/
35
     //- Class/Member Variables -/
36
    //--------------------------/
37

    
38
    /**
39
     * Field _name
40
     */
41
    private java.lang.String _name;
42

    
43
    /**
44
     * Field _position
45
     */
46
    private int _position;
47

    
48
    /**
49
     * keeps track of state for field: _position
50
     */
51
    private boolean _has_position;
52

    
53
    /**
54
     * Field _actionToolList
55
     */
56
    private java.util.Vector _actionToolList;
57

    
58
    /**
59
     * Field _selectableToolList
60
     */
61
    private java.util.Vector _selectableToolList;
62

    
63
    /**
64
     * Field _comboButtonList
65
     */
66
    private java.util.Vector _comboButtonList;
67

    
68
    /**
69
     * Field _comboScaleList
70
     */
71
    private java.util.Vector _comboScaleList;
72

    
73

    
74
      //----------------/
75
     //- Constructors -/
76
    //----------------/
77

    
78
    public ToolBar() {
79
        super();
80
        _actionToolList = new Vector();
81
        _selectableToolList = new Vector();
82
        _comboButtonList = new Vector();
83
        _comboScaleList = new Vector();
84
    } //-- com.iver.andami.plugins.config.generate.ToolBar()
85

    
86

    
87
      //-----------/
88
     //- Methods -/
89
    //-----------/
90

    
91
    /**
92
     * Method addActionTool
93
     * 
94
     * @param vActionTool
95
     */
96
    public void addActionTool(com.iver.andami.plugins.config.generate.ActionTool vActionTool)
97
        throws java.lang.IndexOutOfBoundsException
98
    {
99
        _actionToolList.addElement(vActionTool);
100
    } //-- void addActionTool(com.iver.andami.plugins.config.generate.ActionTool) 
101

    
102
    /**
103
     * Method addActionTool
104
     * 
105
     * @param index
106
     * @param vActionTool
107
     */
108
    public void addActionTool(int index, com.iver.andami.plugins.config.generate.ActionTool vActionTool)
109
        throws java.lang.IndexOutOfBoundsException
110
    {
111
        _actionToolList.insertElementAt(vActionTool, index);
112
    } //-- void addActionTool(int, com.iver.andami.plugins.config.generate.ActionTool) 
113

    
114
    /**
115
     * Method addComboButton
116
     * 
117
     * @param vComboButton
118
     */
119
    public void addComboButton(com.iver.andami.plugins.config.generate.ComboButton vComboButton)
120
        throws java.lang.IndexOutOfBoundsException
121
    {
122
        _comboButtonList.addElement(vComboButton);
123
    } //-- void addComboButton(com.iver.andami.plugins.config.generate.ComboButton) 
124

    
125
    /**
126
     * Method addComboButton
127
     * 
128
     * @param index
129
     * @param vComboButton
130
     */
131
    public void addComboButton(int index, com.iver.andami.plugins.config.generate.ComboButton vComboButton)
132
        throws java.lang.IndexOutOfBoundsException
133
    {
134
        _comboButtonList.insertElementAt(vComboButton, index);
135
    } //-- void addComboButton(int, com.iver.andami.plugins.config.generate.ComboButton) 
136

    
137
    /**
138
     * Method addComboScale
139
     * 
140
     * @param vComboScale
141
     */
142
    public void addComboScale(com.iver.andami.plugins.config.generate.ComboScale vComboScale)
143
        throws java.lang.IndexOutOfBoundsException
144
    {
145
        _comboScaleList.addElement(vComboScale);
146
    } //-- void addComboScale(com.iver.andami.plugins.config.generate.ComboScale) 
147

    
148
    /**
149
     * Method addComboScale
150
     * 
151
     * @param index
152
     * @param vComboScale
153
     */
154
    public void addComboScale(int index, com.iver.andami.plugins.config.generate.ComboScale vComboScale)
155
        throws java.lang.IndexOutOfBoundsException
156
    {
157
        _comboScaleList.insertElementAt(vComboScale, index);
158
    } //-- void addComboScale(int, com.iver.andami.plugins.config.generate.ComboScale) 
159

    
160
    /**
161
     * Method addSelectableTool
162
     * 
163
     * @param vSelectableTool
164
     */
165
    public void addSelectableTool(com.iver.andami.plugins.config.generate.SelectableTool vSelectableTool)
166
        throws java.lang.IndexOutOfBoundsException
167
    {
168
        _selectableToolList.addElement(vSelectableTool);
169
    } //-- void addSelectableTool(com.iver.andami.plugins.config.generate.SelectableTool) 
170

    
171
    /**
172
     * Method addSelectableTool
173
     * 
174
     * @param index
175
     * @param vSelectableTool
176
     */
177
    public void addSelectableTool(int index, com.iver.andami.plugins.config.generate.SelectableTool vSelectableTool)
178
        throws java.lang.IndexOutOfBoundsException
179
    {
180
        _selectableToolList.insertElementAt(vSelectableTool, index);
181
    } //-- void addSelectableTool(int, com.iver.andami.plugins.config.generate.SelectableTool) 
182

    
183
    /**
184
     * Method deletePosition
185
     */
186
    public void deletePosition()
187
    {
188
        this._has_position= false;
189
    } //-- void deletePosition() 
190

    
191
    /**
192
     * Method enumerateActionTool
193
     */
194
    public java.util.Enumeration enumerateActionTool()
195
    {
196
        return _actionToolList.elements();
197
    } //-- java.util.Enumeration enumerateActionTool() 
198

    
199
    /**
200
     * Method enumerateComboButton
201
     */
202
    public java.util.Enumeration enumerateComboButton()
203
    {
204
        return _comboButtonList.elements();
205
    } //-- java.util.Enumeration enumerateComboButton() 
206

    
207
    /**
208
     * Method enumerateComboScale
209
     */
210
    public java.util.Enumeration enumerateComboScale()
211
    {
212
        return _comboScaleList.elements();
213
    } //-- java.util.Enumeration enumerateComboScale() 
214

    
215
    /**
216
     * Method enumerateSelectableTool
217
     */
218
    public java.util.Enumeration enumerateSelectableTool()
219
    {
220
        return _selectableToolList.elements();
221
    } //-- java.util.Enumeration enumerateSelectableTool() 
222

    
223
    /**
224
     * Method getActionTool
225
     * 
226
     * @param index
227
     */
228
    public com.iver.andami.plugins.config.generate.ActionTool getActionTool(int index)
229
        throws java.lang.IndexOutOfBoundsException
230
    {
231
        //-- check bounds for index
232
        if ((index < 0) || (index > _actionToolList.size())) {
233
            throw new IndexOutOfBoundsException();
234
        }
235
        
236
        return (com.iver.andami.plugins.config.generate.ActionTool) _actionToolList.elementAt(index);
237
    } //-- com.iver.andami.plugins.config.generate.ActionTool getActionTool(int) 
238

    
239
    /**
240
     * Method getActionTool
241
     */
242
    public com.iver.andami.plugins.config.generate.ActionTool[] getActionTool()
243
    {
244
        int size = _actionToolList.size();
245
        com.iver.andami.plugins.config.generate.ActionTool[] mArray = new com.iver.andami.plugins.config.generate.ActionTool[size];
246
        for (int index = 0; index < size; index++) {
247
            mArray[index] = (com.iver.andami.plugins.config.generate.ActionTool) _actionToolList.elementAt(index);
248
        }
249
        return mArray;
250
    } //-- com.iver.andami.plugins.config.generate.ActionTool[] getActionTool() 
251

    
252
    /**
253
     * Method getActionToolCount
254
     */
255
    public int getActionToolCount()
256
    {
257
        return _actionToolList.size();
258
    } //-- int getActionToolCount() 
259

    
260
    /**
261
     * Method getComboButton
262
     * 
263
     * @param index
264
     */
265
    public com.iver.andami.plugins.config.generate.ComboButton getComboButton(int index)
266
        throws java.lang.IndexOutOfBoundsException
267
    {
268
        //-- check bounds for index
269
        if ((index < 0) || (index > _comboButtonList.size())) {
270
            throw new IndexOutOfBoundsException();
271
        }
272
        
273
        return (com.iver.andami.plugins.config.generate.ComboButton) _comboButtonList.elementAt(index);
274
    } //-- com.iver.andami.plugins.config.generate.ComboButton getComboButton(int) 
275

    
276
    /**
277
     * Method getComboButton
278
     */
279
    public com.iver.andami.plugins.config.generate.ComboButton[] getComboButton()
280
    {
281
        int size = _comboButtonList.size();
282
        com.iver.andami.plugins.config.generate.ComboButton[] mArray = new com.iver.andami.plugins.config.generate.ComboButton[size];
283
        for (int index = 0; index < size; index++) {
284
            mArray[index] = (com.iver.andami.plugins.config.generate.ComboButton) _comboButtonList.elementAt(index);
285
        }
286
        return mArray;
287
    } //-- com.iver.andami.plugins.config.generate.ComboButton[] getComboButton() 
288

    
289
    /**
290
     * Method getComboButtonCount
291
     */
292
    public int getComboButtonCount()
293
    {
294
        return _comboButtonList.size();
295
    } //-- int getComboButtonCount() 
296

    
297
    /**
298
     * Method getComboScale
299
     * 
300
     * @param index
301
     */
302
    public com.iver.andami.plugins.config.generate.ComboScale getComboScale(int index)
303
        throws java.lang.IndexOutOfBoundsException
304
    {
305
        //-- check bounds for index
306
        if ((index < 0) || (index > _comboScaleList.size())) {
307
            throw new IndexOutOfBoundsException();
308
        }
309
        
310
        return (com.iver.andami.plugins.config.generate.ComboScale) _comboScaleList.elementAt(index);
311
    } //-- com.iver.andami.plugins.config.generate.ComboScale getComboScale(int) 
312

    
313
    /**
314
     * Method getComboScale
315
     */
316
    public com.iver.andami.plugins.config.generate.ComboScale[] getComboScale()
317
    {
318
        int size = _comboScaleList.size();
319
        com.iver.andami.plugins.config.generate.ComboScale[] mArray = new com.iver.andami.plugins.config.generate.ComboScale[size];
320
        for (int index = 0; index < size; index++) {
321
            mArray[index] = (com.iver.andami.plugins.config.generate.ComboScale) _comboScaleList.elementAt(index);
322
        }
323
        return mArray;
324
    } //-- com.iver.andami.plugins.config.generate.ComboScale[] getComboScale() 
325

    
326
    /**
327
     * Method getComboScaleCount
328
     */
329
    public int getComboScaleCount()
330
    {
331
        return _comboScaleList.size();
332
    } //-- int getComboScaleCount() 
333

    
334
    /**
335
     * Returns the value of field 'name'.
336
     * 
337
     * @return the value of field 'name'.
338
     */
339
    public java.lang.String getName()
340
    {
341
        return this._name;
342
    } //-- java.lang.String getName() 
343

    
344
    /**
345
     * Returns the value of field 'position'.
346
     * 
347
     * @return the value of field 'position'.
348
     */
349
    public int getPosition()
350
    {
351
        return this._position;
352
    } //-- int getPosition() 
353

    
354
    /**
355
     * Method getSelectableTool
356
     * 
357
     * @param index
358
     */
359
    public com.iver.andami.plugins.config.generate.SelectableTool getSelectableTool(int index)
360
        throws java.lang.IndexOutOfBoundsException
361
    {
362
        //-- check bounds for index
363
        if ((index < 0) || (index > _selectableToolList.size())) {
364
            throw new IndexOutOfBoundsException();
365
        }
366
        
367
        return (com.iver.andami.plugins.config.generate.SelectableTool) _selectableToolList.elementAt(index);
368
    } //-- com.iver.andami.plugins.config.generate.SelectableTool getSelectableTool(int) 
369

    
370
    /**
371
     * Method getSelectableTool
372
     */
373
    public com.iver.andami.plugins.config.generate.SelectableTool[] getSelectableTool()
374
    {
375
        int size = _selectableToolList.size();
376
        com.iver.andami.plugins.config.generate.SelectableTool[] mArray = new com.iver.andami.plugins.config.generate.SelectableTool[size];
377
        for (int index = 0; index < size; index++) {
378
            mArray[index] = (com.iver.andami.plugins.config.generate.SelectableTool) _selectableToolList.elementAt(index);
379
        }
380
        return mArray;
381
    } //-- com.iver.andami.plugins.config.generate.SelectableTool[] getSelectableTool() 
382

    
383
    /**
384
     * Method getSelectableToolCount
385
     */
386
    public int getSelectableToolCount()
387
    {
388
        return _selectableToolList.size();
389
    } //-- int getSelectableToolCount() 
390

    
391
    /**
392
     * Method hasPosition
393
     */
394
    public boolean hasPosition()
395
    {
396
        return this._has_position;
397
    } //-- boolean hasPosition() 
398

    
399
    /**
400
     * Method isValid
401
     */
402
    public boolean isValid()
403
    {
404
        try {
405
            validate();
406
        }
407
        catch (org.exolab.castor.xml.ValidationException vex) {
408
            return false;
409
        }
410
        return true;
411
    } //-- boolean isValid() 
412

    
413
    /**
414
     * Method marshal
415
     * 
416
     * @param out
417
     */
418
    public void marshal(java.io.Writer out)
419
        throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
420
    {
421
        
422
        Marshaller.marshal(this, out);
423
    } //-- void marshal(java.io.Writer) 
424

    
425
    /**
426
     * Method marshal
427
     * 
428
     * @param handler
429
     */
430
    public void marshal(org.xml.sax.ContentHandler handler)
431
        throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
432
    {
433
        
434
        Marshaller.marshal(this, handler);
435
    } //-- void marshal(org.xml.sax.ContentHandler) 
436

    
437
    /**
438
     * Method removeActionTool
439
     * 
440
     * @param index
441
     */
442
    public com.iver.andami.plugins.config.generate.ActionTool removeActionTool(int index)
443
    {
444
        java.lang.Object obj = _actionToolList.elementAt(index);
445
        _actionToolList.removeElementAt(index);
446
        return (com.iver.andami.plugins.config.generate.ActionTool) obj;
447
    } //-- com.iver.andami.plugins.config.generate.ActionTool removeActionTool(int) 
448

    
449
    /**
450
     * Method removeAllActionTool
451
     */
452
    public void removeAllActionTool()
453
    {
454
        _actionToolList.removeAllElements();
455
    } //-- void removeAllActionTool() 
456

    
457
    /**
458
     * Method removeAllComboButton
459
     */
460
    public void removeAllComboButton()
461
    {
462
        _comboButtonList.removeAllElements();
463
    } //-- void removeAllComboButton() 
464

    
465
    /**
466
     * Method removeAllComboScale
467
     */
468
    public void removeAllComboScale()
469
    {
470
        _comboScaleList.removeAllElements();
471
    } //-- void removeAllComboScale() 
472

    
473
    /**
474
     * Method removeAllSelectableTool
475
     */
476
    public void removeAllSelectableTool()
477
    {
478
        _selectableToolList.removeAllElements();
479
    } //-- void removeAllSelectableTool() 
480

    
481
    /**
482
     * Method removeComboButton
483
     * 
484
     * @param index
485
     */
486
    public com.iver.andami.plugins.config.generate.ComboButton removeComboButton(int index)
487
    {
488
        java.lang.Object obj = _comboButtonList.elementAt(index);
489
        _comboButtonList.removeElementAt(index);
490
        return (com.iver.andami.plugins.config.generate.ComboButton) obj;
491
    } //-- com.iver.andami.plugins.config.generate.ComboButton removeComboButton(int) 
492

    
493
    /**
494
     * Method removeComboScale
495
     * 
496
     * @param index
497
     */
498
    public com.iver.andami.plugins.config.generate.ComboScale removeComboScale(int index)
499
    {
500
        java.lang.Object obj = _comboScaleList.elementAt(index);
501
        _comboScaleList.removeElementAt(index);
502
        return (com.iver.andami.plugins.config.generate.ComboScale) obj;
503
    } //-- com.iver.andami.plugins.config.generate.ComboScale removeComboScale(int) 
504

    
505
    /**
506
     * Method removeSelectableTool
507
     * 
508
     * @param index
509
     */
510
    public com.iver.andami.plugins.config.generate.SelectableTool removeSelectableTool(int index)
511
    {
512
        java.lang.Object obj = _selectableToolList.elementAt(index);
513
        _selectableToolList.removeElementAt(index);
514
        return (com.iver.andami.plugins.config.generate.SelectableTool) obj;
515
    } //-- com.iver.andami.plugins.config.generate.SelectableTool removeSelectableTool(int) 
516

    
517
    /**
518
     * Method setActionTool
519
     * 
520
     * @param index
521
     * @param vActionTool
522
     */
523
    public void setActionTool(int index, com.iver.andami.plugins.config.generate.ActionTool vActionTool)
524
        throws java.lang.IndexOutOfBoundsException
525
    {
526
        //-- check bounds for index
527
        if ((index < 0) || (index > _actionToolList.size())) {
528
            throw new IndexOutOfBoundsException();
529
        }
530
        _actionToolList.setElementAt(vActionTool, index);
531
    } //-- void setActionTool(int, com.iver.andami.plugins.config.generate.ActionTool) 
532

    
533
    /**
534
     * Method setActionTool
535
     * 
536
     * @param actionToolArray
537
     */
538
    public void setActionTool(com.iver.andami.plugins.config.generate.ActionTool[] actionToolArray)
539
    {
540
        //-- copy array
541
        _actionToolList.removeAllElements();
542
        for (int i = 0; i < actionToolArray.length; i++) {
543
            _actionToolList.addElement(actionToolArray[i]);
544
        }
545
    } //-- void setActionTool(com.iver.andami.plugins.config.generate.ActionTool) 
546

    
547
    /**
548
     * Method setComboButton
549
     * 
550
     * @param index
551
     * @param vComboButton
552
     */
553
    public void setComboButton(int index, com.iver.andami.plugins.config.generate.ComboButton vComboButton)
554
        throws java.lang.IndexOutOfBoundsException
555
    {
556
        //-- check bounds for index
557
        if ((index < 0) || (index > _comboButtonList.size())) {
558
            throw new IndexOutOfBoundsException();
559
        }
560
        _comboButtonList.setElementAt(vComboButton, index);
561
    } //-- void setComboButton(int, com.iver.andami.plugins.config.generate.ComboButton) 
562

    
563
    /**
564
     * Method setComboButton
565
     * 
566
     * @param comboButtonArray
567
     */
568
    public void setComboButton(com.iver.andami.plugins.config.generate.ComboButton[] comboButtonArray)
569
    {
570
        //-- copy array
571
        _comboButtonList.removeAllElements();
572
        for (int i = 0; i < comboButtonArray.length; i++) {
573
            _comboButtonList.addElement(comboButtonArray[i]);
574
        }
575
    } //-- void setComboButton(com.iver.andami.plugins.config.generate.ComboButton) 
576

    
577
    /**
578
     * Method setComboScale
579
     * 
580
     * @param index
581
     * @param vComboScale
582
     */
583
    public void setComboScale(int index, com.iver.andami.plugins.config.generate.ComboScale vComboScale)
584
        throws java.lang.IndexOutOfBoundsException
585
    {
586
        //-- check bounds for index
587
        if ((index < 0) || (index > _comboScaleList.size())) {
588
            throw new IndexOutOfBoundsException();
589
        }
590
        _comboScaleList.setElementAt(vComboScale, index);
591
    } //-- void setComboScale(int, com.iver.andami.plugins.config.generate.ComboScale) 
592

    
593
    /**
594
     * Method setComboScale
595
     * 
596
     * @param comboScaleArray
597
     */
598
    public void setComboScale(com.iver.andami.plugins.config.generate.ComboScale[] comboScaleArray)
599
    {
600
        //-- copy array
601
        _comboScaleList.removeAllElements();
602
        for (int i = 0; i < comboScaleArray.length; i++) {
603
            _comboScaleList.addElement(comboScaleArray[i]);
604
        }
605
    } //-- void setComboScale(com.iver.andami.plugins.config.generate.ComboScale) 
606

    
607
    /**
608
     * Sets the value of field 'name'.
609
     * 
610
     * @param name the value of field 'name'.
611
     */
612
    public void setName(java.lang.String name)
613
    {
614
        this._name = name;
615
    } //-- void setName(java.lang.String) 
616

    
617
    /**
618
     * Sets the value of field 'position'.
619
     * 
620
     * @param position the value of field 'position'.
621
     */
622
    public void setPosition(int position)
623
    {
624
        this._position = position;
625
        this._has_position = true;
626
    } //-- void setPosition(int) 
627

    
628
    /**
629
     * Method setSelectableTool
630
     * 
631
     * @param index
632
     * @param vSelectableTool
633
     */
634
    public void setSelectableTool(int index, com.iver.andami.plugins.config.generate.SelectableTool vSelectableTool)
635
        throws java.lang.IndexOutOfBoundsException
636
    {
637
        //-- check bounds for index
638
        if ((index < 0) || (index > _selectableToolList.size())) {
639
            throw new IndexOutOfBoundsException();
640
        }
641
        _selectableToolList.setElementAt(vSelectableTool, index);
642
    } //-- void setSelectableTool(int, com.iver.andami.plugins.config.generate.SelectableTool) 
643

    
644
    /**
645
     * Method setSelectableTool
646
     * 
647
     * @param selectableToolArray
648
     */
649
    public void setSelectableTool(com.iver.andami.plugins.config.generate.SelectableTool[] selectableToolArray)
650
    {
651
        //-- copy array
652
        _selectableToolList.removeAllElements();
653
        for (int i = 0; i < selectableToolArray.length; i++) {
654
            _selectableToolList.addElement(selectableToolArray[i]);
655
        }
656
    } //-- void setSelectableTool(com.iver.andami.plugins.config.generate.SelectableTool) 
657

    
658
    /**
659
     * Method unmarshal
660
     * 
661
     * @param reader
662
     */
663
    public static java.lang.Object unmarshal(java.io.Reader reader)
664
        throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
665
    {
666
        return (com.iver.andami.plugins.config.generate.ToolBar) Unmarshaller.unmarshal(com.iver.andami.plugins.config.generate.ToolBar.class, reader);
667
    } //-- java.lang.Object unmarshal(java.io.Reader) 
668

    
669
    /**
670
     * Method validate
671
     */
672
    public void validate()
673
        throws org.exolab.castor.xml.ValidationException
674
    {
675
        org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
676
        validator.validate(this);
677
    } //-- void validate() 
678

    
679
}