public class LineEnding extends GraphicalPrimitive2D
LineEnding
is a decoration element for the start and/or end
of curves in the SBML render extension, e.g. arrow heads
LineEndings in the SBML render extension are used to apply certain decorations
to the end of curves. Since many curves in layout diagrams use the same decoration
for the beginnings and start of a line, it would be highly redundant to encode
those decorations with each line. Therefor LineEnding
objects can be defined which are
then applied to the beginning or the ends of several curve objects.
A LineEnding
contains an id by which it can be referenced from curve styles, it contains
a visual representation of the decoration in the form of a render extension Group object
and it has some attributes that define the viewport and how the LineEnding
is to be applied
to a curve.
A LineEnding
object is only valid if it has an id, a viewport that has an area which is not 0
and a valid group object.
EVENODD, INHERIT, NONZERO, UNSET
Constructor and Description |
---|
LineEnding()
Creates a new
LineEnding object with the given SBML level
and SBML version. |
LineEnding(LineEnding other)
Copy constructor.
|
LineEnding(long level)
Creates a new
LineEnding object with the given SBML level
and SBML version. |
LineEnding(long level,
long version)
Creates a new
LineEnding object with the given SBML level
and SBML version. |
LineEnding(long level,
long version,
long pkgVersion)
Creates a new
LineEnding object with the given SBML level
and SBML version. |
LineEnding(RenderPkgNamespaces renderns)
Creates a new
LineEnding object with the given SBMLNamespaces . |
LineEnding(RenderPkgNamespaces renderns,
java.lang.String id)
Constructor which creates a
LineEnding with an empty group object,
and a viewport with a size of 0. |
LineEnding(XMLNode node,
long l2version)
Creates a new
LineEnding object from the given XMLNode object. |
Modifier and Type | Method and Description |
---|---|
LineEnding |
cloneObject()
Creates and returns a deep copy of this
LineEnding object. |
void |
delete()
Explicitly deletes the underlying native object.
|
BoundingBox |
getBoundingBox()
Returns a pointer to the viewport bounding box.
|
java.lang.String |
getElementName()
Returns the XML element name of this object.
|
RenderGroup |
getGroup()
Returns a const pointer to the group object.
|
java.lang.String |
getId()
Returns the value of the 'id' attribute of this GraphicalPrimitive.
|
boolean |
getIsEnabledRotationalMapping()
Returns whether rotational mapping is enabled or not.
|
int |
getTypeCode()
Returns the libSBML type code for this SBML object.
|
boolean |
isSetId()
Predicate returning
true or false depending on whether this
GraphicalPrimitive's 'id' attribute has been set. |
void |
setBoundingBox(BoundingBox box)
Sets the viewport for the
LineEnding . |
void |
setEnableRotationalMapping(boolean enable)
Sets whether rotational mapping is to be done or not.
|
void |
setGroup(RenderGroup group)
Sets the group of the
LineEnding to a copy of the given group. |
int |
setId(java.lang.String id)
Sets the value of the 'id' attribute of this GraphicalPrimitive.
|
XMLNode |
toXML()
Creates an
XMLNode object from this LineEnding object. |
int |
unsetId()
Unsets the value of the 'id' attribute of this GraphicalPrimitive.
|
getFillColor, getFillRule, isSetFill, isSetFillColor, isSetFillRule, setFillColor, setFillRule
addDash, clearDashes, getDashByIndex, getNumDashes, getStroke, getStrokeWidth, insertDash, isSetDashArray, isSetStroke, isSetStrokeWidth, removeDash, setDashByIndex, setStroke, setStrokeWidth
getIdentityMatrix2D, getMatrix2D, setMatrix, setMatrix2D
getIdentityMatrix, getMatrix, isSetMatrix
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, renameMetaIdRefs, renameSIdRefs, renameUnitSIdRefs, replaceTopLevelAnnotationElement, replaceTopLevelAnnotationElement, setAnnotation, setAnnotation, setMetaId, setModelHistory, setNamespaces, setNotes, setNotes, setNotes, setSBOTerm, setSBOTerm, toSBML, toXMLNode, unsetAnnotation, unsetCVTerms, unsetMetaId, unsetModelHistory, unsetName, unsetNotes, unsetSBOTerm
public LineEnding() throws SBMLConstructorException
LineEnding
object with the given SBML level
and SBML version.
level
- SBML level of the new objectlevel
- SBML version of the new objectSBMLConstructorException
public LineEnding(LineEnding other) throws SBMLConstructorException
SBMLConstructorException
public LineEnding(long level) throws SBMLConstructorException
LineEnding
object with the given SBML level
and SBML version.
level
- SBML level of the new objectlevel
- SBML version of the new objectSBMLConstructorException
public LineEnding(long level, long version) throws SBMLConstructorException
LineEnding
object with the given SBML level
and SBML version.
level
- SBML level of the new objectlevel
- SBML version of the new objectSBMLConstructorException
public LineEnding(long level, long version, long pkgVersion) throws SBMLConstructorException
LineEnding
object with the given SBML level
and SBML version.
level
- SBML level of the new objectlevel
- SBML version of the new objectSBMLConstructorException
public LineEnding(RenderPkgNamespaces renderns) throws SBMLConstructorException
LineEnding
object with the given SBMLNamespaces
.
sbmlns
- The SBML namespace for the object.SBMLConstructorException
public LineEnding(RenderPkgNamespaces renderns, java.lang.String id) throws SBMLConstructorException
LineEnding
with an empty group object,
and a viewport with a size of 0.
The id is set to the given value.
In order to get a valid object, the group object has to be valid,
the group object has to have descendants other than groups and
the viewport has to have a positive size.
id
- The id for the LineEnding
.
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 LineEnding(XMLNode node, long l2version) throws SBMLConstructorException
LineEnding
object from the given XMLNode
object.
The XMLNode
object has to contain a valid XML representation of a
LineEnding
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 explicitely.
node
- the XMLNode
object reference that describes the LineEnding
object to be instantiated.SBMLConstructorException
public LineEnding cloneObject()
LineEnding
object.
cloneObject
 in class SBase
LineEnding
objectpublic 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 LineEnding.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 LineEnding.delete()
themselves.
delete
 in class GraphicalPrimitive2D
public BoundingBox getBoundingBox()
public java.lang.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 RenderGroup getGroup()
public java.lang.String getId()
getId
 in class GraphicalPrimitive1D
public boolean getIsEnabledRotationalMapping()
LineEnding
or not.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).
LineEnding.getElementName()
public boolean isSetId()
true
or false
depending on whether this
GraphicalPrimitive's 'id' attribute has been set.
isSetId
 in class GraphicalPrimitive1D
public void setBoundingBox(BoundingBox box)
LineEnding
.
box
- The viewport bounding box for the LineEnding
.public void setEnableRotationalMapping(boolean enable)
LineEnding
is rotated
according to the direction of the curve when it is applied.
For details on this, see the render extension specification.
enable
- Boolean flag that specifies whether rotational mapping
for the line ending is to be enabled or not.public void setGroup(RenderGroup group)
LineEnding
to a copy of the given group.
group
- const pointer to the group to be set for the bounding box.
The group object is copied.public int setId(java.lang.String id)
setId
 in class GraphicalPrimitive1D
id
- the new id for the GraphicalPrimitive
public XMLNode toXML()
XMLNode
object from this LineEnding
object.
toXML
 in class GraphicalPrimitive1D
XMLNode
with the XML representation for the
LineEnding
object.public int unsetId()
unsetId
 in class GraphicalPrimitive1D