java.io.Serializable
, java.lang.Cloneable
, javax.swing.tree.TreeNode
, ICurve
, SBase
, TreeNodeWithChangeSupport
public class Curve extends AbstractSBase implements ICurve
Curve
class describes how to connect elements in a diagram defined with
the use of the Layout
package. A curve is fully specified by a mandatory
listOfCurveSegments element and is used in four places in the Layout
package: SpeciesReferenceGlyph
, ReactionGlyph
,
ReferenceGlyph
, and GeneralGlyph
.JSBML_WRONG_SBO_TERM
Constructor | Description |
---|---|
Curve() |
|
Curve(int level,
int version) |
|
Curve(Curve curve) |
Modifier and Type | Method | Description |
---|---|---|
void |
addCurveSegment(int index,
CurveSegment element) |
|
boolean |
addCurveSegment(CurveSegment curveSegment) |
|
Curve |
clone() |
Creates a deep copy of this object, i.e., a new
SBase with the same
properties
like this one. |
CubicBezier |
createCubicBezier() |
Creates a new
CubicBezier instance, adds it to this ICurve . |
CubicBezier |
createCubicBezier(Point start,
Point basePoint1,
Point basePoint2,
Point end) |
|
LineSegment |
createLineSegment() |
Creates a new
LineSegment instance, adds it to this Curve and returns it. |
LineSegment |
createLineSegment(Point start,
Point end) |
|
boolean |
equals(java.lang.Object object) |
|
javax.swing.tree.TreeNode |
getChildAt(int index) |
|
int |
getChildCount() |
|
CurveSegment |
getCurveSegment(int n) |
|
int |
getCurveSegmentCount() |
|
ListOf<CurveSegment> |
getListOfCurveSegments() |
|
ReactionGlyph |
getParentReactionGlyph() |
|
int |
hashCode() |
Returns a hash code value for this
SBase instance. |
boolean |
isIdMandatory() |
Returns
true if the identifier of this
SBase is required to be defined (i.e., not null )
in the definition of SBML. |
boolean |
isSetListOfCurveSegments() |
|
CurveSegment |
removeCurveSegment(int i) |
|
boolean |
removeCurveSegment(CurveSegment cs) |
|
void |
setListOfCurveSegments(ListOf<CurveSegment> listOfCurveSegments) |
The listOfCurveSegments element contains arbitrary number of curve segments that
can be either of type
LineSegment or of type CubicBezier . |
boolean |
unsetListOfCurveSegments() |
Removes the
#listOfCurveSegments from this
Model and notifies
all registered instances of
TreeNodeChangeListener . |
addCVTerm, addDeclaredNamespace, addExtension, addPlugin, addResources, appendAnnotation, appendAnnotation, appendNotes, appendNotes, createHistory, createPlugin, disablePackage, enablePackage, enablePackage, filterCVTerms, filterCVTerms, filterCVTerms, filterCVTerms, fireNodeRemovedEvent, firePropertyChange, getAllDeclaredNamespaces, getAllowsChildren, getAnnotation, getAnnotationString, getCVTerm, getCVTermCount, getCVTerms, getDeclaredNamespaces, getElementByMetaId, getElementBySId, getElementName, getExtension, getExtensionCount, getExtensionPackages, getFirstElementIndex, getHistory, getId, getLevel, getLevelAndVersion, getMetaId, getModel, getName, getNamespace, getNotes, getNotesString, getNumCVTerms, getNumPlugins, getPackageName, getPackageVersion, getParent, getParentSBMLObject, getPlugin, getSBMLDocument, getSBOTerm, getSBOTermID, getURI, getVersion, hasExtension, hasValidAnnotation, hasValidLevelVersionNamespaceCombination, isExtendedByOtherPackages, isPackageEnabled, isPackageURIEnabled, isPkgEnabled, isPkgURIEnabled, isSetAnnotation, isSetHistory, isSetId, isSetLevel, isSetLevelAndVersion, isSetMetaId, isSetName, isSetNotes, isSetPackageVErsion, isSetParentSBMLObject, isSetPlugin, isSetSBOTerm, isSetVersion, isValidLevelAndVersionCombination, isValidMetaId, readAttribute, registerChild, removeCVTerm, removeCVTerm, removeDeclaredNamespaceByNamespace, removeDeclaredNamespaceByPrefix, removeTopLevelAnnotationElement, removeTopLevelAnnotationElement, removeTopLevelAnnotationElement, replaceTopLevelAnnotationElement, replaceTopLevelAnnotationElement, setAnnotation, setAnnotation, setAnnotation, setHistory, setId, setLevel, setMetaId, setName, setNamespace, setNotes, setNotes, setPackageVersion, setSBOTerm, setSBOTerm, setThisAsParentSBMLObject, setVersion, toString, unregisterChild, unsetAnnotation, unsetCVTerms, unsetExtension, unsetHistory, unsetId, unsetMetaId, unsetName, unsetNamespace, unsetNotes, unsetPlugin, unsetSBOTerm, writeXMLAttributes
addAllChangeListeners, addAllChangeListeners, addTreeNodeChangeListener, addTreeNodeChangeListener, children, clearUserObjects, containsUserObjectKey, filter, filter, filter, fireNodeAddedEvent, getIndex, getListOfTreeNodeChangeListeners, getNumChildren, getRoot, getTreeNodeChangeListenerCount, getUserObject, indexOf, isLeaf, isRoot, isSetParent, isSetUserObjects, putUserObject, removeAllTreeNodeChangeListeners, removeAllTreeNodeChangeListeners, removeFromParent, removeTreeNodeChangeListener, removeTreeNodeChangeListener, removeUserObject, setParent, userObjectKeySet
removeTreeNodeChangeListener
addAllChangeListeners, addAllChangeListeners, addTreeNodeChangeListener, addTreeNodeChangeListener, clearUserObjects, containsUserObjectKey, filter, filter, filter, fireNodeAddedEvent, getListOfTreeNodeChangeListeners, getRoot, getTreeNodeChangeListenerCount, getUserObject, isRoot, isSetParent, isSetUserObjects, putUserObject, removeAllTreeNodeChangeListeners, removeAllTreeNodeChangeListeners, removeFromParent, removeTreeNodeChangeListener, removeUserObject, userObjectKeySet
public Curve()
public Curve(Curve curve)
curve
- public Curve(int level, int version)
level
- version
- public boolean addCurveSegment(CurveSegment curveSegment)
addCurveSegment
in interface ICurve
List.add(Object)
public void addCurveSegment(int index, CurveSegment element)
addCurveSegment
in interface ICurve
public Curve clone()
SBase
SBase
with the same
properties
like this one.clone
in interface SBase
clone
in class AbstractSBase
public LineSegment createLineSegment()
LineSegment
instance, adds it to this Curve
and returns it.LineSegment
instancepublic LineSegment createLineSegment(Point start, Point end)
start
- end
- public CubicBezier createCubicBezier()
ICurve
CubicBezier
instance, adds it to this ICurve
.
and returns it.createCubicBezier
in interface ICurve
public CubicBezier createCubicBezier(Point start, Point basePoint1, Point basePoint2, Point end)
start
- basePoint1
- basePoint2
- end
- public boolean equals(java.lang.Object object)
SBase
public javax.swing.tree.TreeNode getChildAt(int index)
getChildAt
in interface javax.swing.tree.TreeNode
getChildAt
in class AbstractSBase
public int getChildCount()
getChildCount
in interface javax.swing.tree.TreeNode
getChildCount
in class AbstractSBase
public CurveSegment getCurveSegment(int n)
getCurveSegment
in interface ICurve
public int getCurveSegmentCount()
getCurveSegmentCount
in interface ICurve
public ListOf<CurveSegment> getListOfCurveSegments()
getListOfCurveSegments
in interface ICurve
public int hashCode()
SBase
SBase
instance.hashCode
in interface SBase
hashCode
in class AbstractSBase
SBase
instance.Object.hashCode()
public boolean isIdMandatory()
SBase
true
if the identifier of this
SBase
is required to be defined (i.e., not null
)
in the definition of SBML.isIdMandatory
in interface SBase
isIdMandatory
in class AbstractSBase
true
if the identifier of this element must be set in
order to create a valid SBML representation. false
otherwise, i.e., if the identifier can be understood as an optional
attribute.public boolean isSetListOfCurveSegments()
isSetListOfCurveSegments
in interface ICurve
public boolean removeCurveSegment(CurveSegment cs)
removeCurveSegment
in interface ICurve
public CurveSegment removeCurveSegment(int i)
i
- public void setListOfCurveSegments(ListOf<CurveSegment> listOfCurveSegments)
ICurve
LineSegment
or of type CubicBezier
. Here,
both classes are child classes of the abstract type CurveSegment
.setListOfCurveSegments
in interface ICurve
public boolean unsetListOfCurveSegments()
ICurve
#listOfCurveSegments
from this
Model
and notifies
all registered instances of
TreeNodeChangeListener
.unsetListOfCurveSegments
in interface ICurve
true
if calling this method lead to a change in this
data structure.public ReactionGlyph getParentReactionGlyph()