after merge
[jalview.git] / src / jalview / binding / JalviewModelSequence.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.binding;\r
9 \r
10   //---------------------------------/\r
11  //- Imported classes and packages -/\r
12 //---------------------------------/\r
13 \r
14 import java.io.IOException;\r
15 import java.io.Reader;\r
16 import java.io.Serializable;\r
17 import java.io.Writer;\r
18 import java.util.Enumeration;\r
19 import java.util.Vector;\r
20 import org.exolab.castor.xml.MarshalException;\r
21 import org.exolab.castor.xml.Marshaller;\r
22 import org.exolab.castor.xml.Unmarshaller;\r
23 import org.exolab.castor.xml.ValidationException;\r
24 import org.xml.sax.ContentHandler;\r
25 \r
26 /**\r
27  * Class JalviewModelSequence.\r
28  * \r
29  * @version $Revision$ $Date$\r
30  */\r
31 public class JalviewModelSequence implements java.io.Serializable {\r
32 \r
33 \r
34       //--------------------------/\r
35      //- Class/Member Variables -/\r
36     //--------------------------/\r
37 \r
38     /**\r
39      * Field _JSeqList\r
40      */\r
41     private java.util.Vector _JSeqList;\r
42 \r
43     /**\r
44      * Field _JGroupList\r
45      */\r
46     private java.util.Vector _JGroupList;\r
47 \r
48     /**\r
49      * Field _viewportList\r
50      */\r
51     private java.util.Vector _viewportList;\r
52 \r
53     /**\r
54      * Field _userColoursList\r
55      */\r
56     private java.util.Vector _userColoursList;\r
57 \r
58     /**\r
59      * Field _treeList\r
60      */\r
61     private java.util.Vector _treeList;\r
62 \r
63     /**\r
64      * Field _featureSettings\r
65      */\r
66     private jalview.binding.FeatureSettings _featureSettings;\r
67 \r
68 \r
69       //----------------/\r
70      //- Constructors -/\r
71     //----------------/\r
72 \r
73     public JalviewModelSequence() {\r
74         super();\r
75         _JSeqList = new Vector();\r
76         _JGroupList = new Vector();\r
77         _viewportList = new Vector();\r
78         _userColoursList = new Vector();\r
79         _treeList = new Vector();\r
80     } //-- jalview.binding.JalviewModelSequence()\r
81 \r
82 \r
83       //-----------/\r
84      //- Methods -/\r
85     //-----------/\r
86 \r
87     /**\r
88      * Method addJGroup\r
89      * \r
90      * \r
91      * \r
92      * @param vJGroup\r
93      */\r
94     public void addJGroup(jalview.binding.JGroup vJGroup)\r
95         throws java.lang.IndexOutOfBoundsException\r
96     {\r
97         _JGroupList.addElement(vJGroup);\r
98     } //-- void addJGroup(jalview.binding.JGroup) \r
99 \r
100     /**\r
101      * Method addJGroup\r
102      * \r
103      * \r
104      * \r
105      * @param index\r
106      * @param vJGroup\r
107      */\r
108     public void addJGroup(int index, jalview.binding.JGroup vJGroup)\r
109         throws java.lang.IndexOutOfBoundsException\r
110     {\r
111         _JGroupList.insertElementAt(vJGroup, index);\r
112     } //-- void addJGroup(int, jalview.binding.JGroup) \r
113 \r
114     /**\r
115      * Method addJSeq\r
116      * \r
117      * \r
118      * \r
119      * @param vJSeq\r
120      */\r
121     public void addJSeq(jalview.binding.JSeq vJSeq)\r
122         throws java.lang.IndexOutOfBoundsException\r
123     {\r
124         _JSeqList.addElement(vJSeq);\r
125     } //-- void addJSeq(jalview.binding.JSeq) \r
126 \r
127     /**\r
128      * Method addJSeq\r
129      * \r
130      * \r
131      * \r
132      * @param index\r
133      * @param vJSeq\r
134      */\r
135     public void addJSeq(int index, jalview.binding.JSeq vJSeq)\r
136         throws java.lang.IndexOutOfBoundsException\r
137     {\r
138         _JSeqList.insertElementAt(vJSeq, index);\r
139     } //-- void addJSeq(int, jalview.binding.JSeq) \r
140 \r
141     /**\r
142      * Method addTree\r
143      * \r
144      * \r
145      * \r
146      * @param vTree\r
147      */\r
148     public void addTree(jalview.binding.Tree vTree)\r
149         throws java.lang.IndexOutOfBoundsException\r
150     {\r
151         _treeList.addElement(vTree);\r
152     } //-- void addTree(jalview.binding.Tree) \r
153 \r
154     /**\r
155      * Method addTree\r
156      * \r
157      * \r
158      * \r
159      * @param index\r
160      * @param vTree\r
161      */\r
162     public void addTree(int index, jalview.binding.Tree vTree)\r
163         throws java.lang.IndexOutOfBoundsException\r
164     {\r
165         _treeList.insertElementAt(vTree, index);\r
166     } //-- void addTree(int, jalview.binding.Tree) \r
167 \r
168     /**\r
169      * Method addUserColours\r
170      * \r
171      * \r
172      * \r
173      * @param vUserColours\r
174      */\r
175     public void addUserColours(jalview.binding.UserColours vUserColours)\r
176         throws java.lang.IndexOutOfBoundsException\r
177     {\r
178         _userColoursList.addElement(vUserColours);\r
179     } //-- void addUserColours(jalview.binding.UserColours) \r
180 \r
181     /**\r
182      * Method addUserColours\r
183      * \r
184      * \r
185      * \r
186      * @param index\r
187      * @param vUserColours\r
188      */\r
189     public void addUserColours(int index, jalview.binding.UserColours vUserColours)\r
190         throws java.lang.IndexOutOfBoundsException\r
191     {\r
192         _userColoursList.insertElementAt(vUserColours, index);\r
193     } //-- void addUserColours(int, jalview.binding.UserColours) \r
194 \r
195     /**\r
196      * Method addViewport\r
197      * \r
198      * \r
199      * \r
200      * @param vViewport\r
201      */\r
202     public void addViewport(jalview.binding.Viewport vViewport)\r
203         throws java.lang.IndexOutOfBoundsException\r
204     {\r
205         _viewportList.addElement(vViewport);\r
206     } //-- void addViewport(jalview.binding.Viewport) \r
207 \r
208     /**\r
209      * Method addViewport\r
210      * \r
211      * \r
212      * \r
213      * @param index\r
214      * @param vViewport\r
215      */\r
216     public void addViewport(int index, jalview.binding.Viewport vViewport)\r
217         throws java.lang.IndexOutOfBoundsException\r
218     {\r
219         _viewportList.insertElementAt(vViewport, index);\r
220     } //-- void addViewport(int, jalview.binding.Viewport) \r
221 \r
222     /**\r
223      * Method enumerateJGroup\r
224      * \r
225      * \r
226      * \r
227      * @return Enumeration\r
228      */\r
229     public java.util.Enumeration enumerateJGroup()\r
230     {\r
231         return _JGroupList.elements();\r
232     } //-- java.util.Enumeration enumerateJGroup() \r
233 \r
234     /**\r
235      * Method enumerateJSeq\r
236      * \r
237      * \r
238      * \r
239      * @return Enumeration\r
240      */\r
241     public java.util.Enumeration enumerateJSeq()\r
242     {\r
243         return _JSeqList.elements();\r
244     } //-- java.util.Enumeration enumerateJSeq() \r
245 \r
246     /**\r
247      * Method enumerateTree\r
248      * \r
249      * \r
250      * \r
251      * @return Enumeration\r
252      */\r
253     public java.util.Enumeration enumerateTree()\r
254     {\r
255         return _treeList.elements();\r
256     } //-- java.util.Enumeration enumerateTree() \r
257 \r
258     /**\r
259      * Method enumerateUserColours\r
260      * \r
261      * \r
262      * \r
263      * @return Enumeration\r
264      */\r
265     public java.util.Enumeration enumerateUserColours()\r
266     {\r
267         return _userColoursList.elements();\r
268     } //-- java.util.Enumeration enumerateUserColours() \r
269 \r
270     /**\r
271      * Method enumerateViewport\r
272      * \r
273      * \r
274      * \r
275      * @return Enumeration\r
276      */\r
277     public java.util.Enumeration enumerateViewport()\r
278     {\r
279         return _viewportList.elements();\r
280     } //-- java.util.Enumeration enumerateViewport() \r
281 \r
282     /**\r
283      * Returns the value of field 'featureSettings'.\r
284      * \r
285      * @return FeatureSettings\r
286      * @return the value of field 'featureSettings'.\r
287      */\r
288     public jalview.binding.FeatureSettings getFeatureSettings()\r
289     {\r
290         return this._featureSettings;\r
291     } //-- jalview.binding.FeatureSettings getFeatureSettings() \r
292 \r
293     /**\r
294      * Method getJGroup\r
295      * \r
296      * \r
297      * \r
298      * @param index\r
299      * @return JGroup\r
300      */\r
301     public jalview.binding.JGroup getJGroup(int index)\r
302         throws java.lang.IndexOutOfBoundsException\r
303     {\r
304         //-- check bounds for index\r
305         if ((index < 0) || (index > _JGroupList.size())) {\r
306             throw new IndexOutOfBoundsException();\r
307         }\r
308         \r
309         return (jalview.binding.JGroup) _JGroupList.elementAt(index);\r
310     } //-- jalview.binding.JGroup getJGroup(int) \r
311 \r
312     /**\r
313      * Method getJGroup\r
314      * \r
315      * \r
316      * \r
317      * @return JGroup\r
318      */\r
319     public jalview.binding.JGroup[] getJGroup()\r
320     {\r
321         int size = _JGroupList.size();\r
322         jalview.binding.JGroup[] mArray = new jalview.binding.JGroup[size];\r
323         for (int index = 0; index < size; index++) {\r
324             mArray[index] = (jalview.binding.JGroup) _JGroupList.elementAt(index);\r
325         }\r
326         return mArray;\r
327     } //-- jalview.binding.JGroup[] getJGroup() \r
328 \r
329     /**\r
330      * Method getJGroupCount\r
331      * \r
332      * \r
333      * \r
334      * @return int\r
335      */\r
336     public int getJGroupCount()\r
337     {\r
338         return _JGroupList.size();\r
339     } //-- int getJGroupCount() \r
340 \r
341     /**\r
342      * Method getJSeq\r
343      * \r
344      * \r
345      * \r
346      * @param index\r
347      * @return JSeq\r
348      */\r
349     public jalview.binding.JSeq getJSeq(int index)\r
350         throws java.lang.IndexOutOfBoundsException\r
351     {\r
352         //-- check bounds for index\r
353         if ((index < 0) || (index > _JSeqList.size())) {\r
354             throw new IndexOutOfBoundsException();\r
355         }\r
356         \r
357         return (jalview.binding.JSeq) _JSeqList.elementAt(index);\r
358     } //-- jalview.binding.JSeq getJSeq(int) \r
359 \r
360     /**\r
361      * Method getJSeq\r
362      * \r
363      * \r
364      * \r
365      * @return JSeq\r
366      */\r
367     public jalview.binding.JSeq[] getJSeq()\r
368     {\r
369         int size = _JSeqList.size();\r
370         jalview.binding.JSeq[] mArray = new jalview.binding.JSeq[size];\r
371         for (int index = 0; index < size; index++) {\r
372             mArray[index] = (jalview.binding.JSeq) _JSeqList.elementAt(index);\r
373         }\r
374         return mArray;\r
375     } //-- jalview.binding.JSeq[] getJSeq() \r
376 \r
377     /**\r
378      * Method getJSeqCount\r
379      * \r
380      * \r
381      * \r
382      * @return int\r
383      */\r
384     public int getJSeqCount()\r
385     {\r
386         return _JSeqList.size();\r
387     } //-- int getJSeqCount() \r
388 \r
389     /**\r
390      * Method getTree\r
391      * \r
392      * \r
393      * \r
394      * @param index\r
395      * @return Tree\r
396      */\r
397     public jalview.binding.Tree getTree(int index)\r
398         throws java.lang.IndexOutOfBoundsException\r
399     {\r
400         //-- check bounds for index\r
401         if ((index < 0) || (index > _treeList.size())) {\r
402             throw new IndexOutOfBoundsException();\r
403         }\r
404         \r
405         return (jalview.binding.Tree) _treeList.elementAt(index);\r
406     } //-- jalview.binding.Tree getTree(int) \r
407 \r
408     /**\r
409      * Method getTree\r
410      * \r
411      * \r
412      * \r
413      * @return Tree\r
414      */\r
415     public jalview.binding.Tree[] getTree()\r
416     {\r
417         int size = _treeList.size();\r
418         jalview.binding.Tree[] mArray = new jalview.binding.Tree[size];\r
419         for (int index = 0; index < size; index++) {\r
420             mArray[index] = (jalview.binding.Tree) _treeList.elementAt(index);\r
421         }\r
422         return mArray;\r
423     } //-- jalview.binding.Tree[] getTree() \r
424 \r
425     /**\r
426      * Method getTreeCount\r
427      * \r
428      * \r
429      * \r
430      * @return int\r
431      */\r
432     public int getTreeCount()\r
433     {\r
434         return _treeList.size();\r
435     } //-- int getTreeCount() \r
436 \r
437     /**\r
438      * Method getUserColours\r
439      * \r
440      * \r
441      * \r
442      * @param index\r
443      * @return UserColours\r
444      */\r
445     public jalview.binding.UserColours getUserColours(int index)\r
446         throws java.lang.IndexOutOfBoundsException\r
447     {\r
448         //-- check bounds for index\r
449         if ((index < 0) || (index > _userColoursList.size())) {\r
450             throw new IndexOutOfBoundsException();\r
451         }\r
452         \r
453         return (jalview.binding.UserColours) _userColoursList.elementAt(index);\r
454     } //-- jalview.binding.UserColours getUserColours(int) \r
455 \r
456     /**\r
457      * Method getUserColours\r
458      * \r
459      * \r
460      * \r
461      * @return UserColours\r
462      */\r
463     public jalview.binding.UserColours[] getUserColours()\r
464     {\r
465         int size = _userColoursList.size();\r
466         jalview.binding.UserColours[] mArray = new jalview.binding.UserColours[size];\r
467         for (int index = 0; index < size; index++) {\r
468             mArray[index] = (jalview.binding.UserColours) _userColoursList.elementAt(index);\r
469         }\r
470         return mArray;\r
471     } //-- jalview.binding.UserColours[] getUserColours() \r
472 \r
473     /**\r
474      * Method getUserColoursCount\r
475      * \r
476      * \r
477      * \r
478      * @return int\r
479      */\r
480     public int getUserColoursCount()\r
481     {\r
482         return _userColoursList.size();\r
483     } //-- int getUserColoursCount() \r
484 \r
485     /**\r
486      * Method getViewport\r
487      * \r
488      * \r
489      * \r
490      * @param index\r
491      * @return Viewport\r
492      */\r
493     public jalview.binding.Viewport getViewport(int index)\r
494         throws java.lang.IndexOutOfBoundsException\r
495     {\r
496         //-- check bounds for index\r
497         if ((index < 0) || (index > _viewportList.size())) {\r
498             throw new IndexOutOfBoundsException();\r
499         }\r
500         \r
501         return (jalview.binding.Viewport) _viewportList.elementAt(index);\r
502     } //-- jalview.binding.Viewport getViewport(int) \r
503 \r
504     /**\r
505      * Method getViewport\r
506      * \r
507      * \r
508      * \r
509      * @return Viewport\r
510      */\r
511     public jalview.binding.Viewport[] getViewport()\r
512     {\r
513         int size = _viewportList.size();\r
514         jalview.binding.Viewport[] mArray = new jalview.binding.Viewport[size];\r
515         for (int index = 0; index < size; index++) {\r
516             mArray[index] = (jalview.binding.Viewport) _viewportList.elementAt(index);\r
517         }\r
518         return mArray;\r
519     } //-- jalview.binding.Viewport[] getViewport() \r
520 \r
521     /**\r
522      * Method getViewportCount\r
523      * \r
524      * \r
525      * \r
526      * @return int\r
527      */\r
528     public int getViewportCount()\r
529     {\r
530         return _viewportList.size();\r
531     } //-- int getViewportCount() \r
532 \r
533     /**\r
534      * Method isValid\r
535      * \r
536      * \r
537      * \r
538      * @return boolean\r
539      */\r
540     public boolean isValid()\r
541     {\r
542         try {\r
543             validate();\r
544         }\r
545         catch (org.exolab.castor.xml.ValidationException vex) {\r
546             return false;\r
547         }\r
548         return true;\r
549     } //-- boolean isValid() \r
550 \r
551     /**\r
552      * Method marshal\r
553      * \r
554      * \r
555      * \r
556      * @param out\r
557      */\r
558     public void marshal(java.io.Writer out)\r
559         throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException\r
560     {\r
561         \r
562         Marshaller.marshal(this, out);\r
563     } //-- void marshal(java.io.Writer) \r
564 \r
565     /**\r
566      * Method marshal\r
567      * \r
568      * \r
569      * \r
570      * @param handler\r
571      */\r
572     public void marshal(org.xml.sax.ContentHandler handler)\r
573         throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException\r
574     {\r
575         \r
576         Marshaller.marshal(this, handler);\r
577     } //-- void marshal(org.xml.sax.ContentHandler) \r
578 \r
579     /**\r
580      * Method removeAllJGroup\r
581      * \r
582      */\r
583     public void removeAllJGroup()\r
584     {\r
585         _JGroupList.removeAllElements();\r
586     } //-- void removeAllJGroup() \r
587 \r
588     /**\r
589      * Method removeAllJSeq\r
590      * \r
591      */\r
592     public void removeAllJSeq()\r
593     {\r
594         _JSeqList.removeAllElements();\r
595     } //-- void removeAllJSeq() \r
596 \r
597     /**\r
598      * Method removeAllTree\r
599      * \r
600      */\r
601     public void removeAllTree()\r
602     {\r
603         _treeList.removeAllElements();\r
604     } //-- void removeAllTree() \r
605 \r
606     /**\r
607      * Method removeAllUserColours\r
608      * \r
609      */\r
610     public void removeAllUserColours()\r
611     {\r
612         _userColoursList.removeAllElements();\r
613     } //-- void removeAllUserColours() \r
614 \r
615     /**\r
616      * Method removeAllViewport\r
617      * \r
618      */\r
619     public void removeAllViewport()\r
620     {\r
621         _viewportList.removeAllElements();\r
622     } //-- void removeAllViewport() \r
623 \r
624     /**\r
625      * Method removeJGroup\r
626      * \r
627      * \r
628      * \r
629      * @param index\r
630      * @return JGroup\r
631      */\r
632     public jalview.binding.JGroup removeJGroup(int index)\r
633     {\r
634         java.lang.Object obj = _JGroupList.elementAt(index);\r
635         _JGroupList.removeElementAt(index);\r
636         return (jalview.binding.JGroup) obj;\r
637     } //-- jalview.binding.JGroup removeJGroup(int) \r
638 \r
639     /**\r
640      * Method removeJSeq\r
641      * \r
642      * \r
643      * \r
644      * @param index\r
645      * @return JSeq\r
646      */\r
647     public jalview.binding.JSeq removeJSeq(int index)\r
648     {\r
649         java.lang.Object obj = _JSeqList.elementAt(index);\r
650         _JSeqList.removeElementAt(index);\r
651         return (jalview.binding.JSeq) obj;\r
652     } //-- jalview.binding.JSeq removeJSeq(int) \r
653 \r
654     /**\r
655      * Method removeTree\r
656      * \r
657      * \r
658      * \r
659      * @param index\r
660      * @return Tree\r
661      */\r
662     public jalview.binding.Tree removeTree(int index)\r
663     {\r
664         java.lang.Object obj = _treeList.elementAt(index);\r
665         _treeList.removeElementAt(index);\r
666         return (jalview.binding.Tree) obj;\r
667     } //-- jalview.binding.Tree removeTree(int) \r
668 \r
669     /**\r
670      * Method removeUserColours\r
671      * \r
672      * \r
673      * \r
674      * @param index\r
675      * @return UserColours\r
676      */\r
677     public jalview.binding.UserColours removeUserColours(int index)\r
678     {\r
679         java.lang.Object obj = _userColoursList.elementAt(index);\r
680         _userColoursList.removeElementAt(index);\r
681         return (jalview.binding.UserColours) obj;\r
682     } //-- jalview.binding.UserColours removeUserColours(int) \r
683 \r
684     /**\r
685      * Method removeViewport\r
686      * \r
687      * \r
688      * \r
689      * @param index\r
690      * @return Viewport\r
691      */\r
692     public jalview.binding.Viewport removeViewport(int index)\r
693     {\r
694         java.lang.Object obj = _viewportList.elementAt(index);\r
695         _viewportList.removeElementAt(index);\r
696         return (jalview.binding.Viewport) obj;\r
697     } //-- jalview.binding.Viewport removeViewport(int) \r
698 \r
699     /**\r
700      * Sets the value of field 'featureSettings'.\r
701      * \r
702      * @param featureSettings the value of field 'featureSettings'.\r
703      */\r
704     public void setFeatureSettings(jalview.binding.FeatureSettings featureSettings)\r
705     {\r
706         this._featureSettings = featureSettings;\r
707     } //-- void setFeatureSettings(jalview.binding.FeatureSettings) \r
708 \r
709     /**\r
710      * Method setJGroup\r
711      * \r
712      * \r
713      * \r
714      * @param index\r
715      * @param vJGroup\r
716      */\r
717     public void setJGroup(int index, jalview.binding.JGroup vJGroup)\r
718         throws java.lang.IndexOutOfBoundsException\r
719     {\r
720         //-- check bounds for index\r
721         if ((index < 0) || (index > _JGroupList.size())) {\r
722             throw new IndexOutOfBoundsException();\r
723         }\r
724         _JGroupList.setElementAt(vJGroup, index);\r
725     } //-- void setJGroup(int, jalview.binding.JGroup) \r
726 \r
727     /**\r
728      * Method setJGroup\r
729      * \r
730      * \r
731      * \r
732      * @param JGroupArray\r
733      */\r
734     public void setJGroup(jalview.binding.JGroup[] JGroupArray)\r
735     {\r
736         //-- copy array\r
737         _JGroupList.removeAllElements();\r
738         for (int i = 0; i < JGroupArray.length; i++) {\r
739             _JGroupList.addElement(JGroupArray[i]);\r
740         }\r
741     } //-- void setJGroup(jalview.binding.JGroup) \r
742 \r
743     /**\r
744      * Method setJSeq\r
745      * \r
746      * \r
747      * \r
748      * @param index\r
749      * @param vJSeq\r
750      */\r
751     public void setJSeq(int index, jalview.binding.JSeq vJSeq)\r
752         throws java.lang.IndexOutOfBoundsException\r
753     {\r
754         //-- check bounds for index\r
755         if ((index < 0) || (index > _JSeqList.size())) {\r
756             throw new IndexOutOfBoundsException();\r
757         }\r
758         _JSeqList.setElementAt(vJSeq, index);\r
759     } //-- void setJSeq(int, jalview.binding.JSeq) \r
760 \r
761     /**\r
762      * Method setJSeq\r
763      * \r
764      * \r
765      * \r
766      * @param JSeqArray\r
767      */\r
768     public void setJSeq(jalview.binding.JSeq[] JSeqArray)\r
769     {\r
770         //-- copy array\r
771         _JSeqList.removeAllElements();\r
772         for (int i = 0; i < JSeqArray.length; i++) {\r
773             _JSeqList.addElement(JSeqArray[i]);\r
774         }\r
775     } //-- void setJSeq(jalview.binding.JSeq) \r
776 \r
777     /**\r
778      * Method setTree\r
779      * \r
780      * \r
781      * \r
782      * @param index\r
783      * @param vTree\r
784      */\r
785     public void setTree(int index, jalview.binding.Tree vTree)\r
786         throws java.lang.IndexOutOfBoundsException\r
787     {\r
788         //-- check bounds for index\r
789         if ((index < 0) || (index > _treeList.size())) {\r
790             throw new IndexOutOfBoundsException();\r
791         }\r
792         _treeList.setElementAt(vTree, index);\r
793     } //-- void setTree(int, jalview.binding.Tree) \r
794 \r
795     /**\r
796      * Method setTree\r
797      * \r
798      * \r
799      * \r
800      * @param treeArray\r
801      */\r
802     public void setTree(jalview.binding.Tree[] treeArray)\r
803     {\r
804         //-- copy array\r
805         _treeList.removeAllElements();\r
806         for (int i = 0; i < treeArray.length; i++) {\r
807             _treeList.addElement(treeArray[i]);\r
808         }\r
809     } //-- void setTree(jalview.binding.Tree) \r
810 \r
811     /**\r
812      * Method setUserColours\r
813      * \r
814      * \r
815      * \r
816      * @param index\r
817      * @param vUserColours\r
818      */\r
819     public void setUserColours(int index, jalview.binding.UserColours vUserColours)\r
820         throws java.lang.IndexOutOfBoundsException\r
821     {\r
822         //-- check bounds for index\r
823         if ((index < 0) || (index > _userColoursList.size())) {\r
824             throw new IndexOutOfBoundsException();\r
825         }\r
826         _userColoursList.setElementAt(vUserColours, index);\r
827     } //-- void setUserColours(int, jalview.binding.UserColours) \r
828 \r
829     /**\r
830      * Method setUserColours\r
831      * \r
832      * \r
833      * \r
834      * @param userColoursArray\r
835      */\r
836     public void setUserColours(jalview.binding.UserColours[] userColoursArray)\r
837     {\r
838         //-- copy array\r
839         _userColoursList.removeAllElements();\r
840         for (int i = 0; i < userColoursArray.length; i++) {\r
841             _userColoursList.addElement(userColoursArray[i]);\r
842         }\r
843     } //-- void setUserColours(jalview.binding.UserColours) \r
844 \r
845     /**\r
846      * Method setViewport\r
847      * \r
848      * \r
849      * \r
850      * @param index\r
851      * @param vViewport\r
852      */\r
853     public void setViewport(int index, jalview.binding.Viewport vViewport)\r
854         throws java.lang.IndexOutOfBoundsException\r
855     {\r
856         //-- check bounds for index\r
857         if ((index < 0) || (index > _viewportList.size())) {\r
858             throw new IndexOutOfBoundsException();\r
859         }\r
860         _viewportList.setElementAt(vViewport, index);\r
861     } //-- void setViewport(int, jalview.binding.Viewport) \r
862 \r
863     /**\r
864      * Method setViewport\r
865      * \r
866      * \r
867      * \r
868      * @param viewportArray\r
869      */\r
870     public void setViewport(jalview.binding.Viewport[] viewportArray)\r
871     {\r
872         //-- copy array\r
873         _viewportList.removeAllElements();\r
874         for (int i = 0; i < viewportArray.length; i++) {\r
875             _viewportList.addElement(viewportArray[i]);\r
876         }\r
877     } //-- void setViewport(jalview.binding.Viewport) \r
878 \r
879     /**\r
880      * Method unmarshal\r
881      * \r
882      * \r
883      * \r
884      * @param reader\r
885      * @return Object\r
886      */\r
887     public static java.lang.Object unmarshal(java.io.Reader reader)\r
888         throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException\r
889     {\r
890         return (jalview.binding.JalviewModelSequence) Unmarshaller.unmarshal(jalview.binding.JalviewModelSequence.class, reader);\r
891     } //-- java.lang.Object unmarshal(java.io.Reader) \r
892 \r
893     /**\r
894      * Method validate\r
895      * \r
896      */\r
897     public void validate()\r
898         throws org.exolab.castor.xml.ValidationException\r
899     {\r
900         org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();\r
901         validator.validate(this);\r
902     } //-- void validate() \r
903 \r
904 }\r