JAL-3054 table tooltip follow mouse in a sensible manner
[jalview.git] / src / jalview / schemabinding / version2 / descriptors / ThresholdLineDescriptor.java
1 /*
2  * This class was automatically generated with 
3  * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
4  * Schema.
5  * $Id$
6  */
7
8 package jalview.schemabinding.version2.descriptors;
9
10 //---------------------------------/
11 //- Imported classes and packages -/
12 //---------------------------------/
13
14 import jalview.schemabinding.version2.ThresholdLine;
15
16 /**
17  * Class ThresholdLineDescriptor.
18  * 
19  * @version $Revision$ $Date$
20  */
21 public class ThresholdLineDescriptor extends
22         org.exolab.castor.xml.util.XMLClassDescriptorImpl
23 {
24
25   // --------------------------/
26   // - Class/Member Variables -/
27   // --------------------------/
28
29   /**
30    * Field _elementDefinition.
31    */
32   private boolean _elementDefinition;
33
34   /**
35    * Field _nsPrefix.
36    */
37   private java.lang.String _nsPrefix;
38
39   /**
40    * Field _nsURI.
41    */
42   private java.lang.String _nsURI;
43
44   /**
45    * Field _xmlName.
46    */
47   private java.lang.String _xmlName;
48
49   // ----------------/
50   // - Constructors -/
51   // ----------------/
52
53   public ThresholdLineDescriptor()
54   {
55     super();
56     _nsURI = "www.vamsas.ac.uk/jalview/version2";
57     _xmlName = "thresholdLine";
58     _elementDefinition = true;
59     org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;
60     org.exolab.castor.mapping.FieldHandler handler = null;
61     org.exolab.castor.xml.FieldValidator fieldValidator = null;
62     // -- initialize attribute descriptors
63
64     // -- _label
65     desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
66             java.lang.String.class, "_label", "label",
67             org.exolab.castor.xml.NodeType.Attribute);
68     desc.setImmutable(true);
69     handler = new org.exolab.castor.xml.XMLFieldHandler()
70     {
71       public java.lang.Object getValue(java.lang.Object object)
72               throws IllegalStateException
73       {
74         ThresholdLine target = (ThresholdLine) object;
75         return target.getLabel();
76       }
77
78       public void setValue(java.lang.Object object, java.lang.Object value)
79               throws IllegalStateException, IllegalArgumentException
80       {
81         try
82         {
83           ThresholdLine target = (ThresholdLine) object;
84           target.setLabel((java.lang.String) value);
85         } catch (java.lang.Exception ex)
86         {
87           throw new IllegalStateException(ex.toString());
88         }
89       }
90
91       public java.lang.Object newInstance(java.lang.Object parent)
92       {
93         return null;
94       }
95     };
96     desc.setHandler(handler);
97     desc.setMultivalued(false);
98     addFieldDescriptor(desc);
99
100     // -- validation code for: _label
101     fieldValidator = new org.exolab.castor.xml.FieldValidator();
102     { // -- local scope
103       org.exolab.castor.xml.validators.StringValidator typeValidator;
104       typeValidator = new org.exolab.castor.xml.validators.StringValidator();
105       fieldValidator.setValidator(typeValidator);
106       typeValidator.setWhiteSpace("preserve");
107     }
108     desc.setValidator(fieldValidator);
109     // -- _value
110     desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
111             java.lang.Float.TYPE, "_value", "value",
112             org.exolab.castor.xml.NodeType.Attribute);
113     handler = new org.exolab.castor.xml.XMLFieldHandler()
114     {
115       public java.lang.Object getValue(java.lang.Object object)
116               throws IllegalStateException
117       {
118         ThresholdLine target = (ThresholdLine) object;
119         if (!target.hasValue())
120         {
121           return null;
122         }
123         return new java.lang.Float(target.getValue());
124       }
125
126       public void setValue(java.lang.Object object, java.lang.Object value)
127               throws IllegalStateException, IllegalArgumentException
128       {
129         try
130         {
131           ThresholdLine target = (ThresholdLine) object;
132           // if null, use delete method for optional primitives
133           if (value == null)
134           {
135             target.deleteValue();
136             return;
137           }
138           target.setValue(((java.lang.Float) value).floatValue());
139         } catch (java.lang.Exception ex)
140         {
141           throw new IllegalStateException(ex.toString());
142         }
143       }
144
145       public java.lang.Object newInstance(java.lang.Object parent)
146       {
147         return null;
148       }
149     };
150     desc.setHandler(handler);
151     desc.setMultivalued(false);
152     addFieldDescriptor(desc);
153
154     // -- validation code for: _value
155     fieldValidator = new org.exolab.castor.xml.FieldValidator();
156     { // -- local scope
157       org.exolab.castor.xml.validators.FloatValidator typeValidator;
158       typeValidator = new org.exolab.castor.xml.validators.FloatValidator();
159       fieldValidator.setValidator(typeValidator);
160       typeValidator.setMinInclusive((float) -3.4028235E38);
161       typeValidator.setMaxInclusive((float) 3.4028235E38);
162     }
163     desc.setValidator(fieldValidator);
164     // -- _colour
165     desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
166             java.lang.Integer.TYPE, "_colour", "colour",
167             org.exolab.castor.xml.NodeType.Attribute);
168     handler = new org.exolab.castor.xml.XMLFieldHandler()
169     {
170       public java.lang.Object getValue(java.lang.Object object)
171               throws IllegalStateException
172       {
173         ThresholdLine target = (ThresholdLine) object;
174         if (!target.hasColour())
175         {
176           return null;
177         }
178         return new java.lang.Integer(target.getColour());
179       }
180
181       public void setValue(java.lang.Object object, java.lang.Object value)
182               throws IllegalStateException, IllegalArgumentException
183       {
184         try
185         {
186           ThresholdLine target = (ThresholdLine) object;
187           // if null, use delete method for optional primitives
188           if (value == null)
189           {
190             target.deleteColour();
191             return;
192           }
193           target.setColour(((java.lang.Integer) value).intValue());
194         } catch (java.lang.Exception ex)
195         {
196           throw new IllegalStateException(ex.toString());
197         }
198       }
199
200       public java.lang.Object newInstance(java.lang.Object parent)
201       {
202         return null;
203       }
204     };
205     desc.setHandler(handler);
206     desc.setMultivalued(false);
207     addFieldDescriptor(desc);
208
209     // -- validation code for: _colour
210     fieldValidator = new org.exolab.castor.xml.FieldValidator();
211     { // -- local scope
212       org.exolab.castor.xml.validators.IntValidator typeValidator;
213       typeValidator = new org.exolab.castor.xml.validators.IntValidator();
214       fieldValidator.setValidator(typeValidator);
215       typeValidator.setMinInclusive(-2147483648);
216       typeValidator.setMaxInclusive(2147483647);
217     }
218     desc.setValidator(fieldValidator);
219     // -- initialize element descriptors
220
221   }
222
223   // -----------/
224   // - Methods -/
225   // -----------/
226
227   /**
228    * Method getAccessMode.
229    * 
230    * @return the access mode specified for this class.
231    */
232   public org.exolab.castor.mapping.AccessMode getAccessMode()
233   {
234     return null;
235   }
236
237   /**
238    * Method getIdentity.
239    * 
240    * @return the identity field, null if this class has no identity.
241    */
242   public org.exolab.castor.mapping.FieldDescriptor getIdentity()
243   {
244     return super.getIdentity();
245   }
246
247   /**
248    * Method getJavaClass.
249    * 
250    * @return the Java class represented by this descriptor.
251    */
252   public java.lang.Class getJavaClass()
253   {
254     return jalview.schemabinding.version2.ThresholdLine.class;
255   }
256
257   /**
258    * Method getNameSpacePrefix.
259    * 
260    * @return the namespace prefix to use when marshaling as XML.
261    */
262   public java.lang.String getNameSpacePrefix()
263   {
264     return _nsPrefix;
265   }
266
267   /**
268    * Method getNameSpaceURI.
269    * 
270    * @return the namespace URI used when marshaling and unmarshaling as XML.
271    */
272   public java.lang.String getNameSpaceURI()
273   {
274     return _nsURI;
275   }
276
277   /**
278    * Method getValidator.
279    * 
280    * @return a specific validator for the class described by this
281    *         ClassDescriptor.
282    */
283   public org.exolab.castor.xml.TypeValidator getValidator()
284   {
285     return this;
286   }
287
288   /**
289    * Method getXMLName.
290    * 
291    * @return the XML Name for the Class being described.
292    */
293   public java.lang.String getXMLName()
294   {
295     return _xmlName;
296   }
297
298   /**
299    * Method isElementDefinition.
300    * 
301    * @return true if XML schema definition of this Class is that of a global
302    *         element or element with anonymous type definition.
303    */
304   public boolean isElementDefinition()
305   {
306     return _elementDefinition;
307   }
308
309 }