Rational Developer for i
7.5.0

com.ibm.etools.systems.application.visual.editor.routers.internal
Class RectilinearFanRouter

java.lang.Object
  extended by AutomaticRouter
      extended by com.ibm.etools.systems.application.visual.editor.routers.internal.RectilinearFanRouter

public class RectilinearFanRouter
extends AutomaticRouter

The router that detects and avoids the rectilinear connection line overlapping. The connection will fan out in a similar way as oblique fan router does but with rectilinear lines.


Nested Class Summary
protected  class RectilinearFanRouter.HashKey
           
protected  class RectilinearFanRouter.MultiValueMap
           
 
Field Summary
static String copyright
           
 
Constructor Summary
RectilinearFanRouter()
           
 
Method Summary
protected  RectilinearFanRouter.MultiValueMap getConnections()
           
 int getSeparation()
          Returns the separation in pixels between fanned connections.
protected  void handleCollision(PointList points, int index)
           
protected  void handleCollisionWith2(PointList points, int index)
          Handle collision if there are only two points in connection, ie, either vertical or horizontal lines.
protected  void handleCollisionWith3(PointList points, int index)
          Handle collision with connection which has 3 points ( start point, vertex bendpoint, end point)
 void invalidate(Connection conn)
           
 void remove(Connection conn)
           
 void route(Connection conn)
          Routes the given connection.
 void setSeparation(int separation)
          Set the separation in pixels between fanned connections.
protected  boolean shouldCheckOverlapping(Connection conn)
          Check if the given connection is overlapped with other connections.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

copyright

public static String copyright
Constructor Detail

RectilinearFanRouter

public RectilinearFanRouter()
Method Detail

route

public void route(Connection conn)
Routes the given connection. Calls the 'next' router first (if one exists) and if no bendpoints were added by the next router, collisions are dealt with by calling handleCollision(PointList, int).

Parameters:
conn - The connection to route

shouldCheckOverlapping

protected boolean shouldCheckOverlapping(Connection conn)
Check if the given connection is overlapped with other connections.


getConnections

protected RectilinearFanRouter.MultiValueMap getConnections()

getSeparation

public int getSeparation()
Returns the separation in pixels between fanned connections.

Returns:
the separation
Since:
2.0

setSeparation

public void setSeparation(int separation)
Set the separation in pixels between fanned connections.


handleCollision

protected void handleCollision(PointList points,
                               int index)

handleCollisionWith2

protected void handleCollisionWith2(PointList points,
                                    int index)
Handle collision if there are only two points in connection, ie, either vertical or horizontal lines.

Parameters:
points -
index -

handleCollisionWith3

protected void handleCollisionWith3(PointList points,
                                    int index)
Handle collision with connection which has 3 points ( start point, vertex bendpoint, end point)

Parameters:
points -
index -

invalidate

public void invalidate(Connection conn)
See Also:
org.eclipse.draw2d.ConnectionRouter#invalidate(Connection)

remove

public void remove(Connection conn)
See Also:
org.eclipse.draw2d.ConnectionRouter#remove(Connection)

Rational Developer for i
7.5.0

Copyright 2009 IBM Corp. All Rights Reserved.

Note: This documentation is for part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.