当前位置: 首页>>代码示例>>Java>>正文


Java ExplorerUtils类代码示例

本文整理汇总了Java中org.openide.explorer.ExplorerUtils的典型用法代码示例。如果您正苦于以下问题:Java ExplorerUtils类的具体用法?Java ExplorerUtils怎么用?Java ExplorerUtils使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


ExplorerUtils类属于org.openide.explorer包,在下文中一共展示了ExplorerUtils类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: AbstractSearchResultsPanel

import org.openide.explorer.ExplorerUtils; //导入依赖的package包/类
/**
 * Creates new form AbstractSearchResultsPanel
 */
public AbstractSearchResultsPanel(SearchComposition<?> searchComposition,
        SearchProvider.Presenter searchProviderPresenter) {
    this.searchComposition = searchComposition;
    this.searchProviderPresenter = searchProviderPresenter;
    initComponents();
    explorerManager = new ExplorerManager();

    ActionMap map = this.getActionMap();
    // map delete key to delete action
    map.put("delete", //NOI18N
            ExplorerUtils.actionDelete(explorerManager, false));
    map.put(DefaultEditorKit.copyAction,
            ExplorerUtils.actionCopy(explorerManager));
    map.put(DefaultEditorKit.cutAction,
            ExplorerUtils.actionCut(explorerManager));

    lookup = ExplorerUtils.createLookup(explorerManager,
            ResultView.getInstance().getActionMap());
    initActions();
    initToolbar();
    initSelectionListeners();
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:26,代码来源:AbstractSearchResultsPanel.java

示例2: ServicesTab

import org.openide.explorer.ExplorerUtils; //导入依赖的package包/类
private ServicesTab() {
    manager = new ExplorerManager();
    manager.setRootContext(new ServicesNode());
    ActionMap map = 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, false));
    associateLookup(ExplorerUtils.createLookup(manager, map));
    view = new BeanTreeView();
    view.setRootVisible(false);
    setLayout(new BorderLayout());
    add(view);
    setName(ID);
    setDisplayName(NbBundle.getMessage(ServicesTab.class, "LBL_Services"));
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:17,代码来源:ServicesTab.java

示例3: TemplatesPanel

import org.openide.explorer.ExplorerUtils; //导入依赖的package包/类
/** Creates new form TemplatesPanel */
public TemplatesPanel (String pathToSelect) {
    
    ActionMap map = getActionMap ();
    map.put (DefaultEditorKit.copyAction, ExplorerUtils.actionCopy (getExplorerManager ()));
    map.put (DefaultEditorKit.cutAction, ExplorerUtils.actionCut (getExplorerManager ()));
    map.put (DefaultEditorKit.pasteAction, ExplorerUtils.actionPaste (getExplorerManager ()));
    map.put ("delete", ExplorerUtils.actionDelete (getExplorerManager (), true)); // NOI18N
    
    initComponents ();
    createTemplateView ();
    treePanel.add (view, BorderLayout.CENTER);
    
    associateLookup (ExplorerUtils.createLookup (getExplorerManager (), map));
    initialize (pathToSelect);
    
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:18,代码来源:TemplatesPanel.java

示例4: ResultPanelTree

import org.openide.explorer.ExplorerUtils; //导入依赖的package包/类
ResultPanelTree(ResultDisplayHandler displayHandler, StatisticsPanel statPanel) {
        super(new BorderLayout());
        treeView = new ResultTreeView();
        treeView.getAccessibleContext().setAccessibleName(Bundle.ACSN_TestResults());
        treeView.getAccessibleContext().setAccessibleDescription(Bundle.ACSD_TestResults());
        treeView.setBorder(BorderFactory.createEtchedBorder());
//        resultBar.setPassedPercentage(0.0f);
        JToolBar toolBar = new JToolBar();
        toolBar.setFloatable(false);
        toolBar.add(resultBar);
        toolBar.setBorder(BorderFactory.createEtchedBorder());

        add(toolBar, BorderLayout.NORTH);
        add(treeView, BorderLayout.CENTER);

        explorerManager = new ExplorerManager();
        explorerManager.setRootContext(rootNode = new RootNode(displayHandler.getSession(), filterMask));
        explorerManager.addPropertyChangeListener(this);

        initAccessibility();

        this.displayHandler = displayHandler;
        this.statPanel = statPanel;
        displayHandler.setLookup(ExplorerUtils.createLookup(explorerManager, new ActionMap()));
    }
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:26,代码来源:ResultPanelTree.java

示例5: getComponent

import org.openide.explorer.ExplorerUtils; //导入依赖的package包/类
public JComponent getComponent() {
    if (panel == null) {
        final BeanTreeView view = new BeanTreeView();
        view.setRootVisible(false);
        view.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
        class Panel extends JPanel implements ExplorerManager.Provider, Lookup.Provider {
            // Make sure action context works correctly:
            private final Lookup lookup = ExplorerUtils.createLookup(manager, new ActionMap());
            {
                setLayout(new BorderLayout());
                add(view, BorderLayout.CENTER);
            }
            public ExplorerManager getExplorerManager() {
                return manager;
            }
            public Lookup getLookup() {
                return lookup;
            }
        }
        panel = new Panel();
    }
    return panel;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:24,代码来源:ErrorNavigatorProviderImpl.java

示例6: getComponent

import org.openide.explorer.ExplorerUtils; //导入依赖的package包/类
public JComponent getComponent() {
    if (panel == null) {
        final BeanTreeView view = new BeanTreeView();
        view.setRootVisible(true);
        view.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
        class Panel extends JPanel implements ExplorerManager.Provider, Lookup.Provider {
            // Make sure action context works correctly:
            private final Lookup lookup = ExplorerUtils.createLookup(manager, new ActionMap());
            {
                setLayout(new BorderLayout());
                add(view, BorderLayout.CENTER);
            }
            public ExplorerManager getExplorerManager() {
                return manager;
            }
            public Lookup getLookup() {
                return lookup;
            }
        }
        panel = new Panel();
    }
    return panel;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:24,代码来源:ElementNavigatorProviderImpl.java

示例7: getComponent

import org.openide.explorer.ExplorerUtils; //导入依赖的package包/类
public JComponent getComponent() {
    if (panel == null) {
        final PropertySheetView view = new PropertySheetView();
        class Panel extends JPanel implements ExplorerManager.Provider, Lookup.Provider {
            // Make sure action context works correctly:
            private final Lookup lookup = ExplorerUtils.createLookup(manager, new ActionMap());
            {
                setLayout(new BorderLayout());
                add(view, BorderLayout.CENTER);
            }
            public ExplorerManager getExplorerManager() {
                return manager;
            }
            public Lookup getLookup() {
                return lookup;
            }
        }
        panel = new Panel();
    }
    return panel;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:22,代码来源:ClasspathNavigatorProviderImpl.java

示例8: CatalogPanel

import org.openide.explorer.ExplorerUtils; //导入依赖的package包/类
/** Creates new form CatalogPanel */
public CatalogPanel() {
    
    ActionMap map = getActionMap();
    map.put(DefaultEditorKit.copyAction, ExplorerUtils.actionCopy(getExplorerManager()));
    map.put(DefaultEditorKit.cutAction, ExplorerUtils.actionCut(getExplorerManager()));
    map.put(DefaultEditorKit.pasteAction, ExplorerUtils.actionPaste(getExplorerManager()));
    map.put("delete", ExplorerUtils.actionDelete(getExplorerManager(), true)); // NOI18N
    
    initComponents();
    createCatalogView();
    treePanel.add(view, BorderLayout.CENTER);
    
    associateLookup(ExplorerUtils.createLookup(getExplorerManager(), map));
    initialize();
    
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:18,代码来源:CatalogPanel.java

示例9: init

import org.openide.explorer.ExplorerUtils; //导入依赖的package包/类
private void init() {
    manager = new ExplorerManager();
    helpAction = new HelpAction();
    final ActionMap map = AbstractDesignEditor.this.getActionMap();
    getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT).put(
        KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F1, 0), ACTION_INVOKE_HELP);
    map.put(ACTION_INVOKE_HELP, helpAction);
    
    SaveAction act = (SaveAction) org.openide.util.actions.SystemAction.get(SaveAction.class);
    KeyStroke stroke = KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_S,
            java.awt.Toolkit.getDefaultToolkit().getMenuShortcutKeyMask());

    getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT).put(stroke, "save"); //NOI18N
    map.put("save", act); //NOI18N  
   
    associateLookup(ExplorerUtils.createLookup(manager, map));
    
    manager.addPropertyChangeListener(new NodeSelectedListener());
    setLayout(new BorderLayout());
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:21,代码来源:AbstractDesignEditor.java

示例10: ListViewNavigatorPanel

import org.openide.explorer.ExplorerUtils; //导入依赖的package包/类
public ListViewNavigatorPanel () {
    manager = new ExplorerManager();
    ActionMap map = getActionMap();
    copyAction = ExplorerUtils.actionCopy(manager);
    map.put(DefaultEditorKit.copyAction, copyAction);
    map.put(DefaultEditorKit.cutAction, ExplorerUtils.actionCut(manager));
    map.put(DefaultEditorKit.pasteAction, ExplorerUtils.actionPaste(manager));
    map.put("delete", ExplorerUtils.actionDelete(manager, true)); // or false

    lookup = ExplorerUtils.createLookup(manager, map);

    listView = new ListView();
    fillListView(listView);
            
    add(listView);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:17,代码来源:ListViewNavigatorPanel.java

示例11: BookmarksView

import org.openide.explorer.ExplorerUtils; //导入依赖的package包/类
BookmarksView() {
//        getActionMap().put("rename", SystemAction.get(RenameAction.class));
        nodeTree = new BookmarksNodeTree();
        explorerManager = new ExplorerManager();
        explorerManager.setRootContext(nodeTree.rootNode());
        ActionMap actionMap = getActionMap();
        actionMap.put("delete", ExplorerUtils.actionDelete(explorerManager, false)); //NOI18N
        associateLookup(ExplorerUtils.createLookup(explorerManager, actionMap));
        explorerManager.addPropertyChangeListener(this);

        // Ctrl+T will toggle the tree/table view
        InputMap inputMap = getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);
        inputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_T, KeyEvent.CTRL_DOWN_MASK), "toggle-view"); //NOI18N
        actionMap.put("toggle-view", new AbstractAction() { //NOI18N
            @Override
            public void actionPerformed(ActionEvent e) {
                setTreeViewVisible(!treeViewShowing);
            }
        });
        setIcon(ImageUtilities.loadImage("org/netbeans/modules/editor/bookmarks/resources/bookmark_16.png")); // NOI18N
    }
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:22,代码来源:BookmarksView.java

示例12: BytecodeViewTopComponent

import org.openide.explorer.ExplorerUtils; //导入依赖的package包/类
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());

    treeView = new BeanTreeView();
    treeView.setRootVisible(false);
    this.add(BorderLayout.CENTER, treeView);
    associateLookup(ExplorerUtils.createLookup(manager, getActionMap()));
}
 
开发者ID:arodchen,项目名称:MaxSim,代码行数:17,代码来源:BytecodeViewTopComponent.java

示例13: OpenFilesListTopComponent

import org.openide.explorer.ExplorerUtils; //导入依赖的package包/类
private OpenFilesListTopComponent() {
    initComponents();
    jToolBar1.setVisible(false);
    setName(NbBundle.getMessage(OpenFilesListTopComponent.class, "CTL_OpenFilesListTopComponent"));
    setToolTipText(NbBundle.getMessage(OpenFilesListTopComponent.class, "HINT_OpenFilesListTopComponent"));
    setIcon(ImageUtilities.loadImage(ICON_PATH, true));

    btnManualRefresh.addActionListener(new ActionListener() {
        @Override
        public void actionPerformed(ActionEvent e) {
            updateModelAndRefreshUI();
        }
    });
    
    associateLookup(ExplorerUtils.createLookup(em, getActionMap()));

    //initial loading
    updateModelAndRefreshUI();
}
 
开发者ID:ranSprd,项目名称:netbeans-openedFiles,代码行数:20,代码来源:OpenFilesListTopComponent.java

示例14: TerrainEditorTopComponent

import org.openide.explorer.ExplorerUtils; //导入依赖的package包/类
public TerrainEditorTopComponent() {
    initComponents();
    setName(NbBundle.getMessage(TerrainEditorTopComponent.class, "CTL_TerrainEditorTopComponent"));
    setToolTipText(NbBundle.getMessage(TerrainEditorTopComponent.class, "HINT_TerrainEditorTopComponent"));
    //content = new InstanceContent();
    
    /*ActionMap actionMap = getActionMap();
    for (Object key : actionMap.allKeys() ) {
        System.out.println("key: "+key+ actionMap.get(key));
        Action value = actionMap.get(key);
    }*/
    //actionMap.put(, terrainWizard);
    Lookup lookup = ExplorerUtils.createLookup(new ExplorerManager(), getActionMap());
    associateLookup(lookup);
    setIcon(ImageUtilities.loadImage(ICON_PATH, true));
    result = Utilities.actionsGlobalContext().lookupResult(JmeSpatial.class);
}
 
开发者ID:jMonkeyEngine,项目名称:sdk,代码行数:18,代码来源:TerrainEditorTopComponent.java

示例15: AppStateExplorerTopComponent

import org.openide.explorer.ExplorerUtils; //导入依赖的package包/类
public AppStateExplorerTopComponent() {
        initComponents();
        setName(Bundle.CTL_AppStateExplorerTopComponent());
        setToolTipText(Bundle.HINT_AppStateExplorerTopComponent());
        ActionMap map = getActionMap();
        map.put("delete", ExplorerUtils.actionDelete(explorerManager, true));
//        map.put("moveup", new MoveUpAction());
//        map.put("movedown", new MoveDownAction());
        associateLookup(ExplorerUtils.createLookup(explorerManager, map));
        //TODO: move to scene listener notify in scene?
        SceneRequest request = SceneApplication.getApplication().getCurrentSceneRequest();
        if (request != null) {
            listener.sceneOpened(request);
        }
        SceneApplication.getApplication().addSceneListener(listener);
    }
 
开发者ID:jMonkeyEngine,项目名称:sdk,代码行数:17,代码来源:AppStateExplorerTopComponent.java


注:本文中的org.openide.explorer.ExplorerUtils类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。