Examples of AbstractTreeNode


Examples of hermes.browser.model.tree.AbstractTreeNode

                        cfNode.remove(node);
                        nodesWereRemoved(cfNode, new int[] { index }, new Object[] { node });
                     }
                     else if (node.getParent() instanceof DestinationFragmentTreeNode)
                     {
                        AbstractTreeNode cleanup = node;
                        do
                        {
                           AbstractTreeNode cleanupParent = (AbstractTreeNode) cleanup.getParent();
                           int index = cleanupParent.getIndex(cleanup);
                           cleanupParent.remove(cleanup);

                           nodesWereRemoved(cleanupParent, new int[] { index }, new Object[] { cleanup });
                           cleanup = cleanupParent;
                        }
                        while (cleanup.getChildCount() == 0 && cleanup instanceof DestinationFragmentTreeNode);
View Full Code Here

Examples of hermes.browser.model.tree.AbstractTreeNode

      return false ;
   }
  
   public static void add(BrowserTreeModel model, Hermes hermes, String path, String delimiter, AbstractTreeNode root, AbstractTreeNode leaf)
   {
      AbstractTreeNode currentNode = root;

      for (StringTokenizer tokens = new StringTokenizer(path, delimiter); tokens.hasMoreTokens();)
      {
         String token = tokens.nextToken();
         boolean found = false;

         for (int i = 0; i < currentNode.getChildCount(); i++)
         {
            AbstractTreeNode node = (AbstractTreeNode) currentNode.getChildAt(i);

            if (node.getId().equals(token))
            {
               if (!tokens.hasMoreTokens())
               {
                  currentNode.remove(node);                
                  currentNode.add(leaf);
View Full Code Here

Examples of org.jwall.web.policy.AbstractTreeNode

        && (MouseUtils.isRightClick(e) || e.isPopupTrigger())) {
      // (e.getModifiers() == MouseEvent.BUTTON3 || ( e.getButton() ==
      // MouseEvent.BUTTON1 && e.getModifiersEx() ==
      // MouseEvent.CTRL_DOWN_MASK) )){

      AbstractTreeNode node = (AbstractTreeNode) jtree
          .getLastSelectedPathComponent();
      if (node != null) {
        DefaultPolicyTreePopupMenu p = new DefaultPolicyTreePopupMenu(
            this, node);
View Full Code Here

Examples of org.jwall.web.policy.AbstractTreeNode

    if (e.getSource() == ctree
        && (e.getButton() == MouseEvent.BUTTON3 || (e.getButton() == MouseEvent.BUTTON1 && e
            .getModifiersEx() == MouseEvent.CTRL_DOWN_MASK))) {
      log.warning(e.toString());

      AbstractTreeNode node = (AbstractTreeNode) ctree
          .getLastSelectedPathComponent();
      if (node == null)
        node = (AbstractTreeNode) this.treeModel.getRoot();

      DefaultPolicyTreePopupMenu p = new DefaultPolicyTreePopupMenu(this,
View Full Code Here

Examples of org.richfaces.component.AbstractTreeNode

     */
    private final class RowKeyContextCallback implements ContextCallback {
        private Object rowKey;

        public void invokeContextCallback(FacesContext context, UIComponent target) {
            AbstractTreeNode treeNode = (AbstractTreeNode) target;
            rowKey = treeNode.findTreeComponent().getRowKey();
        }
View Full Code Here

Examples of org.richfaces.component.AbstractTreeNode

    public void doDecode(FacesContext context, UIComponent component) {
        final Map<String, String> map = context.getExternalContext().getRequestParameterMap();
        String newToggleState = map.get(component.getClientId(context) + NEW_NODE_TOGGLE_STATE);
        if (newToggleState != null) {

            AbstractTreeNode treeNode = (AbstractTreeNode) component;

            boolean initialState = treeNode.isExpanded();
            boolean newState = Boolean.valueOf(newToggleState);
            if (initialState ^ newState) {
                new TreeToggleEvent(treeNode, newState).queue();
            }
View Full Code Here

Examples of org.richfaces.component.AbstractTreeNode

    }

    public void encodeMetaComponent(FacesContext context, UIComponent component, String metaComponentId) throws IOException {

        if (AbstractTreeNode.SUBTREE_META_COMPONENT_ID.equals(metaComponentId)) {
            AbstractTreeNode treeNode = (AbstractTreeNode) component;
            new TreeEncoderPartial(context, treeNode).encode();
        } else {
            throw new IllegalArgumentException(metaComponentId);
        }
    }
View Full Code Here

Examples of org.richfaces.component.AbstractTreeNode

    }

    protected void encodeIcon(FacesContext context, UIComponent component) throws IOException {
        TreeNodeState nodeState = getNodeState(context);

        AbstractTreeNode treeNode = (AbstractTreeNode) component;

        AbstractTree tree = treeNode.findTreeComponent();

        if (nodeState.isLeaf()) {
            String iconLeaf = (String) getFirstNonEmptyAttribute("iconLeaf", treeNode, tree);
            encodeIconForNodeState(context, tree, treeNode, nodeState, iconLeaf);
        } else {
            String iconExpanded = (String) getFirstNonEmptyAttribute("iconExpanded", treeNode, tree);
            String iconCollapsed = (String) getFirstNonEmptyAttribute("iconCollapsed", treeNode, tree);

            if (Strings.isNullOrEmpty(iconCollapsed) && Strings.isNullOrEmpty(iconExpanded)) {
                encodeIconForNodeState(context, tree, treeNode, nodeState, null);
            } else {
                SwitchType toggleType = TreeRendererBase.getToggleTypeOrDefault(treeNode.findTreeComponent());

                if (toggleType == SwitchType.client || nodeState == TreeNodeState.collapsed) {
                    encodeIconForNodeState(context, tree, treeNode, TreeNodeState.collapsed, iconCollapsed);
                }
View Full Code Here

Examples of org.richfaces.component.AbstractTreeNode

                    .get("iconClass")), customIcon);
        }
    }

    protected void addClientEventHandlers(FacesContext facesContext, UIComponent component) {
        AbstractTreeNode treeNode = (AbstractTreeNode) component;

        // TODO check node state
        // TODO check toggle/selection types
        TreeRenderingContext renderingContext = TreeRenderingContext.get(facesContext);
        renderingContext.addHandlers(treeNode);
View Full Code Here

Examples of org.richfaces.component.AbstractTreeNode

        TreeRenderingContext renderingContext = TreeRenderingContext.get(facesContext);
        renderingContext.addHandlers(treeNode);
    }

    protected UIComponent getHandleLoadingFacetIfApplicable(UIComponent component) {
        AbstractTreeNode treeNode = (AbstractTreeNode) component;

        AbstractTree tree = treeNode.findTreeComponent();

        if (TreeRendererBase.getToggleTypeOrDefault(tree) != SwitchType.ajax) {
            return null;
        }

        UIComponent facet = treeNode.getFacet(HANDLE_LOADING_FACET_NAME);
        if (facet == null) {
            facet = tree.getFacet(HANDLE_LOADING_FACET_NAME);
        }

        if (facet != null && facet.isRendered()) {
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.