public class Ellipse extends GraphicalPrimitive2D
The ellipse class is derived from GraphicalPrimitive2D
, so it inherits all its attributes
and methods. Therefore ellipses can have a transformation, a stroke and a stroke with to draw the edge
as well as a fill style and fill style related settings.
Besides those inherited attributes, an ellipse if defined by its center point which can be specified as a combination of absolute and relative values and its radii for the two axes. The radii can also be specified in terms absolute and/or relative values.
EVENODD, INHERIT, NONZERO, UNSET
Constructor and Description |
---|
Ellipse()
Creates a new
Ellipse object with the given SBML level
and SBML version. |
Ellipse(long level)
Creates a new
Ellipse object with the given SBML level
and SBML version. |
Ellipse(long level,
long version)
Creates a new
Ellipse object with the given SBML level
and SBML version. |
Ellipse(long level,
long version,
long pkgVersion)
Creates a new
Ellipse object with the given SBML level
and SBML version. |
Ellipse(RenderPkgNamespaces renderns)
Creates a new
Ellipse object with the given SBMLNamespaces . |
Ellipse(RenderPkgNamespaces renderns,
RelAbsVector cx,
RelAbsVector cy,
RelAbsVector r)
Constructor with 2D center and radius.
|
Ellipse(RenderPkgNamespaces renderns,
RelAbsVector cx,
RelAbsVector cy,
RelAbsVector rx,
RelAbsVector ry)
Constructor with 2D center and radii.
|
Ellipse(RenderPkgNamespaces renderns,
RelAbsVector cx,
RelAbsVector cy,
RelAbsVector cz,
RelAbsVector rx,
RelAbsVector ry)
Constructor with 3D center and radii.
|
Ellipse(RenderPkgNamespaces renderns,
java.lang.String id)
Instantiates a new ellipse object with the center set to 0,0,0
and the radii also set to 0.
|
Ellipse(RenderPkgNamespaces renderns,
java.lang.String id,
RelAbsVector cx,
RelAbsVector cy,
RelAbsVector r)
Constructor with id, 2D center and radius.
|
Ellipse(RenderPkgNamespaces renderns,
java.lang.String id,
RelAbsVector cx,
RelAbsVector cy,
RelAbsVector rx,
RelAbsVector ry)
Constructor with id, 2D center and radii.
|
Ellipse(RenderPkgNamespaces renderns,
java.lang.String id,
RelAbsVector cx,
RelAbsVector cy,
RelAbsVector cz,
RelAbsVector rx,
RelAbsVector ry)
Constructor with id, 3D center and radii.
|
Ellipse(XMLNode node)
Creates a new
RadialGradient object from the given XMLNode object. |
Ellipse(XMLNode node,
long l2version)
Creates a new
RadialGradient object from the given XMLNode object. |
Modifier and Type | Method and Description |
---|---|
Ellipse |
cloneObject()
Creates and returns a deep copy of this
Ellipse object. |
void |
delete()
Explicitly deletes the underlying native object.
|
RelAbsVector |
getCX()
Returns the x coordinate for the center point as a reference.
|
RelAbsVector |
getCY()
Returns the y coordinate for the center point as a reference.
|
RelAbsVector |
getCZ()
Returns the z coordinate for the center point as a reference.
|
java.lang.String |
getElementName()
Returns the XML element name of this object.
|
RelAbsVector |
getRX()
Returns the radius along the x axis as a reference.
|
RelAbsVector |
getRY()
Returns the radius along the y axis as a reference.
|
int |
getTypeCode()
Returns the libSBML type code for this SBML object.
|
void |
setCenter2D(RelAbsVector cx,
RelAbsVector cy)
Sets the 2D coordinates for the center point.
|
void |
setCenter3D(RelAbsVector cx,
RelAbsVector cy,
RelAbsVector cz)
Sets the 3D coordinates for the center point.
|
void |
setCX(RelAbsVector cx)
Sets the x coordinates for the center point.
|
void |
setCY(RelAbsVector cy)
Sets the y coordinates for the center point.
|
void |
setCZ(RelAbsVector cz)
Sets the z coordinates for the center point.
|
void |
setRadii(RelAbsVector rx,
RelAbsVector ry)
Sets the radii of the ellipse
|
void |
setRX(RelAbsVector rx)
Sets the radius along the x axis
|
void |
setRY(RelAbsVector ry)
Sets the radius along the y axis
|
XMLNode |
toXML()
|
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, getIdAttribute, getLevel, getLine, getListOfAllElements, getListOfAllElements, getListOfAllElementsFromPlugins, getListOfAllElementsFromPlugins, getMetaId, getModel, getModelHistory, getName, getNamespaces, getNotes, getNotesString, getNumCVTerms, getNumDisabledPlugins, getNumPlugins, getObjectVersion, getPackageName, getPackageVersion, getParentSBMLObject, getPlugin, getPlugin, getPrefix, getResourceBiologicalQualifier, getResourceModelQualifier, getSBMLDocument, getSBOTerm, getSBOTermAsURL, getSBOTermID, getURI, getVersion, hashCode, hasValidLevelVersionNamespaceCombination, isPackageEnabled, isPackageURIEnabled, isPkgEnabled, isPkgURIEnabled, isSetAnnotation, isSetIdAttribute, isSetMetaId, isSetModelHistory, isSetName, isSetNotes, isSetSBOTerm, isSetUserData, matchesRequiredSBMLNamespacesForAddition, matchesSBMLNamespaces, removeFromParentAndDelete, removeTopLevelAnnotationElement, removeTopLevelAnnotationElement, removeTopLevelAnnotationElement, renameMetaIdRefs, renameSIdRefs, renameUnitSIdRefs, replaceTopLevelAnnotationElement, replaceTopLevelAnnotationElement, setAnnotation, setAnnotation, setIdAttribute, setMetaId, setModelHistory, setName, setNamespaces, setNotes, setNotes, setNotes, setSBOTerm, setSBOTerm, toSBML, toXMLNode, unsetAnnotation, unsetCVTerms, unsetIdAttribute, unsetMetaId, unsetModelHistory, unsetName, unsetNotes, unsetSBOTerm, unsetUserData
public Ellipse(long level, long version, long pkgVersion) throws SBMLConstructorException
Ellipse
object with the given SBML level
and SBML version.
level
- SBML level of the new objectlevel
- SBML version of the new objectSBMLConstructorException
public Ellipse(long level, long version) throws SBMLConstructorException
Ellipse
object with the given SBML level
and SBML version.
level
- SBML level of the new objectlevel
- SBML version of the new objectSBMLConstructorException
public Ellipse(long level) throws SBMLConstructorException
Ellipse
object with the given SBML level
and SBML version.
level
- SBML level of the new objectlevel
- SBML version of the new objectSBMLConstructorException
public Ellipse() throws SBMLConstructorException
Ellipse
object with the given SBML level
and SBML version.
level
- SBML level of the new objectlevel
- SBML version of the new objectSBMLConstructorException
public Ellipse(RenderPkgNamespaces renderns) throws SBMLConstructorException
Ellipse
object with the given SBMLNamespaces
.
sbmlns
- The SBML namespace for the object.SBMLConstructorException
public Ellipse(XMLNode node, long l2version) throws SBMLConstructorException
RadialGradient
object from the given XMLNode
object.
The XMLNode
object has to contain a valid XML representation of a
RadialGradient
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 RadialGradient
object to be instantiated.
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 Ellipse(XMLNode node) throws SBMLConstructorException
RadialGradient
object from the given XMLNode
object.
The XMLNode
object has to contain a valid XML representation of a
RadialGradient
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 RadialGradient
object to be instantiated.
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 Ellipse(RenderPkgNamespaces renderns, java.lang.String id) throws SBMLConstructorException
id
- the id of the ellipse.
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 Ellipse(RenderPkgNamespaces renderns, RelAbsVector cx, RelAbsVector cy, RelAbsVector r) throws SBMLConstructorException
cx
- x value of the center pointcy
- y value of the center pointr
- radius along both axis
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 Ellipse(RenderPkgNamespaces renderns, RelAbsVector cx, RelAbsVector cy, RelAbsVector rx, RelAbsVector ry) throws SBMLConstructorException
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 Ellipse(RenderPkgNamespaces renderns, RelAbsVector cx, RelAbsVector cy, RelAbsVector cz, RelAbsVector rx, RelAbsVector ry) throws SBMLConstructorException
cx
- x value of the center pointcy
- y value of the center pointcz
- z value of the center pointrx
- radius along the x axisry
- radius along the y axis
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 Ellipse(RenderPkgNamespaces renderns, java.lang.String id, RelAbsVector cx, RelAbsVector cy, RelAbsVector r) throws SBMLConstructorException
id
and center.
Both radii are set to the given radius r. This actually yields a circle.
id
- id for the ellipsecx
- x value of the center pointcy
- y value of the center pointr
- radius along both axis
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 Ellipse(RenderPkgNamespaces renderns, java.lang.String id, RelAbsVector cx, RelAbsVector cy, RelAbsVector rx, RelAbsVector ry) throws SBMLConstructorException
id
, center and radii.
id
- id for the ellipsecx
- x value of the center pointcy
- y value of the center pointrx
- radius along the x axisry
- radius along the y axis
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 Ellipse(RenderPkgNamespaces renderns, java.lang.String id, RelAbsVector cx, RelAbsVector cy, RelAbsVector cz, RelAbsVector rx, RelAbsVector ry) throws SBMLConstructorException
id
, center and radii.
id
- id for the ellipsecx
- x value of the center pointcy
- y value of the center pointcz
- z value of the center pointrx
- radius along the x axisry
- radius along the y axis
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 Ellipse.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 Ellipse.delete()
themselves.
delete
 in class GraphicalPrimitive2D
public RelAbsVector getCX()
public RelAbsVector getCY()
public RelAbsVector getCZ()
public RelAbsVector getRX()
public RelAbsVector getRY()
public void setCX(RelAbsVector cx)
cx
- x value of the center pointpublic void setCY(RelAbsVector cy)
cy
- y value of the center pointpublic void setCZ(RelAbsVector cz)
cz
- z value of the center pointpublic void setRX(RelAbsVector rx)
rx
- radius along the x axispublic void setRY(RelAbsVector ry)
ry
- radius along the y axispublic void setCenter2D(RelAbsVector cx, RelAbsVector cy)
cx
- x value of the center pointcy
- y value of the center pointpublic void setCenter3D(RelAbsVector cx, RelAbsVector cy, RelAbsVector cz)
cx
- x value of the center pointcy
- y value of the center pointcz
- z value of the center pointpublic void setRadii(RelAbsVector rx, RelAbsVector ry)
rx
- radius along the x axisry
- radius along the y axispublic java.lang.String getElementName()
This is overridden by subclasses to return a string appropriate to the
SBML component. For example, Ellipse
defines it as returning 'ellipse',
getElementName
 in class SBase
public Ellipse cloneObject()
Ellipse
object.
cloneObject
 in class SBase
Ellipse
objectpublic 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).
Ellipse.getElementName()