Class StraightConnector

    • Constructor Detail

      • StraightConnector

        public StraightConnector​(Site tail,
                                 Site head)
        Create a new straight connector between the given sites. The connector is drawn with a width of one and in black.
    • Method Detail

      • repositionLabel

        public void repositionLabel()
        Tell the connector to reposition its label if it has one. The label is currently only positioned at the center of the arc.
        Specified by:
        repositionLabel in class AbstractConnector
      • route

        public void route()
        Tell the connector to route itself between the current positions of the head and tail sites.
        Specified by:
        route in interface Connector
        Specified by:
        route in class AbstractConnector
      • translate

        public void translate​(double x,
                              double y)
        Translate the connector. This method is implemented, since controllers may wish to translate connectors when the sites at both ends are moved the same distance.
        Specified by:
        translate in interface Figure
        Specified by:
        translate in class AbstractConnector
        Parameters:
        x - The x value to be moved.
        y - The y value to be moved.