001/* ----------------------------------------------------------------------------
002 * This file was automatically generated by SWIG (http://www.swig.org).
003 * Version 2.0.11
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
011public class TextGlyph extends GraphicalObject {
012   private long swigCPtr;
013
014   protected TextGlyph(long cPtr, boolean cMemoryOwn)
015   {
016     super(libsbmlJNI.TextGlyph_SWIGUpcast(cPtr), cMemoryOwn);
017     swigCPtr = cPtr;
018   }
019
020   protected static long getCPtr(TextGlyph obj)
021   {
022     return (obj == null) ? 0 : obj.swigCPtr;
023   }
024
025   protected static long getCPtrAndDisown (TextGlyph obj)
026   {
027     long ptr = 0;
028
029     if (obj != null)
030     {
031       ptr             = obj.swigCPtr;
032       obj.swigCMemOwn = false;
033     }
034
035     return ptr;
036   }
037
038  protected void finalize() {
039    delete();
040  }
041
042  public synchronized void delete() {
043    if (swigCPtr != 0) {
044      if (swigCMemOwn) {
045        swigCMemOwn = false;
046        libsbmlJNI.delete_TextGlyph(swigCPtr);
047      }
048      swigCPtr = 0;
049    }
050    super.delete();
051  }
052
053  public TextGlyph(long level, long version, long pkgVersion) throws org.sbml.libsbml.SBMLConstructorException {
054    this(libsbmlJNI.new_TextGlyph__SWIG_0(level, version, pkgVersion), true);
055  }
056
057  public TextGlyph(long level, long version) throws org.sbml.libsbml.SBMLConstructorException {
058    this(libsbmlJNI.new_TextGlyph__SWIG_1(level, version), true);
059  }
060
061  public TextGlyph(long level) throws org.sbml.libsbml.SBMLConstructorException {
062    this(libsbmlJNI.new_TextGlyph__SWIG_2(level), true);
063  }
064
065  public TextGlyph() throws org.sbml.libsbml.SBMLConstructorException {
066    this(libsbmlJNI.new_TextGlyph__SWIG_3(), true);
067  }
068
069  public TextGlyph(LayoutPkgNamespaces layoutns) throws org.sbml.libsbml.SBMLConstructorException {
070    this(libsbmlJNI.new_TextGlyph__SWIG_4(LayoutPkgNamespaces.getCPtr(layoutns), layoutns), true);
071  }
072
073  public TextGlyph(LayoutPkgNamespaces layoutns, String id) throws org.sbml.libsbml.SBMLConstructorException {
074    this(libsbmlJNI.new_TextGlyph__SWIG_5(LayoutPkgNamespaces.getCPtr(layoutns), layoutns, id), true);
075  }
076
077  public TextGlyph(LayoutPkgNamespaces layoutns, String id, String text) throws org.sbml.libsbml.SBMLConstructorException {
078    this(libsbmlJNI.new_TextGlyph__SWIG_6(LayoutPkgNamespaces.getCPtr(layoutns), layoutns, id, text), true);
079  }
080
081  public TextGlyph(XMLNode node, long l2version) throws org.sbml.libsbml.SBMLConstructorException {
082    this(libsbmlJNI.new_TextGlyph__SWIG_7(XMLNode.getCPtr(node), node, l2version), true);
083  }
084
085  public TextGlyph(XMLNode node) throws org.sbml.libsbml.SBMLConstructorException {
086    this(libsbmlJNI.new_TextGlyph__SWIG_8(XMLNode.getCPtr(node), node), true);
087  }
088
089  public TextGlyph(TextGlyph source) throws org.sbml.libsbml.SBMLConstructorException {
090    this(libsbmlJNI.new_TextGlyph__SWIG_9(TextGlyph.getCPtr(source), source), true);
091  }
092
093  public String getText() {
094    return libsbmlJNI.TextGlyph_getText(swigCPtr, this);
095  }
096
097  public void setText(String text) {
098    libsbmlJNI.TextGlyph_setText(swigCPtr, this, text);
099  }
100
101  public String getGraphicalObjectId() {
102    return libsbmlJNI.TextGlyph_getGraphicalObjectId(swigCPtr, this);
103  }
104
105  public int setGraphicalObjectId(String id) {
106    return libsbmlJNI.TextGlyph_setGraphicalObjectId(swigCPtr, this, id);
107  }
108
109  public String getOriginOfTextId() {
110    return libsbmlJNI.TextGlyph_getOriginOfTextId(swigCPtr, this);
111  }
112
113  public int setOriginOfTextId(String orig) {
114    return libsbmlJNI.TextGlyph_setOriginOfTextId(swigCPtr, this, orig);
115  }
116
117  public boolean isSetText() {
118    return libsbmlJNI.TextGlyph_isSetText(swigCPtr, this);
119  }
120
121  public boolean isSetOriginOfTextId() {
122    return libsbmlJNI.TextGlyph_isSetOriginOfTextId(swigCPtr, this);
123  }
124
125  public boolean isSetGraphicalObjectId() {
126    return libsbmlJNI.TextGlyph_isSetGraphicalObjectId(swigCPtr, this);
127  }
128
129  public void initDefaults() {
130    libsbmlJNI.TextGlyph_initDefaults(swigCPtr, this);
131  }
132
133  
134/**
135   * Returns the XML element name of this object.
136   * <p>
137   * This is overridden by subclasses to return a string appropriate to the
138   * SBML component.  For example, {@link Model} defines it as returning 
139   * <code>'model'</code>, {@link CompartmentType} defines it as returning <code>'compartmentType'</code>,
140   * and so on.
141   */ public
142 String getElementName() {
143    return libsbmlJNI.TextGlyph_getElementName(swigCPtr, this);
144  }
145
146  
147/**
148   * Creates and returns a deep copy of this {@link SBase} object.
149   * <p>
150   * @return a (deep) copy of this {@link SBase} object.
151   */ public
152 TextGlyph cloneObject() {
153    long cPtr = libsbmlJNI.TextGlyph_cloneObject(swigCPtr, this);
154    return (cPtr == 0) ? null : new TextGlyph(cPtr, true);
155  }
156
157  
158/**
159   * Returns the libSBML type code for this object.
160   * <p>
161   * This method may return the type code of this SBML object, or it may
162   * return {@link  libsbmlConstants#SBML_UNKNOWN SBML_UNKNOWN}.  This
163   * is because subclasses of {@link SBase} are not required to implement this
164   * method to return a type code.  This method is meant primarily for the
165   * LibSBML C interface, in which class and subclass information is not
166   * readily available.
167   * <p>
168   * @return the SBML object type code
169   * of this SBML object or
170   * {@link  libsbmlConstants#SBML_UNKNOWN SBML_UNKNOWN} (the default).
171   * <p>
172   * @see #getElementName()
173   * @see #getPackageName()
174   */ public
175 int getTypeCode() {
176    return libsbmlJNI.TextGlyph_getTypeCode(swigCPtr, this);
177  }
178
179  public XMLNode toXML() {
180    return new XMLNode(libsbmlJNI.TextGlyph_toXML(swigCPtr, this), true);
181  }
182
183}