Statistics
| Revision:

root / branches / v2_0_0_prep / frameworks / _fwAndami / src / org / gvsig / andami / plugins / config / generate / ComboButton.java @ 29593

History | View | Annotate | Download (8.5 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 29593 2009-06-29 15:54:31Z jpiera $
6
 */
7

    
8
package org.gvsig.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: 29593 $ $Date: 2009-06-29 17:54:31 +0200 (Mon, 29 Jun 2009) $
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.String _name;
42

    
43
    /**
44
     * Field _position
45
     */
46
    private java.lang.Object _position;
47

    
48
    /**
49
     * Field _comboButtonElementList
50
     */
51
    private java.util.Vector _comboButtonElementList;
52

    
53

    
54
      //----------------/
55
     //- Constructors -/
56
    //----------------/
57

    
58
    public ComboButton() {
59
        super();
60
        _comboButtonElementList = new Vector();
61
    } //-- com.iver.andami.plugins.config.generate.ComboButton()
62

    
63

    
64
      //-----------/
65
     //- Methods -/
66
    //-----------/
67

    
68
    /**
69
     * Method addComboButtonElement
70
     * 
71
     * @param vComboButtonElement
72
     */
73
    public void addComboButtonElement(org.gvsig.andami.plugins.config.generate.ComboButtonElement vComboButtonElement)
74
        throws java.lang.IndexOutOfBoundsException
75
    {
76
        _comboButtonElementList.addElement(vComboButtonElement);
77
    } //-- void addComboButtonElement(com.iver.andami.plugins.config.generate.ComboButtonElement) 
78

    
79
    /**
80
     * Method addComboButtonElement
81
     * 
82
     * @param index
83
     * @param vComboButtonElement
84
     */
85
    public void addComboButtonElement(int index, org.gvsig.andami.plugins.config.generate.ComboButtonElement vComboButtonElement)
86
        throws java.lang.IndexOutOfBoundsException
87
    {
88
        _comboButtonElementList.insertElementAt(vComboButtonElement, index);
89
    } //-- void addComboButtonElement(int, com.iver.andami.plugins.config.generate.ComboButtonElement) 
90

    
91
    /**
92
     * Method enumerateComboButtonElement
93
     */
94
    public java.util.Enumeration enumerateComboButtonElement()
95
    {
96
        return _comboButtonElementList.elements();
97
    } //-- java.util.Enumeration enumerateComboButtonElement() 
98

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

    
115
    /**
116
     * Method getComboButtonElement
117
     */
118
    public org.gvsig.andami.plugins.config.generate.ComboButtonElement[] getComboButtonElement()
119
    {
120
        int size = _comboButtonElementList.size();
121
        org.gvsig.andami.plugins.config.generate.ComboButtonElement[] mArray = new org.gvsig.andami.plugins.config.generate.ComboButtonElement[size];
122
        for (int index = 0; index < size; index++) {
123
            mArray[index] = (org.gvsig.andami.plugins.config.generate.ComboButtonElement) _comboButtonElementList.elementAt(index);
124
        }
125
        return mArray;
126
    } //-- com.iver.andami.plugins.config.generate.ComboButtonElement[] getComboButtonElement() 
127

    
128
    /**
129
     * Method getComboButtonElementCount
130
     */
131
    public int getComboButtonElementCount()
132
    {
133
        return _comboButtonElementList.size();
134
    } //-- int getComboButtonElementCount() 
135

    
136
    /**
137
     * Returns the value of field 'name'.
138
     * 
139
     * @return the value of field 'name'.
140
     */
141
    public java.lang.String getName()
142
    {
143
        return this._name;
144
    } //-- java.lang.String getName() 
145

    
146
    /**
147
     * Returns the value of field 'position'.
148
     * 
149
     * @return the value of field 'position'.
150
     */
151
    public java.lang.Object getPosition()
152
    {
153
        return this._position;
154
    } //-- java.lang.Object getPosition() 
155

    
156
    /**
157
     * Method isValid
158
     */
159
    public boolean isValid()
160
    {
161
        try {
162
            validate();
163
        }
164
        catch (org.exolab.castor.xml.ValidationException vex) {
165
            return false;
166
        }
167
        return true;
168
    } //-- boolean isValid() 
169

    
170
    /**
171
     * Method marshal
172
     * 
173
     * @param out
174
     */
175
    public void marshal(java.io.Writer out)
176
        throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
177
    {
178
        
179
        Marshaller.marshal(this, out);
180
    } //-- void marshal(java.io.Writer) 
181

    
182
    /**
183
     * Method marshal
184
     * 
185
     * @param handler
186
     */
187
    public void marshal(org.xml.sax.ContentHandler handler)
188
        throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
189
    {
190
        
191
        Marshaller.marshal(this, handler);
192
    } //-- void marshal(org.xml.sax.ContentHandler) 
193

    
194
    /**
195
     * Method removeAllComboButtonElement
196
     */
197
    public void removeAllComboButtonElement()
198
    {
199
        _comboButtonElementList.removeAllElements();
200
    } //-- void removeAllComboButtonElement() 
201

    
202
    /**
203
     * Method removeComboButtonElement
204
     * 
205
     * @param index
206
     */
207
    public org.gvsig.andami.plugins.config.generate.ComboButtonElement removeComboButtonElement(int index)
208
    {
209
        java.lang.Object obj = _comboButtonElementList.elementAt(index);
210
        _comboButtonElementList.removeElementAt(index);
211
        return (org.gvsig.andami.plugins.config.generate.ComboButtonElement) obj;
212
    } //-- com.iver.andami.plugins.config.generate.ComboButtonElement removeComboButtonElement(int) 
213

    
214
    /**
215
     * Method setComboButtonElement
216
     * 
217
     * @param index
218
     * @param vComboButtonElement
219
     */
220
    public void setComboButtonElement(int index, org.gvsig.andami.plugins.config.generate.ComboButtonElement vComboButtonElement)
221
        throws java.lang.IndexOutOfBoundsException
222
    {
223
        //-- check bounds for index
224
        if ((index < 0) || (index > _comboButtonElementList.size())) {
225
            throw new IndexOutOfBoundsException();
226
        }
227
        _comboButtonElementList.setElementAt(vComboButtonElement, index);
228
    } //-- void setComboButtonElement(int, com.iver.andami.plugins.config.generate.ComboButtonElement) 
229

    
230
    /**
231
     * Method setComboButtonElement
232
     * 
233
     * @param comboButtonElementArray
234
     */
235
    public void setComboButtonElement(org.gvsig.andami.plugins.config.generate.ComboButtonElement[] comboButtonElementArray)
236
    {
237
        //-- copy array
238
        _comboButtonElementList.removeAllElements();
239
        for (int i = 0; i < comboButtonElementArray.length; i++) {
240
            _comboButtonElementList.addElement(comboButtonElementArray[i]);
241
        }
242
    } //-- void setComboButtonElement(com.iver.andami.plugins.config.generate.ComboButtonElement) 
243

    
244
    /**
245
     * Sets the value of field 'name'.
246
     * 
247
     * @param name the value of field 'name'.
248
     */
249
    public void setName(java.lang.String name)
250
    {
251
        this._name = name;
252
    } //-- void setName(java.lang.String) 
253

    
254
    /**
255
     * Sets the value of field 'position'.
256
     * 
257
     * @param position the value of field 'position'.
258
     */
259
    public void setPosition(java.lang.Object position)
260
    {
261
        this._position = position;
262
    } //-- void setPosition(java.lang.Object) 
263

    
264
    /**
265
     * Method unmarshal
266
     * 
267
     * @param reader
268
     */
269
    public static java.lang.Object unmarshal(java.io.Reader reader)
270
        throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
271
    {
272
        return (org.gvsig.andami.plugins.config.generate.ComboButton) Unmarshaller.unmarshal(org.gvsig.andami.plugins.config.generate.ComboButton.class, reader);
273
    } //-- java.lang.Object unmarshal(java.io.Reader) 
274

    
275
    /**
276
     * Method validate
277
     */
278
    public void validate()
279
        throws org.exolab.castor.xml.ValidationException
280
    {
281
        org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
282
        validator.validate(this);
283
    } //-- void validate() 
284

    
285
}