com.googlecode.whatswrong
Interface EdgeLayout


public interface EdgeLayout

An EdgeLayout draws a set of edges onto a Graphics2D object.

Author:
Sebastian Riedel

Method Summary
 int getHeight()
          The height of the layout for the last call to layout(java.util.Collection, TokenLayout, java.awt.Graphics2D).
 int getWidth()
          The width of the layout for the last call to layout(java.util.Collection, TokenLayout, java.awt.Graphics2D).
 void layout(java.util.Collection<Edge> edges, TokenLayout tokenLayout, java.awt.Graphics2D g2d)
          Draws the edges onto the graphics object.
 

Method Detail

layout

void layout(java.util.Collection<Edge> edges,
            TokenLayout tokenLayout,
            java.awt.Graphics2D g2d)
Draws the edges onto the graphics object. In order to draw edges the method need to know the layout of the tokens (i.e. the position of the tokens).

Parameters:
edges - a set of edges.
tokenLayout - a token layout.
g2d - the graphics object to draw to.

getHeight

int getHeight()
The height of the layout for the last call to layout(java.util.Collection, TokenLayout, java.awt.Graphics2D).

Returns:
the height in pixels.

getWidth

int getWidth()
The width of the layout for the last call to layout(java.util.Collection, TokenLayout, java.awt.Graphics2D).

Returns:
the height in pixels.


Copyright © 2010. All Rights Reserved.