Package org.pathvisio.libgpml.model
Interface GraphLink.LinkableFrom
- All Known Implementing Classes:
LineElement.LinePoint
- Enclosing class:
- GraphLink
public static interface GraphLink.LinkableFrom
Classes which want to refer *to* a
GraphLink.LinkableTo PathwayElement must
implement this interface. At this time that only goes for
LineElement.LinePoint.-
Method Summary
Modifier and Type Method Description GraphLink.LinkableTogetElementRef()Returns theGraphLink.LinkableTopathway element thisGraphLink.LinkableFromelementRef refers to.doublegetRelX()Returns the relative x coordinate.doublegetRelY()Returns the relative y coordinate.voidlinkTo(GraphLink.LinkableTo elementRef, double relX, double relY)Links this linkableFrom (e.g.voidrefeeChanged()Called whenever the object being referred to changes coordinates.voidunlink()Unlinks this linkableFrom (e.g.
-
Method Details
-
getElementRef
GraphLink.LinkableTo getElementRef()Returns theGraphLink.LinkableTopathway element thisGraphLink.LinkableFromelementRef refers to.- Returns:
- the LinkableTo elementRef refers to.
-
getRelX
double getRelX()Returns the relative x coordinate. When the given point is linked to a pathway element, relX and relY are the relative coordinates on the element, where 0,0 is at the center of the object and 1,1 at the bottom right corner of the object.- Returns:
- the relative x.
-
getRelY
double getRelY()Returns the relative y coordinate. When the given point is linked to a pathway element, relX and relY are the relative coordinates on the element, where 0,0 is at the center of the object and 1,1 at the bottom right corner of the object.- Returns:
- the relative y.
-
linkTo
Links this linkableFrom (e.g. linePoint) to the given linkableTo.- Parameters:
elementRef- the linkableTo pathway element.relX- the relative x coordinates.relY- the relative y coordinates.
-
unlink
void unlink()Unlinks this linkableFrom (e.g. linePoint) from linkableTo pathway element. -
refeeChanged
void refeeChanged()Called whenever the object being referred to changes coordinates.
-