Class BezierConnectState

java.lang.Object
jsimgraph.controller.UIStateDefault
jsimgraph.controller.BezierConnectState

public class BezierConnectState extends UIStateDefault

Title: Handles all the events when the user draws a Bezier connection

Description: This class handles all the steps involved in the drawing of a Bezier connection

Author:
Emma Bortone Date: 2020
  • Field Details

    • start

      protected Point2D start
    • current

      protected Point2D current
    • port

      protected org.jgraph.graph.PortView port
    • firstPort

      protected org.jgraph.graph.PortView firstPort
    • path

      protected JMTPath path
    • ml

      protected GraphMouseListener ml
    • pressed

      protected boolean pressed
    • dashedGraphics

      protected Graphics2D dashedGraphics
    • sourceArc

      protected Point2D sourceArc
    • targetArc

      protected Point2D targetArc
    • tangentSourceArc

      protected Point2D tangentSourceArc
    • tangentTargetArc

      protected Point2D tangentTargetArc
    • arcs

      protected ArrayList<JMTArc> arcs
    • state

      protected String state
    • previous_state

      protected String previous_state
    • last

      protected Point2D last
    • lastMousePosition

      protected Point2D lastMousePosition
  • Constructor Details

  • Method Details

    • setState

      protected void setState(String new_state)
    • handlePress

      public void handlePress(MouseEvent e)
      Overrides:
      handlePress in class UIStateDefault
    • handleExit

      public void handleExit(MouseEvent e)
      Overrides:
      handleExit in class UIStateDefault
    • handleEnter

      public void handleEnter(MouseEvent e)
      Overrides:
      handleEnter in class UIStateDefault
    • handleMove

      public void handleMove(MouseEvent e)
      Overrides:
      handleMove in class UIStateDefault
    • handleDrag

      public void handleDrag(MouseEvent e)
      Overrides:
      handleDrag in class UIStateDefault
    • handleRelease

      public void handleRelease(MouseEvent e)
      Overrides:
      handleRelease in class UIStateDefault
    • getOutPortViewAt

      protected org.jgraph.graph.PortView getOutPortViewAt(int x, int y)
      Gets the first portView of the output port of the cell at position
      Parameters:
      x -
      y -
      Returns:
      portView of the output port
    • getInPortViewAt

      protected org.jgraph.graph.PortView getInPortViewAt(int x, int y)
      Gets the first portView of the input port of the cell at position
      Parameters:
      x -
      y -
      Returns:
      portView of the input port