Revision 3309M

org.pathvisio.model
Class PathwayElement

java.lang.Object
  extended by org.pathvisio.model.PathwayElement
All Implemented Interfaces:
java.lang.Comparable<PathwayElement>, GraphLink.GraphIdContainer
Direct Known Subclasses:
MGroup, MLine, MState

public class PathwayElement
extends java.lang.Object
implements GraphLink.GraphIdContainer, java.lang.Comparable<PathwayElement>

PathwayElement is responsible for maintaining the data for all the individual objects that can appear on a pwy (Lines, GeneProducts, Shapes, etc.)

All PathwayElements have an ObjectType. This ObjectType is specified at creation time and can't be modified. To create a PathwayElement, use the createPathwayElement() function. This is a factory method that returns a different implementation class depending on the specified ObjectType.

PathwayElements have a number of properties which consist of a key, value pair.

There are two types of properties: Static and Dynamic Static properties are one of the properties

Dynamic properties can have any String as key. Their value is always of type String. Dynamic properties are not essential for the functioning of PathVisio and can be used to store arbitrary data. In GPML, dynamic properties are stored in an tag. Internally, dynamic properties are stored in a Map

Static properties must have a key from the StaticProperty enum Their value can be various types which can be obtained from StaticProperty.type(). Static properties can be queried with getStaticProperty (key) and setStaticProperty(key, value), but also specific accessors such as e.g. getTextLabel() and setTextLabel()

Internally, dynamic properties are stored in various fields of the PathwayElement Object. The static properties are a union of all possible fields (e.g it has both start and endpoints for lines, and label text for labels)

the setPropertyEx() and getPropertyEx() functions can be used to access both dynamic and static properties from the same function. If key instanceof String then it's assumed the caller wants a dynamic property, if key instanceof StaticProperty then the static property is used.

most static properties cannot be set to null. Notable exceptions are graphId, startGraphRef and endGraphRef.


Nested Class Summary
 class PathwayElement.Comment
          A comment in a pathway element: each element can have zero or more comments with it, and each comment has a source and a text.
 class PathwayElement.MAnchor
          This class represents the Line.Graphics.Anchor element in GPML
 class PathwayElement.MPoint
          This class represents the Line.Graphics.Point element in GPML.
 
Field Summary
protected  AlignType align
           
protected  java.util.List<PathwayElement.MAnchor> anchors
           
protected  java.lang.String author
           
protected  org.jdom.Document biopax
           
protected  java.util.List<java.lang.String> biopaxRefs
           
protected  java.awt.Color color
           
protected  java.lang.String copyright
           
protected  java.lang.String dataNodeType
           
protected  org.bridgedb.DataSource dataSource
          The pathway datasource
protected  java.lang.String email
           
protected  LineType endLineType
           
protected  boolean fBold
           
protected  java.awt.Color fillColor
          a fillcolor of null is equivalent to transparent.
protected  boolean fItalic
           
protected  java.lang.String fontName
           
protected  boolean fStrikethru
           
protected  boolean fUnderline
           
protected  java.lang.String graphId
           
protected  java.lang.String graphRef
           
protected  java.lang.String groupId
           
protected  java.lang.String groupRef
           
protected  GroupStyle groupStyle
           
protected  java.lang.String href
           
protected  java.lang.String lastModified
           
protected  int lineStyle
           
protected  java.lang.String maintainer
           
protected  java.lang.String mapInfoDataSource
           
protected  java.lang.String mapInfoName
           
protected  double mCenterx
           
protected  double mCentery
           
protected  double mFontSize
           
protected  double mHeight
           
protected  double mWidth
           
protected  ObjectType objectType
           
protected  java.lang.String organism
           
protected  Pathway parent
          Parent of this object: may be null (for example, when object is in clipboard)
protected  double rotation
           
protected  java.lang.String setGeneID
           
protected  ShapeType shapeType
           
protected  LineType startLineType
           
protected  java.lang.String textLabel
           
protected  ValignType valign
           
protected  java.lang.String version
           
 
Constructor Summary
protected PathwayElement(ObjectType ot)
           
 
Method Summary
 void addBiopaxRef(java.lang.String ref)
           
 void addComment(PathwayElement.Comment comment)
           
 void addComment(java.lang.String comment, java.lang.String source)
           
 void addListener(PathwayElementListener v)
           
 PathwayElement.MAnchor addMAnchor(double position)
          Add a new anchor to this line at the given position.
 int compareTo(PathwayElement o)
           
 PathwayElement copy()
          Copy Object.
 void copyValuesFrom(PathwayElement src)
          Note: doesn't change parent, only fields Used by UndoAction.
 java.lang.String createGroupId()
           
static PathwayElement createPathwayElement(ObjectType ot)
          Instantiate a pathway element.
 java.lang.String doGetGraphId()
           
 void dontFireEvents(int times)
           
 java.lang.String findComment(java.lang.String source)
          Finds the first comment with a specific source
 void fireObjectModifiedEvent(PathwayElementEvent e)
           
 AlignType getAlign()
           
 java.lang.String getAuthor()
           
 org.jdom.Document getBiopax()
           
 BiopaxReferenceManager getBiopaxReferenceManager()
           
 java.util.List<java.lang.String> getBiopaxRefs()
           
 java.awt.Color getColor()
           
 java.util.List<PathwayElement.Comment> getComments()
           
 ConnectorType getConnectorType()
           
 java.lang.String getCopyright()
           
 java.lang.String getDataNodeType()
           
 org.bridgedb.DataSource getDataSource()
           
 java.lang.String getDynamicProperty(java.lang.String key)
          get a dynamic property
 java.util.Set<java.lang.String> getDynamicPropertyKeys()
          get a set of all dynamic property keys
 java.lang.String getEmail()
           
 java.lang.String getEndGraphRef()
           
 LineType getEndLineType()
           
 java.awt.Color getFillColor()
           
 java.lang.String getFontName()
           
 java.lang.String getGeneID()
           
 java.lang.String getGraphId()
           
 java.lang.String getGraphRef()
          graphRef property, used by Modification
 java.lang.String getGroupId()
           
 java.lang.String getGroupRef()
           
 GroupStyle getGroupStyle()
           
 java.lang.String getHref()
           
 java.lang.String getLastModified()
           
 int getLineStyle()
           
 double getLineThickness()
           
 java.lang.String getMaintainer()
           
 java.util.List<PathwayElement.MAnchor> getMAnchors()
          Get the anchors for this line.
 java.lang.String getMapInfoDataSource()
           
 java.lang.String getMapInfoName()
           
 double getMBoardHeight()
           
 double[] getMBoardSize()
          Calculates the drawing size on basis of the location and size of the containing pathway elements
 double getMBoardWidth()
           
 java.awt.geom.Rectangle2D getMBounds()
          Get the rectangular bounds of the object without rotation taken into accound
 double getMCenterX()
           
 double getMCenterY()
           
 PathwayElement.MPoint getMEnd()
           
 double getMEndX()
           
 double getMEndY()
           
 double getMFontSize()
           
 double getMHeight()
           
 double getMLeft()
           
 java.util.List<PathwayElement.MPoint> getMPoints()
           
 PathwayElement.MPoint getMStart()
           
 double getMStartX()
           
 double getMStartY()
           
 double getMTop()
           
 double getMWidth()
           
 ObjectType getObjectType()
           
 java.lang.String getOrganism()
           
 int getOrientation()
           
 Pathway getParent()
           
 Pathway getPathway()
          Get the parent pathway.
 java.lang.Object getPropertyEx(java.lang.Object key)
           
 java.util.Set<java.lang.Object> getPropertyKeys()
          Returns keys of available static properties and dynamic properties as an object list
 java.awt.geom.Rectangle2D getRBounds()
          Get the rectangular bounds of the object after rotation is applied
 java.util.Set<GraphLink.GraphRefContainer> getReferences()
           
 double getRelX()
          relX property, used by State.
 double getRelY()
          relX property, used by State.
 double getRotation()
           
 ShapeType getShapeType()
           
 java.lang.String getStartGraphRef()
           
 LineType getStartLineType()
           
 java.lang.Object getStaticProperty(StaticProperty key)
           
 java.util.Set<StaticProperty> getStaticPropertyKeys()
          get all attributes that are stored as static members.
 java.lang.String getTextLabel()
           
 ValignType getValign()
           
 java.lang.String getVersion()
           
 org.bridgedb.Xref getXref()
          returns GeneID and datasource combined in an Xref.
 int getZOrder()
           
 boolean isBold()
           
 boolean isItalic()
           
 boolean isStrikethru()
           
 boolean isTransparent()
          checks if fill color is equal to null or the alpha value is equal to 0.
 boolean isUnderline()
           
 void printRefsDebugInfo()
           
 void removeBiopaxRef(java.lang.String ref)
           
 void removeComment(PathwayElement.Comment comment)
           
 void removeListener(PathwayElementListener v)
           
 void removeMAnchor(PathwayElement.MAnchor anchor)
          Remove the given anchor
 void setAlign(AlignType v)
           
 void setAuthor(java.lang.String v)
           
 void setBiopax(org.jdom.Document bp)
           
 void setBiopaxRefs(java.util.List<java.lang.String> refs)
           
 void setBold(boolean v)
           
 void setColor(java.awt.Color v)
           
 void setComments(java.util.List<PathwayElement.Comment> value)
           
 void setConnectorType(ConnectorType type)
           
 void setCopyright(java.lang.String v)
           
 void setDataNodeType(DataNodeType type)
           
 void setDataNodeType(java.lang.String v)
           
 void setDataSource(org.bridgedb.DataSource v)
           
 void setDynamicProperty(java.lang.String key, java.lang.String value)
          set a dynamic property.
 void setEmail(java.lang.String v)
           
 void setEndGraphRef(java.lang.String ref)
           
 void setEndLineType(LineType value)
           
 void setFillColor(java.awt.Color v)
           
 void setFontName(java.lang.String v)
           
 void setGeneID(java.lang.String v)
           
 java.lang.String setGeneratedGraphId()
          generate a unique graph Id and use that.
 void setGraphId(java.lang.String v)
          Set graphId.
 void setGraphRef(java.lang.String value)
          set graphRef property, used by State The new graphRef should exist and point to an existing DataNode
 void setGroupId(java.lang.String w)
          Set groupId.
 void setGroupRef(java.lang.String s)
           
 void setGroupStyle(GroupStyle gs)
           
 void setHref(java.lang.String v)
           
 void setInitialSize()
          This sets the object to a suitable default size.
 void setItalic(boolean v)
           
 void setLastModified(java.lang.String v)
           
 void setLineStyle(int value)
           
 void setLineThickness(double v)
           
 void setMaintainer(java.lang.String v)
           
 void setMapInfoDataSource(java.lang.String v)
           
 void setMapInfoName(java.lang.String v)
           
 void setMCenterX(double v)
           
 void setMCenterY(double v)
           
 void setMEnd(PathwayElement.MPoint p)
           
 void setMEndX(double v)
           
 void setMEndY(double v)
           
 void setMFontSize(double v)
           
 void setMHeight(double v)
           
 void setMLeft(double v)
           
 void setMPoints(java.util.List<PathwayElement.MPoint> points)
           
 void setMStart(PathwayElement.MPoint p)
           
 void setMStartX(double v)
           
 void setMStartY(double v)
           
 void setMTop(double v)
           
 void setMWidth(double v)
           
 void setOrganism(java.lang.String v)
           
 void setOrientation(int orientation)
           
 void setPropertyEx(java.lang.Object key, java.lang.Object value)
          Set dynamic or static properties at the same time Will be replaced with setProperty in the future.
 void setRelX(double value)
          See getRelX
 void setRelY(double value)
          See getRelX
 void setRotation(double v)
           
 void setShapeType(ShapeType v)
           
 void setStartGraphRef(java.lang.String ref)
           
 void setStartLineType(LineType value)
           
 void setStaticProperty(StaticProperty key, java.lang.Object value)
          This works so that o.setNotes(x) is the equivalent of o.setProperty("Notes", x); Value may be null in some cases, e.g.
 void setStrikethru(boolean v)
           
 void setTextLabel(java.lang.String v)
           
 void setTransparent(boolean v)
          sets the alpha component of fillColor to 0 if true sets the alpha component of fillColor to 255 if true
 void setUnderline(boolean v)
           
 void setValign(ValignType v)
           
 void setVersion(java.lang.String v)
           
 void setZOrder(int z)
           
 PathwayElement[] splitLine()
           
 java.awt.geom.Point2D toAbsoluteCoordinate(java.awt.geom.Point2D p)
          Convert a point to pathway coordinates (relative to the pathway)
 java.awt.geom.Point2D toRelativeCoordinate(java.awt.geom.Point2D p)
          Convert a point to shape coordinates (relative to the bounds of the GraphIdContainer)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

parent

protected Pathway parent
Parent of this object: may be null (for example, when object is in clipboard)


objectType

protected ObjectType objectType

lineStyle

protected int lineStyle

endLineType

protected LineType endLineType

startLineType

protected LineType startLineType

anchors

protected java.util.List<PathwayElement.MAnchor> anchors

color

protected java.awt.Color color

fillColor

protected java.awt.Color fillColor
a fillcolor of null is equivalent to transparent.


setGeneID

protected java.lang.String setGeneID

dataNodeType

protected java.lang.String dataNodeType

dataSource

protected org.bridgedb.DataSource dataSource
The pathway datasource


mCenterx

protected double mCenterx

mCentery

protected double mCentery

mWidth

protected double mWidth

mHeight

protected double mHeight

shapeType

protected ShapeType shapeType

rotation

protected double rotation

fBold

protected boolean fBold

fStrikethru

protected boolean fStrikethru

fUnderline

protected boolean fUnderline

fItalic

protected boolean fItalic

fontName

protected java.lang.String fontName

textLabel

protected java.lang.String textLabel

href

protected java.lang.String href

mFontSize

protected double mFontSize

mapInfoName

protected java.lang.String mapInfoName

organism

protected java.lang.String organism

mapInfoDataSource

protected java.lang.String mapInfoDataSource

valign

protected ValignType valign

align

protected AlignType align

version

protected java.lang.String version

author

protected java.lang.String author

maintainer

protected java.lang.String maintainer

email

protected java.lang.String email

copyright

protected java.lang.String copyright

lastModified

protected java.lang.String lastModified

groupId

protected java.lang.String groupId

graphId

protected java.lang.String graphId

groupRef

protected java.lang.String groupRef

groupStyle

protected GroupStyle groupStyle

graphRef

protected java.lang.String graphRef

biopax

protected org.jdom.Document biopax

biopaxRefs

protected java.util.List<java.lang.String> biopaxRefs
Constructor Detail

PathwayElement

protected PathwayElement(ObjectType ot)
Method Detail

getDynamicPropertyKeys

public java.util.Set<java.lang.String> getDynamicPropertyKeys()
get a set of all dynamic property keys


setDynamicProperty

public void setDynamicProperty(java.lang.String key,
                               java.lang.String value)
set a dynamic property. Setting to null means removing this dynamic property altogether


getDynamicProperty

public java.lang.String getDynamicProperty(java.lang.String key)
get a dynamic property


createPathwayElement

public static PathwayElement createPathwayElement(ObjectType ot)
Instantiate a pathway element. The required parameter objectType ensures only objects with a valid type can be created.

Parameters:
ot - Type of object, one of the ObjectType.* fields

getZOrder

public int getZOrder()

setZOrder

public void setZOrder(int z)

getParent

public Pathway getParent()

getPathway

public Pathway getPathway()
Get the parent pathway. Same as getParent(), but necessary to comply to the GraphLink.GraphIdContainer interface.

Specified by:
getPathway in interface GraphLink.GraphIdContainer

getPropertyKeys

public java.util.Set<java.lang.Object> getPropertyKeys()
Returns keys of available static properties and dynamic properties as an object list


getStaticPropertyKeys

public java.util.Set<StaticProperty> getStaticPropertyKeys()
get all attributes that are stored as static members.


setPropertyEx

public void setPropertyEx(java.lang.Object key,
                          java.lang.Object value)
Set dynamic or static properties at the same time Will be replaced with setProperty in the future.


getPropertyEx

public java.lang.Object getPropertyEx(java.lang.Object key)

setStaticProperty

public void setStaticProperty(StaticProperty key,
                              java.lang.Object value)
This works so that o.setNotes(x) is the equivalent of o.setProperty("Notes", x); Value may be null in some cases, e.g. graphRef

Parameters:
key -
value -

getStaticProperty

public java.lang.Object getStaticProperty(StaticProperty key)

copyValuesFrom

public void copyValuesFrom(PathwayElement src)
Note: doesn't change parent, only fields Used by UndoAction.

Parameters:
src -

copy

public PathwayElement copy()
Copy Object. The object will not be part of the same Pathway object, it's parent will be set to null. No events will be sent to the parent of the original.


getObjectType

public ObjectType getObjectType()

setMPoints

public void setMPoints(java.util.List<PathwayElement.MPoint> points)

getMStart

public PathwayElement.MPoint getMStart()

setMStart

public void setMStart(PathwayElement.MPoint p)

getMEnd

public PathwayElement.MPoint getMEnd()

setMEnd

public void setMEnd(PathwayElement.MPoint p)

getMPoints

public java.util.List<PathwayElement.MPoint> getMPoints()

getMStartX

public double getMStartX()

setMStartX

public void setMStartX(double v)

getMStartY

public double getMStartY()

setMStartY

public void setMStartY(double v)

getMEndX

public double getMEndX()

setMEndX

public void setMEndX(double v)

getMEndY

public double getMEndY()

setMEndY

public void setMEndY(double v)

getLineStyle

public int getLineStyle()

setLineStyle

public void setLineStyle(int value)

getStartLineType

public LineType getStartLineType()

getEndLineType

public LineType getEndLineType()

setStartLineType

public void setStartLineType(LineType value)

setEndLineType

public void setEndLineType(LineType value)

setConnectorType

public void setConnectorType(ConnectorType type)

getConnectorType

public ConnectorType getConnectorType()

getMAnchors

public java.util.List<PathwayElement.MAnchor> getMAnchors()
Get the anchors for this line.

Returns:
A list with the anchors, or an empty list, if no anchors are defined

addMAnchor

public PathwayElement.MAnchor addMAnchor(double position)
Add a new anchor to this line at the given position.

Parameters:
position - The relative position on the line, between 0 (start) to 1 (end).

removeMAnchor

public void removeMAnchor(PathwayElement.MAnchor anchor)
Remove the given anchor


getColor

public java.awt.Color getColor()

setColor

public void setColor(java.awt.Color v)

getFillColor

public java.awt.Color getFillColor()

setFillColor

public void setFillColor(java.awt.Color v)

isTransparent

public boolean isTransparent()
checks if fill color is equal to null or the alpha value is equal to 0.


setTransparent

public void setTransparent(boolean v)
sets the alpha component of fillColor to 0 if true sets the alpha component of fillColor to 255 if true


getComments

public java.util.List<PathwayElement.Comment> getComments()

setComments

public void setComments(java.util.List<PathwayElement.Comment> value)

addComment

public void addComment(java.lang.String comment,
                       java.lang.String source)

addComment

public void addComment(PathwayElement.Comment comment)

removeComment

public void removeComment(PathwayElement.Comment comment)

findComment

public java.lang.String findComment(java.lang.String source)
Finds the first comment with a specific source


getGeneID

public java.lang.String getGeneID()

setGeneID

public void setGeneID(java.lang.String v)

getDataNodeType

public java.lang.String getDataNodeType()

setDataNodeType

public void setDataNodeType(DataNodeType type)

setDataNodeType

public void setDataNodeType(java.lang.String v)

getDataSource

public org.bridgedb.DataSource getDataSource()

setDataSource

public void setDataSource(org.bridgedb.DataSource v)

getXref

public org.bridgedb.Xref getXref()
returns GeneID and datasource combined in an Xref. Only meaningful for datanodes. Same as new Xref ( pathwayElement.getGeneID(), pathwayElement.getDataSource() );


getMCenterX

public double getMCenterX()

setMCenterX

public void setMCenterX(double v)

getMCenterY

public double getMCenterY()

setMCenterY

public void setMCenterY(double v)

getMWidth

public double getMWidth()

setMWidth

public void setMWidth(double v)

getMHeight

public double getMHeight()

setMHeight

public void setMHeight(double v)

getMTop

public double getMTop()

setMTop

public void setMTop(double v)

getMLeft

public double getMLeft()

setMLeft

public void setMLeft(double v)

getShapeType

public ShapeType getShapeType()

setShapeType

public void setShapeType(ShapeType v)

setOrientation

public void setOrientation(int orientation)

getOrientation

public int getOrientation()

getRotation

public double getRotation()

setRotation

public void setRotation(double v)

getRBounds

public java.awt.geom.Rectangle2D getRBounds()
Get the rectangular bounds of the object after rotation is applied


getMBounds

public java.awt.geom.Rectangle2D getMBounds()
Get the rectangular bounds of the object without rotation taken into accound


isBold

public boolean isBold()

setBold

public void setBold(boolean v)

isStrikethru

public boolean isStrikethru()

setStrikethru

public void setStrikethru(boolean v)

isUnderline

public boolean isUnderline()

setUnderline

public void setUnderline(boolean v)

isItalic

public boolean isItalic()

setItalic

public void setItalic(boolean v)

getFontName

public java.lang.String getFontName()

setFontName

public void setFontName(java.lang.String v)

getTextLabel

public java.lang.String getTextLabel()

setTextLabel

public void setTextLabel(java.lang.String v)

getHref

public java.lang.String getHref()

setHref

public void setHref(java.lang.String v)

getLineThickness

public double getLineThickness()

setLineThickness

public void setLineThickness(double v)

getMFontSize

public double getMFontSize()

setMFontSize

public void setMFontSize(double v)

getMapInfoName

public java.lang.String getMapInfoName()

setMapInfoName

public void setMapInfoName(java.lang.String v)

getOrganism

public java.lang.String getOrganism()

setOrganism

public void setOrganism(java.lang.String v)

getMapInfoDataSource

public java.lang.String getMapInfoDataSource()

setMapInfoDataSource

public void setMapInfoDataSource(java.lang.String v)

setValign

public void setValign(ValignType v)

getValign

public ValignType getValign()

setAlign

public void setAlign(AlignType v)

getAlign

public AlignType getAlign()

getVersion

public java.lang.String getVersion()

setVersion

public void setVersion(java.lang.String v)

getAuthor

public java.lang.String getAuthor()

setAuthor

public void setAuthor(java.lang.String v)

getMaintainer

public java.lang.String getMaintainer()

setMaintainer

public void setMaintainer(java.lang.String v)

getEmail

public java.lang.String getEmail()

setEmail

public void setEmail(java.lang.String v)

getCopyright

public java.lang.String getCopyright()

setCopyright

public void setCopyright(java.lang.String v)

getLastModified

public java.lang.String getLastModified()

setLastModified

public void setLastModified(java.lang.String v)

getMBoardSize

public double[] getMBoardSize()
Calculates the drawing size on basis of the location and size of the containing pathway elements

Returns:
The drawing size

getMBoardWidth

public double getMBoardWidth()

getMBoardHeight

public double getMBoardHeight()

doGetGraphId

public java.lang.String doGetGraphId()

getGroupRef

public java.lang.String getGroupRef()

setGroupRef

public void setGroupRef(java.lang.String s)

getGroupId

public java.lang.String getGroupId()

createGroupId

public java.lang.String createGroupId()

setGroupStyle

public void setGroupStyle(GroupStyle gs)

getGroupStyle

public GroupStyle getGroupStyle()

setGroupId

public void setGroupId(java.lang.String w)
Set groupId. This id must be any string unique within the Pathway object

See Also:
Pathway.getUniqueId(java.util.Set)

getGraphRef

public java.lang.String getGraphRef()
graphRef property, used by Modification


setGraphRef

public void setGraphRef(java.lang.String value)
set graphRef property, used by State The new graphRef should exist and point to an existing DataNode


getRelX

public double getRelX()
relX property, used by State. Should normally be between -1.0 and 1.0, where 1.0 corresponds to the edge of the parent object


setRelX

public void setRelX(double value)
See getRelX


getRelY

public double getRelY()
relX property, used by State. Should normally be between -1.0 and 1.0, where 1.0 corresponds to the edge of the parent object


setRelY

public void setRelY(double value)
See getRelX


getGraphId

public java.lang.String getGraphId()
Specified by:
getGraphId in interface GraphLink.GraphIdContainer

setGraphId

public void setGraphId(java.lang.String v)
Set graphId. This id must be any string unique within the Pathway object

Specified by:
setGraphId in interface GraphLink.GraphIdContainer
See Also:
Pathway.getUniqueId(java.util.Set)

setGeneratedGraphId

public java.lang.String setGeneratedGraphId()
Description copied from interface: GraphLink.GraphIdContainer
generate a unique graph Id and use that.

Specified by:
setGeneratedGraphId in interface GraphLink.GraphIdContainer

getStartGraphRef

public java.lang.String getStartGraphRef()

setStartGraphRef

public void setStartGraphRef(java.lang.String ref)

getEndGraphRef

public java.lang.String getEndGraphRef()

setEndGraphRef

public void setEndGraphRef(java.lang.String ref)

getBiopax

public org.jdom.Document getBiopax()

getBiopaxReferenceManager

public BiopaxReferenceManager getBiopaxReferenceManager()

setBiopax

public void setBiopax(org.jdom.Document bp)

getBiopaxRefs

public java.util.List<java.lang.String> getBiopaxRefs()

setBiopaxRefs

public void setBiopaxRefs(java.util.List<java.lang.String> refs)

addBiopaxRef

public void addBiopaxRef(java.lang.String ref)

removeBiopaxRef

public void removeBiopaxRef(java.lang.String ref)

splitLine

public PathwayElement[] splitLine()

dontFireEvents

public void dontFireEvents(int times)

addListener

public void addListener(PathwayElementListener v)

removeListener

public void removeListener(PathwayElementListener v)

fireObjectModifiedEvent

public void fireObjectModifiedEvent(PathwayElementEvent e)

setInitialSize

public void setInitialSize()
This sets the object to a suitable default size. This method is intended to be called right after the object is placed on the drawing with a click.


getReferences

public java.util.Set<GraphLink.GraphRefContainer> getReferences()
Specified by:
getReferences in interface GraphLink.GraphIdContainer

compareTo

public int compareTo(PathwayElement o)
Specified by:
compareTo in interface java.lang.Comparable<PathwayElement>

toAbsoluteCoordinate

public java.awt.geom.Point2D toAbsoluteCoordinate(java.awt.geom.Point2D p)
Description copied from interface: GraphLink.GraphIdContainer
Convert a point to pathway coordinates (relative to the pathway)

Specified by:
toAbsoluteCoordinate in interface GraphLink.GraphIdContainer

toRelativeCoordinate

public java.awt.geom.Point2D toRelativeCoordinate(java.awt.geom.Point2D p)
Description copied from interface: GraphLink.GraphIdContainer
Convert a point to shape coordinates (relative to the bounds of the GraphIdContainer)

Specified by:
toRelativeCoordinate in interface GraphLink.GraphIdContainer

printRefsDebugInfo

public void printRefsDebugInfo()

Generated September 9 2010