⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 nodepainter.java

📁 JPowerGraph is a Java library for creating directed graphs for SWT. It supports graph movement, sele
💻 JAVA
字号:
package net.sourceforge.jpowergraph.painters;

import net.sourceforge.jpowergraph.Legend;
import net.sourceforge.jpowergraph.Node;
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 node.
 */
public interface NodePainter {
    
    public static final int SMALL = 0;
    public static final int LARGE = 1;
    
    /**
     * Paints the supplied node.
     *
     * @param graphPane             the graph pane
     * @param g                     the graphics
     * @param node                  the node to paint
     */
    void paintNode(JGraphPane graphPane,GC g,Node node, int size);
    /**
     * Checks whether given point is inside the node.
     *
     * @param graphPane             the graph pane
     * @param node                  the node
     * @param point                 the point
     * @return                      <code>true</code> if the point is in the node
     */
    boolean isInNode(JGraphPane graphPane,Node node,Point point, int size);
    /**
     * Returns the outer rectangle of the node on screen.
     *
     * @param graphPane             the graph pane
     * @param node                  the node
     * @param nodeScreenRectangle   the rectangle receiving the node's coordinates
     */
    void getNodeScreenBounds(JGraphPane graphPane,Node node, int size, Rectangle nodeScreenRectangle);
    /**
     * Paints the specified legend item
     * 
     * @param ThePoint the point to draw the legend item at
     * @param legendText The text for this legend item
     */
    void paintLegendItem(JGraphPane graphPane, GC g, Point thePoint, String legendText);
    /**
     * Returns the dimensions of this legend item
     */
    Point getLegendItemSize(JGraphPane graphPane, String legendText);
    void dispose();
    boolean isDisposed();
}

⌨️ 快捷键说明

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