예제 #1
0
 /**
  * Recalculates and reapplies all of the node appearances. The visual attributes are calculated by
  * delegating to the NodePainter member of the current visual style.
  */
 public void applyNodeAppearances() {
   for (PNodeView nodeView : nodeViewMap.values()) {
     FNode node = nodeView.getNode();
     HGHandle h = node.getHandle();
     NodePainter p = getPainter(h, false);
     p.paintNode(nodeView);
   }
 }
예제 #2
0
  /**
   * Adds a PNodeView given a FNode
   *
   * @param node the node
   * @return a new PNodeView or existing one
   */
  public PNodeView addNodeView(FNode node) {
    if (nodeViewMap.containsKey(node)) return nodeViewMap.get(node);

    PNodeView node_view = new PNodeView(node, this);
    nodeViewMap.put(node, node_view);
    addToNodeLayer(node_view);
    fireGraphChanged(new GraphViewNodesAddedEvent(this, new FNode[] {node}));
    def_node_painter.paintNode(node_view);
    return node_view;
  }