public class Rectangle extends GraphicalPrimitive2D
EVENODD, INHERIT, NONZERO, UNSET
Constructor and Description |
---|
Rectangle()
Creates a new Rectangle object with the given SBML level
and SBML version.
|
Rectangle(long level)
Creates a new Rectangle object with the given SBML level
and SBML version.
|
Rectangle(long level,
long version)
Creates a new Rectangle object with the given SBML level
and SBML version.
|
Rectangle(long level,
long version,
long pkgVersion)
Creates a new Rectangle object with the given SBML level
and SBML version.
|
Rectangle(RenderPkgNamespaces renderns)
Creates a new Rectangle object with the given
SBMLNamespaces . |
Rectangle(RenderPkgNamespaces renderns,
String id)
Instantiates a new Rectangle object.
|
Rectangle(RenderPkgNamespaces renderns,
String id,
RelAbsVector x,
RelAbsVector y,
RelAbsVector w,
RelAbsVector h)
Instantiates a new Rectangle object.
|
Rectangle(RenderPkgNamespaces renderns,
String id,
RelAbsVector x,
RelAbsVector y,
RelAbsVector z,
RelAbsVector w,
RelAbsVector h)
Instantiates a new Rectangle object.
|
Rectangle(XMLNode node)
Creates a new Rectangle object from the given
XMLNode object. |
Rectangle(XMLNode node,
long l2version)
Creates a new Rectangle object from the given
XMLNode object. |
Modifier and Type | Method and Description |
---|---|
Rectangle |
cloneObject()
Creates and returns a deep copy of this Rectangle object.
|
void |
delete()
Explicitly deletes the underlying native object.
|
String |
getElementName()
Returns the XML element name of this object.
|
RelAbsVector |
getHeight()
Returns the height of the rectangle
|
RelAbsVector |
getRadiusX()
Returns the corner radius along the x axis
|
RelAbsVector |
getRadiusY()
Returns the corner radius along the y axis
|
int |
getTypeCode()
Returns the libSBML type code for this SBML object.
|
RelAbsVector |
getWidth()
Returns the with of the rectangle
|
RelAbsVector |
getX()
Returns the x coordinate of the rectangles position
|
RelAbsVector |
getY()
Returns the y coordinate of the rectangles position
|
RelAbsVector |
getZ()
Returns the z coordinate of the rectangles position
|
void |
setCoordinates(RelAbsVector x,
RelAbsVector y,
RelAbsVector z)
Sets the position of the Rectangle within the viewport.
|
void |
setCoordinatesAndSize(RelAbsVector x,
RelAbsVector y,
RelAbsVector z,
RelAbsVector w,
RelAbsVector h)
Sets the position and the size of the Rectangle within the viewport.
|
void |
setHeight(RelAbsVector h)
Sets the height of the Rectangle
|
void |
setRadii(RelAbsVector rx,
RelAbsVector ry)
Sets the two corner radii of the rectangle
|
void |
setRadiusX(RelAbsVector rx)
Sets the corner radius along the x axis
|
void |
setRadiusY(RelAbsVector ry)
Sets the corner radius along the y axis
|
void |
setSize(RelAbsVector w,
RelAbsVector h)
Sets the size of the Rectangle
|
void |
setWidth(RelAbsVector w)
Sets the siwidth of the Rectangle
|
void |
setX(RelAbsVector x)
Sets the x position of the Rectangle within the viewport.
|
void |
setY(RelAbsVector y)
Sets the y position of the Rectangle within the viewport.
|
void |
setZ(RelAbsVector z)
Sets the z position of the Rectangle within the viewport.
|
XMLNode |
toXML()
Creates an
XMLNode object from this Rectangle object. |
getFillColor, getFillRule, isSetFill, isSetFillColor, isSetFillRule, setFillColor, setFillRule
addDash, clearDashes, getDashByIndex, getId, getNumDashes, getStroke, getStrokeWidth, insertDash, isSetDashArray, isSetId, isSetStroke, isSetStrokeWidth, removeDash, setDashByIndex, setId, setStroke, setStrokeWidth, unsetId
getIdentityMatrix2D, getMatrix2D, setMatrix, setMatrix2D
getIdentityMatrix, getMatrix, isSetMatrix
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 Rectangle(long level, long version, long pkgVersion) throws SBMLConstructorException
level
- SBML level of the new objectlevel
- SBML version of the new objectSBMLConstructorException
public Rectangle(long level, long version) throws SBMLConstructorException
level
- SBML level of the new objectlevel
- SBML version of the new objectSBMLConstructorException
public Rectangle(long level) throws SBMLConstructorException
level
- SBML level of the new objectlevel
- SBML version of the new objectSBMLConstructorException
public Rectangle() throws SBMLConstructorException
level
- SBML level of the new objectlevel
- SBML version of the new objectSBMLConstructorException
public Rectangle(RenderPkgNamespaces renderns) throws SBMLConstructorException
SBMLNamespaces
.
sbmlns
- The SBML namespace for the object.SBMLConstructorException
public Rectangle(XMLNode node, long l2version) throws SBMLConstructorException
XMLNode
object.
The XMLNode
object has to contain a valid XML representation of a
Rectangle object as defined in the render extension specification.
This method is normally called when render information is read from a file and
should normally not have to be called explicitly.
node
- the XMLNode
object reference that describes the Rectangle
object to be instantiated.SBMLConstructorException
public Rectangle(XMLNode node) throws SBMLConstructorException
XMLNode
object.
The XMLNode
object has to contain a valid XML representation of a
Rectangle object as defined in the render extension specification.
This method is normally called when render information is read from a file and
should normally not have to be called explicitly.
node
- the XMLNode
object reference that describes the Rectangle
object to be instantiated.SBMLConstructorException
public Rectangle(RenderPkgNamespaces renderns, String id) throws SBMLConstructorException
GraphicalPrimitive2D
.
The id is set to the given string and all rectangle specific attributes are set to 0.
id
- id string for the rectangle
This constructor is deprecated. The new libsbml API only has
constructors which take the SBML level and version or one that takes
an SBMLNamespaces
object.
SBMLConstructorException
public Rectangle(RenderPkgNamespaces renderns, String id, RelAbsVector x, RelAbsVector y, RelAbsVector z, RelAbsVector w, RelAbsVector h) throws SBMLConstructorException
GraphicalPrimitive2D
.
The id is set to the given string and all rectangle specific attributes are set to the given values.
id
- id string for the rectanglex
- x coordinate of the positiony
- y coordinate of the positionz
- z coordinate of the positionw
- w widthh
- h height
This constructor is deprecated. The new libsbml API only has
constructors which take the SBML level and version or one that takes
an SBMLNamespaces
object.
SBMLConstructorException
public Rectangle(RenderPkgNamespaces renderns, String id, RelAbsVector x, RelAbsVector y, RelAbsVector w, RelAbsVector h) throws SBMLConstructorException
GraphicalPrimitive2D
.
The id is set to the given string and all rectangle specific attributes are set to the given values. The z coordinate of the position is set to 0.
id
- id string for the rectanglex
- x coordinate of the positiony
- y coordinate of the positionw
- w widthh
- h height
This constructor is deprecated. The new libsbml API only has
constructors which take the SBML level and version or one that takes
an SBMLNamespaces
object.
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 Rectangle.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 Rectangle.delete()
themselves.
delete
 in class GraphicalPrimitive2D
public void setCoordinatesAndSize(RelAbsVector x, RelAbsVector y, RelAbsVector z, RelAbsVector w, RelAbsVector h)
x
- x coordinate of the positiony
- y coordinate of the positionz
- z coordinate of the positionw
- w widthh
- h heightpublic void setCoordinates(RelAbsVector x, RelAbsVector y, RelAbsVector z)
x
- x coordinate of the positiony
- y coordinate of the positionz
- z coordinate of the positionpublic void setSize(RelAbsVector w, RelAbsVector h)
w
- w widthh
- h heightpublic void setWidth(RelAbsVector w)
w
- w widthpublic void setHeight(RelAbsVector h)
h
- h heightpublic void setRadii(RelAbsVector rx, RelAbsVector ry)
rx
- corner radius along the x axisry
- corner radius along the y axispublic void setRadiusX(RelAbsVector rx)
rx
- corner radius along the x axispublic void setRadiusY(RelAbsVector ry)
ry
- corner radius along the y axispublic void setX(RelAbsVector x)
x
- x coordinate of the positionpublic void setY(RelAbsVector y)
y
- y coordinate of the positionpublic void setZ(RelAbsVector z)
z
- z coordinate of the positionpublic RelAbsVector getX()
RelAbsVector
that represents the x positionpublic RelAbsVector getY()
RelAbsVector
that represents the y positionpublic RelAbsVector getZ()
RelAbsVector
that represents the z positionpublic RelAbsVector getWidth()
RelAbsVector
that represents the widthpublic RelAbsVector getHeight()
RelAbsVector
that represents the heightpublic RelAbsVector getRadiusX()
RelAbsVector
that corner radius along the x axispublic RelAbsVector getRadiusY()
RelAbsVector
that corner radius along the y axispublic Rectangle cloneObject()
cloneObject
 in class SBase
public String getElementName()
This is overridden by subclasses to return a string appropriate to the
SBML component. For example, Model
defines it as returning 'model',
CompartmentType
defines it as returning 'compartmentType', etc.
getElementName
 in class SBase
public int getTypeCode()
LibSBML attaches an
identifying code to every kind of SBML object. These are known as
SBML type codes. In other languages, the set of type codes
is stored in an enumeration in the Java language interface for
libSBML, the type codes are defined as static integer constants in
interface class libsbmlConstants
. The names of the type codes
all begin with the characters SBML_.
getTypeCode
 in class SBase
SBML_UNKNOWN
(default).
Rectangle.getElementName()