本文整理汇总了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();
}
示例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"));
}
示例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);
}
示例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()));
}
示例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;
}
示例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;
}
示例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;
}
示例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();
}
示例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());
}
示例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);
}
示例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
}
示例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()));
}
示例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();
}
示例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);
}
示例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);
}