Class RMLineShape

All Implemented Interfaces:
Archivable, DeepChangeListener, RMPropertyChanger, RMTypes, PropertyChangeListener, Cloneable, EventListener
Direct Known Subclasses:
RMCrossTabDivider

public class RMLineShape extends RMParentShape
This class represents a simple line shape, drawing a line from a start point to an end point.
  • Constructor Details

    • RMLineShape

      public RMLineShape()
      Creates a basic line (a point actually at 0,0).
    • RMLineShape

      public RMLineShape(double x1, double y1, double x2, double y2)
      Creates a basic black line from the given x1, y1 to the given x2, y2.
  • Method Details

    • getPath

      public RMPath getPath()
      Returns the line path.
      Overrides:
      getPath in class RMShape
    • getArrowHead

      public RMLineShape.ArrowHead getArrowHead()
      Returns the line segment arrow head.
    • setArrowHead

      public void setArrowHead(RMLineShape.ArrowHead anArrowHead)
      Sets the line segment arrow head.
    • childrenSuperSelectImmediately

      public boolean childrenSuperSelectImmediately()
      Override to prevent arrow heads from selecting.
      Overrides:
      childrenSuperSelectImmediately in class RMShape
    • setStroke

      public void setStroke(RMStroke aStroke)
      Override to handle arrow heads special.
      Overrides:
      setStroke in class RMShape
    • setStrokeColor

      public void setStrokeColor(RMColor aColor)
      Override to handle arrow heads special.
      Overrides:
      setStrokeColor in class RMShape
    • setStrokeWidth

      public void setStrokeWidth(float aValue)
      Override to handle arrow heads special.
      Overrides:
      setStrokeWidth in class RMShape
    • layoutChildren

      protected void layoutChildren()
      Called to layout line arrow heads.
      Overrides:
      layoutChildren in class RMParentShape
    • setWidth

      public void setWidth(double aWidth)
      Override to prevent width from going to zero.
      Overrides:
      setWidth in class RMParentShape
    • setHeight

      public void setHeight(double aHeight)
      Override to prevent width from going to zero.
      Overrides:
      setHeight in class RMParentShape
    • toXMLShape

      protected RXElement toXMLShape(RXArchiver anArchiver)
      XML archival.
      Overrides:
      toXMLShape in class RMParentShape