org.argouml.uml.diagram.layout
Class LayoutHelper

java.lang.Object
  extended byorg.argouml.uml.diagram.layout.LayoutHelper

public class LayoutHelper
extends java.lang.Object

LayoutHelper is a utility class which mainly returns various types of routing polygons for different kind of connection lines between two nodes. Specific layouters might use these methods to reuse certain kinds of diagram lines.


Field Summary
static int EAST
           
static int NORTH
           
static int NORTHEAST
           
static int NORTHWEST
           
static int SOUTH
           
static int SOUTHEAST
           
static int SOUTHWEST
           
static int WEST
           
 
Constructor Summary
LayoutHelper()
           
 
Method Summary
static java.awt.Point getPointOnPerimeter(java.awt.Rectangle rect, int direction)
           
static java.awt.Point getPointOnPerimeter(java.awt.Rectangle rect, int direction, double xOff, double yOff)
           
static java.awt.Polygon getRoutingPolygonStraightLine(java.awt.Point start, java.awt.Point end)
          get a routing polygon for a straightline between two points
static java.awt.Polygon getRoutingPolygonStraightLineWithOffset(java.awt.Point start, java.awt.Point end, int offset)
          get a routing polygon with a horizontal offset from the two points
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NORTH

public static final int NORTH
See Also:
Constant Field Values

NORTHEAST

public static final int NORTHEAST
See Also:
Constant Field Values

EAST

public static final int EAST
See Also:
Constant Field Values

SOUTHEAST

public static final int SOUTHEAST
See Also:
Constant Field Values

SOUTH

public static final int SOUTH
See Also:
Constant Field Values

SOUTHWEST

public static final int SOUTHWEST
See Also:
Constant Field Values

WEST

public static final int WEST
See Also:
Constant Field Values

NORTHWEST

public static final int NORTHWEST
See Also:
Constant Field Values
Constructor Detail

LayoutHelper

public LayoutHelper()
Method Detail

getPointOnPerimeter

public static java.awt.Point getPointOnPerimeter(java.awt.Rectangle rect,
                                                 int direction)

getPointOnPerimeter

public static java.awt.Point getPointOnPerimeter(java.awt.Rectangle rect,
                                                 int direction,
                                                 double xOff,
                                                 double yOff)

getRoutingPolygonStraightLine

public static java.awt.Polygon getRoutingPolygonStraightLine(java.awt.Point start,
                                                             java.awt.Point end)
get a routing polygon for a straightline between two points


getRoutingPolygonStraightLineWithOffset

public static java.awt.Polygon getRoutingPolygonStraightLineWithOffset(java.awt.Point start,
                                                                       java.awt.Point end,
                                                                       int offset)
get a routing polygon with a horizontal offset from the two points



ArgoUML © 1996-2004 (20040316)ArgoUML HomepageArgoUML Developers' pageArgoUML Cookbook