org.sbml.jsbml.ext.layout
public class LineSegment extends CurveSegment
LineSegment
class consists of the mandatory attribute xsi:type and two child
elements of type Point
. One is called 'start' and represents the starting point
of the line, the other is called 'end' and represents the endpoint of the line. The
LineSegment
class is also the base class for CubicBezier
, which represent
curved lines instead of straight ones.CurveSegment.Type
Modifier and Type | Field and Description |
---|---|
(package private) Point |
end |
private static long |
serialVersionUID
Generated serial version identifier.
|
(package private) Point |
start |
ignoredExtensions, ignoredXMLElements
listOfListeners, parent, UNKNOWN_ATTRIBUTES, UNKNOWN_ELEMENTS
Constructor and Description |
---|
LineSegment() |
LineSegment(CurveSegment lineSegment) |
LineSegment(int level,
int version) |
LineSegment(LineSegment lineSegment) |
Modifier and Type | Method and Description |
---|---|
LineSegment |
clone()
Creates a deep copy of this object, i.e., a new
SBase with the same properties
like this one. |
Point |
createEnd()
Creates, sets and returns a
Point |
Point |
createEnd(double x,
double y,
double z)
Creates, sets and returns a
Point based on the
given values. |
Point |
createStart()
Creates, sets and returns a
Point |
Point |
createStart(double x,
double y,
double z)
Creates, sets and returns a
Point based on the
given values. |
boolean |
equals(java.lang.Object object)
|
javax.swing.tree.TreeNode |
getChildAt(int index) |
int |
getChildCount() |
Point |
getEnd()
|
Point |
getStart()
|
int |
hashCode()
Returns a hash code value for this
SBase instance. |
boolean |
isSetEnd()
|
boolean |
isSetStart()
|
void |
setEnd(Point end)
|
void |
setStart(Point start)
|
java.lang.String |
toString() |
getType, isCubicBezier, isLineSegment, isSetType, readAttribute, removeEnd, removeStart, setType, writeXMLAttributes
addCVTerm, addDeclaredNamespace, addExtension, addPlugin, appendNotes, appendNotes, checkLevelAndVersionCompatibility, createHistory, createPlugin, disablePackage, enablePackage, enablePackage, filterCVTerms, filterCVTerms, filterCVTerms, filterCVTerms, fireNodeRemovedEvent, firePropertyChange, getAllowsChildren, getAnnotation, getAnnotationString, getCVTerm, getCVTermCount, getCVTerms, getDeclaredNamespaces, getElementName, getExtension, getExtensionCount, getExtensionPackages, getHistory, getIdManager, getLevel, getLevelAndVersion, getMetaId, getModel, getNamespace, getNotes, getNotesString, getNumCVTerms, getNumPlugins, getParent, getParentSBMLObject, getPlugin, getSBMLDocument, getSBOTerm, getSBOTermID, getVersion, hasValidAnnotation, hasValidLevelVersionNamespaceCombination, isExtendedByOtherPackages, isPackageEnabled, isPackageURIEnabled, isPkgEnabled, isPkgURIEnabled, isSetAnnotation, isSetHistory, isSetLevel, isSetLevelAndVersion, isSetMetaId, isSetNotes, isSetParentSBMLObject, isSetPlugin, isSetSBOTerm, isSetVersion, isValidLevelAndVersionCombination, isValidMetaId, notifyChildChange, registerChild, removeCVTerm, removeCVTerm, setAnnotation, setHistory, setLevel, setMetaId, setNamespace, setNotes, setNotes, setParentSBML, setParentSBMLObject, setSBOTerm, setSBOTerm, setThisAsParentSBMLObject, setVersion, unregisterChild, unsetAnnotation, unsetCVTerms, unsetExtension, unsetHistory, unsetMetaId, unsetNamespace, unsetNotes, unsetPlugin, unsetSBOTerm
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
finalize, getClass, notify, notifyAll, wait, wait, wait
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
private static final long serialVersionUID
Point end
Point start
public LineSegment()
public LineSegment(int level, int version)
level
- version
- public LineSegment(LineSegment lineSegment)
lineSegment
- public LineSegment(CurveSegment lineSegment)
lineSegment
- public LineSegment clone()
SBase
SBase
with the same properties
like this one.clone
in interface SBase
clone
in class AbstractSBase
public Point createEnd()
Point
createEnd
in class CurveSegment
Point
object.public Point createEnd(double x, double y, double z)
Point
based on the
given values.createEnd
in class CurveSegment
x
- y
- z
- Point
object.public Point createStart()
Point
createStart
in class CurveSegment
Point
object.public Point createStart(double x, double y, double z)
Point
based on the
given values.createStart
in class CurveSegment
x
- y
- z
- Point
object.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 Point getEnd()
CurveSegment
getEnd
in class CurveSegment
End
Point
of this CurveSegment
.public Point getStart()
CurveSegment
getStart
in class CurveSegment
Start
Point
of this CurveSegment
.public int hashCode()
SBase
SBase
instance.hashCode
in interface SBase
hashCode
in class CurveSegment
SBase
instance.Object.hashCode()
public boolean isSetEnd()
CurveSegment
isSetEnd
in class CurveSegment
true
if the End
Point
is set.public boolean isSetStart()
CurveSegment
isSetStart
in class CurveSegment
true
if the Start
Point
is set.public void setEnd(Point end)
CurveSegment
setEnd
in class CurveSegment
public void setStart(Point start)
CurveSegment
setStart
in class CurveSegment
start
- the Start
Point
to setpublic java.lang.String toString()
toString
in class AbstractSBase