Package org.openide.windows

Examples of org.openide.windows.TopComponent


                    }
                }
                final MenuItem extractMenuItem = new MenuItem("Extract File(s)");
                extractMenuItem.setOnAction((ActionEvent t) -> {
                    SwingUtilities.invokeLater(() -> {
                        TopComponent etc = WindowManager.getDefault().findTopComponent(ImageAnalyzerTopComponent.PREFERRED_ID);
                        ExtractAction.getInstance().actionPerformed(new java.awt.event.ActionEvent(etc, 0, null));
                    });
                });
                menuItems.add(extractMenuItem);
View Full Code Here


               
                if (contentList == null) {
                    contentList = Collections.<AbstractFile>emptyList();
                }

                final TopComponent searchResultWin = DataResultTopComponent.createInstance(title, pathText,
                        new TableFilterNode(new SearchNode(contentList), true), contentList.size());

                searchResultWin.requestActive(); // make it the active top component

                /**
                 * If total matches more than 1000, pop up a dialog box that say
                 * the performance maybe be slow and to increase the
                 * performance, tell the users to refine their search.
View Full Code Here

     * Obtain the DirectoryTreeTopComponent instance. Never call
     * {@link #getDefault} directly!
     */
    public static synchronized DirectoryTreeTopComponent findInstance() {
        WindowManager winManager = WindowManager.getDefault();
        TopComponent win = winManager.findTopComponent(PREFERRED_ID);
        if (win == null) {
            logger.warning(
                    "Cannot find " + PREFERRED_ID + " component. It will not be located properly in the window system."); //NON-NLS
            return getDefault();
        }
View Full Code Here

        }
        return instance;
    }

    public static synchronized IngestMessageTopComponent findInstance() {
        TopComponent win = WindowManager.getDefault().findTopComponent(PREFERRED_ID);
        if (win == null) {
            return getDefault();
        }
        if (win instanceof IngestMessageTopComponent) {
            return (IngestMessageTopComponent) win;
View Full Code Here

        // Get DataContent provider to include in the menu
        int totalItems = newWindowLists.size() > 0 ? 2 : 1;
        JComponent[] comps = new JComponent[totalItems];
        int counter = 0;
       
        TopComponent contentWin = DataContentTopComponent.findInstance();
        JMenuItem defaultItem = new JMenuItem(contentWin.getName()); // set the main name

        defaultItem.addActionListener(new OpenTopComponentAction(contentWin));

        if (!Case.existsCurrentCase() || Case.getCurrentCase().hasData() == false) {
            defaultItem.setEnabled(false); // disable the menu items when no case is opened
View Full Code Here

       
        int i = 0;
        for(DataExplorer dx : dataExplorers){
            if (! dx.hasMenuOpenAction())
                continue;
            TopComponent explorerWin = dx.getTopComponent();
            JMenuItem item = new JMenuItem(explorerWin.getName());
            item.addActionListener(new OpenTopComponentAction(explorerWin));

            if(!Case.existsCurrentCase() || Case.getCurrentCase().hasData() == false){
                item.setEnabled(false); // disable the menu when no case is opened
            }
View Full Code Here

    /**
     * Obtain the default DataContentTopComponent defaultInstance. Never call {@link #getDefault} directly!
     */
    public static synchronized DataContentTopComponent findInstance() {
        TopComponent win = WindowManager.getDefault().findTopComponent(PREFERRED_ID);
        if (win == null) {
            logger.warning("Cannot find " + PREFERRED_ID + " component. It will not be located properly in the window system."); //NON-NLS
            return getDefault();
        }
        if (win instanceof DataContentTopComponent) {
View Full Code Here

                reScheduleRefresh(1000);
            }
            return;
        }
        if (ExplorerManager.PROP_SELECTED_NODES.equals(evt.getPropertyName())) {
            TopComponent tc = (TopComponent) SwingUtilities.getAncestorOfClass(TopComponent.class, this);
            if (tc != null) {
                tc.setActivatedNodes((Node[]) evt.getNewValue());
            }
            return;
        }
    }
View Full Code Here

        ProjectInformation pi = ProjectUtils.getInformation(p);
        return pi == null ? null : pi.getDisplayName();
    }

    private static synchronized ExplorerManager.Provider findDefault(String tcID) {
        TopComponent tc = WindowManager.getDefault().findTopComponent(tcID);
        return (ExplorerManager.Provider) tc;
    }
View Full Code Here

        }
         */
    }

    public void valueChanged(ListSelectionEvent e) {
        final TopComponent tc = (TopComponent) SwingUtilities.getAncestorOfClass(TopComponent.class, table);
        if (tc == null) {
            return; // table is no longer in component hierarchy
        }
        master.setSelectedIndex(table.getSelectedRow());
    }
View Full Code Here

TOP

Related Classes of org.openide.windows.TopComponent

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.