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