Example #1
0
  @Override
  public void setup(Manipulator m, DialogControls dialogControls) {
    manipulator = (LinkNodes) m;
    nodes = manipulator.getNodes();
    if (manipulator.isDirected()) {
      directedEdge.setSelected(true);
    } else {
      undirectedEdge.setSelected(true);
    }

    Node sourceNode = manipulator.getSourceNode();
    // Prepare combo box with nodes data:
    for (int i = 0; i < nodes.length; i++) {
      sourceNodeComboBox.addItem(nodes[i].getId() + " - " + nodes[i].getLabel());
      if (nodes[i] == sourceNode) {
        sourceNodeComboBox.setSelectedIndex(i);
      }
    }
  }
Example #2
0
 @Override
 public String getDisplayName() {
   return manipulator.getName();
 }
Example #3
0
 @Override
 public void unSetup() {
   manipulator.setSourceNode(nodes[sourceNodeComboBox.getSelectedIndex()]);
   manipulator.setDirected(directedEdge.isSelected());
 }