Package org.jwall.web.policy

Examples of org.jwall.web.policy.TreeNode


        jtree.startEditingAtPath(new TreePath(PolicyTreeModel
            .getPath(ct)));
      }

      if (AbstractTreeAction.TREE_DELETE_NODE == e.getActionCommand()) {
        TreeNode parent = node.getParent();
        if (parent == null)
          return;
        parent.remove(node);
        rmodel.notify(parent);
      }

      if (AbstractTreeAction.TREE_INSERT_LIMIT == e.getActionCommand()) {
        Limit limit = new Limit();
View Full Code Here


    if (filter != null) {

      Iterator<TreeNode> it = list.iterator();
      while (it.hasNext()) {
        TreeNode ch = it.next();
        if (!filter.matches(ch))
          it.remove();
      }
    }
View Full Code Here

   * @see javax.swing.tree.TreeModel#getIndexOfChild(java.lang.Object,
   * java.lang.Object)
   */
  public int getIndexOfChild(Object arg0, Object arg1) {
    LinkedList<TreeNode> list = this.getAllChildren((TreeNode) arg0);
    TreeNode child = (TreeNode) arg1;
    return list.indexOf(child);
  }
View Full Code Here

  public static Object[] getPath(TreeNode node) {

    LinkedList<TreeNode> nodes = new LinkedList<TreeNode>();

    TreeNode cur = node;
    while (cur != null) {
      nodes.addFirst(cur);
      cur = cur.getParent();
    }

    return nodes.toArray();
  }
View Full Code Here

   * nothing.
   *
   * @param node
   */
  public void deleteNode(TreeNode node) {
    TreeNode parent = node.getParent();
    if (parent != null) {
      parent.remove(node);
      notify(parent);
    }
  }
View Full Code Here

  public boolean isEditable() {
    return true;
  }

  protected SuperClass getSuperClass(TreeNode node) {
    TreeNode cur = node;
    while (cur != null) {
      if (cur instanceof SuperClass)
        return (SuperClass) node;

      cur = cur.getParent();
    }

    return null;
  }
View Full Code Here

          .getActionCommand()) {
        treeModel.notify(node);
      }

      if (AbstractTreeAction.TREE_DELETE_NODE == e.getActionCommand()) {
        TreeNode parent = node.getParent();
        if (parent == null)
          return;
        parent.remove(node);
        treeModel.notify(parent);
      }

      if (AbstractTreeAction.TREE_EDIT_NODE == e.getActionCommand()) {
        if (ctree.isEditable())
View Full Code Here

TOP

Related Classes of org.jwall.web.policy.TreeNode

Copyright © 2018 www.massapicom. 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.