Search in sources :

Example 6 with MenuItemListener

use of com.biglybt.pif.ui.menus.MenuItemListener in project BiglyBT by BiglySoftware.

the class MainMDISetup method setupSidebarVuzeUI.

private static void setupSidebarVuzeUI(final MultipleDocumentInterfaceSWT mdi) {
    mdi.setPreferredOrder(preferredOrder);
    setupCatsTags(mdi);
    sb_dashboard = new SB_Dashboard(mdi);
    for (int i = 0; i < preferredOrder.length; i++) {
        String id = preferredOrder[i];
        mdi.registerEntry(id, new MdiEntryCreationListener() {

            @Override
            public MdiEntry createMDiEntry(String id) {
                MdiEntry entry;
                if (id.equals(MultipleDocumentInterface.SIDEBAR_HEADER_DASHBOARD)) {
                    entry = sb_dashboard.setupMDIEntry();
                } else {
                    entry = mdi.createHeader(id, "sidebar." + id, null);
                    if (entry == null) {
                        return (null);
                    }
                    entry.setDefaultExpanded(true);
                    if (id.equals(SIDEBAR_HEADER_PLUGINS)) {
                        // remove header when there are no children
                        entry.addListener((parent, ch, user) -> {
                            if (mdi.getChildrenOf(SIDEBAR_HEADER_PLUGINS).isEmpty()) {
                                mdi.closeEntry(parent, false);
                            }
                        });
                        PluginInterface pi = PluginInitializer.getDefaultInterface();
                        UIManager uim = pi.getUIManager();
                        MenuManager menuManager = uim.getMenuManager();
                        MenuItem menuItem;
                        menuItem = menuManager.addMenuItem("sidebar." + SIDEBAR_HEADER_PLUGINS, "label.plugin.options");
                        menuItem.setDisposeWithUIDetach(UIInstance.UIT_SWT);
                        menuItem.addListener(new MenuItemListener() {

                            @Override
                            public void selected(MenuItem menu, Object target) {
                                UIFunctions uif = UIFunctionsManager.getUIFunctions();
                                if (uif != null) {
                                    uif.getMDI().showEntryByID(MultipleDocumentInterface.SIDEBAR_SECTION_CONFIG, "plugins");
                                }
                            }
                        });
                    }
                }
                return entry;
            }
        });
    }
    sb_transfers = new SB_Transfers(mdi, true);
    sb_vuze = new SB_Vuze(mdi);
    new SB_Discovery(mdi);
    mdi.loadEntryByID(MultipleDocumentInterface.SIDEBAR_HEADER_DASHBOARD, false);
    mdi.loadEntryByID(MultipleDocumentInterface.SIDEBAR_SECTION_LIBRARY, false);
    if (COConfigurationManager.getBooleanParameter("Show New In Side Bar")) {
        mdi.loadEntryByID(MultipleDocumentInterface.SIDEBAR_SECTION_LIBRARY_UNOPENED, false);
    }
    mdi.loadEntryByID(MultipleDocumentInterface.SIDEBAR_SECTION_SUBSCRIPTIONS, false);
    mdi.loadEntryByID(MultipleDocumentInterface.SIDEBAR_SECTION_DEVICES, false);
    mdi.loadEntryByID(MultipleDocumentInterface.SIDEBAR_SECTION_ACTIVITIES, false);
}
Also used : CategoryManager(com.biglybt.core.category.CategoryManager) SBC_ChatOverview(com.biglybt.plugin.net.buddy.swt.SBC_ChatOverview) AllTrackersEvent(com.biglybt.core.tracker.AllTrackersManager.AllTrackersEvent) URL(java.net.URL) COConfigurationManager(com.biglybt.core.config.COConfigurationManager) ViewTitleInfo2(com.biglybt.ui.common.viewtitleinfo.ViewTitleInfo2) MultipleDocumentInterfaceSWT(com.biglybt.ui.swt.mdi.MultipleDocumentInterfaceSWT) TagManagerFactory(com.biglybt.core.tag.TagManagerFactory) ViewTitleInfoManager(com.biglybt.ui.common.viewtitleinfo.ViewTitleInfoManager) UIFunctionsManager(com.biglybt.ui.UIFunctionsManager) TagTypeListener(com.biglybt.core.tag.TagTypeListener) Utils(com.biglybt.ui.swt.Utils) MenuItemListener(com.biglybt.pif.ui.menus.MenuItemListener) DownloadHistoryManager(com.biglybt.core.history.DownloadHistoryManager) ViewTitleInfo(com.biglybt.ui.common.viewtitleinfo.ViewTitleInfo) com.biglybt.ui.mdi(com.biglybt.ui.mdi) BuddyPluginUtils(com.biglybt.plugin.net.buddy.BuddyPluginUtils) AllTrackersListener(com.biglybt.core.tracker.AllTrackersManager.AllTrackersListener) com.biglybt.ui.swt.views(com.biglybt.ui.swt.views) ParameterListener(com.biglybt.core.config.ParameterListener) MessageText(com.biglybt.core.internat.MessageText) InetSocketAddress(java.net.InetSocketAddress) Category(com.biglybt.core.category.Category) PluginInitializer(com.biglybt.pifimpl.local.PluginInitializer) com.biglybt.pif.sharing(com.biglybt.pif.sharing) UIManager(com.biglybt.pif.ui.UIManager) TRHost(com.biglybt.core.tracker.host.TRHost) UIFunctions(com.biglybt.ui.UIFunctions) DeviceManagerUI(com.biglybt.ui.swt.devices.DeviceManagerUI) java.util(java.util) BuddyPluginBeta(com.biglybt.plugin.net.buddy.BuddyPluginBeta) Tag(com.biglybt.core.tag.Tag) MdiEntrySWT(com.biglybt.ui.swt.mdi.MdiEntrySWT) TagManager(com.biglybt.core.tag.TagManager) MenuManager(com.biglybt.pif.ui.menus.MenuManager) AllTrackers(com.biglybt.core.tracker.AllTrackersManager.AllTrackers) StatsView(com.biglybt.ui.swt.views.stats.StatsView) UISWTViewEventListener(com.biglybt.ui.swt.pif.UISWTViewEventListener) ChatInstance(com.biglybt.plugin.net.buddy.BuddyPluginBeta.ChatInstance) MessageBoxShell(com.biglybt.ui.swt.shells.MessageBoxShell) PluginInterface(com.biglybt.pif.PluginInterface) ClientStatsView(com.biglybt.ui.swt.views.clientstats.ClientStatsView) ManagerUtils(com.biglybt.ui.swt.views.utils.ManagerUtils) com.biglybt.core.peermanager.control(com.biglybt.core.peermanager.control) TRHostListener(com.biglybt.core.tracker.host.TRHostListener) UISWTViewBuilderCore(com.biglybt.ui.swt.pifimpl.UISWTViewBuilderCore) MenuItem(com.biglybt.pif.ui.menus.MenuItem) UIInstance(com.biglybt.pif.ui.UIInstance) CoreFactory(com.biglybt.core.CoreFactory) OutputStream(java.io.OutputStream) DownloadHistoryEvent(com.biglybt.core.history.DownloadHistoryEvent) TRHostTorrent(com.biglybt.core.tracker.host.TRHostTorrent) com.biglybt.pif.download(com.biglybt.pif.download) AllTrackersManager(com.biglybt.core.tracker.AllTrackersManager) SideBar(com.biglybt.ui.swt.views.skin.sidebar.SideBar) IOException(java.io.IOException) DownloadHistoryListener(com.biglybt.core.history.DownloadHistoryListener) com.biglybt.core.util(com.biglybt.core.util) com.biglybt.ui.swt.views.skin(com.biglybt.ui.swt.views.skin) MultipleDocumentInterface(com.biglybt.ui.mdi.MultipleDocumentInterface) TagType(com.biglybt.core.tag.TagType) TagManagerListener(com.biglybt.core.tag.TagManagerListener) InputStream(java.io.InputStream) PluginInterface(com.biglybt.pif.PluginInterface) UIManager(com.biglybt.pif.ui.UIManager) MenuItem(com.biglybt.pif.ui.menus.MenuItem) UIFunctions(com.biglybt.ui.UIFunctions) MenuManager(com.biglybt.pif.ui.menus.MenuManager) MenuItemListener(com.biglybt.pif.ui.menus.MenuItemListener)

Example 7 with MenuItemListener

use of com.biglybt.pif.ui.menus.MenuItemListener in project BiglyBT by BiglySoftware.

the class DeviceManagerUI method setupMenuListeners.

protected void setupMenuListeners() {
    properties_listener = new MenuItemListener() {

        @Override
        public void selected(MenuItem menu, Object target) {
            if (target instanceof MdiEntry) {
                MdiEntry info = (MdiEntry) target;
                Device device = (Device) info.getDatasource();
                showProperties(device);
            }
        }
    };
    hide_listener = new MenuItemListener() {

        @Override
        public void selected(MenuItem menu, Object target) {
            if (target instanceof MdiEntry) {
                MdiEntry info = (MdiEntry) target;
                Device device = (Device) info.getDatasource();
                device.setHidden(true);
            }
        }
    };
    will_tag_listener = new MenuItemFillListener() {

        @Override
        public void menuWillBeShown(MenuItem menu, Object targets) {
            Object[] rows;
            if (targets instanceof Object[]) {
                rows = (Object[]) targets;
            } else {
                rows = new Object[] { targets };
            }
            if (rows.length > 0 && rows[0] instanceof MdiEntry) {
                MdiEntry info = (MdiEntry) rows[0];
                Device device = (Device) info.getDatasource();
                menu.setData(device.isTagged());
            } else {
                menu.setEnabled(false);
            }
        }
    };
    tag_listener = new MenuItemListener() {

        @Override
        public void selected(MenuItem menu, Object target) {
            if (target instanceof MdiEntry) {
                MdiEntry info = (MdiEntry) target;
                Device device = (Device) info.getDatasource();
                device.setTagged(!device.isTagged());
            }
        }
    };
    rename_listener = new MenuItemListener() {

        @Override
        public void selected(MenuItem menu, Object target) {
            if (target instanceof MdiEntry) {
                MdiEntry info = (MdiEntry) target;
                final Device device = (Device) info.getDatasource();
                UISWTInputReceiver entry = (UISWTInputReceiver) swt_ui.getInputReceiver();
                entry.setPreenteredText(device.getName(), false);
                entry.maintainWhitespace(false);
                entry.allowEmptyInput(false);
                entry.setLocalisedTitle(MessageText.getString("label.rename", new String[] { device.getName() }));
                entry.prompt(new UIInputReceiverListener() {

                    @Override
                    public void UIInputReceiverClosed(UIInputReceiver entry) {
                        if (!entry.hasSubmittedInput()) {
                            return;
                        }
                        String input = entry.getSubmittedInput().trim();
                        if (input.length() > 0) {
                            device.setName(input, false);
                        }
                    }
                });
            }
        }
    };
    export_listener = new MenuItemListener() {

        @Override
        public void selected(MenuItem menu, Object target) {
            if (target instanceof MdiEntry) {
                MdiEntry info = (MdiEntry) target;
                Device device = (Device) info.getDatasource();
                export(device);
            }
        }
    };
    will_remove_listener = new MenuItemFillListener() {

        @Override
        public void menuWillBeShown(MenuItem menu, Object targets) {
            Object[] rows;
            if (targets instanceof Object[]) {
                rows = (Object[]) targets;
            } else {
                rows = new Object[] { targets };
            }
            if (rows.length > 0 && rows[0] instanceof MdiEntry) {
                MdiEntry info = (MdiEntry) rows[0];
                Device device = (Device) info.getDatasource();
                menu.setEnabled(device.canRemove());
            } else {
                menu.setEnabled(false);
            }
        }
    };
    remove_listener = new MenuItemListener() {

        @Override
        public void selected(MenuItem menu, Object target) {
            if (target instanceof MdiEntry) {
                MdiEntry info = (MdiEntry) target;
                Device device = (Device) info.getDatasource();
                device.remove();
            }
        }
    };
    will_browse_listener = new MenuItemFillListener() {

        @Override
        public void menuWillBeShown(MenuItem menu, Object targets) {
            menu.removeAllChildItems();
            boolean enabled = false;
            Object[] rows;
            if (targets instanceof Object[]) {
                rows = (Object[]) targets;
            } else {
                rows = new Object[] { targets };
            }
            if (rows.length > 0 && rows[0] instanceof MdiEntry) {
                MdiEntry info = (MdiEntry) rows[0];
                Device device = (Device) info.getDatasource();
                Device.browseLocation[] locs = device.getBrowseLocations();
                enabled = locs != null && locs.length > 0;
                if (enabled) {
                    MenuManager menuManager = ui_manager.getMenuManager();
                    for (final Device.browseLocation loc : locs) {
                        MenuItem loc_menu = menuManager.addMenuItem(menu, loc.getName());
                        loc_menu.addListener(new MenuItemListener() {

                            @Override
                            public void selected(MenuItem menu, Object target) {
                                Utils.launch(loc.getURL().toExternalForm());
                            }
                        });
                    }
                }
            }
            menu.setEnabled(enabled);
        }
    };
    show_listener = new MenuItemListener() {

        @Override
        public void selected(MenuItem menu, Object target) {
            if (target instanceof MdiEntry) {
                MdiEntry info = (MdiEntry) target;
                Object ds = info.getDatasource();
                if (ds instanceof Device) {
                    // shouldn't get here really as its hidden :)
                    Device device = (Device) ds;
                    device.setHidden(true);
                } else {
                    int category_type = ds == null ? Device.DT_UNKNOWN : (Integer) ds;
                    Device[] devices = device_manager.getDevices();
                    for (Device device : devices) {
                        if (category_type == Device.DT_UNKNOWN || device.getType() == category_type && device.isHidden()) {
                            device.setHidden(false);
                        }
                    }
                }
            }
        }
    };
    show_fill_listener = new MenuItemFillListener() {

        @Override
        public void menuWillBeShown(MenuItem menu, Object targets) {
            boolean enabled = false;
            Object[] rows;
            if (targets instanceof Object[]) {
                rows = (Object[]) targets;
            } else {
                rows = new Object[] { targets };
            }
            for (Object row : rows) {
                if (row instanceof MdiEntry) {
                    MdiEntry info = (MdiEntry) row;
                    Object ds = info.getDatasource();
                    if (ds instanceof Device) {
                    } else {
                        int category_type = ds == null ? Device.DT_UNKNOWN : (Integer) ds;
                        Device[] devices = device_manager.getDevices();
                        for (Device device : devices) {
                            if (category_type == Device.DT_UNKNOWN || device.getType() == category_type && device.isHidden()) {
                                if (device.isHidden()) {
                                    enabled = true;
                                }
                            }
                        }
                    }
                }
            }
            menu.setEnabled(enabled);
        }
    };
}
Also used : UPnPDevice(com.biglybt.net.upnp.UPnPDevice) UnassociatedDevice(com.biglybt.core.devices.DeviceManager.UnassociatedDevice) UPnPRootDevice(com.biglybt.net.upnp.UPnPRootDevice) TableContextMenuItem(com.biglybt.pif.ui.tables.TableContextMenuItem) MenuItem(com.biglybt.pif.ui.menus.MenuItem) MenuItemFillListener(com.biglybt.pif.ui.menus.MenuItemFillListener) MenuManager(com.biglybt.pif.ui.menus.MenuManager) MenuItemListener(com.biglybt.pif.ui.menus.MenuItemListener)

Example 8 with MenuItemListener

use of com.biglybt.pif.ui.menus.MenuItemListener in project BiglyBT by BiglySoftware.

the class BuddyPluginView method buildMenu.

private void buildMenu(final Set<ChatInstance> current_instances) {
    if (menu_items.size() == 0 || !menu_latest_instances.equals(current_instances)) {
        for (MenuItem mi : menu_items) {
            mi.remove();
        }
        menu_items.clear();
        final MenuManager menu_manager = plugin.getPluginInterface().getUIManager().getMenuManager();
        MenuContext mc = beta_status.getMenuContext();
        for (final ChatInstance chat : sortChats(current_instances)) {
            String short_name = chat.getShortName();
            MenuItem mi = menu_manager.addMenuItem(mc, "!" + short_name + "!");
            mi.addListener(new MenuItemListener() {

                @Override
                public void selected(MenuItem menu, Object target) {
                    try {
                        openChat(chat.getClone());
                    } catch (Throwable e) {
                        Debug.out(e);
                    }
                }
            });
            menu_items.add(mi);
        }
        boolean need_sep = true;
        if (current_instances.size() > 1) {
            MenuItem mi = menu_manager.addMenuItem(mc, "sep1");
            need_sep = false;
            mi.setStyle(MenuItem.STYLE_SEPARATOR);
            menu_items.add(mi);
            mi = menu_manager.addMenuItem(mc, "label.open.all");
            mi.addListener(new MenuItemListener() {

                @Override
                public void selected(MenuItem menu, Object target) {
                    for (ChatInstance chat : current_instances) {
                        try {
                            openChat(chat.getClone());
                        } catch (Throwable e) {
                            Debug.out(e);
                        }
                    }
                }
            });
            menu_items.add(mi);
        }
        if (need_sep) {
            MenuItem mi = menu_manager.addMenuItem(mc, "sep2");
            mi.setStyle(MenuItem.STYLE_SEPARATOR);
            menu_items.add(mi);
        }
        // create channel
        MenuItem mi = menu_manager.addMenuItem(mc, "chat.view.create.chat");
        mi.setStyle(MenuItem.STYLE_MENU);
        menu_items.add(mi);
        mi.addFillListener(new com.biglybt.pif.ui.menus.MenuItemFillListener() {

            @Override
            public void menuWillBeShown(MenuItem menu, Object data) {
                menu.removeAllChildItems();
                MenuItem mi = menu_manager.addMenuItem(menu, "!" + MessageText.getString("label.public") + "...!");
                mi.addListener(new MenuItemListener() {

                    @Override
                    public void selected(MenuItem menu, Object target) {
                        SimpleTextEntryWindow entryWindow = new SimpleTextEntryWindow("chat.view.enter.key.title", "chat.view.enter.key.msg");
                        entryWindow.prompt(new UIInputReceiverListener() {

                            @Override
                            public void UIInputReceiverClosed(UIInputReceiver receiver) {
                                if (!receiver.hasSubmittedInput()) {
                                    return;
                                }
                                String key = receiver.getSubmittedInput().trim();
                                BuddyPluginUtils.createBetaChat(AENetworkClassifier.AT_PUBLIC, key, null);
                            }
                        });
                    }
                });
                mi = menu_manager.addMenuItem(menu, "!" + MessageText.getString("label.anon") + "...!");
                mi.addListener(new MenuItemListener() {

                    @Override
                    public void selected(MenuItem menu, Object target) {
                        if (plugin.getBeta().isI2PAvailable()) {
                            SimpleTextEntryWindow entryWindow = new SimpleTextEntryWindow("chat.view.enter.key.title", "chat.view.enter.key.msg");
                            entryWindow.prompt(new UIInputReceiverListener() {

                                @Override
                                public void UIInputReceiverClosed(UIInputReceiver receiver) {
                                    if (!receiver.hasSubmittedInput()) {
                                        return;
                                    }
                                    String key = receiver.getSubmittedInput().trim();
                                    BuddyPluginUtils.createBetaChat(AENetworkClassifier.AT_I2P, key, null);
                                }
                            });
                        } else {
                            I2PHelpers.installI2PHelper(null, null, null);
                        }
                    }
                });
                if (I2PHelpers.isInstallingI2PHelper()) {
                    mi.setEnabled(false);
                    mi.setText(mi.getText() + " (" + MessageText.getString("PeersView.state.pending") + ")");
                }
            }
        });
        // chat overview
        mi = menu_manager.addMenuItem(mc, "!" + MessageText.getString("chats.view.heading") + "...!");
        mi.addListener(new MenuItemListener() {

            @Override
            public void selected(MenuItem menu, Object target) {
                UIFunctions uif = UIFunctionsManager.getUIFunctions();
                if (uif != null) {
                    uif.getMDI().showEntryByID(MultipleDocumentInterface.SIDEBAR_SECTION_CHAT);
                }
            }
        });
        menu_items.add(mi);
        mi = menu_manager.addMenuItem(mc, "sep3");
        mi.setStyle(MenuItem.STYLE_SEPARATOR);
        menu_items.add(mi);
        // options
        mi = menu_manager.addMenuItem(mc, "MainWindow.menu.view.configuration");
        mi.addListener(new MenuItemListener() {

            @Override
            public void selected(MenuItem menu, Object target) {
                ui_instance.openView(UISWTInstance.VIEW_MAIN, VIEW_ID, null);
            }
        });
        menu_items.add(mi);
        menu_latest_instances = current_instances;
    }
}
Also used : ChatInstance(com.biglybt.plugin.net.buddy.BuddyPluginBeta.ChatInstance) MenuItem(com.biglybt.pif.ui.menus.MenuItem) MenuContext(com.biglybt.pif.ui.menus.MenuContext) UIFunctions(com.biglybt.ui.UIFunctions) SimpleTextEntryWindow(com.biglybt.ui.swt.SimpleTextEntryWindow) UIInputReceiver(com.biglybt.pif.ui.UIInputReceiver) MenuManager(com.biglybt.pif.ui.menus.MenuManager) MenuItemListener(com.biglybt.pif.ui.menus.MenuItemListener) UIInputReceiverListener(com.biglybt.pif.ui.UIInputReceiverListener)

Example 9 with MenuItemListener

use of com.biglybt.pif.ui.menus.MenuItemListener in project BiglyBT by BiglySoftware.

the class MainMDISetup method setupSideBar.

public static void setupSideBar(final MultipleDocumentInterfaceSWT mdi, final MdiListener l) {
    if (Utils.isAZ2UI()) {
        setupSidebarClassic(mdi);
    } else {
        setupSidebarVuzeUI(mdi);
    }
    SBC_TorrentDetailsView.TorrentDetailMdiEntry.register(mdi);
    PluginInterface pi = PluginInitializer.getDefaultInterface();
    pi.getUIManager().addUIListener(new UIManagerListener2() {

        @Override
        public void UIDetached(UIInstance instance) {
        }

        @Override
        public void UIAttached(UIInstance instance) {
        }

        @Override
        public void UIAttachedComplete(UIInstance instance) {
            PluginInitializer.getDefaultInterface().getUIManager().removeUIListener(this);
            MdiEntry currentEntry = mdi.getCurrentEntry();
            if (currentEntry != null) {
                // User or another plugin selected an entry
                return;
            }
            final String CFG_STARTTAB = "v3.StartTab";
            final String CFG_STARTTAB_DS = "v3.StartTab.ds";
            String startTab;
            String datasource = null;
            boolean showWelcome = false;
            if (showWelcome) {
                startTab = SideBar.SIDEBAR_SECTION_WELCOME;
            } else {
                if (!COConfigurationManager.hasParameter(CFG_STARTTAB, true)) {
                    COConfigurationManager.setParameter(CFG_STARTTAB, SideBar.SIDEBAR_SECTION_LIBRARY);
                }
                startTab = COConfigurationManager.getStringParameter(CFG_STARTTAB);
                datasource = COConfigurationManager.getStringParameter(CFG_STARTTAB_DS, null);
            }
            if (!mdi.loadEntryByID(startTab, true, false, datasource)) {
                mdi.showEntryByID(SideBar.SIDEBAR_SECTION_LIBRARY);
            }
            if (l != null) {
                mdi.addListener(l);
            }
        }
    });
    configBetaEnabledListener = new ParameterListener() {

        @Override
        public void parameterChanged(String parameterName) {
            boolean enabled = COConfigurationManager.getBooleanParameter("Beta Programme Enabled");
            if (enabled) {
                boolean closed = COConfigurationManager.getBooleanParameter("Beta Programme Sidebar Closed");
                if (!closed) {
                    mdi.loadEntryByID(MultipleDocumentInterface.SIDEBAR_SECTION_BETAPROGRAM, false);
                }
            }
        }
    };
    COConfigurationManager.addAndFireParameterListener("Beta Programme Enabled", configBetaEnabledListener);
    mdi.registerEntry(StatsView.VIEW_ID, new MdiEntryCreationListener() {

        @Override
        public MdiEntry createMDiEntry(String id) {
            MdiEntry entry = mdi.createEntryFromEventListener(MultipleDocumentInterface.SIDEBAR_HEADER_PLUGINS, new StatsView(), id, true, null, null);
            return entry;
        }
    });
    mdi.registerEntry(MultipleDocumentInterface.SIDEBAR_SECTION_ALLPEERS, new MdiEntryCreationListener() {

        @Override
        public MdiEntry createMDiEntry(String id) {
            MdiEntry entry = mdi.createEntryFromEventListener(MultipleDocumentInterface.SIDEBAR_HEADER_TRANSFERS, new PeersSuperView(), id, true, null, null);
            entry.setImageLeftID("image.sidebar.allpeers");
            return entry;
        }
    });
    mdi.registerEntry(MultipleDocumentInterface.SIDEBAR_SECTION_LOGGER, new MdiEntryCreationListener() {

        @Override
        public MdiEntry createMDiEntry(String id) {
            MdiEntry entry = mdi.createEntryFromEventListener(MultipleDocumentInterface.SIDEBAR_HEADER_PLUGINS, new LoggerView(), id, true, null, null);
            return entry;
        }
    });
    mdi.registerEntry(MultipleDocumentInterface.SIDEBAR_SECTION_TAGS, new MdiEntryCreationListener() {

        @Override
        public MdiEntry createMDiEntry(String id) {
            MdiEntry entry = mdi.createEntryFromSkinRef(MultipleDocumentInterface.SIDEBAR_HEADER_TRANSFERS, id, "tagsview", "{tags.view.heading}", null, null, true, null);
            entry.setImageLeftID("image.sidebar.tag-overview");
            entry.setDefaultExpanded(true);
            return entry;
        }
    });
    mdi.registerEntry(MultipleDocumentInterface.SIDEBAR_SECTION_TAG_DISCOVERY, new MdiEntryCreationListener() {

        @Override
        public MdiEntry createMDiEntry(String id) {
            MdiEntry entry = mdi.createEntryFromSkinRef(MultipleDocumentInterface.SIDEBAR_SECTION_TAGS, id, "tagdiscoveryview", "{mdi.entry.tagdiscovery}", null, null, true, null);
            entry.setImageLeftID("image.sidebar.tag-overview");
            return entry;
        }
    });
    mdi.registerEntry(MultipleDocumentInterface.SIDEBAR_SECTION_CHAT, new MdiEntryCreationListener() {

        @Override
        public MdiEntry createMDiEntry(String id) {
            final ViewTitleInfo title_info = new ViewTitleInfo() {

                @Override
                public Object getTitleInfoProperty(int propertyID) {
                    BuddyPluginBeta bp = BuddyPluginUtils.getBetaPlugin();
                    if (bp == null) {
                        return (null);
                    }
                    if (propertyID == TITLE_INDICATOR_TEXT) {
                        int num = 0;
                        for (ChatInstance chat : bp.getChats()) {
                            if (chat.getMessageOutstanding()) {
                                num++;
                            }
                        }
                        if (num > 0) {
                            return (String.valueOf(num));
                        } else {
                            return (null);
                        }
                    } else if (propertyID == TITLE_INDICATOR_COLOR) {
                        for (ChatInstance chat : bp.getChats()) {
                            if (chat.getMessageOutstanding()) {
                                if (chat.hasUnseenMessageWithNick()) {
                                    return (SBC_ChatOverview.COLOR_MESSAGE_WITH_NICK);
                                }
                            }
                        }
                    }
                    return null;
                }
            };
            MdiEntry mdi_entry = mdi.createEntryFromSkinRef(MultipleDocumentInterface.SIDEBAR_HEADER_DISCOVERY, MultipleDocumentInterface.SIDEBAR_SECTION_CHAT, "chatsview", "{mdi.entry.chatsoverview}", title_info, null, true, null);
            mdi_entry.setImageLeftID("image.sidebar.chat-overview");
            final TimerEventPeriodic timer = SimpleTimer.addPeriodicEvent("sb:chatup", 5 * 1000, new TimerEventPerformer() {

                private String last_text;

                private int[] last_colour;

                @Override
                public void perform(TimerEvent event) {
                    String text = (String) title_info.getTitleInfoProperty(ViewTitleInfo.TITLE_INDICATOR_TEXT);
                    int[] colour = (int[]) title_info.getTitleInfoProperty(ViewTitleInfo.TITLE_INDICATOR_COLOR);
                    boolean changed = text != last_text && (text == null || last_text == null || !text.equals(last_text));
                    if (!changed) {
                        changed = colour != last_colour && (colour == null || last_colour == null || !Arrays.equals(colour, last_colour));
                    }
                    if (changed) {
                        last_text = text;
                        last_colour = colour;
                        mdi_entry.redraw();
                    }
                    ViewTitleInfoManager.refreshTitleInfo(title_info);
                }
            });
            mdi_entry.addListener(new MdiCloseListener() {

                @Override
                public void mdiEntryClosed(MdiEntry entry, boolean userClosed) {
                    timer.cancel();
                }
            });
            return mdi_entry;
        }
    });
    mdi.registerEntry(MultipleDocumentInterface.SIDEBAR_SECTION_ARCHIVED_DOWNLOADS, new MdiEntryCreationListener() {

        @Override
        public MdiEntry createMDiEntry(String id) {
            final com.biglybt.pif.download.DownloadManager download_manager = PluginInitializer.getDefaultInterface().getDownloadManager();
            final ViewTitleInfo title_info = new ViewTitleInfo() {

                @Override
                public Object getTitleInfoProperty(int propertyID) {
                    if (propertyID == TITLE_INDICATOR_TEXT) {
                        int num = download_manager.getDownloadStubCount();
                        return (String.valueOf(num));
                    }
                    return null;
                }
            };
            MdiEntry entry = mdi.createEntryFromSkinRef(MultipleDocumentInterface.SIDEBAR_HEADER_TRANSFERS, MultipleDocumentInterface.SIDEBAR_SECTION_ARCHIVED_DOWNLOADS, "archivedlsview", "{mdi.entry.archiveddownloadsview}", title_info, null, true, null);
            entry.setImageLeftID("image.sidebar.archive");
            final DownloadStubListener stub_listener = new DownloadStubListener() {

                @Override
                public void downloadStubEventOccurred(DownloadStubEvent event) {
                    ViewTitleInfoManager.refreshTitleInfo(title_info);
                }
            };
            download_manager.addDownloadStubListener(stub_listener, false);
            entry.addListener(new MdiCloseListener() {

                @Override
                public void mdiEntryClosed(MdiEntry entry, boolean userClosed) {
                    download_manager.removeDownloadStubListener(stub_listener);
                }
            });
            entry.addListener(new MdiEntryDropListener() {

                @Override
                public boolean mdiEntryDrop(MdiEntry entry, Object data) {
                    if (data instanceof String) {
                        String str = (String) data;
                        if (str.startsWith("DownloadManager\n")) {
                            String[] bits = str.split("\n");
                            com.biglybt.pif.download.DownloadManager dm = PluginInitializer.getDefaultInterface().getDownloadManager();
                            List<Download> downloads = new ArrayList<>();
                            boolean failed = false;
                            for (int i = 1; i < bits.length; i++) {
                                byte[] hash = Base32.decode(bits[i]);
                                try {
                                    Download download = dm.getDownload(hash);
                                    if (download.canStubbify()) {
                                        downloads.add(download);
                                    } else {
                                        failed = true;
                                    }
                                } catch (Throwable e) {
                                }
                            }
                            final boolean f_failed = failed;
                            ManagerUtils.moveToArchive(downloads, new ManagerUtils.ArchiveCallback() {

                                boolean error = f_failed;

                                @Override
                                public void failed(DownloadStub original, Throwable e) {
                                    error = true;
                                }

                                @Override
                                public void completed() {
                                    if (error) {
                                        String title = MessageText.getString("archive.failed.title");
                                        String text = MessageText.getString("archive.failed.text");
                                        MessageBoxShell prompter = new MessageBoxShell(title, text, new String[] { MessageText.getString("Button.ok") }, 0);
                                        prompter.setAutoCloseInMS(0);
                                        prompter.open(null);
                                    }
                                }
                            });
                        }
                        return (true);
                    }
                    return false;
                }
            });
            return entry;
        }
    });
    // download history
    mdi.registerEntry(MultipleDocumentInterface.SIDEBAR_SECTION_DOWNLOAD_HISTORY, new MdiEntryCreationListener() {

        @Override
        public MdiEntry createMDiEntry(String id) {
            final DownloadHistoryManager history_manager = (DownloadHistoryManager) CoreFactory.getSingleton().getGlobalManager().getDownloadHistoryManager();
            final ViewTitleInfo title_info = new ViewTitleInfo() {

                @Override
                public Object getTitleInfoProperty(int propertyID) {
                    if (propertyID == TITLE_INDICATOR_TEXT) {
                        if (history_manager == null) {
                            return (null);
                        } else if (history_manager.isEnabled()) {
                            int num = history_manager.getHistoryCount();
                            return (String.valueOf(num));
                        } else {
                            return (MessageText.getString("label.disabled"));
                        }
                    }
                    return null;
                }
            };
            MdiEntry entry = mdi.createEntryFromSkinRef(MultipleDocumentInterface.SIDEBAR_HEADER_TRANSFERS, MultipleDocumentInterface.SIDEBAR_SECTION_DOWNLOAD_HISTORY, "downloadhistoryview", "{mdi.entry.downloadhistoryview}", title_info, null, true, null);
            entry.setImageLeftID("image.sidebar.logview");
            if (history_manager != null) {
                final DownloadHistoryListener history_listener = new DownloadHistoryListener() {

                    @Override
                    public void downloadHistoryEventOccurred(DownloadHistoryEvent event) {
                        ViewTitleInfoManager.refreshTitleInfo(title_info);
                    }
                };
                history_manager.addListener(history_listener, false);
                entry.addListener(new MdiCloseListener() {

                    @Override
                    public void mdiEntryClosed(MdiEntry entry, boolean userClosed) {
                        history_manager.removeListener(history_listener);
                    }
                });
            }
            return entry;
        }
    });
    // torrent options
    mdi.registerEntry(MultipleDocumentInterface.SIDEBAR_SECTION_TORRENT_OPTIONS, new MdiEntryCreationListener() {

        @Override
        public MdiEntry createMDiEntry(String id) {
            MdiEntry entry = mdi.createEntryFromEventListener(MultipleDocumentInterface.SIDEBAR_HEADER_TRANSFERS, TorrentOptionsView.class, MultipleDocumentInterface.SIDEBAR_SECTION_TORRENT_OPTIONS, true, null, null);
            entry.setImageLeftID("image.sidebar.torrentoptions");
            return entry;
        }
    });
    mdi.registerEntry(MultipleDocumentInterface.SIDEBAR_SECTION_MY_SHARES, new MdiEntryCreationListener() {

        @Override
        public MdiEntry createMDiEntry(String id) {
            MdiEntry entry = mdi.createEntryFromEventListener(MultipleDocumentInterface.SIDEBAR_HEADER_TRANSFERS, MySharesView.class, MultipleDocumentInterface.SIDEBAR_SECTION_MY_SHARES, true, null, null);
            entry.setImageLeftID("image.sidebar.myshares");
            return entry;
        }
    });
    mdi.registerEntry(MultipleDocumentInterface.SIDEBAR_SECTION_MY_TRACKER, new MdiEntryCreationListener() {

        @Override
        public MdiEntry createMDiEntry(String id) {
            MdiEntry entry = mdi.createEntryFromEventListener(MultipleDocumentInterface.SIDEBAR_HEADER_TRANSFERS, MyTrackerView.class, MultipleDocumentInterface.SIDEBAR_SECTION_MY_TRACKER, true, null, null);
            entry.setImageLeftID("image.sidebar.mytracker");
            return entry;
        }
    });
    mdi.registerEntry(MultipleDocumentInterface.SIDEBAR_SECTION_CLIENT_STATS, new MdiEntryCreationListener() {

        @Override
        public MdiEntry createMDiEntry(String id) {
            MdiEntry entry = mdi.createEntryFromEventListener(MultipleDocumentInterface.SIDEBAR_HEADER_PLUGINS, ClientStatsView.class, MultipleDocumentInterface.SIDEBAR_SECTION_CLIENT_STATS, true, null, null);
            entry.setImageLeftID("image.sidebar.clientstats");
            return entry;
        }
    });
    mdi.registerEntry(MultipleDocumentInterface.SIDEBAR_SECTION_CONFIG, new MdiEntryCreationListener2() {

        @Override
        public MdiEntry createMDiEntry(MultipleDocumentInterface mdi, String id, Object datasource, Map<?, ?> params) {
            String section = (datasource instanceof String) ? ((String) datasource) : null;
            boolean uiClassic = COConfigurationManager.getStringParameter("ui").equals("az2");
            if (uiClassic || COConfigurationManager.getBooleanParameter("Show Options In Side Bar")) {
                MdiEntry entry = ((MultipleDocumentInterfaceSWT) mdi).createEntryFromEventListener(MultipleDocumentInterface.SIDEBAR_HEADER_PLUGINS, ConfigView.class, MultipleDocumentInterface.SIDEBAR_SECTION_CONFIG, true, null, null);
                entry.setImageLeftID("image.sidebar.config");
                return entry;
            }
            ConfigShell.getInstance().open(section);
            return null;
        }
    });
    try {
        if (!COConfigurationManager.getBooleanParameter("my.shares.view.auto.open.done", false)) {
            final ShareManager share_manager = pi.getShareManager();
            if (share_manager.getShares().length > 0) {
            // stop showing this by default
            // mdi.showEntryByID(MultipleDocumentInterface.SIDEBAR_SECTION_MY_SHARES);
            } else {
                shareManagerListener = new ShareManagerListener() {

                    boolean done = false;

                    @Override
                    public void resourceModified(ShareResource old_resource, ShareResource new_resource) {
                    }

                    @Override
                    public void resourceDeleted(ShareResource resource) {
                    }

                    @Override
                    public void resourceAdded(ShareResource resource) {
                        if (done) {
                            return;
                        }
                        done = true;
                        share_manager.removeListener(this);
                        COConfigurationManager.setParameter("my.shares.view.auto.open.done", true);
                        mdi.loadEntryByID(MultipleDocumentInterface.SIDEBAR_SECTION_MY_SHARES, false);
                    }

                    @Override
                    public void reportProgress(int percent_complete) {
                    }

                    @Override
                    public void reportCurrentTask(String task_description) {
                    }
                };
                share_manager.addListener(shareManagerListener);
            }
        }
    } catch (Throwable t) {
    }
    try {
        if (!COConfigurationManager.getBooleanParameter("my.tracker.view.auto.open.done", false)) {
            // Load Tracker View on first host of file
            TRHost trackerHost = CoreFactory.getSingleton().getTrackerHost();
            trackerHostListener = new TRHostListener() {

                boolean done = false;

                @Override
                public void torrentRemoved(TRHostTorrent t) {
                }

                @Override
                public void torrentChanged(TRHostTorrent t) {
                }

                @Override
                public void torrentAdded(TRHostTorrent t) {
                    if (done) {
                        return;
                    }
                    done = true;
                    trackerHost.removeListener(this);
                    COConfigurationManager.setParameter("my.tracker.view.auto.open.done", true);
                    mdi.loadEntryByID(MultipleDocumentInterface.SIDEBAR_SECTION_MY_TRACKER, false);
                }

                @Override
                public boolean handleExternalRequest(InetSocketAddress client_address, String user, String url, URL absolute_url, String header, InputStream is, OutputStream os, AsyncController async) throws IOException {
                    return false;
                }
            };
            trackerHost.addListener(trackerHostListener);
        }
    } catch (Throwable t) {
    }
    UIManager uim = pi.getUIManager();
    if (uim != null) {
        MenuItem menuItem = uim.getMenuManager().addMenuItem(MenuManager.MENU_MENUBAR, "tags.view.heading");
        menuItem.setDisposeWithUIDetach(UIInstance.UIT_SWT);
        menuItem.addListener(new MenuItemListener() {

            @Override
            public void selected(MenuItem menu, Object target) {
                UIFunctionsManager.getUIFunctions().getMDI().showEntryByID(MultipleDocumentInterface.SIDEBAR_SECTION_TAGS);
            }
        });
        menuItem = uim.getMenuManager().addMenuItem(MenuManager.MENU_MENUBAR, "tag.discovery.view.heading");
        menuItem.setDisposeWithUIDetach(UIInstance.UIT_SWT);
        menuItem.addListener(new MenuItemListener() {

            @Override
            public void selected(MenuItem menu, Object target) {
                UIFunctionsManager.getUIFunctions().getMDI().showEntryByID(MultipleDocumentInterface.SIDEBAR_SECTION_TAG_DISCOVERY);
            }
        });
        menuItem = uim.getMenuManager().addMenuItem(MenuManager.MENU_MENUBAR, "chats.view.heading");
        menuItem.setDisposeWithUIDetach(UIInstance.UIT_SWT);
        menuItem.addListener(new MenuItemListener() {

            @Override
            public void selected(MenuItem menu, Object target) {
                UIFunctionsManager.getUIFunctions().getMDI().showEntryByID(MultipleDocumentInterface.SIDEBAR_SECTION_CHAT);
            }
        });
        menuItem = uim.getMenuManager().addMenuItem(MenuManager.MENU_MENUBAR, "archivedlsview.view.heading");
        menuItem.setDisposeWithUIDetach(UIInstance.UIT_SWT);
        menuItem.addListener(new MenuItemListener() {

            @Override
            public void selected(MenuItem menu, Object target) {
                UIFunctionsManager.getUIFunctions().getMDI().showEntryByID(MultipleDocumentInterface.SIDEBAR_SECTION_ARCHIVED_DOWNLOADS);
            }
        });
        menuItem = uim.getMenuManager().addMenuItem(MenuManager.MENU_MENUBAR, "downloadhistoryview.view.heading");
        menuItem.setDisposeWithUIDetach(UIInstance.UIT_SWT);
        menuItem.addListener(new MenuItemListener() {

            @Override
            public void selected(MenuItem menu, Object target) {
                UIFunctionsManager.getUIFunctions().getMDI().showEntryByID(MultipleDocumentInterface.SIDEBAR_SECTION_DOWNLOAD_HISTORY);
            }
        });
    }
// System.out.println("Activate sidebar " + startTab + " took "
// + (SystemTime.getCurrentTime() - startTime) + "ms");
// startTime = SystemTime.getCurrentTime();
}
Also used : TimerEventPeriodic(com.biglybt.core.util.TimerEventPeriodic) DownloadHistoryManager(com.biglybt.core.history.DownloadHistoryManager) ChatInstance(com.biglybt.plugin.net.buddy.BuddyPluginBeta.ChatInstance) InetSocketAddress(java.net.InetSocketAddress) OutputStream(java.io.OutputStream) ArrayList(java.util.ArrayList) UIManager(com.biglybt.pif.ui.UIManager) UIManagerListener2(com.biglybt.pif.ui.UIManagerListener2) DownloadStub(com.biglybt.pif.download.DownloadStub) TimerEventPerformer(com.biglybt.core.util.TimerEventPerformer) TimerEvent(com.biglybt.core.util.TimerEvent) ShareManagerListener(com.biglybt.pif.sharing.ShareManagerListener) MenuItemListener(com.biglybt.pif.ui.menus.MenuItemListener) UIInstance(com.biglybt.pif.ui.UIInstance) StatsView(com.biglybt.ui.swt.views.stats.StatsView) ClientStatsView(com.biglybt.ui.swt.views.clientstats.ClientStatsView) TRHostTorrent(com.biglybt.core.tracker.host.TRHostTorrent) DownloadStubEvent(com.biglybt.pif.download.DownloadStubEvent) TRHost(com.biglybt.core.tracker.host.TRHost) DownloadHistoryListener(com.biglybt.core.history.DownloadHistoryListener) ViewTitleInfo(com.biglybt.ui.common.viewtitleinfo.ViewTitleInfo) AsyncController(com.biglybt.core.util.AsyncController) ShareManager(com.biglybt.pif.sharing.ShareManager) ManagerUtils(com.biglybt.ui.swt.views.utils.ManagerUtils) URL(java.net.URL) DownloadHistoryEvent(com.biglybt.core.history.DownloadHistoryEvent) BuddyPluginBeta(com.biglybt.plugin.net.buddy.BuddyPluginBeta) Download(com.biglybt.pif.download.Download) ShareResource(com.biglybt.pif.sharing.ShareResource) InputStream(java.io.InputStream) PluginInterface(com.biglybt.pif.PluginInterface) DownloadStubListener(com.biglybt.pif.download.DownloadStubListener) MessageBoxShell(com.biglybt.ui.swt.shells.MessageBoxShell) MenuItem(com.biglybt.pif.ui.menus.MenuItem) IOException(java.io.IOException) TRHostListener(com.biglybt.core.tracker.host.TRHostListener) ParameterListener(com.biglybt.core.config.ParameterListener) ClientStatsView(com.biglybt.ui.swt.views.clientstats.ClientStatsView)

Example 10 with MenuItemListener

use of com.biglybt.pif.ui.menus.MenuItemListener in project BiglyBT by BiglySoftware.

the class TabbedMDI method addMenus.

private void addMenus(TabbedEntry entry, String id) {
    PluginManager pm = CoreFactory.getSingleton().getPluginManager();
    PluginInterface pi = pm.getDefaultPluginInterface();
    UIManager uim = pi.getUIManager();
    MenuManager menuManager = uim.getMenuManager();
    {
        if (!Utils.isAZ2UI()) {
            MenuItem menuParentItem = menuManager.addMenuItem(id + "._end_", "menu.add.to");
            menuParentItem.setStyle(MenuItem.STYLE_MENU);
            menuParentItem.setDisposeWithUIDetach(UIInstance.UIT_SWT);
            menuParentItem.addFillListener(new MenuItemFillListener() {

                @Override
                public void menuWillBeShown(MenuItem menu, Object data) {
                    // pick up the right target - due to the confusion of multiple tab instances registering
                    // the same menu entries the original registerer may well not be the one that should receive the event,
                    // rather the one specified in the event is
                    TabbedEntry target = entry;
                    if (data instanceof Object[]) {
                        Object[] odata = (Object[]) data;
                        if (odata.length == 1 && odata[0] instanceof TabbedEntry) {
                            target = (TabbedEntry) odata[0];
                        }
                    }
                    menu.setVisible(target.canBuildStandAlone());
                }
            });
            MenuItem menuItemDashBoard = menuManager.addMenuItem(menuParentItem, "label.dashboard");
            menuItemDashBoard.addListener(new MenuItemListener() {

                @Override
                public void selected(com.biglybt.pif.ui.menus.MenuItem menu, Object data) {
                    TabbedEntry target = entry;
                    if (data instanceof Object[]) {
                        Object[] odata = (Object[]) data;
                        if (odata.length == 1 && odata[0] instanceof TabbedEntry) {
                            target = (TabbedEntry) odata[0];
                        }
                    } else if (data instanceof TabbedEntry) {
                        target = (TabbedEntry) data;
                    }
                    MainMDISetup.getSb_dashboard().addItem(target);
                }
            });
            MenuItem menuItemSidebar = menuManager.addMenuItem(menuParentItem, "label.sidebar");
            menuItemSidebar.addListener(new MenuItemListener() {

                @Override
                public void selected(com.biglybt.pif.ui.menus.MenuItem menu, Object data) {
                    TabbedEntry target = entry;
                    if (data instanceof Object[]) {
                        Object[] odata = (Object[]) data;
                        if (odata.length == 1 && odata[0] instanceof TabbedEntry) {
                            target = (TabbedEntry) odata[0];
                        }
                    } else if (data instanceof TabbedEntry) {
                        target = (TabbedEntry) data;
                    }
                    MainMDISetup.getSb_dashboard().addItemToSidebar(target);
                }
            });
        }
    }
    {
        MenuItem menuParentItem = menuManager.addMenuItem(id + "._end_", "label.pop.out");
        menuParentItem.setStyle(MenuItem.STYLE_MENU);
        menuParentItem.setDisposeWithUIDetach(UIInstance.UIT_SWT);
        menuParentItem.addFillListener(new com.biglybt.pif.ui.menus.MenuItemFillListener() {

            @Override
            public void menuWillBeShown(com.biglybt.pif.ui.menus.MenuItem menu, Object data) {
                TabbedEntry target = entry;
                if (data instanceof Object[]) {
                    Object[] odata = (Object[]) data;
                    if (odata.length == 1 && odata[0] instanceof TabbedEntry) {
                        target = (TabbedEntry) odata[0];
                    }
                }
                menu.setVisible(target.canBuildStandAlone());
            }
        });
        MenuItem menuItemIndependent = menuManager.addMenuItem(menuParentItem, "menu.independent");
        MenuItem menuItemOnTop = menuManager.addMenuItem(menuParentItem, "menu.on.top");
        com.biglybt.pif.ui.menus.MenuItemListener listener = new com.biglybt.pif.ui.menus.MenuItemListener() {

            @Override
            public void selected(com.biglybt.pif.ui.menus.MenuItem menu, Object data) {
                TabbedEntry target = entry;
                if (data instanceof Object[]) {
                    Object[] odata = (Object[]) data;
                    if (odata.length == 1 && odata[0] instanceof TabbedEntry) {
                        target = (TabbedEntry) odata[0];
                    }
                } else if (data instanceof TabbedEntry) {
                    target = (TabbedEntry) data;
                }
                popoutEntry(target, menu == menuItemOnTop);
            }
        };
        menuItemIndependent.addListener(listener);
        menuItemOnTop.addListener(listener);
    }
}
Also used : PluginInterface(com.biglybt.pif.PluginInterface) UIManager(com.biglybt.pif.ui.UIManager) MenuItem(com.biglybt.pif.ui.menus.MenuItem) PluginManager(com.biglybt.pif.PluginManager) MenuItemFillListener(com.biglybt.pif.ui.menus.MenuItemFillListener) MenuItemListener(com.biglybt.pif.ui.menus.MenuItemListener) MenuManager(com.biglybt.pif.ui.menus.MenuManager) MenuItem(com.biglybt.pif.ui.menus.MenuItem) MenuItemListener(com.biglybt.pif.ui.menus.MenuItemListener)

Aggregations

MenuItemListener (com.biglybt.pif.ui.menus.MenuItemListener)22 MenuItem (com.biglybt.pif.ui.menus.MenuItem)19 MenuItemFillListener (com.biglybt.pif.ui.menus.MenuItemFillListener)8 MenuManager (com.biglybt.pif.ui.menus.MenuManager)7 ChatInstance (com.biglybt.plugin.net.buddy.BuddyPluginBeta.ChatInstance)7 PluginInterface (com.biglybt.pif.PluginInterface)5 UIInstance (com.biglybt.pif.ui.UIInstance)5 TableContextMenuItem (com.biglybt.pif.ui.tables.TableContextMenuItem)5 ParameterListener (com.biglybt.core.config.ParameterListener)4 UIManager (com.biglybt.pif.ui.UIManager)4 UIFunctions (com.biglybt.ui.UIFunctions)4 InputStream (java.io.InputStream)4 InetSocketAddress (java.net.InetSocketAddress)4 URL (java.net.URL)4 ArrayList (java.util.ArrayList)4 List (java.util.List)4 DownloadHistoryEvent (com.biglybt.core.history.DownloadHistoryEvent)3 DownloadHistoryListener (com.biglybt.core.history.DownloadHistoryListener)3 DownloadHistoryManager (com.biglybt.core.history.DownloadHistoryManager)3 Tag (com.biglybt.core.tag.Tag)3