1 package de.fzi.wim.guibase.graphview.view;
2
3 import java.awt.Graphics2D;
4 import java.awt.Point;
5 import java.awt.Rectangle;
6
7 import de.fzi.wim.guibase.graphview.graph.*;
8
9 /***
10 * The painter for the edge.
11 */
12 public interface EdgePainter {
13 /***
14 * Paints the supplied edge.
15 *
16 * @param graphPane the graph pane
17 * @param g the graphics
18 * @param edge the edge to paint
19 */
20 void paintEdge(JGraphPane graphPane,Graphics2D g,Edge edge);
21 /***
22 * Returns the distance of the point to the edge.
23 *
24 * @param graphPane the graph pane
25 * @param edge the edge
26 * @param point the point
27 * @return the distance of the point from the edge
28 */
29 double screenDistanceFromEdge(JGraphPane graphPane,Edge edge,Point point);
30 /***
31 * Returns the outer rectangle of the edge on screen.
32 *
33 * @param graphPane the graph pane
34 * @param edge the edge
35 * @param edgeScreenRectangle the rectangle receiving the edge's coordinates
36 */
37 void getEdgeScreenBounds(JGraphPane graphPane,Edge edge,Rectangle edgeScreenRectangle);
38 }