org.argouml.uml.diagram.static_structure.layout
Class ClassdiagramEdge

java.lang.Object
  extended byorg.argouml.uml.diagram.static_structure.layout.ClassdiagramEdge
All Implemented Interfaces:
LayoutedEdge, LayoutedObject
Direct Known Subclasses:
ClassdiagramAssociationEdge, ClassdiagramInheritanceEdge, ClassdiagramNoteEdge

public abstract class ClassdiagramEdge
extends Object
implements LayoutedEdge

This class is an abstract implementation of all edges which are layoutable in the classdiagram.

Since:
0.11.1

Field Summary
private  org.tigris.gef.presentation.FigEdge currentEdge
           
private  org.tigris.gef.presentation.Fig destFigNode
          each fig has a source and a destination port
private static int hGap
           
private  org.tigris.gef.presentation.Fig sourceFigNode
           
private  org.tigris.gef.presentation.FigPoly underlyingFig
          the underlying fig of the edge we want to layout
private static int vGap
          the layout is oriented on a grid.
 
Constructor Summary
ClassdiagramEdge(org.tigris.gef.presentation.FigEdge edge)
          Constructor.
 
Method Summary
protected  org.tigris.gef.presentation.FigEdge getCurrentEdge()
           
(package private)  org.tigris.gef.presentation.Fig getDestFigNode()
           
static int getHGap()
           
(package private)  org.tigris.gef.presentation.Fig getSourceFigNode()
           
protected  org.tigris.gef.presentation.FigPoly getUnderlyingFig()
           
static int getVGap()
           
abstract  void layout()
          Abstract method to layout the edge.
static void setHGap(int h)
           
static void setVGap(int v)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

vGap

private static int vGap
the layout is oriented on a grid. These are our grid spaces.


hGap

private static int hGap

currentEdge

private org.tigris.gef.presentation.FigEdge currentEdge

underlyingFig

private org.tigris.gef.presentation.FigPoly underlyingFig
the underlying fig of the edge we want to layout


destFigNode

private org.tigris.gef.presentation.Fig destFigNode
each fig has a source and a destination port


sourceFigNode

private org.tigris.gef.presentation.Fig sourceFigNode
Constructor Detail

ClassdiagramEdge

public ClassdiagramEdge(org.tigris.gef.presentation.FigEdge edge)
Constructor.

Parameters:
edge - the Edge to layout
Method Detail

layout

public abstract void layout()
Abstract method to layout the edge.

Specified by:
layout in interface LayoutedEdge
See Also:
LayoutedEdge.layout()

setHGap

public static void setHGap(int h)
Parameters:
h - the horizontal gap

setVGap

public static void setVGap(int v)
Parameters:
v - the vertical gap

getHGap

public static int getHGap()
Returns:
the horizontal gap

getVGap

public static int getVGap()
Returns:
the vertical gap

getDestFigNode

org.tigris.gef.presentation.Fig getDestFigNode()
Returns:
Returns the destFigNode.

getSourceFigNode

org.tigris.gef.presentation.Fig getSourceFigNode()
Returns:
Returns the sourceFigNode.

getCurrentEdge

protected org.tigris.gef.presentation.FigEdge getCurrentEdge()
Returns:
Returns the currentEdge.

getUnderlyingFig

protected org.tigris.gef.presentation.FigPoly getUnderlyingFig()
Returns:
Returns the underlyingFig.


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