View Javadoc

1   package de.fzi.wim.guibase.graphview.graph;
2   
3   import java.util.List;
4   
5   /***
6    * The node in the graph.
7    */
8   public interface Node {
9       /***
10       * Returns the list of edges from the node.
11       *
12       * @return                              the list of edges from the node
13       */
14      List getEdgesFrom();
15      /***
16       * Returns the list of edges to the node.
17       *
18       * @return                              the list of edges to the node
19       */
20      List getEdgesTo();
21      /***
22       * Set the location of this node.
23       *
24       * @param x                             the X coordination
25       * @param y                             the Y coordination
26       */
27      void setLocation(double x,double y);
28      /***
29       * Returns the X coordinate of this node.
30       *
31       * @return                              the X coordinate
32       */
33      double getX();
34      /***
35       * Returns the Y coordinate of this node.
36       *
37       * @return                              the Y coordinate
38       */
39      double getY();
40      /***
41       * The repulstion factor (specifies how much does this node repulses other nodes).
42       *
43       * @return                              the repulsion factor of the node
44       */
45      double getRepulsion();
46      /***
47       * Return the label of this node.
48       *
49       * @return                               the label of this node
50       */
51      String getLabel();
52      /***
53       * Returns <code>true</code> if this node is fixed (in place).
54       *
55       * @return                              <code>true</code> if this node is fixed
56       */
57      boolean isFixed();
58      /***
59       * Makes this node fixed.
60       *
61       * @param fixed                         <code>true</code> if this node is fixed
62       */
63      void setFixed(boolean fixed);
64  }