net.sourceforge.toscanaj.view.diagram
Class LineView

java.lang.Object
  extended byorg.tockit.canvas.CanvasItem
      extended bynet.sourceforge.toscanaj.view.diagram.LineView

public class LineView
extends org.tockit.canvas.CanvasItem

Draws a line between two points, representing a DiagramLine in the model.


Field Summary
static net.sourceforge.toscanaj.view.diagram.LineView.NonRealizedConceptGroupingMode CLOUDS_GROUPING
           
static net.sourceforge.toscanaj.view.diagram.LineView.NonRealizedConceptGroupingMode COLORED_LINES_GROUPING
           
static net.sourceforge.toscanaj.view.diagram.LineView.NonRealizedConceptGroupingMode NO_GROUPING
           
 
Constructor Summary
LineView(DiagramLine diagramLine, NodeView fromView, NodeView toView)
          Creates a view for the given DiagramLine.
 
Method Summary
 boolean containsPoint(java.awt.geom.Point2D point)
          Returns always false since we assume the line to have no width.
 void draw(java.awt.Graphics2D graphics)
          Draws the line.
 java.awt.geom.Rectangle2D getCanvasBounds(java.awt.Graphics2D graphics)
          Calculates the rectangle around this line.
 java.awt.geom.Point2D getPosition()
           
 
Methods inherited from class org.tockit.canvas.CanvasItem
hasAutoRaise
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NO_GROUPING

public static final net.sourceforge.toscanaj.view.diagram.LineView.NonRealizedConceptGroupingMode NO_GROUPING

COLORED_LINES_GROUPING

public static final net.sourceforge.toscanaj.view.diagram.LineView.NonRealizedConceptGroupingMode COLORED_LINES_GROUPING

CLOUDS_GROUPING

public static final net.sourceforge.toscanaj.view.diagram.LineView.NonRealizedConceptGroupingMode CLOUDS_GROUPING
Constructor Detail

LineView

public LineView(DiagramLine diagramLine,
                NodeView fromView,
                NodeView toView)
Creates a view for the given DiagramLine.

Method Detail

draw

public void draw(java.awt.Graphics2D graphics)
Draws the line.


containsPoint

public boolean containsPoint(java.awt.geom.Point2D point)
Returns always false since we assume the line to have no width.


getCanvasBounds

public java.awt.geom.Rectangle2D getCanvasBounds(java.awt.Graphics2D graphics)
Calculates the rectangle around this line.


getPosition

public java.awt.geom.Point2D getPosition()


The ToscanaJ project