Exemplo n.º 1
0
  private void processAddNodeActionEvent(UITreeNode srcNode) {
    UITree srcTree = srcNode != null ? srcNode.getUITree() : null;
    TreeRowKey dragNodeKey =
        (srcNode.getDragValue() instanceof TreeRowKey) ? (TreeRowKey) srcNode.getDragValue() : null;
    TreeNode draggedNode = dragNodeKey != null ? srcTree.getTreeNode(dragNodeKey) : null;

    log.debug("dropped key: " + dragNodeKey);

    // add to list of selected properties
    if (draggedNode != null)
      this.dndSelNodes.put(((OntologyProperty) draggedNode.getData()).getURI(), draggedNode);
  }
Exemplo n.º 2
0
  public void processDrop(DropEvent dropEvent) {
    // resolve drag source attributes
    UITreeNode srcNode =
        (dropEvent.getDraggableSource() instanceof UITreeNode)
            ? (UITreeNode) dropEvent.getDraggableSource()
            : null;
    UITree srcTree = srcNode != null ? srcNode.getUITree() : null;
    TreeRowKey dragNodeKey =
        (dropEvent.getDragValue() instanceof TreeRowKey)
            ? (TreeRowKey) dropEvent.getDragValue()
            : null;
    TreeNode draggedNode = dragNodeKey != null ? srcTree.getTreeNode(dragNodeKey) : null;

    log.debug("dropped key: " + dragNodeKey);

    // add to list of selected properties
    if (draggedNode != null)
      this.dndSelNodes.put(((OntologyProperty) draggedNode.getData()).getURI(), draggedNode);
  }