graph.java

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

JAVA
43
字号
package net.sourceforge.jpowergraph;

import java.util.List;

/**
 * Models a graph.
 */
public interface Graph {
    /**
     * Adds a listener to the graph.
     *
     * @param listener              the listener added to the graph
     */
    void addGraphListener(GraphListener listener);
    /**
     * Removes a listener from the graph.
     *
     * @param listener              the listener removed from the graph
     */
    void removeGraphListener(GraphListener listener);
    /**
     * Notifies the graph that its layout has been updated.
     */
    void notifyLayoutUpdated();
    /**
     * Notifies the graph that its nodes have been updated, but that no node has changed position.
     */
    void notifyUpdated();
    /**
     * Returns a list the nodes in the graph. The order of the list reflects the Z-order of nodes in the graph.
     * Elements with lower indices are lower in the Z-order.
     *
     * @return                      the list of the nodes in the graph
     */
    List getNodes();
    /**
     * Returns a collection of the edges in the graph. The order of the list reflects the Z-order of nodes in the graph.
     *
     * @return                      the list of the edges in the graph
     */
    List getEdges();
}

⌨️ 快捷键说明

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