Package org.pathvisio.libgpml.model
Interface GraphLink.LinkableTo
- All Known Implementing Classes:
DataNode,DataNode.State,Group,Label,LineElement.Anchor,Shape,ShapedElement
- Enclosing class:
- GraphLink
public static interface GraphLink.LinkableTo
PathwayElements which can be referred to must implement this interface.
DataNode, DataNode.State, LineElement.Anchor,
Label, Shape, and Group can all be referred to by a
end LineElement.LinePoint.-
Method Summary
Modifier and Type Method Description java.lang.StringgetElementId()Returns the elementId for this pathway element.java.util.Set<GraphLink.LinkableFrom>getLinkableFroms()ReturnsGraphLink.LinkableFromsLineElement.LinePointfor this pathway element.ObjectTypegetObjectType()Returns the object type of the pathway object.java.awt.geom.Point2DtoAbsoluteCoordinate(java.awt.geom.Point2D p)Converts a point to pathway coordinates (relative to the pathway)java.awt.geom.Point2DtoRelativeCoordinate(java.awt.geom.Point2D p)Converts a point to shape coordinates (relative to the bounds of the LinkableTo).
-
Method Details
-
getElementId
java.lang.String getElementId()Returns the elementId for this pathway element.- Returns:
- the elementId.
-
getObjectType
ObjectType getObjectType()Returns the object type of the pathway object.- Returns:
- objectType the object type.
-
getLinkableFroms
java.util.Set<GraphLink.LinkableFrom> getLinkableFroms()ReturnsGraphLink.LinkableFromsLineElement.LinePointfor this pathway element.- Returns:
- the LinkableFrom line points.
-
toAbsoluteCoordinate
java.awt.geom.Point2D toAbsoluteCoordinate(java.awt.geom.Point2D p)Converts a point to pathway coordinates (relative to the pathway)- Parameters:
p- the point2d coordinate.- Returns:
- point2d absolute coordinate.
-
toRelativeCoordinate
java.awt.geom.Point2D toRelativeCoordinate(java.awt.geom.Point2D p)Converts a point to shape coordinates (relative to the bounds of the LinkableTo).- Parameters:
p- a point in absolute model coordinates- Returns:
- the same point relative to the bounding box of this pathway element: -1,-1 meaning the top-left corner, 1,1 meaning the bottom right corner, and 0,0 meaning the center.
-