001/* ----------------------------------------------------------------------------
002 * This file was automatically generated by SWIG (http://www.swig.org).
003 * Version 3.0.8
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 * <span class="pkg-marker pkg-color-layout"><a href="group__layout.html">layout</a></span>
013
014 The layout of a diagram of an SBML model.
015 <p>
016 * The {@link Layout} class stores layout information for some or all elements of the
017 * SBML model as well as additional objects that need not be connected to the
018 * model. The {@link Layout} has two attributes: id and name. Additionally, a
019 * {@link Dimensions} element specifies the size of the layout.  The actual layout
020 * elements are contained in several lists, namely: a
021 * {@link ListOfCompartmentGlyphs}, a {@link ListOfSpeciesGlyphs}, a {@link ListOfReactionGlyphs}, a
022 * {@link ListOfTextGlyphs}, and a ListOfAdditionalGraphicalObjects. Each of these
023 * lists can only occur once, and, if present, are not allowed to be empty.
024 */
025
026public class Layout extends SBase {
027   private long swigCPtr;
028
029   protected Layout(long cPtr, boolean cMemoryOwn)
030   {
031     super(libsbmlJNI.Layout_SWIGUpcast(cPtr), cMemoryOwn);
032     swigCPtr = cPtr;
033   }
034
035   protected static long getCPtr(Layout obj)
036   {
037     return (obj == null) ? 0 : obj.swigCPtr;
038   }
039
040   protected static long getCPtrAndDisown (Layout obj)
041   {
042     long ptr = 0;
043
044     if (obj != null)
045     {
046       ptr             = obj.swigCPtr;
047       obj.swigCMemOwn = false;
048     }
049
050     return ptr;
051   }
052
053  protected void finalize() {
054    delete();
055  }
056
057  public synchronized void delete() {
058    if (swigCPtr != 0) {
059      if (swigCMemOwn) {
060        swigCMemOwn = false;
061        libsbmlJNI.delete_Layout(swigCPtr);
062      }
063      swigCPtr = 0;
064    }
065    super.delete();
066  }
067
068  
069/**
070   * Creates a new {@link Layout} with the given level, version, and package version.
071   */ public
072 Layout(long level, long version, long pkgVersion) throws org.sbml.libsbml.SBMLConstructorException {
073    this(libsbmlJNI.new_Layout__SWIG_0(level, version, pkgVersion), true);
074  }
075
076  
077/**
078   * Creates a new {@link Layout} with the given level, version, and package version.
079   */ public
080 Layout(long level, long version) throws org.sbml.libsbml.SBMLConstructorException {
081    this(libsbmlJNI.new_Layout__SWIG_1(level, version), true);
082  }
083
084  
085/**
086   * Creates a new {@link Layout} with the given level, version, and package version.
087   */ public
088 Layout(long level) throws org.sbml.libsbml.SBMLConstructorException {
089    this(libsbmlJNI.new_Layout__SWIG_2(level), true);
090  }
091
092  
093/**
094   * Creates a new {@link Layout} with the given level, version, and package version.
095   */ public
096 Layout() throws org.sbml.libsbml.SBMLConstructorException {
097    this(libsbmlJNI.new_Layout__SWIG_3(), true);
098  }
099
100  
101/**
102   * Creates a new {@link Layout} with the given {@link LayoutPkgNamespaces} object.
103   */ public
104 Layout(LayoutPkgNamespaces layoutns) throws org.sbml.libsbml.SBMLConstructorException {
105    this(libsbmlJNI.new_Layout__SWIG_4(LayoutPkgNamespaces.getCPtr(layoutns), layoutns), true);
106  }
107
108  
109/**
110   * Creates a new {@link Layout} with the given <code>id</code> and dimensions.
111   <p>
112   * (FOR BACKWARD COMPATIBILITY)
113   */ public
114 Layout(LayoutPkgNamespaces layoutns, String id, Dimensions dimensions) throws org.sbml.libsbml.SBMLConstructorException {
115    this(libsbmlJNI.new_Layout__SWIG_5(LayoutPkgNamespaces.getCPtr(layoutns), layoutns, id, Dimensions.getCPtr(dimensions), dimensions), true);
116  }
117
118  
119/**
120   * Creates a new {@link Layout} from the given {@link XMLNode}
121   * (only for SBML Level2)
122   <p>
123   * (FOR BACKWARD COMPATIBILITY)
124   */ public
125 Layout(XMLNode node, long l2version) throws org.sbml.libsbml.SBMLConstructorException {
126    this(libsbmlJNI.new_Layout__SWIG_6(XMLNode.getCPtr(node), node, l2version), true);
127  }
128
129  
130/**
131   * Creates a new {@link Layout} from the given {@link XMLNode}
132   * (only for SBML Level2)
133   <p>
134   * (FOR BACKWARD COMPATIBILITY)
135   */ public
136 Layout(XMLNode node) throws org.sbml.libsbml.SBMLConstructorException {
137    this(libsbmlJNI.new_Layout__SWIG_7(XMLNode.getCPtr(node), node), true);
138  }
139
140  
141/**
142   * Copy constructor.
143   */ public
144 Layout(Layout source) throws org.sbml.libsbml.SBMLConstructorException {
145    this(libsbmlJNI.new_Layout__SWIG_8(Layout.getCPtr(source), source), true);
146  }
147
148  
149/**
150   * Does nothing since no defaults are defined for {@link Layout}.
151   */ public
152 void initDefaults() {
153    libsbmlJNI.Layout_initDefaults(swigCPtr, this);
154  }
155
156  
157/**
158   * Returns the value of the 'id' attribute of this {@link Layout}.
159   */ public
160 String getId() {
161    return libsbmlJNI.Layout_getId(swigCPtr, this);
162  }
163
164  
165/**
166   * Predicate returning <code>true</code> or <code>false</code> depending on whether this
167   * {@link Layout}'s 'id' attribute has been set.
168   */ public
169 boolean isSetId() {
170    return libsbmlJNI.Layout_isSetId(swigCPtr, this);
171  }
172
173  
174/**
175   * Sets the value of the 'id' attribute of this {@link Layout}.
176   */ public
177 int setId(String id) {
178    return libsbmlJNI.Layout_setId(swigCPtr, this, id);
179  }
180
181  
182/**
183   * Unsets the value of the 'id' attribute of this {@link Layout}.
184   */ public
185 int unsetId() {
186    return libsbmlJNI.Layout_unsetId(swigCPtr, this);
187  }
188
189  
190/**
191   * Returns the value of the 'name' attribute of this {@link Layout}.
192   */ public
193 String getName() {
194    return libsbmlJNI.Layout_getName(swigCPtr, this);
195  }
196
197  
198/**
199   * Predicate returning <code>true</code> or <code>false</code> depending on whether this
200   * {@link Layout}'s 'name' attribute has been set.
201   */ public
202 boolean isSetName() {
203    return libsbmlJNI.Layout_isSetName(swigCPtr, this);
204  }
205
206  
207/**
208   * Sets the value of the 'name' attribute of this {@link Layout}.
209   */ public
210 int setName(String name) {
211    return libsbmlJNI.Layout_setName(swigCPtr, this, name);
212  }
213
214  
215/**
216   * Unsets the value of the 'name' attribute of this {@link Layout}.
217   */ public
218 int unsetName() {
219    return libsbmlJNI.Layout_unsetName(swigCPtr, this);
220  }
221
222  
223/**
224   * Returns the dimensions of the layout.
225   */ public
226 Dimensions getDimensions() {
227    long cPtr = libsbmlJNI.Layout_getDimensions(swigCPtr, this);
228    return (cPtr == 0) ? null : new Dimensions(cPtr, false);
229  }
230
231  
232/**
233   * Sets the dimensions of the layout.
234   */ public
235 void setDimensions(Dimensions dimensions) {
236    libsbmlJNI.Layout_setDimensions(swigCPtr, this, Dimensions.getCPtr(dimensions), dimensions);
237  }
238
239  
240/**
241   * Predicate returning true if the dimensions has been set
242   */ public
243 boolean getDimensionsExplicitlySet() {
244    return libsbmlJNI.Layout_getDimensionsExplicitlySet(swigCPtr, this);
245  }
246
247  
248/**
249   * Returns the {@link ListOf} object that holds all compartment glyphs.
250   */ public
251 ListOfCompartmentGlyphs getListOfCompartmentGlyphs() {
252    long cPtr = libsbmlJNI.Layout_getListOfCompartmentGlyphs(swigCPtr, this);
253    return (cPtr == 0) ? null : new ListOfCompartmentGlyphs(cPtr, false);
254  }
255
256  
257/**
258   * Returns the {@link ListOf} object that holds all species glyphs.
259   */ public
260 ListOfSpeciesGlyphs getListOfSpeciesGlyphs() {
261    long cPtr = libsbmlJNI.Layout_getListOfSpeciesGlyphs(swigCPtr, this);
262    return (cPtr == 0) ? null : new ListOfSpeciesGlyphs(cPtr, false);
263  }
264
265  
266/**
267   * Returns the {@link ListOf} object that holds all reaction glyphs.
268   */ public
269 ListOfReactionGlyphs getListOfReactionGlyphs() {
270    long cPtr = libsbmlJNI.Layout_getListOfReactionGlyphs(swigCPtr, this);
271    return (cPtr == 0) ? null : new ListOfReactionGlyphs(cPtr, false);
272  }
273
274  
275/**
276   * Returns the {@link ListOf} object that holds all text glyphs.
277   */ public
278 ListOfTextGlyphs getListOfTextGlyphs() {
279    long cPtr = libsbmlJNI.Layout_getListOfTextGlyphs(swigCPtr, this);
280    return (cPtr == 0) ? null : new ListOfTextGlyphs(cPtr, false);
281  }
282
283  
284/**
285   * Returns the {@link ListOf} object that holds all additional graphical objects.
286   */ public
287 ListOfGraphicalObjects getListOfAdditionalGraphicalObjects() {
288    long cPtr = libsbmlJNI.Layout_getListOfAdditionalGraphicalObjects(swigCPtr, this);
289    return (cPtr == 0) ? null : new ListOfGraphicalObjects(cPtr, false);
290  }
291
292  
293/**
294   * Returns the compartment glyph with the given index.
295   * If the index is invalid, <code>null</code> is returned.
296   */ public
297 CompartmentGlyph getCompartmentGlyph(long index) {
298    long cPtr = libsbmlJNI.Layout_getCompartmentGlyph__SWIG_0(swigCPtr, this, index);
299    return (cPtr == 0) ? null : new CompartmentGlyph(cPtr, false);
300  }
301
302  
303/**
304   * Returns the species glyph with the given index.
305   * If the index is invalid, <code>null</code> is returned.
306   */ public
307 SpeciesGlyph getSpeciesGlyph(long index) {
308    long cPtr = libsbmlJNI.Layout_getSpeciesGlyph__SWIG_0(swigCPtr, this, index);
309    return (cPtr == 0) ? null : new SpeciesGlyph(cPtr, false);
310  }
311
312  
313/**
314   * Returns the reaction glyph with the given index.
315   * If the index is invalid, <code>null</code> is returned.
316   */ public
317 ReactionGlyph getReactionGlyph(long index) {
318    long cPtr = libsbmlJNI.Layout_getReactionGlyph__SWIG_0(swigCPtr, this, index);
319    return (cPtr == 0) ? null : new ReactionGlyph(cPtr, false);
320  }
321
322  
323/**
324   * Returns the text glyph with the given index.
325   * If the index is invalid, <code>null</code> is returned.
326   */ public
327 TextGlyph getTextGlyph(long index) {
328    long cPtr = libsbmlJNI.Layout_getTextGlyph__SWIG_0(swigCPtr, this, index);
329    return (cPtr == 0) ? null : new TextGlyph(cPtr, false);
330  }
331
332  
333/**
334   * Returns the additional graphical object with the given index.
335   * If the index is invalid, <code>null</code> is returned.
336   */ public
337 GraphicalObject getAdditionalGraphicalObject(long index) {
338    return (GraphicalObject) libsbml.DowncastSBase(libsbmlJNI.Layout_getAdditionalGraphicalObject__SWIG_0(swigCPtr, this, index), false);
339}
340
341  
342/**
343   * Returns the general glyph with the given index.
344   * If the index is invalid, <code>null</code> is returned.
345   */ public
346 GeneralGlyph getGeneralGlyph(long index) {
347    long cPtr = libsbmlJNI.Layout_getGeneralGlyph__SWIG_0(swigCPtr, this, index);
348    return (cPtr == 0) ? null : new GeneralGlyph(cPtr, false);
349  }
350
351  
352/**
353   * Returns the compartment glyph that has the given <code>id</code>, or <code>null</code> if no
354   * compartment glyph has the id.
355   */ public
356 CompartmentGlyph getCompartmentGlyph(String id) {
357    long cPtr = libsbmlJNI.Layout_getCompartmentGlyph__SWIG_2(swigCPtr, this, id);
358    return (cPtr == 0) ? null : new CompartmentGlyph(cPtr, false);
359  }
360
361  
362/**
363   * Returns the species glyph that has the given <code>id</code>, or <code>null</code> if no species
364   * glyph has the id.
365   */ public
366 SpeciesGlyph getSpeciesGlyph(String id) {
367    long cPtr = libsbmlJNI.Layout_getSpeciesGlyph__SWIG_2(swigCPtr, this, id);
368    return (cPtr == 0) ? null : new SpeciesGlyph(cPtr, false);
369  }
370
371  
372/**
373   * Returns the reaction glyph that has the given <code>id</code>, or <code>null</code> if no
374   * reaction glyph has the id.
375   */ public
376 ReactionGlyph getReactionGlyph(String id) {
377    long cPtr = libsbmlJNI.Layout_getReactionGlyph__SWIG_2(swigCPtr, this, id);
378    return (cPtr == 0) ? null : new ReactionGlyph(cPtr, false);
379  }
380
381  
382/**
383   * Returns the text glyph that has the given <code>id</code>, or <code>null</code> if no text glyph
384   * has the id.
385   */ public
386 TextGlyph getTextGlyph(String id) {
387    long cPtr = libsbmlJNI.Layout_getTextGlyph__SWIG_2(swigCPtr, this, id);
388    return (cPtr == 0) ? null : new TextGlyph(cPtr, false);
389  }
390
391  
392/**
393   * Returns the additional graphical object that has the given <code>id</code>, or <code>null</code>
394   * if no graphical object has the id.
395   */ public
396 GraphicalObject getAdditionalGraphicalObject(String id) {
397    return (GraphicalObject) libsbml.DowncastSBase(libsbmlJNI.Layout_getAdditionalGraphicalObject__SWIG_2(swigCPtr, this, id), false);
398}
399
400  
401/**
402   * Returns the general glyph that has the given <code>id</code>, or <code>null</code>
403   * if no graphical object has the id.
404   */ public
405 GeneralGlyph getGeneralGlyph(String id) {
406    long cPtr = libsbmlJNI.Layout_getGeneralGlyph__SWIG_2(swigCPtr, this, id);
407    return (cPtr == 0) ? null : new GeneralGlyph(cPtr, false);
408  }
409
410  
411/**
412   * Adds a new compartment glyph.
413   */ public
414 void addCompartmentGlyph(CompartmentGlyph glyph) {
415    libsbmlJNI.Layout_addCompartmentGlyph(swigCPtr, this, CompartmentGlyph.getCPtr(glyph), glyph);
416  }
417
418  
419/**
420   * Adds a new species glyph.
421   */ public
422 void addSpeciesGlyph(SpeciesGlyph glyph) {
423    libsbmlJNI.Layout_addSpeciesGlyph(swigCPtr, this, SpeciesGlyph.getCPtr(glyph), glyph);
424  }
425
426  
427/**
428   * Adds a new reaction glyph.
429   */ public
430 void addReactionGlyph(ReactionGlyph glyph) {
431    libsbmlJNI.Layout_addReactionGlyph(swigCPtr, this, ReactionGlyph.getCPtr(glyph), glyph);
432  }
433
434  
435/**
436   * Adds a new text glyph.
437   */ public
438 void addTextGlyph(TextGlyph glyph) {
439    libsbmlJNI.Layout_addTextGlyph(swigCPtr, this, TextGlyph.getCPtr(glyph), glyph);
440  }
441
442  
443/**
444   * Adds a new additional graphical object glyph.
445   */ public
446 void addAdditionalGraphicalObject(GraphicalObject glyph) {
447    libsbmlJNI.Layout_addAdditionalGraphicalObject(swigCPtr, this, GraphicalObject.getCPtr(glyph), glyph);
448  }
449
450  
451/**
452   * Adds a new general glyph.
453   */ public
454 void addGeneralGlyph(GeneralGlyph glyph) {
455    libsbmlJNI.Layout_addGeneralGlyph(swigCPtr, this, GeneralGlyph.getCPtr(glyph), glyph);
456  }
457
458  
459/**
460   * Returns the number of compartment glyphs for the layout.
461   */ public
462 long getNumCompartmentGlyphs() {
463    return libsbmlJNI.Layout_getNumCompartmentGlyphs(swigCPtr, this);
464  }
465
466  
467/**
468   * Returns the number of species glyphs for the layout.
469   */ public
470 long getNumSpeciesGlyphs() {
471    return libsbmlJNI.Layout_getNumSpeciesGlyphs(swigCPtr, this);
472  }
473
474  
475/**
476   * Returns the number of reaction glyphs for the layout.
477   */ public
478 long getNumReactionGlyphs() {
479    return libsbmlJNI.Layout_getNumReactionGlyphs(swigCPtr, this);
480  }
481
482  
483/**
484   * Returns the number of text glyphs for the layout.
485   */ public
486 long getNumTextGlyphs() {
487    return libsbmlJNI.Layout_getNumTextGlyphs(swigCPtr, this);
488  }
489
490  
491/**
492   * Returns the number of additional graphical objects for the layout.
493   */ public
494 long getNumAdditionalGraphicalObjects() {
495    return libsbmlJNI.Layout_getNumAdditionalGraphicalObjects(swigCPtr, this);
496  }
497
498  
499/**
500   * Returns the number of general glyphs for the layout.
501   */ public
502 long getNumGeneralGlyphs() {
503    return libsbmlJNI.Layout_getNumGeneralGlyphs(swigCPtr, this);
504  }
505
506  
507/**
508   * Creates a {@link CompartmentGlyph} object, adds it to the end of the
509   * compartment glyph objects list and returns a pointer to the newly
510   * created object.
511   */ public
512 CompartmentGlyph createCompartmentGlyph() {
513    long cPtr = libsbmlJNI.Layout_createCompartmentGlyph(swigCPtr, this);
514    return (cPtr == 0) ? null : new CompartmentGlyph(cPtr, false);
515  }
516
517  
518/**
519   * Creates a {@link SpeciesGlyph} object, adds it to the end of the species glyph
520   * objects list and returns a pointer to the newly created object.
521   */ public
522 SpeciesGlyph createSpeciesGlyph() {
523    long cPtr = libsbmlJNI.Layout_createSpeciesGlyph(swigCPtr, this);
524    return (cPtr == 0) ? null : new SpeciesGlyph(cPtr, false);
525  }
526
527  
528/**
529   * Creates a {@link ReactionGlyph} object, adds it to the end of the reaction
530   * glyph objects list and returns a pointer to the newly created
531   * object.
532   */ public
533 ReactionGlyph createReactionGlyph() {
534    long cPtr = libsbmlJNI.Layout_createReactionGlyph(swigCPtr, this);
535    return (cPtr == 0) ? null : new ReactionGlyph(cPtr, false);
536  }
537
538  
539/**
540   * Creates a {@link GeneralGlyph} object, adds it to the end of the additional 
541   * objects list and returns a reference to the newly created object.
542   */ public
543 GeneralGlyph createGeneralGlyph() {
544    long cPtr = libsbmlJNI.Layout_createGeneralGlyph(swigCPtr, this);
545    return (cPtr == 0) ? null : new GeneralGlyph(cPtr, false);
546  }
547
548  
549/**
550   * Creates a {@link TextGlyph} object, adds it to the end of the text glyph
551   * objects list and returns a pointer to the newly created object.
552   */ public
553 TextGlyph createTextGlyph() {
554    long cPtr = libsbmlJNI.Layout_createTextGlyph(swigCPtr, this);
555    return (cPtr == 0) ? null : new TextGlyph(cPtr, false);
556  }
557
558  
559/**
560   * Creates a {@link GraphicalObject} object, adds it to the end of the additional
561   * graphical objects list and returns a pointer to the newly created
562   * object.
563   */ public
564 GraphicalObject createAdditionalGraphicalObject() {
565    return (GraphicalObject) libsbml.DowncastSBase(libsbmlJNI.Layout_createAdditionalGraphicalObject(swigCPtr, this), false);
566}
567
568  
569/**
570   * Creates a new {@link SpeciesReferenceGlyph} for the last {@link ReactionGlyph} and
571   * adds it to its list of {@link SpeciesReferenceGlyph} objects.  A pointer to
572   * the newly created object is returned.
573   */ public
574 SpeciesReferenceGlyph createSpeciesReferenceGlyph() {
575    long cPtr = libsbmlJNI.Layout_createSpeciesReferenceGlyph(swigCPtr, this);
576    return (cPtr == 0) ? null : new SpeciesReferenceGlyph(cPtr, false);
577  }
578
579  
580/**
581   * Creates a new {@link LineSegment} for the {@link Curve} object of the last
582   * {@link ReactionGlyph} or the last {@link SpeciesReferenceGlyph} in the last
583   * {@link ReactionGlyph} and adds it to its list of {@link SpeciesReferenceGlyph}
584   * objects.  A pointer to the newly created object is returned.
585   */ public
586 LineSegment createLineSegment() {
587    return (LineSegment) libsbml.DowncastSBase(libsbmlJNI.Layout_createLineSegment(swigCPtr, this), false);
588}
589
590  
591/**
592   * Creates a new {@link CubicBezier} for the {@link Curve} object of the last
593   * {@link ReactionGlyph} or the last {@link SpeciesReferenceGlyph} in the last
594   * {@link ReactionGlyph} and adds it to its list of {@link SpeciesReferenceGlyph}
595   * objects.  A pointer to the newly created object is returned.
596   */ public
597 CubicBezier createCubicBezier() {
598    long cPtr = libsbmlJNI.Layout_createCubicBezier(swigCPtr, this);
599    return (cPtr == 0) ? null : new CubicBezier(cPtr, false);
600  }
601
602  
603/**
604   * Removes the compartment glyph with the given index from the layout.
605   * A pointer to the compartment glyph that was removed is returned.
606   * If no compartment glyph has been removed, <code>null</code> is returned.
607   */ public
608 CompartmentGlyph removeCompartmentGlyph(long index) {
609    long cPtr = libsbmlJNI.Layout_removeCompartmentGlyph__SWIG_0(swigCPtr, this, index);
610    return (cPtr == 0) ? null : new CompartmentGlyph(cPtr, true);
611  }
612
613  
614/**
615   * Removes the species glyph with the given index from the layout.
616   * A pointer to the species glyph that was removed is returned.
617   * If no species glyph has been removed, <code>null</code> is returned.
618   */ public
619 SpeciesGlyph removeSpeciesGlyph(long index) {
620    long cPtr = libsbmlJNI.Layout_removeSpeciesGlyph__SWIG_0(swigCPtr, this, index);
621    return (cPtr == 0) ? null : new SpeciesGlyph(cPtr, true);
622  }
623
624  
625/**
626   * Removes the reaction glyph with the given index from the layout.
627   * A pointer to the reaction glyph that was removed is returned.
628   * If no reaction glyph has been removed, <code>null</code> is returned.
629   */ public
630 ReactionGlyph removeReactionGlyph(long index) {
631    long cPtr = libsbmlJNI.Layout_removeReactionGlyph__SWIG_0(swigCPtr, this, index);
632    return (cPtr == 0) ? null : new ReactionGlyph(cPtr, true);
633  }
634
635  
636/**
637   * Removes the text glyph with the given index from the layout.
638   * A pointer to the text glyph that was removed is returned.
639   * If no text glyph has been removed, <code>null</code> is returned.
640   */ public
641 TextGlyph removeTextGlyph(long index) {
642    long cPtr = libsbmlJNI.Layout_removeTextGlyph__SWIG_0(swigCPtr, this, index);
643    return (cPtr == 0) ? null : new TextGlyph(cPtr, true);
644  }
645
646  
647/**
648   * Removes the graphical object with the given index from the layout.
649   * A pointer to the graphical object that was removed is returned.
650   * If no graphical object has been removed, <code>null</code> is returned.
651   */ public
652 GraphicalObject removeAdditionalGraphicalObject(long index) {
653    return (GraphicalObject) libsbml.DowncastSBase(libsbmlJNI.Layout_removeAdditionalGraphicalObject__SWIG_0(swigCPtr, this, index), true);
654}
655
656  
657/**
658   * Remove the compartment glyph with the given <code>id</code>.
659   * A pointer to the removed compartment glyph is returned.
660   * If no compartment glyph has been removed, <code>null</code> is returned.
661   */ public
662 CompartmentGlyph removeCompartmentGlyph(String id) {
663    long cPtr = libsbmlJNI.Layout_removeCompartmentGlyph__SWIG_1(swigCPtr, this, id);
664    return (cPtr == 0) ? null : new CompartmentGlyph(cPtr, true);
665  }
666
667  
668/**
669   * Remove the species glyph with the given <code>id</code>.
670   * A pointer to the removed species glyph is returned.
671   * If no species glyph has been removed, <code>null</code> is returned.
672   */ public
673 SpeciesGlyph removeSpeciesGlyph(String id) {
674    long cPtr = libsbmlJNI.Layout_removeSpeciesGlyph__SWIG_1(swigCPtr, this, id);
675    return (cPtr == 0) ? null : new SpeciesGlyph(cPtr, true);
676  }
677
678  
679/**
680   * Remove the reaction glyph with the given <code>id</code>.
681   * A pointer to the removed reaction glyph is returned.
682   * If no reaction glyph has been removed, <code>null</code> is returned.
683   */ public
684 ReactionGlyph removeReactionGlyph(String id) {
685    long cPtr = libsbmlJNI.Layout_removeReactionGlyph__SWIG_1(swigCPtr, this, id);
686    return (cPtr == 0) ? null : new ReactionGlyph(cPtr, true);
687  }
688
689  
690/**
691   * Remove the species reference glyph with the given <code>id</code>.
692   * A pointer to the removed species reference glyph is returned.
693   * If no species reference glyph has been removed, <code>null</code> is returned.
694   */ public
695 SpeciesReferenceGlyph removeSpeciesReferenceGlyph(String id) {
696    long cPtr = libsbmlJNI.Layout_removeSpeciesReferenceGlyph(swigCPtr, this, id);
697    return (cPtr == 0) ? null : new SpeciesReferenceGlyph(cPtr, true);
698  }
699
700  
701/**
702   * Remove the text glyph with the given <code>id</code>.
703   * A pointer to the removed text glyph is returned.
704   * If no text glyph has been removed, <code>null</code> is returned.
705   */ public
706 TextGlyph removeTextGlyph(String id) {
707    long cPtr = libsbmlJNI.Layout_removeTextGlyph__SWIG_1(swigCPtr, this, id);
708    return (cPtr == 0) ? null : new TextGlyph(cPtr, true);
709  }
710
711  
712/**
713   * Remove the graphical object with the given <code>id</code>.
714   * A pointer to the removed graphical object is returned.
715   * If no graphical object has been removed, <code>null</code> is returned.
716   */ public
717 GraphicalObject removeAdditionalGraphicalObject(String id) {
718    return (GraphicalObject) libsbml.DowncastSBase(libsbmlJNI.Layout_removeAdditionalGraphicalObject__SWIG_1(swigCPtr, this, id), true);
719}
720
721  
722/**
723   * Returns the XML element name of
724   * this SBML object.
725   <p>
726   * @return the string of the name of this element
727   */ public
728 String getElementName() {
729    return libsbmlJNI.Layout_getElementName(swigCPtr, this);
730  }
731
732  
733/**
734   * Creates and returns a deep copy of this {@link Layout}.
735   <p>
736   * @return a (deep) copy of this {@link Layout}.
737   */ public
738 Layout cloneObject() {
739    long cPtr = libsbmlJNI.Layout_cloneObject(swigCPtr, this);
740    return (cPtr == 0) ? null : new Layout(cPtr, true);
741  }
742
743  
744/**
745   * Returns the libSBML type code of this object instance.
746   <p>
747   * <p>
748 * LibSBML attaches an identifying code to every kind of SBML object.  These
749 * are integer constants known as <em>SBML type codes</em>.  The names of all
750 * the codes begin with the characters <code>SBML_</code>.
751 * In the Java language interface for libSBML, the
752 * type codes are defined as static integer constants in the interface class
753 * {@link libsbmlConstants}.    Note that different Level&nbsp;3
754 * package plug-ins may use overlapping type codes; to identify the package
755 * to which a given object belongs, call the <code>getPackageName()</code>
756 * method on the object.
757   <p>
758   * @return the SBML type code for this object:
759   * {@link libsbmlConstants#SBML_LAYOUT_LAYOUT SBML_LAYOUT_LAYOUT}
760   <p>
761   * <p>
762 * @warning <span class='warning'>The specific integer values of the possible
763 * type codes may be reused by different Level&nbsp;3 package plug-ins.
764 * Thus, to identifiy the correct code, <strong>it is necessary to invoke
765 * both getTypeCode() and getPackageName()</strong>.</span>
766   <p>
767   * @see #getElementName()
768   * @see #getPackageName()
769   */ public
770 int getTypeCode() {
771    return libsbmlJNI.Layout_getTypeCode(swigCPtr, this);
772  }
773
774  
775/**
776    * Creates an {@link XMLNode} object from this.
777    */ public
778 XMLNode toXML() {
779    return new XMLNode(libsbmlJNI.Layout_toXML(swigCPtr, this), true);
780  }
781
782  public void connectToChild() {
783    libsbmlJNI.Layout_connectToChild(swigCPtr, this);
784  }
785
786  
787/** * @internal */ public
788 void enablePackageInternal(String pkgURI, String pkgPrefix, boolean flag) {
789    libsbmlJNI.Layout_enablePackageInternal(swigCPtr, this, pkgURI, pkgPrefix, flag);
790  }
791
792}