e32317cbb1d805b485720a89719869c1c2495333
[jalview.git] / src / jalview / schemabinding / version2 / ViewportDescriptor.java
1 /*\r
2  * This class was automatically generated with \r
3  * <a href="http://www.castor.org">Castor 0.9.6</a>, using an XML\r
4  * Schema.\r
5  * $Id$\r
6  */\r
7 \r
8 package jalview.schemabinding.version2;\r
9 \r
10   //---------------------------------/\r
11  //- Imported classes and packages -/\r
12 //---------------------------------/\r
13 \r
14 import org.exolab.castor.mapping.AccessMode;\r
15 import org.exolab.castor.xml.TypeValidator;\r
16 import org.exolab.castor.xml.XMLFieldDescriptor;\r
17 import org.exolab.castor.xml.validators.*;\r
18 \r
19 /**\r
20  * Class ViewportDescriptor.\r
21  * \r
22  * @version $Revision$ $Date$\r
23  */\r
24 public class ViewportDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl {\r
25 \r
26 \r
27       //--------------------------/\r
28      //- Class/Member Variables -/\r
29     //--------------------------/\r
30 \r
31     /**\r
32      * Field nsPrefix\r
33      */\r
34     private java.lang.String nsPrefix;\r
35 \r
36     /**\r
37      * Field nsURI\r
38      */\r
39     private java.lang.String nsURI;\r
40 \r
41     /**\r
42      * Field xmlName\r
43      */\r
44     private java.lang.String xmlName;\r
45 \r
46     /**\r
47      * Field identity\r
48      */\r
49     private org.exolab.castor.xml.XMLFieldDescriptor identity;\r
50 \r
51 \r
52       //----------------/\r
53      //- Constructors -/\r
54     //----------------/\r
55 \r
56     public ViewportDescriptor() {\r
57         super();\r
58         nsURI = "www.jalview.org";\r
59         xmlName = "Viewport";\r
60         \r
61         //-- set grouping compositor\r
62         setCompositorAsSequence();\r
63         org.exolab.castor.xml.util.XMLFieldDescriptorImpl  desc           = null;\r
64         org.exolab.castor.xml.XMLFieldHandler              handler        = null;\r
65         org.exolab.castor.xml.FieldValidator               fieldValidator = null;\r
66         //-- initialize attribute descriptors\r
67         \r
68         //-- _conservationSelected\r
69         desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_conservationSelected", "conservationSelected", org.exolab.castor.xml.NodeType.Attribute);\r
70         handler = (new org.exolab.castor.xml.XMLFieldHandler() {\r
71             public java.lang.Object getValue( java.lang.Object object ) \r
72                 throws IllegalStateException\r
73             {\r
74                 Viewport target = (Viewport) object;\r
75                 if(!target.hasConservationSelected())\r
76                     return null;\r
77                 return (target.getConservationSelected() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE);\r
78             }\r
79             public void setValue( java.lang.Object object, java.lang.Object value) \r
80                 throws IllegalStateException, IllegalArgumentException\r
81             {\r
82                 try {\r
83                     Viewport target = (Viewport) object;\r
84                     // if null, use delete method for optional primitives \r
85                     if (value == null) {\r
86                         target.deleteConservationSelected();\r
87                         return;\r
88                     }\r
89                     target.setConservationSelected( ((java.lang.Boolean)value).booleanValue());\r
90                 }\r
91                 catch (java.lang.Exception ex) {\r
92                     throw new IllegalStateException(ex.toString());\r
93                 }\r
94             }\r
95             public java.lang.Object newInstance( java.lang.Object parent ) {\r
96                 return null;\r
97             }\r
98         } );\r
99         desc.setHandler(handler);\r
100         addFieldDescriptor(desc);\r
101         \r
102         //-- validation code for: _conservationSelected\r
103         fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
104         { //-- local scope\r
105             BooleanValidator typeValidator = new BooleanValidator();\r
106             fieldValidator.setValidator(typeValidator);\r
107         }\r
108         desc.setValidator(fieldValidator);\r
109         //-- _pidSelected\r
110         desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_pidSelected", "pidSelected", org.exolab.castor.xml.NodeType.Attribute);\r
111         handler = (new org.exolab.castor.xml.XMLFieldHandler() {\r
112             public java.lang.Object getValue( java.lang.Object object ) \r
113                 throws IllegalStateException\r
114             {\r
115                 Viewport target = (Viewport) object;\r
116                 if(!target.hasPidSelected())\r
117                     return null;\r
118                 return (target.getPidSelected() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE);\r
119             }\r
120             public void setValue( java.lang.Object object, java.lang.Object value) \r
121                 throws IllegalStateException, IllegalArgumentException\r
122             {\r
123                 try {\r
124                     Viewport target = (Viewport) object;\r
125                     // if null, use delete method for optional primitives \r
126                     if (value == null) {\r
127                         target.deletePidSelected();\r
128                         return;\r
129                     }\r
130                     target.setPidSelected( ((java.lang.Boolean)value).booleanValue());\r
131                 }\r
132                 catch (java.lang.Exception ex) {\r
133                     throw new IllegalStateException(ex.toString());\r
134                 }\r
135             }\r
136             public java.lang.Object newInstance( java.lang.Object parent ) {\r
137                 return null;\r
138             }\r
139         } );\r
140         desc.setHandler(handler);\r
141         addFieldDescriptor(desc);\r
142         \r
143         //-- validation code for: _pidSelected\r
144         fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
145         { //-- local scope\r
146             BooleanValidator typeValidator = new BooleanValidator();\r
147             fieldValidator.setValidator(typeValidator);\r
148         }\r
149         desc.setValidator(fieldValidator);\r
150         //-- _bgColour\r
151         desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_bgColour", "bgColour", org.exolab.castor.xml.NodeType.Attribute);\r
152         desc.setImmutable(true);\r
153         handler = (new org.exolab.castor.xml.XMLFieldHandler() {\r
154             public java.lang.Object getValue( java.lang.Object object ) \r
155                 throws IllegalStateException\r
156             {\r
157                 Viewport target = (Viewport) object;\r
158                 return target.getBgColour();\r
159             }\r
160             public void setValue( java.lang.Object object, java.lang.Object value) \r
161                 throws IllegalStateException, IllegalArgumentException\r
162             {\r
163                 try {\r
164                     Viewport target = (Viewport) object;\r
165                     target.setBgColour( (java.lang.String) value);\r
166                 }\r
167                 catch (java.lang.Exception ex) {\r
168                     throw new IllegalStateException(ex.toString());\r
169                 }\r
170             }\r
171             public java.lang.Object newInstance( java.lang.Object parent ) {\r
172                 return null;\r
173             }\r
174         } );\r
175         desc.setHandler(handler);\r
176         addFieldDescriptor(desc);\r
177         \r
178         //-- validation code for: _bgColour\r
179         fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
180         { //-- local scope\r
181             StringValidator typeValidator = new StringValidator();\r
182             typeValidator.setWhiteSpace("preserve");\r
183             fieldValidator.setValidator(typeValidator);\r
184         }\r
185         desc.setValidator(fieldValidator);\r
186         //-- _consThreshold\r
187         desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_consThreshold", "consThreshold", org.exolab.castor.xml.NodeType.Attribute);\r
188         handler = (new org.exolab.castor.xml.XMLFieldHandler() {\r
189             public java.lang.Object getValue( java.lang.Object object ) \r
190                 throws IllegalStateException\r
191             {\r
192                 Viewport target = (Viewport) object;\r
193                 if(!target.hasConsThreshold())\r
194                     return null;\r
195                 return new java.lang.Integer(target.getConsThreshold());\r
196             }\r
197             public void setValue( java.lang.Object object, java.lang.Object value) \r
198                 throws IllegalStateException, IllegalArgumentException\r
199             {\r
200                 try {\r
201                     Viewport target = (Viewport) object;\r
202                     // if null, use delete method for optional primitives \r
203                     if (value == null) {\r
204                         target.deleteConsThreshold();\r
205                         return;\r
206                     }\r
207                     target.setConsThreshold( ((java.lang.Integer)value).intValue());\r
208                 }\r
209                 catch (java.lang.Exception ex) {\r
210                     throw new IllegalStateException(ex.toString());\r
211                 }\r
212             }\r
213             public java.lang.Object newInstance( java.lang.Object parent ) {\r
214                 return null;\r
215             }\r
216         } );\r
217         desc.setHandler(handler);\r
218         addFieldDescriptor(desc);\r
219         \r
220         //-- validation code for: _consThreshold\r
221         fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
222         { //-- local scope\r
223             IntegerValidator typeValidator= new IntegerValidator();\r
224             fieldValidator.setValidator(typeValidator);\r
225         }\r
226         desc.setValidator(fieldValidator);\r
227         //-- _pidThreshold\r
228         desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_pidThreshold", "pidThreshold", org.exolab.castor.xml.NodeType.Attribute);\r
229         handler = (new org.exolab.castor.xml.XMLFieldHandler() {\r
230             public java.lang.Object getValue( java.lang.Object object ) \r
231                 throws IllegalStateException\r
232             {\r
233                 Viewport target = (Viewport) object;\r
234                 if(!target.hasPidThreshold())\r
235                     return null;\r
236                 return new java.lang.Integer(target.getPidThreshold());\r
237             }\r
238             public void setValue( java.lang.Object object, java.lang.Object value) \r
239                 throws IllegalStateException, IllegalArgumentException\r
240             {\r
241                 try {\r
242                     Viewport target = (Viewport) object;\r
243                     // if null, use delete method for optional primitives \r
244                     if (value == null) {\r
245                         target.deletePidThreshold();\r
246                         return;\r
247                     }\r
248                     target.setPidThreshold( ((java.lang.Integer)value).intValue());\r
249                 }\r
250                 catch (java.lang.Exception ex) {\r
251                     throw new IllegalStateException(ex.toString());\r
252                 }\r
253             }\r
254             public java.lang.Object newInstance( java.lang.Object parent ) {\r
255                 return null;\r
256             }\r
257         } );\r
258         desc.setHandler(handler);\r
259         addFieldDescriptor(desc);\r
260         \r
261         //-- validation code for: _pidThreshold\r
262         fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
263         { //-- local scope\r
264             IntegerValidator typeValidator= new IntegerValidator();\r
265             fieldValidator.setValidator(typeValidator);\r
266         }\r
267         desc.setValidator(fieldValidator);\r
268         //-- _title\r
269         desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_title", "title", org.exolab.castor.xml.NodeType.Attribute);\r
270         desc.setImmutable(true);\r
271         handler = (new org.exolab.castor.xml.XMLFieldHandler() {\r
272             public java.lang.Object getValue( java.lang.Object object ) \r
273                 throws IllegalStateException\r
274             {\r
275                 Viewport target = (Viewport) object;\r
276                 return target.getTitle();\r
277             }\r
278             public void setValue( java.lang.Object object, java.lang.Object value) \r
279                 throws IllegalStateException, IllegalArgumentException\r
280             {\r
281                 try {\r
282                     Viewport target = (Viewport) object;\r
283                     target.setTitle( (java.lang.String) value);\r
284                 }\r
285                 catch (java.lang.Exception ex) {\r
286                     throw new IllegalStateException(ex.toString());\r
287                 }\r
288             }\r
289             public java.lang.Object newInstance( java.lang.Object parent ) {\r
290                 return null;\r
291             }\r
292         } );\r
293         desc.setHandler(handler);\r
294         addFieldDescriptor(desc);\r
295         \r
296         //-- validation code for: _title\r
297         fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
298         { //-- local scope\r
299             StringValidator typeValidator = new StringValidator();\r
300             typeValidator.setWhiteSpace("preserve");\r
301             fieldValidator.setValidator(typeValidator);\r
302         }\r
303         desc.setValidator(fieldValidator);\r
304         //-- _showFullId\r
305         desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_showFullId", "showFullId", org.exolab.castor.xml.NodeType.Attribute);\r
306         handler = (new org.exolab.castor.xml.XMLFieldHandler() {\r
307             public java.lang.Object getValue( java.lang.Object object ) \r
308                 throws IllegalStateException\r
309             {\r
310                 Viewport target = (Viewport) object;\r
311                 if(!target.hasShowFullId())\r
312                     return null;\r
313                 return (target.getShowFullId() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE);\r
314             }\r
315             public void setValue( java.lang.Object object, java.lang.Object value) \r
316                 throws IllegalStateException, IllegalArgumentException\r
317             {\r
318                 try {\r
319                     Viewport target = (Viewport) object;\r
320                     // if null, use delete method for optional primitives \r
321                     if (value == null) {\r
322                         target.deleteShowFullId();\r
323                         return;\r
324                     }\r
325                     target.setShowFullId( ((java.lang.Boolean)value).booleanValue());\r
326                 }\r
327                 catch (java.lang.Exception ex) {\r
328                     throw new IllegalStateException(ex.toString());\r
329                 }\r
330             }\r
331             public java.lang.Object newInstance( java.lang.Object parent ) {\r
332                 return null;\r
333             }\r
334         } );\r
335         desc.setHandler(handler);\r
336         addFieldDescriptor(desc);\r
337         \r
338         //-- validation code for: _showFullId\r
339         fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
340         { //-- local scope\r
341             BooleanValidator typeValidator = new BooleanValidator();\r
342             fieldValidator.setValidator(typeValidator);\r
343         }\r
344         desc.setValidator(fieldValidator);\r
345         //-- _showText\r
346         desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_showText", "showText", org.exolab.castor.xml.NodeType.Attribute);\r
347         handler = (new org.exolab.castor.xml.XMLFieldHandler() {\r
348             public java.lang.Object getValue( java.lang.Object object ) \r
349                 throws IllegalStateException\r
350             {\r
351                 Viewport target = (Viewport) object;\r
352                 if(!target.hasShowText())\r
353                     return null;\r
354                 return (target.getShowText() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE);\r
355             }\r
356             public void setValue( java.lang.Object object, java.lang.Object value) \r
357                 throws IllegalStateException, IllegalArgumentException\r
358             {\r
359                 try {\r
360                     Viewport target = (Viewport) object;\r
361                     // if null, use delete method for optional primitives \r
362                     if (value == null) {\r
363                         target.deleteShowText();\r
364                         return;\r
365                     }\r
366                     target.setShowText( ((java.lang.Boolean)value).booleanValue());\r
367                 }\r
368                 catch (java.lang.Exception ex) {\r
369                     throw new IllegalStateException(ex.toString());\r
370                 }\r
371             }\r
372             public java.lang.Object newInstance( java.lang.Object parent ) {\r
373                 return null;\r
374             }\r
375         } );\r
376         desc.setHandler(handler);\r
377         addFieldDescriptor(desc);\r
378         \r
379         //-- validation code for: _showText\r
380         fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
381         { //-- local scope\r
382             BooleanValidator typeValidator = new BooleanValidator();\r
383             fieldValidator.setValidator(typeValidator);\r
384         }\r
385         desc.setValidator(fieldValidator);\r
386         //-- _showColourText\r
387         desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_showColourText", "showColourText", org.exolab.castor.xml.NodeType.Attribute);\r
388         handler = (new org.exolab.castor.xml.XMLFieldHandler() {\r
389             public java.lang.Object getValue( java.lang.Object object ) \r
390                 throws IllegalStateException\r
391             {\r
392                 Viewport target = (Viewport) object;\r
393                 if(!target.hasShowColourText())\r
394                     return null;\r
395                 return (target.getShowColourText() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE);\r
396             }\r
397             public void setValue( java.lang.Object object, java.lang.Object value) \r
398                 throws IllegalStateException, IllegalArgumentException\r
399             {\r
400                 try {\r
401                     Viewport target = (Viewport) object;\r
402                     // if null, use delete method for optional primitives \r
403                     if (value == null) {\r
404                         target.deleteShowColourText();\r
405                         return;\r
406                     }\r
407                     target.setShowColourText( ((java.lang.Boolean)value).booleanValue());\r
408                 }\r
409                 catch (java.lang.Exception ex) {\r
410                     throw new IllegalStateException(ex.toString());\r
411                 }\r
412             }\r
413             public java.lang.Object newInstance( java.lang.Object parent ) {\r
414                 return null;\r
415             }\r
416         } );\r
417         desc.setHandler(handler);\r
418         addFieldDescriptor(desc);\r
419         \r
420         //-- validation code for: _showColourText\r
421         fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
422         { //-- local scope\r
423             BooleanValidator typeValidator = new BooleanValidator();\r
424             fieldValidator.setValidator(typeValidator);\r
425         }\r
426         desc.setValidator(fieldValidator);\r
427         //-- _showBoxes\r
428         desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_showBoxes", "showBoxes", org.exolab.castor.xml.NodeType.Attribute);\r
429         handler = (new org.exolab.castor.xml.XMLFieldHandler() {\r
430             public java.lang.Object getValue( java.lang.Object object ) \r
431                 throws IllegalStateException\r
432             {\r
433                 Viewport target = (Viewport) object;\r
434                 if(!target.hasShowBoxes())\r
435                     return null;\r
436                 return (target.getShowBoxes() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE);\r
437             }\r
438             public void setValue( java.lang.Object object, java.lang.Object value) \r
439                 throws IllegalStateException, IllegalArgumentException\r
440             {\r
441                 try {\r
442                     Viewport target = (Viewport) object;\r
443                     // if null, use delete method for optional primitives \r
444                     if (value == null) {\r
445                         target.deleteShowBoxes();\r
446                         return;\r
447                     }\r
448                     target.setShowBoxes( ((java.lang.Boolean)value).booleanValue());\r
449                 }\r
450                 catch (java.lang.Exception ex) {\r
451                     throw new IllegalStateException(ex.toString());\r
452                 }\r
453             }\r
454             public java.lang.Object newInstance( java.lang.Object parent ) {\r
455                 return null;\r
456             }\r
457         } );\r
458         desc.setHandler(handler);\r
459         addFieldDescriptor(desc);\r
460         \r
461         //-- validation code for: _showBoxes\r
462         fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
463         { //-- local scope\r
464             BooleanValidator typeValidator = new BooleanValidator();\r
465             fieldValidator.setValidator(typeValidator);\r
466         }\r
467         desc.setValidator(fieldValidator);\r
468         //-- _wrapAlignment\r
469         desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_wrapAlignment", "wrapAlignment", org.exolab.castor.xml.NodeType.Attribute);\r
470         handler = (new org.exolab.castor.xml.XMLFieldHandler() {\r
471             public java.lang.Object getValue( java.lang.Object object ) \r
472                 throws IllegalStateException\r
473             {\r
474                 Viewport target = (Viewport) object;\r
475                 if(!target.hasWrapAlignment())\r
476                     return null;\r
477                 return (target.getWrapAlignment() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE);\r
478             }\r
479             public void setValue( java.lang.Object object, java.lang.Object value) \r
480                 throws IllegalStateException, IllegalArgumentException\r
481             {\r
482                 try {\r
483                     Viewport target = (Viewport) object;\r
484                     // if null, use delete method for optional primitives \r
485                     if (value == null) {\r
486                         target.deleteWrapAlignment();\r
487                         return;\r
488                     }\r
489                     target.setWrapAlignment( ((java.lang.Boolean)value).booleanValue());\r
490                 }\r
491                 catch (java.lang.Exception ex) {\r
492                     throw new IllegalStateException(ex.toString());\r
493                 }\r
494             }\r
495             public java.lang.Object newInstance( java.lang.Object parent ) {\r
496                 return null;\r
497             }\r
498         } );\r
499         desc.setHandler(handler);\r
500         addFieldDescriptor(desc);\r
501         \r
502         //-- validation code for: _wrapAlignment\r
503         fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
504         { //-- local scope\r
505             BooleanValidator typeValidator = new BooleanValidator();\r
506             fieldValidator.setValidator(typeValidator);\r
507         }\r
508         desc.setValidator(fieldValidator);\r
509         //-- _renderGaps\r
510         desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_renderGaps", "renderGaps", org.exolab.castor.xml.NodeType.Attribute);\r
511         handler = (new org.exolab.castor.xml.XMLFieldHandler() {\r
512             public java.lang.Object getValue( java.lang.Object object ) \r
513                 throws IllegalStateException\r
514             {\r
515                 Viewport target = (Viewport) object;\r
516                 if(!target.hasRenderGaps())\r
517                     return null;\r
518                 return (target.getRenderGaps() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE);\r
519             }\r
520             public void setValue( java.lang.Object object, java.lang.Object value) \r
521                 throws IllegalStateException, IllegalArgumentException\r
522             {\r
523                 try {\r
524                     Viewport target = (Viewport) object;\r
525                     // if null, use delete method for optional primitives \r
526                     if (value == null) {\r
527                         target.deleteRenderGaps();\r
528                         return;\r
529                     }\r
530                     target.setRenderGaps( ((java.lang.Boolean)value).booleanValue());\r
531                 }\r
532                 catch (java.lang.Exception ex) {\r
533                     throw new IllegalStateException(ex.toString());\r
534                 }\r
535             }\r
536             public java.lang.Object newInstance( java.lang.Object parent ) {\r
537                 return null;\r
538             }\r
539         } );\r
540         desc.setHandler(handler);\r
541         addFieldDescriptor(desc);\r
542         \r
543         //-- validation code for: _renderGaps\r
544         fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
545         { //-- local scope\r
546             BooleanValidator typeValidator = new BooleanValidator();\r
547             fieldValidator.setValidator(typeValidator);\r
548         }\r
549         desc.setValidator(fieldValidator);\r
550         //-- _showSequenceFeatures\r
551         desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_showSequenceFeatures", "showSequenceFeatures", org.exolab.castor.xml.NodeType.Attribute);\r
552         handler = (new org.exolab.castor.xml.XMLFieldHandler() {\r
553             public java.lang.Object getValue( java.lang.Object object ) \r
554                 throws IllegalStateException\r
555             {\r
556                 Viewport target = (Viewport) object;\r
557                 if(!target.hasShowSequenceFeatures())\r
558                     return null;\r
559                 return (target.getShowSequenceFeatures() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE);\r
560             }\r
561             public void setValue( java.lang.Object object, java.lang.Object value) \r
562                 throws IllegalStateException, IllegalArgumentException\r
563             {\r
564                 try {\r
565                     Viewport target = (Viewport) object;\r
566                     // if null, use delete method for optional primitives \r
567                     if (value == null) {\r
568                         target.deleteShowSequenceFeatures();\r
569                         return;\r
570                     }\r
571                     target.setShowSequenceFeatures( ((java.lang.Boolean)value).booleanValue());\r
572                 }\r
573                 catch (java.lang.Exception ex) {\r
574                     throw new IllegalStateException(ex.toString());\r
575                 }\r
576             }\r
577             public java.lang.Object newInstance( java.lang.Object parent ) {\r
578                 return null;\r
579             }\r
580         } );\r
581         desc.setHandler(handler);\r
582         addFieldDescriptor(desc);\r
583         \r
584         //-- validation code for: _showSequenceFeatures\r
585         fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
586         { //-- local scope\r
587             BooleanValidator typeValidator = new BooleanValidator();\r
588             fieldValidator.setValidator(typeValidator);\r
589         }\r
590         desc.setValidator(fieldValidator);\r
591         //-- _showAnnotation\r
592         desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_showAnnotation", "showAnnotation", org.exolab.castor.xml.NodeType.Attribute);\r
593         handler = (new org.exolab.castor.xml.XMLFieldHandler() {\r
594             public java.lang.Object getValue( java.lang.Object object ) \r
595                 throws IllegalStateException\r
596             {\r
597                 Viewport target = (Viewport) object;\r
598                 if(!target.hasShowAnnotation())\r
599                     return null;\r
600                 return (target.getShowAnnotation() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE);\r
601             }\r
602             public void setValue( java.lang.Object object, java.lang.Object value) \r
603                 throws IllegalStateException, IllegalArgumentException\r
604             {\r
605                 try {\r
606                     Viewport target = (Viewport) object;\r
607                     // if null, use delete method for optional primitives \r
608                     if (value == null) {\r
609                         target.deleteShowAnnotation();\r
610                         return;\r
611                     }\r
612                     target.setShowAnnotation( ((java.lang.Boolean)value).booleanValue());\r
613                 }\r
614                 catch (java.lang.Exception ex) {\r
615                     throw new IllegalStateException(ex.toString());\r
616                 }\r
617             }\r
618             public java.lang.Object newInstance( java.lang.Object parent ) {\r
619                 return null;\r
620             }\r
621         } );\r
622         desc.setHandler(handler);\r
623         addFieldDescriptor(desc);\r
624         \r
625         //-- validation code for: _showAnnotation\r
626         fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
627         { //-- local scope\r
628             BooleanValidator typeValidator = new BooleanValidator();\r
629             fieldValidator.setValidator(typeValidator);\r
630         }\r
631         desc.setValidator(fieldValidator);\r
632         //-- _xpos\r
633         desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_xpos", "xpos", org.exolab.castor.xml.NodeType.Attribute);\r
634         handler = (new org.exolab.castor.xml.XMLFieldHandler() {\r
635             public java.lang.Object getValue( java.lang.Object object ) \r
636                 throws IllegalStateException\r
637             {\r
638                 Viewport target = (Viewport) object;\r
639                 if(!target.hasXpos())\r
640                     return null;\r
641                 return new java.lang.Integer(target.getXpos());\r
642             }\r
643             public void setValue( java.lang.Object object, java.lang.Object value) \r
644                 throws IllegalStateException, IllegalArgumentException\r
645             {\r
646                 try {\r
647                     Viewport target = (Viewport) object;\r
648                     // if null, use delete method for optional primitives \r
649                     if (value == null) {\r
650                         target.deleteXpos();\r
651                         return;\r
652                     }\r
653                     target.setXpos( ((java.lang.Integer)value).intValue());\r
654                 }\r
655                 catch (java.lang.Exception ex) {\r
656                     throw new IllegalStateException(ex.toString());\r
657                 }\r
658             }\r
659             public java.lang.Object newInstance( java.lang.Object parent ) {\r
660                 return null;\r
661             }\r
662         } );\r
663         desc.setHandler(handler);\r
664         addFieldDescriptor(desc);\r
665         \r
666         //-- validation code for: _xpos\r
667         fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
668         { //-- local scope\r
669             IntegerValidator typeValidator= new IntegerValidator();\r
670             fieldValidator.setValidator(typeValidator);\r
671         }\r
672         desc.setValidator(fieldValidator);\r
673         //-- _ypos\r
674         desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_ypos", "ypos", org.exolab.castor.xml.NodeType.Attribute);\r
675         handler = (new org.exolab.castor.xml.XMLFieldHandler() {\r
676             public java.lang.Object getValue( java.lang.Object object ) \r
677                 throws IllegalStateException\r
678             {\r
679                 Viewport target = (Viewport) object;\r
680                 if(!target.hasYpos())\r
681                     return null;\r
682                 return new java.lang.Integer(target.getYpos());\r
683             }\r
684             public void setValue( java.lang.Object object, java.lang.Object value) \r
685                 throws IllegalStateException, IllegalArgumentException\r
686             {\r
687                 try {\r
688                     Viewport target = (Viewport) object;\r
689                     // if null, use delete method for optional primitives \r
690                     if (value == null) {\r
691                         target.deleteYpos();\r
692                         return;\r
693                     }\r
694                     target.setYpos( ((java.lang.Integer)value).intValue());\r
695                 }\r
696                 catch (java.lang.Exception ex) {\r
697                     throw new IllegalStateException(ex.toString());\r
698                 }\r
699             }\r
700             public java.lang.Object newInstance( java.lang.Object parent ) {\r
701                 return null;\r
702             }\r
703         } );\r
704         desc.setHandler(handler);\r
705         addFieldDescriptor(desc);\r
706         \r
707         //-- validation code for: _ypos\r
708         fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
709         { //-- local scope\r
710             IntegerValidator typeValidator= new IntegerValidator();\r
711             fieldValidator.setValidator(typeValidator);\r
712         }\r
713         desc.setValidator(fieldValidator);\r
714         //-- _width\r
715         desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_width", "width", org.exolab.castor.xml.NodeType.Attribute);\r
716         handler = (new org.exolab.castor.xml.XMLFieldHandler() {\r
717             public java.lang.Object getValue( java.lang.Object object ) \r
718                 throws IllegalStateException\r
719             {\r
720                 Viewport target = (Viewport) object;\r
721                 if(!target.hasWidth())\r
722                     return null;\r
723                 return new java.lang.Integer(target.getWidth());\r
724             }\r
725             public void setValue( java.lang.Object object, java.lang.Object value) \r
726                 throws IllegalStateException, IllegalArgumentException\r
727             {\r
728                 try {\r
729                     Viewport target = (Viewport) object;\r
730                     // if null, use delete method for optional primitives \r
731                     if (value == null) {\r
732                         target.deleteWidth();\r
733                         return;\r
734                     }\r
735                     target.setWidth( ((java.lang.Integer)value).intValue());\r
736                 }\r
737                 catch (java.lang.Exception ex) {\r
738                     throw new IllegalStateException(ex.toString());\r
739                 }\r
740             }\r
741             public java.lang.Object newInstance( java.lang.Object parent ) {\r
742                 return null;\r
743             }\r
744         } );\r
745         desc.setHandler(handler);\r
746         addFieldDescriptor(desc);\r
747         \r
748         //-- validation code for: _width\r
749         fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
750         { //-- local scope\r
751             IntegerValidator typeValidator= new IntegerValidator();\r
752             fieldValidator.setValidator(typeValidator);\r
753         }\r
754         desc.setValidator(fieldValidator);\r
755         //-- _height\r
756         desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_height", "height", org.exolab.castor.xml.NodeType.Attribute);\r
757         handler = (new org.exolab.castor.xml.XMLFieldHandler() {\r
758             public java.lang.Object getValue( java.lang.Object object ) \r
759                 throws IllegalStateException\r
760             {\r
761                 Viewport target = (Viewport) object;\r
762                 if(!target.hasHeight())\r
763                     return null;\r
764                 return new java.lang.Integer(target.getHeight());\r
765             }\r
766             public void setValue( java.lang.Object object, java.lang.Object value) \r
767                 throws IllegalStateException, IllegalArgumentException\r
768             {\r
769                 try {\r
770                     Viewport target = (Viewport) object;\r
771                     // if null, use delete method for optional primitives \r
772                     if (value == null) {\r
773                         target.deleteHeight();\r
774                         return;\r
775                     }\r
776                     target.setHeight( ((java.lang.Integer)value).intValue());\r
777                 }\r
778                 catch (java.lang.Exception ex) {\r
779                     throw new IllegalStateException(ex.toString());\r
780                 }\r
781             }\r
782             public java.lang.Object newInstance( java.lang.Object parent ) {\r
783                 return null;\r
784             }\r
785         } );\r
786         desc.setHandler(handler);\r
787         addFieldDescriptor(desc);\r
788         \r
789         //-- validation code for: _height\r
790         fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
791         { //-- local scope\r
792             IntegerValidator typeValidator= new IntegerValidator();\r
793             fieldValidator.setValidator(typeValidator);\r
794         }\r
795         desc.setValidator(fieldValidator);\r
796         //-- _startRes\r
797         desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_startRes", "startRes", org.exolab.castor.xml.NodeType.Attribute);\r
798         handler = (new org.exolab.castor.xml.XMLFieldHandler() {\r
799             public java.lang.Object getValue( java.lang.Object object ) \r
800                 throws IllegalStateException\r
801             {\r
802                 Viewport target = (Viewport) object;\r
803                 if(!target.hasStartRes())\r
804                     return null;\r
805                 return new java.lang.Integer(target.getStartRes());\r
806             }\r
807             public void setValue( java.lang.Object object, java.lang.Object value) \r
808                 throws IllegalStateException, IllegalArgumentException\r
809             {\r
810                 try {\r
811                     Viewport target = (Viewport) object;\r
812                     // if null, use delete method for optional primitives \r
813                     if (value == null) {\r
814                         target.deleteStartRes();\r
815                         return;\r
816                     }\r
817                     target.setStartRes( ((java.lang.Integer)value).intValue());\r
818                 }\r
819                 catch (java.lang.Exception ex) {\r
820                     throw new IllegalStateException(ex.toString());\r
821                 }\r
822             }\r
823             public java.lang.Object newInstance( java.lang.Object parent ) {\r
824                 return null;\r
825             }\r
826         } );\r
827         desc.setHandler(handler);\r
828         addFieldDescriptor(desc);\r
829         \r
830         //-- validation code for: _startRes\r
831         fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
832         { //-- local scope\r
833             IntegerValidator typeValidator= new IntegerValidator();\r
834             fieldValidator.setValidator(typeValidator);\r
835         }\r
836         desc.setValidator(fieldValidator);\r
837         //-- _startSeq\r
838         desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_startSeq", "startSeq", org.exolab.castor.xml.NodeType.Attribute);\r
839         handler = (new org.exolab.castor.xml.XMLFieldHandler() {\r
840             public java.lang.Object getValue( java.lang.Object object ) \r
841                 throws IllegalStateException\r
842             {\r
843                 Viewport target = (Viewport) object;\r
844                 if(!target.hasStartSeq())\r
845                     return null;\r
846                 return new java.lang.Integer(target.getStartSeq());\r
847             }\r
848             public void setValue( java.lang.Object object, java.lang.Object value) \r
849                 throws IllegalStateException, IllegalArgumentException\r
850             {\r
851                 try {\r
852                     Viewport target = (Viewport) object;\r
853                     // if null, use delete method for optional primitives \r
854                     if (value == null) {\r
855                         target.deleteStartSeq();\r
856                         return;\r
857                     }\r
858                     target.setStartSeq( ((java.lang.Integer)value).intValue());\r
859                 }\r
860                 catch (java.lang.Exception ex) {\r
861                     throw new IllegalStateException(ex.toString());\r
862                 }\r
863             }\r
864             public java.lang.Object newInstance( java.lang.Object parent ) {\r
865                 return null;\r
866             }\r
867         } );\r
868         desc.setHandler(handler);\r
869         addFieldDescriptor(desc);\r
870         \r
871         //-- validation code for: _startSeq\r
872         fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
873         { //-- local scope\r
874             IntegerValidator typeValidator= new IntegerValidator();\r
875             fieldValidator.setValidator(typeValidator);\r
876         }\r
877         desc.setValidator(fieldValidator);\r
878         //-- _fontName\r
879         desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_fontName", "fontName", org.exolab.castor.xml.NodeType.Attribute);\r
880         desc.setImmutable(true);\r
881         handler = (new org.exolab.castor.xml.XMLFieldHandler() {\r
882             public java.lang.Object getValue( java.lang.Object object ) \r
883                 throws IllegalStateException\r
884             {\r
885                 Viewport target = (Viewport) object;\r
886                 return target.getFontName();\r
887             }\r
888             public void setValue( java.lang.Object object, java.lang.Object value) \r
889                 throws IllegalStateException, IllegalArgumentException\r
890             {\r
891                 try {\r
892                     Viewport target = (Viewport) object;\r
893                     target.setFontName( (java.lang.String) value);\r
894                 }\r
895                 catch (java.lang.Exception ex) {\r
896                     throw new IllegalStateException(ex.toString());\r
897                 }\r
898             }\r
899             public java.lang.Object newInstance( java.lang.Object parent ) {\r
900                 return null;\r
901             }\r
902         } );\r
903         desc.setHandler(handler);\r
904         addFieldDescriptor(desc);\r
905         \r
906         //-- validation code for: _fontName\r
907         fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
908         { //-- local scope\r
909             StringValidator typeValidator = new StringValidator();\r
910             typeValidator.setWhiteSpace("preserve");\r
911             fieldValidator.setValidator(typeValidator);\r
912         }\r
913         desc.setValidator(fieldValidator);\r
914         //-- _fontSize\r
915         desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_fontSize", "fontSize", org.exolab.castor.xml.NodeType.Attribute);\r
916         handler = (new org.exolab.castor.xml.XMLFieldHandler() {\r
917             public java.lang.Object getValue( java.lang.Object object ) \r
918                 throws IllegalStateException\r
919             {\r
920                 Viewport target = (Viewport) object;\r
921                 if(!target.hasFontSize())\r
922                     return null;\r
923                 return new java.lang.Integer(target.getFontSize());\r
924             }\r
925             public void setValue( java.lang.Object object, java.lang.Object value) \r
926                 throws IllegalStateException, IllegalArgumentException\r
927             {\r
928                 try {\r
929                     Viewport target = (Viewport) object;\r
930                     // if null, use delete method for optional primitives \r
931                     if (value == null) {\r
932                         target.deleteFontSize();\r
933                         return;\r
934                     }\r
935                     target.setFontSize( ((java.lang.Integer)value).intValue());\r
936                 }\r
937                 catch (java.lang.Exception ex) {\r
938                     throw new IllegalStateException(ex.toString());\r
939                 }\r
940             }\r
941             public java.lang.Object newInstance( java.lang.Object parent ) {\r
942                 return null;\r
943             }\r
944         } );\r
945         desc.setHandler(handler);\r
946         addFieldDescriptor(desc);\r
947         \r
948         //-- validation code for: _fontSize\r
949         fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
950         { //-- local scope\r
951             IntegerValidator typeValidator= new IntegerValidator();\r
952             fieldValidator.setValidator(typeValidator);\r
953         }\r
954         desc.setValidator(fieldValidator);\r
955         //-- _fontStyle\r
956         desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_fontStyle", "fontStyle", org.exolab.castor.xml.NodeType.Attribute);\r
957         handler = (new org.exolab.castor.xml.XMLFieldHandler() {\r
958             public java.lang.Object getValue( java.lang.Object object ) \r
959                 throws IllegalStateException\r
960             {\r
961                 Viewport target = (Viewport) object;\r
962                 if(!target.hasFontStyle())\r
963                     return null;\r
964                 return new java.lang.Integer(target.getFontStyle());\r
965             }\r
966             public void setValue( java.lang.Object object, java.lang.Object value) \r
967                 throws IllegalStateException, IllegalArgumentException\r
968             {\r
969                 try {\r
970                     Viewport target = (Viewport) object;\r
971                     // if null, use delete method for optional primitives \r
972                     if (value == null) {\r
973                         target.deleteFontStyle();\r
974                         return;\r
975                     }\r
976                     target.setFontStyle( ((java.lang.Integer)value).intValue());\r
977                 }\r
978                 catch (java.lang.Exception ex) {\r
979                     throw new IllegalStateException(ex.toString());\r
980                 }\r
981             }\r
982             public java.lang.Object newInstance( java.lang.Object parent ) {\r
983                 return null;\r
984             }\r
985         } );\r
986         desc.setHandler(handler);\r
987         addFieldDescriptor(desc);\r
988         \r
989         //-- validation code for: _fontStyle\r
990         fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
991         { //-- local scope\r
992             IntegerValidator typeValidator= new IntegerValidator();\r
993             fieldValidator.setValidator(typeValidator);\r
994         }\r
995         desc.setValidator(fieldValidator);\r
996         //-- _viewName\r
997         desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_viewName", "viewName", org.exolab.castor.xml.NodeType.Attribute);\r
998         desc.setImmutable(true);\r
999         handler = (new org.exolab.castor.xml.XMLFieldHandler() {\r
1000             public java.lang.Object getValue( java.lang.Object object ) \r
1001                 throws IllegalStateException\r
1002             {\r
1003                 Viewport target = (Viewport) object;\r
1004                 return target.getViewName();\r
1005             }\r
1006             public void setValue( java.lang.Object object, java.lang.Object value) \r
1007                 throws IllegalStateException, IllegalArgumentException\r
1008             {\r
1009                 try {\r
1010                     Viewport target = (Viewport) object;\r
1011                     target.setViewName( (java.lang.String) value);\r
1012                 }\r
1013                 catch (java.lang.Exception ex) {\r
1014                     throw new IllegalStateException(ex.toString());\r
1015                 }\r
1016             }\r
1017             public java.lang.Object newInstance( java.lang.Object parent ) {\r
1018                 return null;\r
1019             }\r
1020         } );\r
1021         desc.setHandler(handler);\r
1022         addFieldDescriptor(desc);\r
1023         \r
1024         //-- validation code for: _viewName\r
1025         fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
1026         { //-- local scope\r
1027             StringValidator typeValidator = new StringValidator();\r
1028             typeValidator.setWhiteSpace("preserve");\r
1029             fieldValidator.setValidator(typeValidator);\r
1030         }\r
1031         desc.setValidator(fieldValidator);\r
1032         //-- _sequenceSetId\r
1033         desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_sequenceSetId", "sequenceSetId", org.exolab.castor.xml.NodeType.Attribute);\r
1034         desc.setImmutable(true);\r
1035         handler = (new org.exolab.castor.xml.XMLFieldHandler() {\r
1036             public java.lang.Object getValue( java.lang.Object object ) \r
1037                 throws IllegalStateException\r
1038             {\r
1039                 Viewport target = (Viewport) object;\r
1040                 return target.getSequenceSetId();\r
1041             }\r
1042             public void setValue( java.lang.Object object, java.lang.Object value) \r
1043                 throws IllegalStateException, IllegalArgumentException\r
1044             {\r
1045                 try {\r
1046                     Viewport target = (Viewport) object;\r
1047                     target.setSequenceSetId( (java.lang.String) value);\r
1048                 }\r
1049                 catch (java.lang.Exception ex) {\r
1050                     throw new IllegalStateException(ex.toString());\r
1051                 }\r
1052             }\r
1053             public java.lang.Object newInstance( java.lang.Object parent ) {\r
1054                 return null;\r
1055             }\r
1056         } );\r
1057         desc.setHandler(handler);\r
1058         addFieldDescriptor(desc);\r
1059         \r
1060         //-- validation code for: _sequenceSetId\r
1061         fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
1062         { //-- local scope\r
1063             StringValidator typeValidator = new StringValidator();\r
1064             typeValidator.setWhiteSpace("preserve");\r
1065             fieldValidator.setValidator(typeValidator);\r
1066         }\r
1067         desc.setValidator(fieldValidator);\r
1068         //-- _gatheredViews\r
1069         desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_gatheredViews", "gatheredViews", org.exolab.castor.xml.NodeType.Attribute);\r
1070         handler = (new org.exolab.castor.xml.XMLFieldHandler() {\r
1071             public java.lang.Object getValue( java.lang.Object object ) \r
1072                 throws IllegalStateException\r
1073             {\r
1074                 Viewport target = (Viewport) object;\r
1075                 if(!target.hasGatheredViews())\r
1076                     return null;\r
1077                 return (target.getGatheredViews() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE);\r
1078             }\r
1079             public void setValue( java.lang.Object object, java.lang.Object value) \r
1080                 throws IllegalStateException, IllegalArgumentException\r
1081             {\r
1082                 try {\r
1083                     Viewport target = (Viewport) object;\r
1084                     // if null, use delete method for optional primitives \r
1085                     if (value == null) {\r
1086                         target.deleteGatheredViews();\r
1087                         return;\r
1088                     }\r
1089                     target.setGatheredViews( ((java.lang.Boolean)value).booleanValue());\r
1090                 }\r
1091                 catch (java.lang.Exception ex) {\r
1092                     throw new IllegalStateException(ex.toString());\r
1093                 }\r
1094             }\r
1095             public java.lang.Object newInstance( java.lang.Object parent ) {\r
1096                 return null;\r
1097             }\r
1098         } );\r
1099         desc.setHandler(handler);\r
1100         addFieldDescriptor(desc);\r
1101         \r
1102         //-- validation code for: _gatheredViews\r
1103         fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
1104         { //-- local scope\r
1105             BooleanValidator typeValidator = new BooleanValidator();\r
1106             fieldValidator.setValidator(typeValidator);\r
1107         }\r
1108         desc.setValidator(fieldValidator);\r
1109         //-- _textCol1\r
1110         desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_textCol1", "textCol1", org.exolab.castor.xml.NodeType.Attribute);\r
1111         handler = (new org.exolab.castor.xml.XMLFieldHandler() {\r
1112             public java.lang.Object getValue( java.lang.Object object ) \r
1113                 throws IllegalStateException\r
1114             {\r
1115                 Viewport target = (Viewport) object;\r
1116                 if(!target.hasTextCol1())\r
1117                     return null;\r
1118                 return new java.lang.Integer(target.getTextCol1());\r
1119             }\r
1120             public void setValue( java.lang.Object object, java.lang.Object value) \r
1121                 throws IllegalStateException, IllegalArgumentException\r
1122             {\r
1123                 try {\r
1124                     Viewport target = (Viewport) object;\r
1125                     // if null, use delete method for optional primitives \r
1126                     if (value == null) {\r
1127                         target.deleteTextCol1();\r
1128                         return;\r
1129                     }\r
1130                     target.setTextCol1( ((java.lang.Integer)value).intValue());\r
1131                 }\r
1132                 catch (java.lang.Exception ex) {\r
1133                     throw new IllegalStateException(ex.toString());\r
1134                 }\r
1135             }\r
1136             public java.lang.Object newInstance( java.lang.Object parent ) {\r
1137                 return null;\r
1138             }\r
1139         } );\r
1140         desc.setHandler(handler);\r
1141         addFieldDescriptor(desc);\r
1142         \r
1143         //-- validation code for: _textCol1\r
1144         fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
1145         { //-- local scope\r
1146             IntegerValidator typeValidator= new IntegerValidator();\r
1147             fieldValidator.setValidator(typeValidator);\r
1148         }\r
1149         desc.setValidator(fieldValidator);\r
1150         //-- _textCol2\r
1151         desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_textCol2", "textCol2", org.exolab.castor.xml.NodeType.Attribute);\r
1152         handler = (new org.exolab.castor.xml.XMLFieldHandler() {\r
1153             public java.lang.Object getValue( java.lang.Object object ) \r
1154                 throws IllegalStateException\r
1155             {\r
1156                 Viewport target = (Viewport) object;\r
1157                 if(!target.hasTextCol2())\r
1158                     return null;\r
1159                 return new java.lang.Integer(target.getTextCol2());\r
1160             }\r
1161             public void setValue( java.lang.Object object, java.lang.Object value) \r
1162                 throws IllegalStateException, IllegalArgumentException\r
1163             {\r
1164                 try {\r
1165                     Viewport target = (Viewport) object;\r
1166                     // if null, use delete method for optional primitives \r
1167                     if (value == null) {\r
1168                         target.deleteTextCol2();\r
1169                         return;\r
1170                     }\r
1171                     target.setTextCol2( ((java.lang.Integer)value).intValue());\r
1172                 }\r
1173                 catch (java.lang.Exception ex) {\r
1174                     throw new IllegalStateException(ex.toString());\r
1175                 }\r
1176             }\r
1177             public java.lang.Object newInstance( java.lang.Object parent ) {\r
1178                 return null;\r
1179             }\r
1180         } );\r
1181         desc.setHandler(handler);\r
1182         addFieldDescriptor(desc);\r
1183         \r
1184         //-- validation code for: _textCol2\r
1185         fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
1186         { //-- local scope\r
1187             IntegerValidator typeValidator= new IntegerValidator();\r
1188             fieldValidator.setValidator(typeValidator);\r
1189         }\r
1190         desc.setValidator(fieldValidator);\r
1191         //-- _textColThreshold\r
1192         desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_textColThreshold", "textColThreshold", org.exolab.castor.xml.NodeType.Attribute);\r
1193         handler = (new org.exolab.castor.xml.XMLFieldHandler() {\r
1194             public java.lang.Object getValue( java.lang.Object object ) \r
1195                 throws IllegalStateException\r
1196             {\r
1197                 Viewport target = (Viewport) object;\r
1198                 if(!target.hasTextColThreshold())\r
1199                     return null;\r
1200                 return new java.lang.Integer(target.getTextColThreshold());\r
1201             }\r
1202             public void setValue( java.lang.Object object, java.lang.Object value) \r
1203                 throws IllegalStateException, IllegalArgumentException\r
1204             {\r
1205                 try {\r
1206                     Viewport target = (Viewport) object;\r
1207                     // if null, use delete method for optional primitives \r
1208                     if (value == null) {\r
1209                         target.deleteTextColThreshold();\r
1210                         return;\r
1211                     }\r
1212                     target.setTextColThreshold( ((java.lang.Integer)value).intValue());\r
1213                 }\r
1214                 catch (java.lang.Exception ex) {\r
1215                     throw new IllegalStateException(ex.toString());\r
1216                 }\r
1217             }\r
1218             public java.lang.Object newInstance( java.lang.Object parent ) {\r
1219                 return null;\r
1220             }\r
1221         } );\r
1222         desc.setHandler(handler);\r
1223         addFieldDescriptor(desc);\r
1224         \r
1225         //-- validation code for: _textColThreshold\r
1226         fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
1227         { //-- local scope\r
1228             IntegerValidator typeValidator= new IntegerValidator();\r
1229             fieldValidator.setValidator(typeValidator);\r
1230         }\r
1231         desc.setValidator(fieldValidator);\r
1232         //-- initialize element descriptors\r
1233         \r
1234         //-- _annotationColours\r
1235         desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(jalview.schemabinding.version2.AnnotationColours.class, "_annotationColours", "AnnotationColours", org.exolab.castor.xml.NodeType.Element);\r
1236         handler = (new org.exolab.castor.xml.XMLFieldHandler() {\r
1237             public java.lang.Object getValue( java.lang.Object object ) \r
1238                 throws IllegalStateException\r
1239             {\r
1240                 Viewport target = (Viewport) object;\r
1241                 return target.getAnnotationColours();\r
1242             }\r
1243             public void setValue( java.lang.Object object, java.lang.Object value) \r
1244                 throws IllegalStateException, IllegalArgumentException\r
1245             {\r
1246                 try {\r
1247                     Viewport target = (Viewport) object;\r
1248                     target.setAnnotationColours( (jalview.schemabinding.version2.AnnotationColours) value);\r
1249                 }\r
1250                 catch (java.lang.Exception ex) {\r
1251                     throw new IllegalStateException(ex.toString());\r
1252                 }\r
1253             }\r
1254             public java.lang.Object newInstance( java.lang.Object parent ) {\r
1255                 return new jalview.schemabinding.version2.AnnotationColours();\r
1256             }\r
1257         } );\r
1258         desc.setHandler(handler);\r
1259         desc.setNameSpaceURI("www.jalview.org");\r
1260         desc.setMultivalued(false);\r
1261         addFieldDescriptor(desc);\r
1262         \r
1263         //-- validation code for: _annotationColours\r
1264         fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
1265         { //-- local scope\r
1266         }\r
1267         desc.setValidator(fieldValidator);\r
1268         //-- _hiddenColumnsList\r
1269         desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(jalview.schemabinding.version2.HiddenColumns.class, "_hiddenColumnsList", "hiddenColumns", org.exolab.castor.xml.NodeType.Element);\r
1270         handler = (new org.exolab.castor.xml.XMLFieldHandler() {\r
1271             public java.lang.Object getValue( java.lang.Object object ) \r
1272                 throws IllegalStateException\r
1273             {\r
1274                 Viewport target = (Viewport) object;\r
1275                 return target.getHiddenColumns();\r
1276             }\r
1277             public void setValue( java.lang.Object object, java.lang.Object value) \r
1278                 throws IllegalStateException, IllegalArgumentException\r
1279             {\r
1280                 try {\r
1281                     Viewport target = (Viewport) object;\r
1282                     target.addHiddenColumns( (jalview.schemabinding.version2.HiddenColumns) value);\r
1283                 }\r
1284                 catch (java.lang.Exception ex) {\r
1285                     throw new IllegalStateException(ex.toString());\r
1286                 }\r
1287             }\r
1288             public java.lang.Object newInstance( java.lang.Object parent ) {\r
1289                 return new jalview.schemabinding.version2.HiddenColumns();\r
1290             }\r
1291         } );\r
1292         desc.setHandler(handler);\r
1293         desc.setNameSpaceURI("www.jalview.org");\r
1294         desc.setMultivalued(true);\r
1295         addFieldDescriptor(desc);\r
1296         \r
1297         //-- validation code for: _hiddenColumnsList\r
1298         fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
1299         fieldValidator.setMinOccurs(0);\r
1300         { //-- local scope\r
1301         }\r
1302         desc.setValidator(fieldValidator);\r
1303     } //-- jalview.schemabinding.version2.ViewportDescriptor()\r
1304 \r
1305 \r
1306       //-----------/\r
1307      //- Methods -/\r
1308     //-----------/\r
1309 \r
1310     /**\r
1311      * Method getAccessMode\r
1312      * \r
1313      * \r
1314      * \r
1315      * @return AccessMode\r
1316      */\r
1317     public org.exolab.castor.mapping.AccessMode getAccessMode()\r
1318     {\r
1319         return null;\r
1320     } //-- org.exolab.castor.mapping.AccessMode getAccessMode() \r
1321 \r
1322     /**\r
1323      * Method getExtends\r
1324      * \r
1325      * \r
1326      * \r
1327      * @return ClassDescriptor\r
1328      */\r
1329     public org.exolab.castor.mapping.ClassDescriptor getExtends()\r
1330     {\r
1331         return null;\r
1332     } //-- org.exolab.castor.mapping.ClassDescriptor getExtends() \r
1333 \r
1334     /**\r
1335      * Method getIdentity\r
1336      * \r
1337      * \r
1338      * \r
1339      * @return FieldDescriptor\r
1340      */\r
1341     public org.exolab.castor.mapping.FieldDescriptor getIdentity()\r
1342     {\r
1343         return identity;\r
1344     } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() \r
1345 \r
1346     /**\r
1347      * Method getJavaClass\r
1348      * \r
1349      * \r
1350      * \r
1351      * @return Class\r
1352      */\r
1353     public java.lang.Class getJavaClass()\r
1354     {\r
1355         return jalview.schemabinding.version2.Viewport.class;\r
1356     } //-- java.lang.Class getJavaClass() \r
1357 \r
1358     /**\r
1359      * Method getNameSpacePrefix\r
1360      * \r
1361      * \r
1362      * \r
1363      * @return String\r
1364      */\r
1365     public java.lang.String getNameSpacePrefix()\r
1366     {\r
1367         return nsPrefix;\r
1368     } //-- java.lang.String getNameSpacePrefix() \r
1369 \r
1370     /**\r
1371      * Method getNameSpaceURI\r
1372      * \r
1373      * \r
1374      * \r
1375      * @return String\r
1376      */\r
1377     public java.lang.String getNameSpaceURI()\r
1378     {\r
1379         return nsURI;\r
1380     } //-- java.lang.String getNameSpaceURI() \r
1381 \r
1382     /**\r
1383      * Method getValidator\r
1384      * \r
1385      * \r
1386      * \r
1387      * @return TypeValidator\r
1388      */\r
1389     public org.exolab.castor.xml.TypeValidator getValidator()\r
1390     {\r
1391         return this;\r
1392     } //-- org.exolab.castor.xml.TypeValidator getValidator() \r
1393 \r
1394     /**\r
1395      * Method getXMLName\r
1396      * \r
1397      * \r
1398      * \r
1399      * @return String\r
1400      */\r
1401     public java.lang.String getXMLName()\r
1402     {\r
1403         return xmlName;\r
1404     } //-- java.lang.String getXMLName() \r
1405 \r
1406 }\r