@Override public void requestFocus() { btv.requestFocus(); }
@Override public void requestFocus() { treeView.requestFocus(); }
@Override public void requestFocus() { treeView.requestFocus(); }
@Override public void propertyChange (PropertyChangeEvent event) { if (ExplorerManager.PROP_SELECTED_NODES.equals(event.getPropertyName())) { Node[] nodes = (Node[]) event.getNewValue (); selectLibrary(nodes); libraries.requestFocus(); } } });
@Override public boolean requestFocus(boolean temporary) { if (treeView != null) { return treeView.requestFocus(temporary); } return super.requestFocus(temporary); }
@Override public boolean requestFocus(boolean temporary) { if (treeView != null) { return treeView.requestFocus(temporary); } return super.requestFocus(temporary); }
@Override public void requestFocus() { super.requestFocus(); view.requestFocus(); }
@Override public void addNotify() { super.addNotify(); expandTree(); this.libraries.requestFocus(); }
currentCustomizer = null; btv.requestFocus();
private void setRootNode() { explorer.setRootContext(new AbstractNode(new VariableChildren(model.getVariables()))); tree.requestFocus(); }
private void setRootNode() { explorer.setRootContext(new AbstractNode(new LibraryManagerChildren())); tree.expandAll(); try { if (explorer.getRootContext().getChildren().getNodes(true).length > 0) { explorer.setSelectedNodes(new Node[] {explorer.getRootContext().getChildren().getNodes(true)[0]}); } } catch (PropertyVetoException x) { Exceptions.printStackTrace(x); } /* XXX Nothing seems to work to scroll to top; how is it done? tree.getViewport().setViewPosition(new Point()); tree.getViewport().scrollRectToVisible(new Rectangle(0, 0, 1, 1)); */ tree.requestFocus(); }
private void deleteLibrary(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_deleteLibrary Node[] nodes = this.getExplorerManager().getSelectedNodes(); if (nodes.length == 1) { LibraryImplementation library = nodes[0].getLookup().lookup(LibraryImplementation.class); if (library == null) { return; } Node[] sib = nodes[0].getParentNode().getChildren().getNodes(true); Node selNode = null; for (int i=0; i < sib.length; i++) { if (nodes[0].equals(sib[i])) { if (i>0) { selNode = sib[i-1]; } else if (i<sib.length-1){ selNode = sib[i+1]; } } } model.removeLibrary(library); try { if (selNode != null) { this.getExplorerManager().setSelectedNodes(new Node[] {selNode}); } } catch (PropertyVetoException e) { //Ignore it } this.libraries.requestFocus(); } }//GEN-LAST:event_deleteLibrary