2 * This class was automatically generated with
\r
3 * <a href="http://www.castor.org">Castor 0.9.6</a>, using an XML
\r
8 package jalview.binding;
\r
10 //---------------------------------/
\r
11 //- Imported classes and packages -/
\r
12 //---------------------------------/
\r
17 * Class JalviewModelSequence2Item.
\r
19 * @version $Revision$ $Date$
\r
21 public class JalviewModelSequence2Item
\r
22 implements java.io.Serializable
\r
25 //--------------------------/
\r
26 //- Class/Member Variables -/
\r
27 //--------------------------/
\r
30 * Field _userColourSchemeList
\r
32 private java.util.Vector _userColourSchemeList;
\r
38 public JalviewModelSequence2Item()
\r
41 _userColourSchemeList = new Vector();
\r
42 } //-- jalview.binding.JalviewModelSequence2Item()
\r
49 * Method addUserColourScheme
\r
53 * @param vUserColourScheme
\r
55 public void addUserColourScheme(jalview.binding.UserColourScheme
\r
57 throws java.lang.IndexOutOfBoundsException
\r
59 _userColourSchemeList.addElement(vUserColourScheme);
\r
60 } //-- void addUserColourScheme(jalview.binding.UserColourScheme)
\r
63 * Method addUserColourScheme
\r
68 * @param vUserColourScheme
\r
70 public void addUserColourScheme(int index,
\r
71 jalview.binding.UserColourScheme
\r
73 throws java.lang.IndexOutOfBoundsException
\r
75 _userColourSchemeList.insertElementAt(vUserColourScheme, index);
\r
76 } //-- void addUserColourScheme(int, jalview.binding.UserColourScheme)
\r
79 * Method enumerateUserColourScheme
\r
83 * @return Enumeration
\r
85 public java.util.Enumeration enumerateUserColourScheme()
\r
87 return _userColourSchemeList.elements();
\r
88 } //-- java.util.Enumeration enumerateUserColourScheme()
\r
91 * Method getUserColourScheme
\r
96 * @return UserColourScheme
\r
98 public jalview.binding.UserColourScheme getUserColourScheme(int index)
\r
99 throws java.lang.IndexOutOfBoundsException
\r
101 //-- check bounds for index
\r
102 if ( (index < 0) || (index > _userColourSchemeList.size()))
\r
104 throw new IndexOutOfBoundsException();
\r
107 return (jalview.binding.UserColourScheme) _userColourSchemeList.elementAt(
\r
109 } //-- jalview.binding.UserColourScheme getUserColourScheme(int)
\r
112 * Method getUserColourScheme
\r
116 * @return UserColourScheme
\r
118 public jalview.binding.UserColourScheme[] getUserColourScheme()
\r
120 int size = _userColourSchemeList.size();
\r
121 jalview.binding.UserColourScheme[] mArray = new jalview.binding.
\r
122 UserColourScheme[size];
\r
123 for (int index = 0; index < size; index++)
\r
125 mArray[index] = (jalview.binding.UserColourScheme) _userColourSchemeList.
\r
129 } //-- jalview.binding.UserColourScheme[] getUserColourScheme()
\r
132 * Method getUserColourSchemeCount
\r
138 public int getUserColourSchemeCount()
\r
140 return _userColourSchemeList.size();
\r
141 } //-- int getUserColourSchemeCount()
\r
144 * Method removeAllUserColourScheme
\r
147 public void removeAllUserColourScheme()
\r
149 _userColourSchemeList.removeAllElements();
\r
150 } //-- void removeAllUserColourScheme()
\r
153 * Method removeUserColourScheme
\r
158 * @return UserColourScheme
\r
160 public jalview.binding.UserColourScheme removeUserColourScheme(int index)
\r
162 java.lang.Object obj = _userColourSchemeList.elementAt(index);
\r
163 _userColourSchemeList.removeElementAt(index);
\r
164 return (jalview.binding.UserColourScheme) obj;
\r
165 } //-- jalview.binding.UserColourScheme removeUserColourScheme(int)
\r
168 * Method setUserColourScheme
\r
173 * @param vUserColourScheme
\r
175 public void setUserColourScheme(int index,
\r
176 jalview.binding.UserColourScheme
\r
178 throws java.lang.IndexOutOfBoundsException
\r
180 //-- check bounds for index
\r
181 if ( (index < 0) || (index > _userColourSchemeList.size()))
\r
183 throw new IndexOutOfBoundsException();
\r
185 _userColourSchemeList.setElementAt(vUserColourScheme, index);
\r
186 } //-- void setUserColourScheme(int, jalview.binding.UserColourScheme)
\r
189 * Method setUserColourScheme
\r
193 * @param userColourSchemeArray
\r
195 public void setUserColourScheme(jalview.binding.UserColourScheme[]
\r
196 userColourSchemeArray)
\r
199 _userColourSchemeList.removeAllElements();
\r
200 for (int i = 0; i < userColourSchemeArray.length; i++)
\r
202 _userColourSchemeList.addElement(userColourSchemeArray[i]);
\r
204 } //-- void setUserColourScheme(jalview.binding.UserColourScheme)
\r