Examples of nodesWereInserted()


Examples of javax.swing.tree.DefaultTreeModel.nodesWereInserted()

              if (n.comp == o) {
                int[] changed = { i };
                children.remove(i);
                model.nodesWereRemoved(this, changed, new Object[] { n });
                children.add(i, new ComponentNode(this, n.comp));
                model.nodesWereInserted(this, changed);
              }
            }
          }
        }
      }
View Full Code Here

Examples of javax.swing.tree.DefaultTreeModel.nodesWereInserted()

        parentNode.add(ret);

        // Tell the model that a new node has been inserted
        DefaultTreeModel model = (DefaultTreeModel)cellHierarchyTree.getModel();
        int childIndex = parentNode.getIndex(ret);
        model.nodesWereInserted(parentNode, new int[] { childIndex });

        // Recursively iterate through all of the Cell's children and add to
        // the tree.
        List<Cell> children = cell.getChildren();
        for (Cell child : children) {
View Full Code Here

Examples of javax.swing.tree.DefaultTreeModel.nodesWereInserted()

                            if (n.comp == o) {
                                int[] changed = { i };
                                children.remove(i);
                                model.nodesWereRemoved(this, changed, new Object[] { n });
                                children.add(i, new ComponentNode(this, n.comp));
                                model.nodesWereInserted(this, changed);
                            }
                        }
                    }
                }
            }
View Full Code Here

Examples of javax.swing.tree.DefaultTreeModel.nodesWereInserted()

    if (selected != null) {
        DefaultMutableTreeNode parent = (DefaultMutableTreeNode) selected.getLastPathComponent();
        DefaultMutableTreeNode child = new DefaultMutableTreeNode("child " + (parent.getChildCount() + 1));
        parent.add(child);
        DefaultTreeModel dtm = (DefaultTreeModel) tree.getModel();
        dtm.nodesWereInserted(parent, new int[] { parent.getIndex(child) });
        tree.expandPath(selected);
    }
      }
  };
  addButton.addActionListener(addListener);
View Full Code Here

Examples of javax.swing.tree.DefaultTreeModel.nodesWereInserted()

    if (resource != null) {
        System.out.println("Adding to " + resource.toString());
        DefaultTreeModel dtm = (DefaultTreeModel) CheckboxTreeExample.this.checkboxTree.getModel();
        DefaultMutableTreeNode node = new DefaultMutableTreeNode("test");
        resource.add(node);
        dtm.nodesWereInserted(resource, new int[] { resource.getIndex(node) });
        System.out.println("posizione: " + resource.getIndex(node));
    }
      }

  }
View Full Code Here

Examples of javax.swing.tree.DefaultTreeModel.nodesWereInserted()

        childNode = new DefaultMutableTreeNode("Item " + (count + 1) + ".2");
        parentNode.insert(childNode,1);

        // Notificamos la inserci�n del peque�o �rbol

        dataModel.nodesWereInserted(rootNode,new int[]{count});
    }

    public void removeItems()
    {
        DefaultTreeModel dataModel = (DefaultTreeModel)comp.getTreeModel();
View Full Code Here

Examples of javax.swing.tree.DefaultTreeModel.nodesWereInserted()

/*     */
/* 263 */                   int[] i = new int[1];
/*     */
/* 265 */                   i[0] = (currentRoot.getChildCount() - 1);
/*     */
/* 267 */                   model.nodesWereInserted(currentRoot, i);
/*     */
/* 269 */                   added = true;
/*     */                 }
/*     */
/* 272 */                 currentRoot = findRoot(top, currentNode);
View Full Code Here

Examples of org.apache.myfaces.custom.tree.model.DefaultTreeModel.nodesWereInserted()

            // Get the index of the new node.
            TreeNode parentNode = SecurityApplicationUtils.findTreeNode(roleTree, getParentRole().getFullPath());
            TreeNode childNode = SecurityApplicationUtils.findTreeNode(roleTree, addedRole.getPreferences().absolutePath());
            int [] childIndices = {treeModel.getIndexOfChild(parentNode, childNode)};
            // Send the node inserted event.
            treeModel.nodesWereInserted(parentNode, childIndices);
        }
        catch (SecurityException se)
        {
            log.error("Error adding role " + getRoleName() + ". " + se);
        }
View Full Code Here

Examples of org.apache.myfaces.custom.tree.model.DefaultTreeModel.nodesWereInserted()

            // Get the index of the new node.
            TreeNode parentNode = SecurityApplicationUtils.findTreeNode(roleTree, getParentRole().getFullPath());
            TreeNode childNode = SecurityApplicationUtils.findTreeNode(roleTree, addedRole.getPreferences().absolutePath());
            int [] childIndices = {treeModel.getIndexOfChild(parentNode, childNode)};
            // Send the node inserted event.
            treeModel.nodesWereInserted(parentNode, childIndices);
        }
        catch (SecurityException se)
        {
            log.error("Error adding role " + getRoleName() + ". " + se);
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.