public class Dimensions extends SBase
A dimension is specified via the required attributes width, height and an
optional attribute depth, all of which are of type double. If the
attribute depth is not specified, the object is a two dimensional object.
The width attribute of Dimensions
specifies the size of the object in the
direction of the positive x axis, the height attribute specifies the size
of the object along the positive y axis and the depth attribute specifies
the size of the object along the positive z axis. All sizes for Dimensions
objects are positive values, and so the attributes are not allowed to take
negative values. The Dimensions
class also has an optional attribute id
of type SId. While not used in the &ldquolayout&rdquo package, it can be
used by programs to refer to the elements.
Constructor and Description |
---|
Dimensions()
Creates a new
Dimensions object with the given level, version, and package version
and with all sizes set to 0.0. |
Dimensions(Dimensions orig)
Copy constructor.
|
Dimensions(LayoutPkgNamespaces layoutns)
Creates a new
Dimensions object with the given LayoutPkgNamespaces object. |
Dimensions(LayoutPkgNamespaces layoutns,
double w,
double h)
Creates a new
Dimensions object with the given sizes. |
Dimensions(LayoutPkgNamespaces layoutns,
double w,
double h,
double d)
Creates a new
Dimensions object with the given sizes. |
Dimensions(long level)
Creates a new
Dimensions object with the given level, version, and package version
and with all sizes set to 0.0. |
Dimensions(long level,
long version)
Creates a new
Dimensions object with the given level, version, and package version
and with all sizes set to 0.0. |
Dimensions(long level,
long version,
long pkgVersion)
Creates a new
Dimensions object with the given level, version, and package version
and with all sizes set to 0.0. |
Dimensions(XMLNode node)
Creates a new
Dimensions object from the given XMLNode |
Dimensions(XMLNode node,
long l2version)
Creates a new
Dimensions object from the given XMLNode |
Modifier and Type | Method and Description |
---|---|
Dimensions |
cloneObject()
Creates and returns a deep copy of this
Dimensions . |
void |
delete()
Explicitly deletes the underlying native object.
|
double |
depth()
Returns the depth.
|
double |
getDepth()
Returns the depth.
|
boolean |
getDExplicitlySet()   |
java.lang.String |
getElementName()
Returns the XML element name of
this SBML object.
|
double |
getHeight()
Returns the height.
|
java.lang.String |
getId()
Returns the value of the 'id' attribute of this
Dimensions . |
int |
getTypeCode()
Returns the libSBML type code of this object instance.
|
double |
getWidth()
Returns the width.
|
double |
height()
Returns the height.
|
void |
initDefaults()
Sets the depth to 0.0
|
boolean |
isSetId()
Predicate returning
true or false depending on whether this
Dimensions 's 'id' attribute has been set. |
void |
setBounds(double w,
double h)
Sets all sizes of the
Dimensions object to the given values. |
void |
setBounds(double w,
double h,
double d)
Sets all sizes of the
Dimensions object to the given values. |
void |
setDepth(double d)
Sets the depth to the given value.
|
void |
setHeight(double h)
Sets the height to the given value.
|
int |
setId(java.lang.String id)
Sets the value of the 'id' attribute of this
Dimensions . |
void |
setWidth(double w)
Sets the width to the given value.
|
XMLNode |
toXML()
Creates an
XMLNode object from this. |
int |
unsetId()
Unsets the value of the 'id' attribute of this
Dimensions . |
double |
width()
Returns the width.
|
addCVTerm, addCVTerm, appendAnnotation, appendAnnotation, appendNotes, appendNotes, connectToChild, deleteDisabledPlugins, deleteDisabledPlugins, disablePackage, enablePackage, equals, getAncestorOfType, getAncestorOfType, getAnnotation, getAnnotationString, getColumn, getCVTerm, getCVTerms, getDisabledPlugin, getElementByMetaId, getElementBySId, getLevel, getLine, getListOfAllElements, getListOfAllElements, getListOfAllElementsFromPlugins, getListOfAllElementsFromPlugins, getMetaId, getModel, getModelHistory, getNamespaces, getNotes, getNotesString, getNumCVTerms, getNumDisabledPlugins, getNumPlugins, getPackageName, getPackageVersion, getParentSBMLObject, getPlugin, getPlugin, getPrefix, getResourceBiologicalQualifier, getResourceModelQualifier, getSBMLDocument, getSBOTerm, getSBOTermAsURL, getSBOTermID, getURI, getVersion, hashCode, hasValidLevelVersionNamespaceCombination, isPackageEnabled, isPackageURIEnabled, isPkgEnabled, isPkgURIEnabled, isSetAnnotation, isSetMetaId, isSetModelHistory, isSetNotes, isSetSBOTerm, isSetUserData, matchesRequiredSBMLNamespacesForAddition, matchesSBMLNamespaces, removeFromParentAndDelete, removeTopLevelAnnotationElement, removeTopLevelAnnotationElement, removeTopLevelAnnotationElement, renameMetaIdRefs, renameSIdRefs, renameUnitSIdRefs, replaceTopLevelAnnotationElement, replaceTopLevelAnnotationElement, setAnnotation, setAnnotation, setMetaId, setModelHistory, setNamespaces, setNotes, setNotes, setNotes, setSBOTerm, setSBOTerm, toSBML, toXMLNode, unsetAnnotation, unsetCVTerms, unsetMetaId, unsetModelHistory, unsetName, unsetNotes, unsetSBOTerm, unsetUserData
public Dimensions(long level, long version, long pkgVersion) throws SBMLConstructorException
Dimensions
object with the given level, version, and package version
and with all sizes set to 0.0.SBMLConstructorException
public Dimensions(long level, long version) throws SBMLConstructorException
Dimensions
object with the given level, version, and package version
and with all sizes set to 0.0.SBMLConstructorException
public Dimensions(long level) throws SBMLConstructorException
Dimensions
object with the given level, version, and package version
and with all sizes set to 0.0.SBMLConstructorException
public Dimensions() throws SBMLConstructorException
Dimensions
object with the given level, version, and package version
and with all sizes set to 0.0.SBMLConstructorException
public Dimensions(LayoutPkgNamespaces layoutns) throws SBMLConstructorException
Dimensions
object with the given LayoutPkgNamespaces
object.SBMLConstructorException
public Dimensions(Dimensions orig) throws SBMLConstructorException
SBMLConstructorException
public Dimensions(LayoutPkgNamespaces layoutns, double w, double h, double d) throws SBMLConstructorException
Dimensions
object with the given sizes.SBMLConstructorException
public Dimensions(LayoutPkgNamespaces layoutns, double w, double h) throws SBMLConstructorException
Dimensions
object with the given sizes.SBMLConstructorException
public Dimensions(XMLNode node, long l2version) throws SBMLConstructorException
Dimensions
object from the given XMLNode
SBMLConstructorException
public Dimensions(XMLNode node) throws SBMLConstructorException
Dimensions
object from the given XMLNode
SBMLConstructorException
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 Dimensions.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 Dimensions.delete()
themselves.
public double width()
public double height()
public double depth()
public double getWidth()
public double getHeight()
public double getDepth()
public void setWidth(double w)
public void setHeight(double h)
public void setDepth(double d)
public void setBounds(double w, double h, double d)
Dimensions
object to the given values.public void setBounds(double w, double h)
Dimensions
object to the given values.public boolean getDExplicitlySet()
public void initDefaults()
public java.lang.String getId()
Dimensions
.public boolean isSetId()
true
or false
depending on whether this
Dimensions
's 'id' attribute has been set.public int setId(java.lang.String id)
Dimensions
.public int unsetId()
Dimensions
.public java.lang.String getElementName()
getElementName
 in class SBase
public Dimensions cloneObject()
Dimensions
.
cloneObject
 in class SBase
Dimensions
object.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 SBML_
.
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_DIMENSIONS
Dimensions.getElementName()
,
SBase.getPackageName()