Package org.apache.wicket.markup.html.tree

Examples of org.apache.wicket.markup.html.tree.ITreeState


        }
    }

    @SuppressWarnings("unchecked")
    public String getSelectedNodeKey() {
        ITreeState treeState = getTree().getTreeState();
        Collection<DefaultMutableTreeNode> selectedNodes = treeState.getSelectedNodes();
        String selectedKey = null;
        if (selectedNodes.size() > 0) {
            DefaultMutableTreeNode selectedNode = selectedNodes.iterator().next();
            ResourceKeyTreePanel.NodeBean userObject = (NodeBean) selectedNode.getUserObject();
            selectedKey = userObject.getResourceKey();
View Full Code Here


        public void nodeUnselected(final TreeNode node) {
            // nothing to do
        }

        public void nodeSelected(final TreeNode node) {
            final ITreeState treeState = getTree().getTreeState();
            if (!node.isLeaf()) {
                if (node.equals(previouslySelected) && treeState.isNodeExpanded(node)) {
                    treeState.collapseNode(node);
                } else {
                    treeState.expandNode(node);
                }
            }
            previouslySelected = node;
        }
View Full Code Here

      }

      @Override
      protected void onNodeLinkClicked(Object node, BaseTree tree, AjaxRequestTarget target)
      {
        ITreeState state = tree.getTreeState();
        if (state.isNodeExpanded(node) && state.isNodeSelected(node))
        {
          state.collapseNode(node);
        }
        else
        {
          state.expandNode(node);
        }
        state.selectNode(node, true);


        JmxTreeNode jmxNode = (JmxTreeNode)node;
        Object object = jmxNode.getUserObject();
        Panel panel = null;
View Full Code Here

TOP

Related Classes of org.apache.wicket.markup.html.tree.ITreeState

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.