001/* ----------------------------------------------------------------------------
002 * This file was automatically generated by SWIG (http://www.swig.org).
003 * Version 2.0.12
004 *
005 * Do not make changes to this file unless you know what you are doing--modify
006 * the SWIG interface file instead.
007 * ----------------------------------------------------------------------------- */
008
009package org.sbml.libsbml;
010
011/** 
012 * Represents a point where the coordinates can be made up of absolute
013 * as well as relative values (@see RelAbsVector)
014 @see RenderCurve or @see Polygon).
015 */
016
017public class RenderPoint extends SBase {
018   private long swigCPtr;
019
020   protected RenderPoint(long cPtr, boolean cMemoryOwn)
021   {
022     super(libsbmlJNI.RenderPoint_SWIGUpcast(cPtr), cMemoryOwn);
023     swigCPtr = cPtr;
024   }
025
026   protected static long getCPtr(RenderPoint obj)
027   {
028     return (obj == null) ? 0 : obj.swigCPtr;
029   }
030
031   protected static long getCPtrAndDisown (RenderPoint obj)
032   {
033     long ptr = 0;
034
035     if (obj != null)
036     {
037       ptr             = obj.swigCPtr;
038       obj.swigCMemOwn = false;
039     }
040
041     return ptr;
042   }
043
044  protected void finalize() {
045    delete();
046  }
047
048  public synchronized void delete() {
049    if (swigCPtr != 0) {
050      if (swigCMemOwn) {
051        swigCMemOwn = false;
052        libsbmlJNI.delete_RenderPoint(swigCPtr);
053      }
054      swigCPtr = 0;
055    }
056    super.delete();
057  }
058
059  
060/**
061   * Creates a new {@link RenderPoint} object with the given SBML level
062   * and SBML version.
063   <p>
064   * @param level SBML level of the new object
065   * @param level SBML version of the new object
066   */ public
067 RenderPoint(long level, long version, long pkgVersion) throws org.sbml.libsbml.SBMLConstructorException {
068    this(libsbmlJNI.new_RenderPoint__SWIG_0(level, version, pkgVersion), true);
069  }
070
071  
072/**
073   * Creates a new {@link RenderPoint} object with the given SBML level
074   * and SBML version.
075   <p>
076   * @param level SBML level of the new object
077   * @param level SBML version of the new object
078   */ public
079 RenderPoint(long level, long version) throws org.sbml.libsbml.SBMLConstructorException {
080    this(libsbmlJNI.new_RenderPoint__SWIG_1(level, version), true);
081  }
082
083  
084/**
085   * Creates a new {@link RenderPoint} object with the given SBML level
086   * and SBML version.
087   <p>
088   * @param level SBML level of the new object
089   * @param level SBML version of the new object
090   */ public
091 RenderPoint(long level) throws org.sbml.libsbml.SBMLConstructorException {
092    this(libsbmlJNI.new_RenderPoint__SWIG_2(level), true);
093  }
094
095  
096/**
097   * Creates a new {@link RenderPoint} object with the given SBML level
098   * and SBML version.
099   <p>
100   * @param level SBML level of the new object
101   * @param level SBML version of the new object
102   */ public
103 RenderPoint() throws org.sbml.libsbml.SBMLConstructorException {
104    this(libsbmlJNI.new_RenderPoint__SWIG_3(), true);
105  }
106
107  
108/**
109   * Creates a new {@link RenderPoint} object with the given {@link SBMLNamespaces}.
110   <p>
111   * @param sbmlns The SBML namespace for the object.
112   */ public
113 RenderPoint(RenderPkgNamespaces renderns) throws org.sbml.libsbml.SBMLConstructorException {
114    this(libsbmlJNI.new_RenderPoint__SWIG_4(RenderPkgNamespaces.getCPtr(renderns), renderns), true);
115  }
116
117  
118/**
119   * Copy constructor for {@link RenderPoint} objects.
120   */ public
121 RenderPoint(RenderPoint orig) throws org.sbml.libsbml.SBMLConstructorException {
122    this(libsbmlJNI.new_RenderPoint__SWIG_5(RenderPoint.getCPtr(orig), orig), true);
123  }
124
125  
126/**
127   * Creates a new point with the given ccordinates.
128   <p>
129   * @param x x coordinate of the {@link RenderPoint} object
130   * @param y y coordinate of the {@link RenderPoint} object
131   * @param z z coordinate of the {@link RenderPoint} object
132   * If the z value is omitted, it is set to 0.
133   */ public
134 RenderPoint(RenderPkgNamespaces renderns, RelAbsVector x, RelAbsVector y, RelAbsVector z) throws org.sbml.libsbml.SBMLConstructorException {
135    this(libsbmlJNI.new_RenderPoint__SWIG_6(RenderPkgNamespaces.getCPtr(renderns), renderns, RelAbsVector.getCPtr(x), x, RelAbsVector.getCPtr(y), y, RelAbsVector.getCPtr(z), z), true);
136  }
137
138  
139/**
140   * Creates a new point with the given ccordinates.
141   <p>
142   * @param x x coordinate of the {@link RenderPoint} object
143   * @param y y coordinate of the {@link RenderPoint} object
144   * @param z z coordinate of the {@link RenderPoint} object
145   * If the z value is omitted, it is set to 0.
146   */ public
147 RenderPoint(RenderPkgNamespaces renderns, RelAbsVector x, RelAbsVector y) throws org.sbml.libsbml.SBMLConstructorException {
148    this(libsbmlJNI.new_RenderPoint__SWIG_7(RenderPkgNamespaces.getCPtr(renderns), renderns, RelAbsVector.getCPtr(x), x, RelAbsVector.getCPtr(y), y), true);
149  }
150
151  
152/**
153   * Creates a new {@link RenderPoint} object from the given {@link XMLNode} object.
154   * The {@link XMLNode} object has to contain a valid XML representation of a 
155   * {@link RenderPoint} object as defined in the render extension specification.
156   * This method is normally called when render information is read from a file and 
157   * should normally not have to be called explicitely.
158   <p>
159   * @param node the {@link XMLNode} object reference that describes the {@link RenderPoint}
160   * object to be instantiated.
161   */ public
162 RenderPoint(XMLNode node, long l2version) throws org.sbml.libsbml.SBMLConstructorException {
163    this(libsbmlJNI.new_RenderPoint__SWIG_8(XMLNode.getCPtr(node), node, l2version), true);
164  }
165
166  
167/**
168   * Creates a new {@link RenderPoint} object from the given {@link XMLNode} object.
169   * The {@link XMLNode} object has to contain a valid XML representation of a 
170   * {@link RenderPoint} object as defined in the render extension specification.
171   * This method is normally called when render information is read from a file and 
172   * should normally not have to be called explicitely.
173   <p>
174   * @param node the {@link XMLNode} object reference that describes the {@link RenderPoint}
175   * object to be instantiated.
176   */ public
177 RenderPoint(XMLNode node) throws org.sbml.libsbml.SBMLConstructorException {
178    this(libsbmlJNI.new_RenderPoint__SWIG_9(XMLNode.getCPtr(node), node), true);
179  }
180
181  
182/**
183   * Returns the x coordinate of the {@link RenderPoint} as a const reference.
184   <p>
185   * @return const reference to x coordinate.
186   */ public
187 RelAbsVector x() {
188    return new RelAbsVector(libsbmlJNI.RenderPoint_x__SWIG_0(swigCPtr, this), false);
189  }
190
191  
192/**
193   * Returns the y coordinate of the {@link RenderPoint} as a const reference.
194   <p>
195   * @return const reference to y coordinate.
196   */ public
197 RelAbsVector y() {
198    return new RelAbsVector(libsbmlJNI.RenderPoint_y__SWIG_0(swigCPtr, this), false);
199  }
200
201  
202/**
203   * Returns the z coordinate of the {@link RenderPoint} as a const reference.
204   <p>
205   * @return const reference to z coordinate.
206   */ public
207 RelAbsVector z() {
208    return new RelAbsVector(libsbmlJNI.RenderPoint_z__SWIG_0(swigCPtr, this), false);
209  }
210
211  
212/**
213   * Sets the x ccordiante of the {@link RenderPoint} object.
214   <p>
215   * @param x x coordinate to be set.
216   */ public
217 void setX(RelAbsVector x) {
218    libsbmlJNI.RenderPoint_setX(swigCPtr, this, RelAbsVector.getCPtr(x), x);
219  }
220
221  
222/**
223   * Sets the y ccordiante of the {@link RenderPoint} object.
224   <p>
225   * @param y y coordinate to be set.
226   */ public
227 void setY(RelAbsVector y) {
228    libsbmlJNI.RenderPoint_setY(swigCPtr, this, RelAbsVector.getCPtr(y), y);
229  }
230
231  
232/**
233   * Sets the z ccordiante of the {@link RenderPoint} object.
234   <p>
235   * @param z z coordinate to be set.
236   */ public
237 void setZ(RelAbsVector z) {
238    libsbmlJNI.RenderPoint_setZ(swigCPtr, this, RelAbsVector.getCPtr(z), z);
239  }
240
241  
242/**
243   * Sets the coordinates of the {@link RenderPoint} to the given values.
244   <p>
245   * @param x x coordinate to be set.
246   * @param y y coordinate to be set.
247   * @param z z coordinate to be set. If the z coordinate is omitted, it is set to 0.
248   */ public
249 void setCoordinates(RelAbsVector x, RelAbsVector y, RelAbsVector z) {
250    libsbmlJNI.RenderPoint_setCoordinates__SWIG_0(swigCPtr, this, RelAbsVector.getCPtr(x), x, RelAbsVector.getCPtr(y), y, RelAbsVector.getCPtr(z), z);
251  }
252
253  
254/**
255   * Sets the coordinates of the {@link RenderPoint} to the given values.
256   <p>
257   * @param x x coordinate to be set.
258   * @param y y coordinate to be set.
259   * @param z z coordinate to be set. If the z coordinate is omitted, it is set to 0.
260   */ public
261 void setCoordinates(RelAbsVector x, RelAbsVector y) {
262    libsbmlJNI.RenderPoint_setCoordinates__SWIG_1(swigCPtr, this, RelAbsVector.getCPtr(x), x, RelAbsVector.getCPtr(y), y);
263  }
264
265  
266/**
267   * Sets the coordinates of the {@link RenderPoint} to the given values.
268   * This method is deprecated, please use setCoordinates. 
269   <p>
270   * @param x x coordinate to be set.
271   * @param y y coordinate to be set.
272   * @param z z coordinate to be set. If the z coordinate is omitted, it is set to 0.
273   */ public
274 void setOffsets(RelAbsVector x, RelAbsVector y, RelAbsVector z) {
275    libsbmlJNI.RenderPoint_setOffsets__SWIG_0(swigCPtr, this, RelAbsVector.getCPtr(x), x, RelAbsVector.getCPtr(y), y, RelAbsVector.getCPtr(z), z);
276  }
277
278  
279/**
280   * Sets the coordinates of the {@link RenderPoint} to the given values.
281   * This method is deprecated, please use setCoordinates. 
282   <p>
283   * @param x x coordinate to be set.
284   * @param y y coordinate to be set.
285   * @param z z coordinate to be set. If the z coordinate is omitted, it is set to 0.
286   */ public
287 void setOffsets(RelAbsVector x, RelAbsVector y) {
288    libsbmlJNI.RenderPoint_setOffsets__SWIG_1(swigCPtr, this, RelAbsVector.getCPtr(x), x, RelAbsVector.getCPtr(y), y);
289  }
290
291  
292/**
293   * Sets the Z offset to 0.0.
294   */ public
295 void initDefaults() {
296    libsbmlJNI.RenderPoint_initDefaults(swigCPtr, this);
297  }
298
299  
300/**
301   * Sets the element name which is returned by getElementName.
302   * {@link RenderPoint} objects can have different element names depending on context.
303   <p>
304   * @param name the string with the element name to be set.
305   */ public
306 void setElementName(String name) {
307    libsbmlJNI.RenderPoint_setElementName(swigCPtr, this, name);
308  }
309
310  
311/**
312   * Returns the XML element name of this object, which for
313   * {@link RenderPoint}, depends on the context.
314   * The name that is returned has to be set with 
315   * setElementName.
316   <p>
317   * @return the name of this element  (@see setElementName)
318   */ public
319 String getElementName() {
320    return libsbmlJNI.RenderPoint_getElementName(swigCPtr, this);
321  }
322
323  
324/**
325   * Creates and returns a deep copy of this {@link RenderPoint} object.
326   <p>
327   * @return a (deep) copy of this {@link RenderPoint} object
328   */ public
329 RenderPoint cloneObject() {
330  return (RenderPoint) libsbml.DowncastSBase(libsbmlJNI.RenderPoint_cloneObject(swigCPtr, this), true);
331}
332
333  
334/**
335   * Returns the libSBML type code for this SBML object.
336   <p>
337   * LibSBML attaches an
338   * identifying code to every kind of SBML object.  These are known as
339   * <em>SBML type codes</em>.  In other languages, the set of type codes
340   * is stored in an enumeration; in the Java language interface for
341   * libSBML, the type codes are defined as static integer constants in
342   * interface class {@link libsbmlConstants}.  The names of the type codes
343   * all begin with the characters <code>SBML_.</code> 
344   <p>
345   * @return the SBML type code for this object, or <code>SBML_UNKNOWN</code> (default).
346   <p>
347   * @see #getElementName()
348   */ public
349 int getTypeCode() {
350    return libsbmlJNI.RenderPoint_getTypeCode(swigCPtr, this);
351  }
352
353  
354/**
355   * Creates an {@link XMLNode} object from this {@link ColorDefinition} object.
356   <p>
357   * @return the {@link XMLNode} with the XML representation for the 
358   * {@link ColorDefinition} object.
359   */ public
360 XMLNode toXML(String name) {
361    return new XMLNode(libsbmlJNI.RenderPoint_toXML(swigCPtr, this, name), true);
362  }
363
364  
365/** * @internal */ public
366 boolean hasRequiredAttributes() {
367    return libsbmlJNI.RenderPoint_hasRequiredAttributes(swigCPtr, this);
368  }
369
370  
371/** * @internal */ public
372 boolean hasRequiredElements() {
373    return libsbmlJNI.RenderPoint_hasRequiredElements(swigCPtr, this);
374  }
375
376}