Package org.openide.explorer

Examples of org.openide.explorer.ExplorerManager


        ExplorerManager.Provider, Lookup.Provider, PropertyChangeListener {

    /** Creates new form MainFrame */
    public MainFrame(String[] args) throws Exception {
        // same as before...
        manager = new ExplorerManager();
        ActionMap map = getRootPane().getActionMap();
        map.put(DefaultEditorKit.copyAction, ExplorerUtils.actionCopy(manager));
        map.put(DefaultEditorKit.cutAction, ExplorerUtils.actionCut(manager));
        map.put(DefaultEditorKit.pasteAction, ExplorerUtils.actionPaste(manager));
        map.put("delete", ExplorerUtils.actionDelete(manager, true)); // or false
View Full Code Here


        ExplorerManager.Provider, Lookup.Provider, PropertyChangeListener {

    /** Creates new form MainFrame */
    public MainFrame(String[] args) throws Exception {
        // same as before...
        manager = new ExplorerManager();
        ActionMap map = getRootPane().getActionMap();
        map.put(DefaultEditorKit.copyAction, ExplorerUtils.actionCopy(manager));
        map.put(DefaultEditorKit.cutAction, ExplorerUtils.actionCut(manager));
        map.put(DefaultEditorKit.pasteAction, ExplorerUtils.actionPaste(manager));
        map.put("delete", ExplorerUtils.actionDelete(manager, true)); // or false
View Full Code Here

    Explorer(Service service) {
        this.roots = new Children.Array();
        roots.add(new Node[] { new ServiceNode(service) });
        Node root = new AbstractNode(roots);
        root.setDisplayName("Root"); // Not visible
        this.manager = new ExplorerManager();
        this.manager.setRootContext(root);
        initialize();
    }
View Full Code Here

                    return true;
                }
            };
        }
       
        manager = new ExplorerManager();
        AbstractNode rootNode = new AbstractNode(new SourceGroupsChildren(folders));
        manager.setRootContext(rootNode);
       
        // Create the templates view
        BeanTreeView btv = new BeanTreeView();
View Full Code Here

    }
       

    public synchronized ExplorerManager getExplorerManager() {
        if (this.manager == null) {
            this.manager = new ExplorerManager ();
            this.manager.setRootContext(new AbstractNode (getChildren()));
            this.manager.addPropertyChangeListener (this);
            this.manager.addVetoableChangeListener(this);
        }
        return manager;
View Full Code Here

        ScalaPlatform defaultPlatform = ScalaPlatformManager.getDefault().getDefaultPlatform();
        return defaultPlatform!=null && !defaultPlatform.equals(platform);
    }

    private void expandPlatforms (ScalaPlatform platform) {
        ExplorerManager mgr = this.getExplorerManager();
        Node node = mgr.getRootContext();
        expandAllNodes(this.platforms, node, mgr, platform);
    }
View Full Code Here

    private BytecodeViewTopComponent() {
        initComponents();
        setName(NbBundle.getMessage(BytecodeViewTopComponent.class, "CTL_BytecodeViewTopComponent"));
        setToolTipText(NbBundle.getMessage(BytecodeViewTopComponent.class, "HINT_BytecodeViewTopComponent"));

        manager = new ExplorerManager();
        rootNode = new MethodNode(null, null, "");
        manager.setRootContext(rootNode);

        setLayout(new BorderLayout());
View Full Code Here

        super.removeNotify();
        manager.removePropertyChangeListener(managerListener);
    }   

    private void updateButtons() {
        ExplorerManager m = manager;
        Node[] nodes = m.getSelectedNodes();  
        boolean singleSel = nodes.length == 1;

        // these buttons are valid only for single selection
        if (indexableParent != null && singleSel) {
            // If the nodes provide ReorderCookie, they can be reordered inside their parent.
View Full Code Here

        }
    }

    FileObject showSelectMainFileDialog () {
        ExplorerPanel ep = new ExplorerPanel();
        final ExplorerManager mgr = ep.getExplorerManager();
        ChildFactory<?> kids = new AllJSFiles( getProjectDirectory() );
        Children ch = Children.create( kids, true );
        Node root = new AbstractNode( ch );
        mgr.setRootContext( root );
        final SwingValidationGroup grp = SwingValidationGroup.create();
        ValidationPanel pnl = new ValidationPanel( grp );
        pnl.setInnerComponent( ep );
        class X extends ValidationListener<Void> implements PropertyChangeListener {
            X () {
                super( Void.class, ValidationUI.NO_OP, null );
            }

            @Override
            public void propertyChange ( PropertyChangeEvent pce ) {
                grp.performValidation();
            }

            @Override
            protected void performValidation ( Problems prblms ) {
                Node[] selection = mgr.getSelectedNodes();
                if (selection != null && selection.length == 1) {
                    return;
                }
                prblms.add( new Problem( NbBundle.getMessage( NodeJSProject.class, "PROBLEM_NO_MAIN_FILE" ), Severity.FATAL ) ); //NOI18N
            }
        }
        X x = new X();
        mgr.addPropertyChangeListener( x );
        grp.addItem( x, true );
        DialogBuilder b = new DialogBuilder( NodeJSProject.class ).setModal( true ).setContent( ep ).setValidationGroup( grp ).setTitle( NbBundle.getMessage( NodeJSProject.class, "CHOOSE_NO_MAIN_FILE" ) ).setDialogType( DialogType.QUESTION );
        if (b.showDialog( NotifyDescriptor.OK_OPTION ) && mgr.getSelectedNodes().length == 1) {
            Node n = mgr.getSelectedNodes()[0];
            FileObject fo = n.getLookup().lookup( DataObject.class ).getPrimaryFile();
            return fo;
        }
        return null;
    }
View Full Code Here

        //        setIcon(Utilities.loadImage(ICON_PATH, true));

        sequence = new FilterChain();
        filterChain = new FilterChain();
        initFilters();
        manager = new ExplorerManager();
        manager.setRootContext(new AbstractNode(new FilterChildren()));
        associateLookup(ExplorerUtils.createLookup(manager, getActionMap()));
        view = new CheckListView();

        ToolbarPool.getDefault().setPreferredIconSize(16);
View Full Code Here

TOP

Related Classes of org.openide.explorer.ExplorerManager

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.