Rational Developer for Power Systems Software
V7.6

com.ibm.etools.systems.application.visual.editor.routers
Class SystemManhattanConnectionRouter

java.lang.Object
  extended by AbstractRouter
      extended by com.ibm.etools.systems.application.visual.editor.routers.SystemManhattanConnectionRouter

public final class SystemManhattanConnectionRouter
extends AbstractRouter

Provides a Connection with an orthogonal route between the Connection's source and target anchors. Experiment API. Internal use only.


Constructor Summary
SystemManhattanConnectionRouter(LayeredPane parent)
           
 
Method Summary
protected  int adjust(Connection connection, int col)
           
protected  IFigure findFirstFigureAtStraightLine(Ray start, Ray direction, List excluding)
           
 Object getConstraint(Connection connection)
           
protected  Ray getDirection(Rectangle r, Point p)
          Returns the direction the point p is in relation to the given rectangle.
protected  Ray getEndDirection(Connection conn)
           
protected  List getExcludingFigures(Connection conn)
           
 IFigure getPrimary()
           
protected  int getRowNear(Connection connection, int r, int n, int x)
           
protected  Ray getStartDirection(Connection conn)
           
 void invalidate(Connection connection)
           
protected  boolean isCycle(Connection conn)
           
protected  void processPositions(Ray start, Ray end, List positions, boolean horizontal, Connection conn)
           
 void remove(Connection connection)
           
protected  void removeReservedLines(Connection connection)
           
protected  void reserveColumn(Connection connection, Integer column)
           
protected  void reserveRow(Connection connection, Integer row)
           
 void route(Connection conn)
           
 void setConstraint(Connection connection, Object constraint)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SystemManhattanConnectionRouter

public SystemManhattanConnectionRouter(LayeredPane parent)
Method Detail

invalidate

public void invalidate(Connection connection)
See Also:
ConnectionRouter#invalidate(Connection)

getDirection

protected Ray getDirection(Rectangle r,
                           Point p)
Returns the direction the point p is in relation to the given rectangle. Possible values are LEFT (-1,0), RIGHT (1,0), UP (0,-1) and DOWN (0,1).

Parameters:
r - the rectangle
p - the point
Returns:
the direction from r to p

getEndDirection

protected Ray getEndDirection(Connection conn)

getRowNear

protected int getRowNear(Connection connection,
                         int r,
                         int n,
                         int x)

getStartDirection

protected Ray getStartDirection(Connection conn)

processPositions

protected void processPositions(Ray start,
                                Ray end,
                                List positions,
                                boolean horizontal,
                                Connection conn)

remove

public void remove(Connection connection)
See Also:
ConnectionRouter#remove(Connection)

removeReservedLines

protected void removeReservedLines(Connection connection)

reserveColumn

protected void reserveColumn(Connection connection,
                             Integer column)

reserveRow

protected void reserveRow(Connection connection,
                          Integer row)

route

public void route(Connection conn)
See Also:
ConnectionRouter#route(Connection)

getConstraint

public Object getConstraint(Connection connection)

setConstraint

public void setConstraint(Connection connection,
                          Object constraint)

isCycle

protected boolean isCycle(Connection conn)

getExcludingFigures

protected List getExcludingFigures(Connection conn)

findFirstFigureAtStraightLine

protected IFigure findFirstFigureAtStraightLine(Ray start,
                                                Ray direction,
                                                List excluding)

adjust

protected int adjust(Connection connection,
                     int col)

getPrimary

public IFigure getPrimary()

Rational Developer for Power Systems Software
V7.6

Copyright 2011 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.