Statistics
| Revision:

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

History | View | Annotate | Download (7.91 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: ComboButton.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 ComboButton.
28
 * 
29
 * @version $Revision: 6431 $ $Date: 2006-07-19 12:41:35 +0200 (Wed, 19 Jul 2006) $
30
 */
31
public class ComboButton implements java.io.Serializable {
32

    
33

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

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

    
43
    /**
44
     * Field _comboButtonElementList
45
     */
46
    private java.util.Vector _comboButtonElementList;
47

    
48

    
49
      //----------------/
50
     //- Constructors -/
51
    //----------------/
52

    
53
    public ComboButton() {
54
        super();
55
        _comboButtonElementList = new Vector();
56
    } //-- com.iver.andami.plugins.config.generate.ComboButton()
57

    
58

    
59
      //-----------/
60
     //- Methods -/
61
    //-----------/
62

    
63
    /**
64
     * Method addComboButtonElement
65
     * 
66
     * @param vComboButtonElement
67
     */
68
    public void addComboButtonElement(com.iver.andami.plugins.config.generate.ComboButtonElement vComboButtonElement)
69
        throws java.lang.IndexOutOfBoundsException
70
    {
71
        _comboButtonElementList.addElement(vComboButtonElement);
72
    } //-- void addComboButtonElement(com.iver.andami.plugins.config.generate.ComboButtonElement) 
73

    
74
    /**
75
     * Method addComboButtonElement
76
     * 
77
     * @param index
78
     * @param vComboButtonElement
79
     */
80
    public void addComboButtonElement(int index, com.iver.andami.plugins.config.generate.ComboButtonElement vComboButtonElement)
81
        throws java.lang.IndexOutOfBoundsException
82
    {
83
        _comboButtonElementList.insertElementAt(vComboButtonElement, index);
84
    } //-- void addComboButtonElement(int, com.iver.andami.plugins.config.generate.ComboButtonElement) 
85

    
86
    /**
87
     * Method enumerateComboButtonElement
88
     */
89
    public java.util.Enumeration enumerateComboButtonElement()
90
    {
91
        return _comboButtonElementList.elements();
92
    } //-- java.util.Enumeration enumerateComboButtonElement() 
93

    
94
    /**
95
     * Method getComboButtonElement
96
     * 
97
     * @param index
98
     */
99
    public com.iver.andami.plugins.config.generate.ComboButtonElement getComboButtonElement(int index)
100
        throws java.lang.IndexOutOfBoundsException
101
    {
102
        //-- check bounds for index
103
        if ((index < 0) || (index > _comboButtonElementList.size())) {
104
            throw new IndexOutOfBoundsException();
105
        }
106
        
107
        return (com.iver.andami.plugins.config.generate.ComboButtonElement) _comboButtonElementList.elementAt(index);
108
    } //-- com.iver.andami.plugins.config.generate.ComboButtonElement getComboButtonElement(int) 
109

    
110
    /**
111
     * Method getComboButtonElement
112
     */
113
    public com.iver.andami.plugins.config.generate.ComboButtonElement[] getComboButtonElement()
114
    {
115
        int size = _comboButtonElementList.size();
116
        com.iver.andami.plugins.config.generate.ComboButtonElement[] mArray = new com.iver.andami.plugins.config.generate.ComboButtonElement[size];
117
        for (int index = 0; index < size; index++) {
118
            mArray[index] = (com.iver.andami.plugins.config.generate.ComboButtonElement) _comboButtonElementList.elementAt(index);
119
        }
120
        return mArray;
121
    } //-- com.iver.andami.plugins.config.generate.ComboButtonElement[] getComboButtonElement() 
122

    
123
    /**
124
     * Method getComboButtonElementCount
125
     */
126
    public int getComboButtonElementCount()
127
    {
128
        return _comboButtonElementList.size();
129
    } //-- int getComboButtonElementCount() 
130

    
131
    /**
132
     * Returns the value of field 'name'.
133
     * 
134
     * @return the value of field 'name'.
135
     */
136
    public java.lang.Object getName()
137
    {
138
        return this._name;
139
    } //-- java.lang.Object getName() 
140

    
141
    /**
142
     * Method isValid
143
     */
144
    public boolean isValid()
145
    {
146
        try {
147
            validate();
148
        }
149
        catch (org.exolab.castor.xml.ValidationException vex) {
150
            return false;
151
        }
152
        return true;
153
    } //-- boolean isValid() 
154

    
155
    /**
156
     * Method marshal
157
     * 
158
     * @param out
159
     */
160
    public void marshal(java.io.Writer out)
161
        throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
162
    {
163
        
164
        Marshaller.marshal(this, out);
165
    } //-- void marshal(java.io.Writer) 
166

    
167
    /**
168
     * Method marshal
169
     * 
170
     * @param handler
171
     */
172
    public void marshal(org.xml.sax.ContentHandler handler)
173
        throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
174
    {
175
        
176
        Marshaller.marshal(this, handler);
177
    } //-- void marshal(org.xml.sax.ContentHandler) 
178

    
179
    /**
180
     * Method removeAllComboButtonElement
181
     */
182
    public void removeAllComboButtonElement()
183
    {
184
        _comboButtonElementList.removeAllElements();
185
    } //-- void removeAllComboButtonElement() 
186

    
187
    /**
188
     * Method removeComboButtonElement
189
     * 
190
     * @param index
191
     */
192
    public com.iver.andami.plugins.config.generate.ComboButtonElement removeComboButtonElement(int index)
193
    {
194
        java.lang.Object obj = _comboButtonElementList.elementAt(index);
195
        _comboButtonElementList.removeElementAt(index);
196
        return (com.iver.andami.plugins.config.generate.ComboButtonElement) obj;
197
    } //-- com.iver.andami.plugins.config.generate.ComboButtonElement removeComboButtonElement(int) 
198

    
199
    /**
200
     * Method setComboButtonElement
201
     * 
202
     * @param index
203
     * @param vComboButtonElement
204
     */
205
    public void setComboButtonElement(int index, com.iver.andami.plugins.config.generate.ComboButtonElement vComboButtonElement)
206
        throws java.lang.IndexOutOfBoundsException
207
    {
208
        //-- check bounds for index
209
        if ((index < 0) || (index > _comboButtonElementList.size())) {
210
            throw new IndexOutOfBoundsException();
211
        }
212
        _comboButtonElementList.setElementAt(vComboButtonElement, index);
213
    } //-- void setComboButtonElement(int, com.iver.andami.plugins.config.generate.ComboButtonElement) 
214

    
215
    /**
216
     * Method setComboButtonElement
217
     * 
218
     * @param comboButtonElementArray
219
     */
220
    public void setComboButtonElement(com.iver.andami.plugins.config.generate.ComboButtonElement[] comboButtonElementArray)
221
    {
222
        //-- copy array
223
        _comboButtonElementList.removeAllElements();
224
        for (int i = 0; i < comboButtonElementArray.length; i++) {
225
            _comboButtonElementList.addElement(comboButtonElementArray[i]);
226
        }
227
    } //-- void setComboButtonElement(com.iver.andami.plugins.config.generate.ComboButtonElement) 
228

    
229
    /**
230
     * Sets the value of field 'name'.
231
     * 
232
     * @param name the value of field 'name'.
233
     */
234
    public void setName(java.lang.Object name)
235
    {
236
        this._name = name;
237
    } //-- void setName(java.lang.Object) 
238

    
239
    /**
240
     * Method unmarshal
241
     * 
242
     * @param reader
243
     */
244
    public static java.lang.Object unmarshal(java.io.Reader reader)
245
        throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
246
    {
247
        return (com.iver.andami.plugins.config.generate.ComboButton) Unmarshaller.unmarshal(com.iver.andami.plugins.config.generate.ComboButton.class, reader);
248
    } //-- java.lang.Object unmarshal(java.io.Reader) 
249

    
250
    /**
251
     * Method validate
252
     */
253
    public void validate()
254
        throws org.exolab.castor.xml.ValidationException
255
    {
256
        org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
257
        validator.validate(this);
258
    } //-- void validate() 
259

    
260
}