/** Set the explored context. * The node selection will be cleared as well. * @param value the new node to explore, or <code>null</code> if none should be explored. * @throws IllegalArgumentException if the node is not within the current root context in the node hierarchy */ public final void setExploredContext(Node value) { setExploredContext(value, new Node[0]); }
/** Set the explored context. * The node selection will be cleared as well. * @param value the new node to explore, or <code>null</code> if none should be explored. * @throws IllegalArgumentException if the node is not within the current root context in the node hierarchy */ public final void setExploredContext(Node value) { setExploredContext(value, new Node[0]); }
/** Set the explored context. * The node selection will be cleared as well. * @param value the new node to explore, or <code>null</code> if none should be explored. * @throws IllegalArgumentException if the node is not within the current root context in the node hierarchy */ public final void setExploredContext(Node value) { setExploredContext(value, new Node[0]); }
protected void selectionChanged(Node[] nodes, ExplorerManager man) throws PropertyVetoException { if (nodes.length > 0) { man.setExploredContext(nodes[0]); } man.setSelectedNodes(nodes); }
protected void selectionChanged(Node[] nodes, ExplorerManager man) throws PropertyVetoException { if (nodes.length > 0) { man.setExploredContext (nodes[0]); } man.setSelectedNodes(nodes); }
protected void selectionChanged(Node[] nodes, ExplorerManager man) throws PropertyVetoException { if (nodes.length > 0) { man.setExploredContext (nodes[0]); } man.setSelectedNodes(nodes); }
/** Is the set of nodes acceptable? * @param nodes the nodes to consider * @return <CODE>true</CODE> if so */ public boolean acceptNodes(Node[] nodes) { // don't allow multiple selections if ((nodes == null) || (nodes.length != 1)) { return false; } Node n = nodes[0]; Node parent = n.getParentNode(); if (parent != null) { explorerManager.setExploredContext(parent, new Node[] { n }); } return true; }
/** Is the set of nodes acceptable? * @param nodes the nodes to consider * @return <CODE>true</CODE> if so */ public boolean acceptNodes(Node[] nodes) { // don't allow multiple selections if ((nodes == null) || (nodes.length != 1)) { return false; } Node n = nodes[0]; Node parent = n.getParentNode (); if (parent != null) { explorerManager.setExploredContext (parent, new Node[] { n }); } return true; }
/** Is the set of nodes acceptable? * @param nodes the nodes to consider * @return <CODE>true</CODE> if so */ public boolean acceptNodes(Node[] nodes) { // don't allow multiple selections if ((nodes == null) || (nodes.length != 1)) { return false; } Node n = nodes[0]; Node parent = n.getParentNode (); if (parent != null) { explorerManager.setExploredContext (parent, new Node[] { n }); } return true; }
public void run() { // convert paths to Nodes List<Node> selNodes = new ArrayList<Node>(selectedPaths.size()); for (Object path : selectedPaths) { selNodes.add(findPath(root, (String[]) path)); } // set the selection Node[] newSelection = selNodes.toArray(new Node[selNodes.size()]); if (exploredCtx != null) { setExploredContext(findPath(root, exploredCtx), newSelection); } else { setSelectedNodes0(newSelection); } } }
public void run() { // convert paths to Nodes List selNodes = new ArrayList(selectedPaths.size()); for (Iterator iter = selectedPaths.iterator(); iter.hasNext(); ) { String[] path = (String[]) iter.next(); selNodes.add(findPath(root, path)); } // set the selection Node[] newSelection = (Node[]) selNodes.toArray(new Node[selNodes.size ()]); if (exploredCtx != null) { setExploredContext(findPath(root, exploredCtx), newSelection); } else { setSelectedNodes0(newSelection); } } });
public void run() { // convert paths to Nodes List selNodes = new ArrayList(selectedPaths.size()); for (Iterator iter = selectedPaths.iterator(); iter.hasNext(); ) { String[] path = (String[]) iter.next(); selNodes.add(findPath(root, path)); } // set the selection Node[] newSelection = (Node[]) selNodes.toArray(new Node[selNodes.size ()]); if (exploredCtx != null) { setExploredContext(findPath(root, exploredCtx), newSelection); } else { setSelectedNodes0(newSelection); } } });
public void actionPerformed(ActionEvent e) { if (traversalAllowed) { Node pan = manager.getExploredContext(); pan = pan.getParentNode(); if (pan != null) { manager.setExploredContext(pan, manager.getSelectedNodes()); } } }
public void actionPerformed(ActionEvent e) { if (traversalAllowed) { Node pan = manager.getExploredContext(); pan = pan.getParentNode(); if (pan != null) manager.setExploredContext(pan, manager.getSelectedNodes()); } } public boolean isEnabled() {
public void actionPerformed(ActionEvent e) { if (traversalAllowed) { Node pan = manager.getExploredContext(); pan = pan.getParentNode(); if (pan != null) manager.setExploredContext(pan, manager.getSelectedNodes()); } } public boolean isEnabled() {
@Override public void addNotify() { ExplorerManager em = ExplorerManager.find(this); em.setRootContext(rootNode); em.setExploredContext(rootNode); expandNode(rootNode); super.addNotify(); } }
manager.setExploredContext (node, manager.getSelectedNodes());
manager.setExploredContext (node, manager.getSelectedNodes());
/** Set the root context. * The explored context will be set to the new root context as well. * If any of the selected nodes are not inside it, the selection will be cleared. * @param value the new node to serve as a root * @throws IllegalArgumentException if it is <code>null</code> */ public final void setRootContext(Node value) { if (value == null) throw new IllegalArgumentException(getString("EXC_CannotHaveNullRootContext")); if (rootContext.equals (value)) return; Node oldValue = rootContext; rootContext = value; oldValue.removeNodeListener (weakListener); rootContext.addNodeListener (weakListener); fireInAWT(PROP_ROOT_CONTEXT, oldValue, rootContext); Node[] newselection = getSelectedNodes(); if (!areUnderTarget(newselection, rootContext)) { newselection = new Node[0]; } setExploredContext(rootContext, newselection); }
/** Set the root context. * The explored context will be set to the new root context as well. * If any of the selected nodes are not inside it, the selection will be cleared. * @param value the new node to serve as a root * @throws IllegalArgumentException if it is <code>null</code> */ public final void setRootContext(Node value) { if (value == null) throw new IllegalArgumentException(getString("EXC_CannotHaveNullRootContext")); if (rootContext.equals (value)) return; Node oldValue = rootContext; rootContext = value; oldValue.removeNodeListener (weakListener); rootContext.addNodeListener (weakListener); fireInAWT(PROP_ROOT_CONTEXT, oldValue, rootContext); Node[] newselection = getSelectedNodes(); if (!areUnderTarget(newselection, rootContext)) { newselection = new Node[0]; } setExploredContext(rootContext, newselection); }