Class DefaultViewFactory.PicNodeConnectionView

  • All Implemented Interfaces:
    View, ViewConstants
    Enclosing class:
    DefaultViewFactory

    public class DefaultViewFactory.PicNodeConnectionView
    extends DefaultViewFactory.LeafElementView
    a View for rendering any concrete implementation of jpicedt.graphic.model.PicNodeConnection This view is responsible for painting the edge only! Nodes are rendered with their own view (provided they were added to the drawing at some early point...)
    • Field Detail

      • arrowStroke

        protected java.awt.Stroke arrowStroke
      • arrow1

        protected Arrow arrow1
      • arrow2

        protected Arrow arrow2
      • arrow1Loc

        protected PicPoint arrow1Loc
      • arrow2Loc

        protected PicPoint arrow2Loc
    • Constructor Detail

      • PicNodeConnectionView

        public PicNodeConnectionView​(PicNodeConnection edge)
        construct a new View for the given node connection
    • Method Detail

      • syncShape

        protected void syncShape()
        Synchronize the "shape" variable with the model. To reduce the burden for subclasses, this method calls syncTangents after having updated the shape field. It is up to subclasses to adapt their behaviour according to the underlying model, if only computing tangents is different.
        Overrides:
        syncShape in class DefaultViewFactory.LeafElementView
      • paint

        public void paint​(java.awt.Graphics2D g,
                          java.awt.geom.Rectangle2D a)
        Render the View to the given graphic context.
        Specified by:
        paint in interface View
        Overrides:
        paint in class DefaultViewFactory.LeafElementView
        a - the current graphic clip