public class GraphicalObject extends SBase
All the more specific layout elements (CompartmentGlyph, GeneralGlyph
,
SpeciesGlyph
, ReactionGlyph
, ReferenceGlyph
, TextGlyph
, and
SpeciesReferenceGlyph
) are derived from the class GraphicalObject
. Each
object of class GraphicalObject
has a mandatory BoundingBox
, which
specifies the position and the size of the object. While GraphicalObject
is the base class for most elements in the &ldquolayout&rdquo package,
it is not an abstract class. It can be instantiated when used in the
listOfAdditionalGraphicalObjects to describe additional elements and
relationships. Since it only describes a BoundingBox
, programs are
encouraged to add Annotation objects that describe program-specific
graphical information.
Constructor and Description |
---|
GraphicalObject()
Creates a new
GraphicalObject . |
GraphicalObject(GraphicalObject source)
Copy constructor.
|
GraphicalObject(LayoutPkgNamespaces layoutns)
Creates a new
GraphicalObject with the given LayoutPkgNamespaces |
GraphicalObject(LayoutPkgNamespaces layoutns,
java.lang.String id)
Creates a new
GraphicalObject with the given id . |
GraphicalObject(LayoutPkgNamespaces layoutns,
java.lang.String id,
BoundingBox bb)
Creates a new
GraphicalObject with the given id and 3D coordinates for
the bounding box. |
GraphicalObject(LayoutPkgNamespaces layoutns,
java.lang.String id,
double x,
double y,
double w,
double h)
Creates a new
GraphicalObject with the given id and 2D coordinates for
the bounding box. |
GraphicalObject(LayoutPkgNamespaces layoutns,
java.lang.String id,
double x,
double y,
double z,
double w,
double h,
double d)
Creates a new
GraphicalObject with the given id and 3D coordinates for
the bounding box. |
GraphicalObject(LayoutPkgNamespaces layoutns,
java.lang.String id,
Point p,
Dimensions d)
Creates a new
GraphicalObject with the given id and 3D coordinates for
the bounding box. |
GraphicalObject(long level)
Creates a new
GraphicalObject . |
GraphicalObject(long level,
long version)
Creates a new
GraphicalObject . |
GraphicalObject(long level,
long version,
long pkgVersion)
Creates a new
GraphicalObject . |
GraphicalObject(XMLNode node)
Creates a new
GraphicalObject from the given XMLNode |
GraphicalObject(XMLNode node,
long l2version)
Creates a new
GraphicalObject from the given XMLNode |
Modifier and Type | Method and Description |
---|---|
GraphicalObject |
cloneObject()
Creates and returns a deep copy of this
GraphicalObject . |
void |
delete()
Explicitly deletes the underlying native object.
|
BoundingBox |
getBoundingBox()
Returns the bounding box for the
GraphicalObject . |
boolean |
getBoundingBoxExplicitlySet()   |
java.lang.String |
getElementName()
Returns the XML element name of
this SBML object.
|
java.lang.String |
getId()
Returns the value of the 'id' attribute of this
GraphicalObject . |
java.lang.String |
getMetaIdRef()
Returns the value of the 'metaidRef' attribute of this
GraphicalObject . |
int |
getTypeCode()
Returns the libSBML type code of this object instance.
|
void |
initDefaults()
Does nothing.
|
boolean |
isSetId()
Predicate returning
true or false depending on whether this
GraphicalObject 's 'id' attribute has been set. |
boolean |
isSetMetaIdRef()
Predicate returning
true or false depending on whether this
GraphicalObject 's 'metaidRef' attribute has been set. |
void |
renameMetaIdRefs(java.lang.String oldid,
java.lang.String newid)
Renames all the
MetaIdRef attributes on this element. |
void |
setBoundingBox(BoundingBox bb)
Sets the boundingbox for the
GraphicalObject . |
int |
setId(java.lang.String id)
Sets the value of the 'id' attribute of this
GraphicalObject . |
int |
setMetaIdRef(java.lang.String metaid)
Sets the value of the 'metaidRef' attribute of this
GraphicalObject . |
XMLNode |
toXML()
Creates an
XMLNode object from this. |
int |
unsetId()
Unsets the value of the 'id' attribute of this
GraphicalObject . |
int |
unsetMetaIdRef()
Unsets the value of the 'metaidRef' attribute of this
GraphicalObject . |
addCVTerm, addCVTerm, appendAnnotation, appendAnnotation, appendNotes, appendNotes, disablePackage, enablePackage, equals, getAncestorOfType, getAncestorOfType, getAnnotation, getAnnotationString, getColumn, getCVTerm, getCVTerms, getElementByMetaId, getElementBySId, getLevel, getLine, getListOfAllElements, getListOfAllElements, getListOfAllElementsFromPlugins, getListOfAllElementsFromPlugins, getMetaId, getModel, getModelHistory, getNamespaces, getNotes, getNotesString, getNumCVTerms, getNumPlugins, getPackageName, getPackageVersion, getParentSBMLObject, getPlugin, getPlugin, getPrefix, getResourceBiologicalQualifier, getResourceModelQualifier, getSBMLDocument, getSBOTerm, getSBOTermAsURL, getSBOTermID, getURI, getVersion, hashCode, hasValidLevelVersionNamespaceCombination, isPackageEnabled, isPackageURIEnabled, isSetAnnotation, isSetMetaId, isSetModelHistory, isSetNotes, isSetSBOTerm, matchesRequiredSBMLNamespacesForAddition, matchesSBMLNamespaces, removeFromParentAndDelete, removeTopLevelAnnotationElement, removeTopLevelAnnotationElement, removeTopLevelAnnotationElement, renameSIdRefs, renameUnitSIdRefs, replaceTopLevelAnnotationElement, replaceTopLevelAnnotationElement, setAnnotation, setAnnotation, setMetaId, setModelHistory, setNamespaces, setNotes, setNotes, setNotes, setSBOTerm, setSBOTerm, toSBML, toXMLNode, unsetAnnotation, unsetCVTerms, unsetMetaId, unsetModelHistory, unsetName, unsetNotes, unsetSBOTerm
public GraphicalObject() throws SBMLConstructorException
GraphicalObject
.SBMLConstructorException
public GraphicalObject(GraphicalObject source) throws SBMLConstructorException
SBMLConstructorException
public GraphicalObject(LayoutPkgNamespaces layoutns) throws SBMLConstructorException
GraphicalObject
with the given LayoutPkgNamespaces
SBMLConstructorException
public GraphicalObject(LayoutPkgNamespaces layoutns, java.lang.String id) throws SBMLConstructorException
SBMLConstructorException
public GraphicalObject(LayoutPkgNamespaces layoutns, java.lang.String id, BoundingBox bb) throws SBMLConstructorException
GraphicalObject
with the given id
and 3D coordinates for
the bounding box.
(FOR BACKWARD COMPATIBILITY)
SBMLConstructorException
public GraphicalObject(LayoutPkgNamespaces layoutns, java.lang.String id, double x, double y, double w, double h) throws SBMLConstructorException
GraphicalObject
with the given id
and 2D coordinates for
the bounding box.
(FOR BACKWARD COMPATIBILITY)
SBMLConstructorException
public GraphicalObject(LayoutPkgNamespaces layoutns, java.lang.String id, double x, double y, double z, double w, double h, double d) throws SBMLConstructorException
GraphicalObject
with the given id
and 3D coordinates for
the bounding box.
(FOR BACKWARD COMPATIBILITY)
SBMLConstructorException
public GraphicalObject(LayoutPkgNamespaces layoutns, java.lang.String id, Point p, Dimensions d) throws SBMLConstructorException
GraphicalObject
with the given id
and 3D coordinates for
the bounding box.
(FOR BACKWARD COMPATIBILITY)
SBMLConstructorException
public GraphicalObject(long level) throws SBMLConstructorException
GraphicalObject
.SBMLConstructorException
public GraphicalObject(long level, long version) throws SBMLConstructorException
GraphicalObject
.SBMLConstructorException
public GraphicalObject(long level, long version, long pkgVersion) throws SBMLConstructorException
GraphicalObject
.SBMLConstructorException
public GraphicalObject(XMLNode node) throws SBMLConstructorException
SBMLConstructorException
public GraphicalObject(XMLNode node, long l2version) throws SBMLConstructorException
SBMLConstructorException
public GraphicalObject cloneObject()
GraphicalObject
.
cloneObject
 in class SBase
GraphicalObject
.public void delete()
In general, application software will not need to call this method directly. The Java language binding for libSBML is implemented as a language wrapper that provides a Java interface to libSBML's underlying C++/C code. Some of the Java methods return objects that are linked to objects created not by Java code, but by C++ code. The Java objects wrapped around them will be deleted when the garbage collector invokes the corresponding C++ finalize()
methods for the objects. The finalize()
methods in turn call the GraphicalObject.delete()
method on the libSBML object.
This method is exposed in case calling programs want to ensure that the underlying object is freed immediately, and not at some arbitrary time determined by the Java garbage collector. In normal usage, callers do not need to invoke GraphicalObject.delete()
themselves.
public BoundingBox getBoundingBox()
GraphicalObject
.public boolean getBoundingBoxExplicitlySet()
public java.lang.String getElementName()
getElementName
 in class SBase
public java.lang.String getId()
GraphicalObject
.public java.lang.String getMetaIdRef()
GraphicalObject
.public int getTypeCode()
LibSBML attaches an identifying code to every kind of SBML object. These
are integer constants known as SBML type codes. The names of all
the codes begin with the characters &ldquoSBML_
&rdquo.
In the Java language interface for libSBML, the
type codes are defined as static integer constants in the interface class
libsbmlConstants
. Note that different Level 3
package plug-ins may use overlapping type codes to identify the package
to which a given object belongs, call the getPackageName()
method on the object.
getTypeCode
 in class SBase
SBML_LAYOUT_GRAPHICALOBJECT
GraphicalObject.getElementName()
,
SBase.getPackageName()
public void initDefaults()
GraphicalObject
.public boolean isSetId()
true
or false
depending on whether this
GraphicalObject
's 'id' attribute has been set.public boolean isSetMetaIdRef()
true
or false
depending on whether this
GraphicalObject
's 'metaidRef' attribute has been set.public void renameMetaIdRefs(java.lang.String oldid, java.lang.String newid)
MetaIdRef
attributes on this element.
This method works by looking at all meta-attribute values, comparing
the identifiers to the value of oldid
. If any matches are found,
the matching identifiers are replaced with newid
. The method does
not descend into child elements.
renameMetaIdRefs
 in class SBase
oldid
- the old identifiernewid
- the new identifierpublic void setBoundingBox(BoundingBox bb)
GraphicalObject
.public int setId(java.lang.String id)
GraphicalObject
.public int setMetaIdRef(java.lang.String metaid)
GraphicalObject
.public int unsetId()
GraphicalObject
.public int unsetMetaIdRef()
GraphicalObject
.