Class IncrManhattanRouter

  • All Implemented Interfaces:
    ManhattanRouter, Router

    public class IncrManhattanRouter
    extends java.lang.Object
    implements ManhattanRouter
    A manhattan router which does only incremental routing and delegates static routing to another manhattan router implementation.
    Version:
    $Id$
    Author:
    Michael Shilman, John Reekie
    Pt.AcceptedRating:
    Red
    • Constructor Summary

      Constructors 
      Constructor Description
      IncrManhattanRouter​(ManhattanRouter staticRouter)
      Construct a new incremental router which delegates static routing to the given manhattan router, but does incremental routing (the reroute*() methods) on its own.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void reroute​(Connector c, java.awt.Shape s)
      Reroute the given shape, given that both the head the tail sites moved.
      void rerouteHead​(Connector c, java.awt.Shape s)
      Reroute the given Shape, given that the head site moved.
      void rerouteTail​(Connector c, java.awt.Shape s)
      Reroute the given Shape, given that the tail site moved.
      java.awt.Shape route​(Connector c)
      Delegate the static routing to the static router.
      Polyline2D routeManhattan​(ManhattanConnector c)
      Delegate the static routing to the static router.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • IncrManhattanRouter

        public IncrManhattanRouter​(ManhattanRouter staticRouter)
        Construct a new incremental router which delegates static routing to the given manhattan router, but does incremental routing (the reroute*() methods) on its own.
    • Method Detail

      • rerouteHead

        public void rerouteHead​(Connector c,
                                java.awt.Shape s)
        Reroute the given Shape, given that the head site moved.
        Specified by:
        rerouteHead in interface Router
      • rerouteTail

        public void rerouteTail​(Connector c,
                                java.awt.Shape s)
        Reroute the given Shape, given that the tail site moved.
        Specified by:
        rerouteTail in interface Router
      • reroute

        public void reroute​(Connector c,
                            java.awt.Shape s)
        Reroute the given shape, given that both the head the tail sites moved. The shape is modified by the router.
        Specified by:
        reroute in interface Router
      • route

        public java.awt.Shape route​(Connector c)
        Delegate the static routing to the static router.
        Specified by:
        route in interface Router