Interface Drawable

All Known Subinterfaces:
Groupable
All Known Implementing Classes:
DataNode, DataNode.State, GraphicalLine, Group, Interaction, Label, LineElement, LineElement.Anchor, LineElement.GenericPoint, LineElement.LinePoint, Shape, ShapedElement

public interface Drawable
Interface for classes which can be drawn a pathway model canvas. This class is extended by Groupable and is implemented by LineElement.LinePoint and LineElement.Anchor. NB: Groupable is implemented by ShapedElement and LineElement.
Author:
finterly
  • Method Summary

    Modifier and Type Method Description
    ObjectType getObjectType()
    Returns the object type of this pathway element.
    PathwayModel getPathwayModel()
    Returns the pathway model of this pathway element.
    int getZOrder()
    Returns the z-order of this pathway element.
    void setZOrder​(int v)
    Sets the z-order of this pathway element.
    java.awt.geom.Point2D toAbsoluteCoordinate​(java.awt.geom.Point2D p)
    Converts a point to pathway coordinates (relative to the pathway).
    java.awt.geom.Point2D toRelativeCoordinate​(java.awt.geom.Point2D p)
    Converts a point to shape coordinates (relative to the bounds of the LinkableTo)
  • Method Details

    • getPathwayModel

      PathwayModel getPathwayModel()
      Returns the pathway model of this pathway element.
      Returns:
      the pathway model of this pathway element.
    • getObjectType

      ObjectType getObjectType()
      Returns the object type of this pathway element.
      Returns:
      objectType the object type.
    • getZOrder

      int getZOrder()
      Returns the z-order of this pathway element.
      Returns:
      zOrder the order of this pathway element.
    • setZOrder

      void setZOrder​(int v)
      Sets the z-order of this pathway element.
      Parameters:
      v - the order of this pathway element.
    • 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.
      Returns:
      the absolute point2d 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.