edgepainter.java

来自「JPowerGraph is a Java library for creati」· Java 代码 · 共 43 行

JAVA
43
字号
package net.sourceforge.jpowergraph.painters;

import net.sourceforge.jpowergraph.Edge;
import net.sourceforge.jpowergraph.pane.JGraphPane;

import org.eclipse.swt.graphics.GC;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.graphics.Rectangle;


/**
 * The painter for the edge.
 */
public interface EdgePainter {
    /**
     * Paints the supplied edge.
     *
     * @param graphPane             the graph pane
     * @param g                     the graphics
     * @param edge                  the edge to paint
     */
    void paintEdge(JGraphPane graphPane,GC g,Edge edge);
    /**
     * Returns the distance of the point to the edge.
     *
     * @param graphPane             the graph pane
     * @param edge                  the edge
     * @param point                 the point
     * @return                      the distance of the point from the edge
     */
    double screenDistanceFromEdge(JGraphPane graphPane,Edge edge,Point point);
    /**
     * Returns the outer rectangle of the edge on screen.
     *
     * @param graphPane             the graph pane
     * @param edge                  the edge
     * @param edgeScreenRectangle   the rectangle receiving the edge's coordinates
     */
    void getEdgeScreenBounds(JGraphPane graphPane,Edge edge,Rectangle edgeScreenRectangle);
    void dispose();
    boolean isDisposed();
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?