Search in sources :

Example 1 with UISWTViewBuilderCore

use of com.biglybt.ui.swt.pifimpl.UISWTViewBuilderCore in project BiglyBT by BiglySoftware.

the class SBC_ChatOverview method createChatMdiEntry.

private static MdiEntry createChatMdiEntry(UIManager ui_manager, ChatInstance chat) {
    MultipleDocumentInterfaceSWT mdi = UIFunctionsManagerSWT.getUIFunctionsSWT().getMDISWT();
    if (mdi == null) {
        return (null);
    }
    try {
        String key = "Chat_" + chat.getNetwork() + ":" + Base32.encode(chat.getKey().getBytes("UTF-8"));
        MdiEntry existing = mdi.getEntry(key);
        if (existing != null) {
            chat.destroy();
            return (existing);
        }
        BuddyPluginBeta bp = BuddyPluginUtils.getBetaPlugin();
        TreeMap<ChatInstance, String> name_map = new TreeMap<>(new Comparator<ChatInstance>() {

            @Override
            public int compare(ChatInstance o1, ChatInstance o2) {
                return (o1.getName().compareTo(o2.getName()));
            }
        });
        name_map.put(chat, key);
        List<ChatInstance> all_chats = bp.getChats();
        for (ChatInstance c : all_chats) {
            try {
                String k = "Chat_" + c.getNetwork() + ":" + Base32.encode(c.getKey().getBytes("UTF-8"));
                if (mdi.getEntry(k) != null) {
                    name_map.put(c, k);
                }
            } catch (Throwable e) {
            }
        }
        String prev_id = null;
        for (String this_id : name_map.values()) {
            if (this_id == key) {
                break;
            }
            prev_id = this_id;
        }
        if (prev_id == null && name_map.size() > 1) {
            Iterator<String> it = name_map.values().iterator();
            it.next();
            prev_id = "~" + it.next();
        }
        UISWTViewBuilderCore builder = new UISWTViewBuilderCore(key, null, ChatView.class);
        builder.setParentEntryID(MultipleDocumentInterface.SIDEBAR_SECTION_CHAT);
        builder.setInitialDatasource(chat);
        builder.setPreferredAfterID(prev_id);
        MdiEntry entry = mdi.createEntry(builder, true);
        ChatMDIEntry entry_info = new ChatMDIEntry(ui_manager, chat, entry);
        chat.setUserData(MDI_KEY, entry_info);
        entry.addListener(new MdiCloseListener() {

            @Override
            public void mdiEntryClosed(MdiEntry entry, boolean userClosed) {
                chat.setUserData(MDI_KEY, null);
            }
        });
        return (entry);
    } catch (Throwable e) {
        Debug.out(e);
        return (null);
    }
}
Also used : ChatInstance(com.biglybt.plugin.net.buddy.BuddyPluginBeta.ChatInstance) UISWTViewBuilderCore(com.biglybt.ui.swt.pifimpl.UISWTViewBuilderCore) MultipleDocumentInterfaceSWT(com.biglybt.ui.swt.mdi.MultipleDocumentInterfaceSWT) BuddyPluginBeta(com.biglybt.plugin.net.buddy.BuddyPluginBeta)

Example 2 with UISWTViewBuilderCore

use of com.biglybt.ui.swt.pifimpl.UISWTViewBuilderCore in project BiglyBT by BiglySoftware.

the class DeviceManagerUI method addDeviceCategory.

protected categoryView addDeviceCategory(int device_type, String category_title, String category_image_id) {
    String key = "Device_" + category_title + ":" + nextSidebarID();
    categoryView eventListener;
    if (device_type == Device.DT_INTERNET) {
        eventListener = new DeviceInternetView(this, category_title);
    } else {
        eventListener = new categoryViewGeneric(this, device_type, category_title);
    }
    // Pass already created eventListener to builder, because this class needs
    // a reference to fiddle with.  Might cause problems with cloning.
    UISWTViewBuilderCore builder = new UISWTViewBuilderCore(key, null).setInitialDatasource(device_type).setListenerInstantiator(false, (Builder, view) -> eventListener).setParentEntryID(SideBar.SIDEBAR_HEADER_DEVICES);
    MdiEntry entry = mdi.createEntry(builder, false);
    addDefaultDropListener(entry);
    entry.setImageLeftID(category_image_id);
    eventListener.setDetails(entry, key);
    return (eventListener);
}
Also used : DiskManagerFileInfoURL(com.biglybt.core.download.DiskManagerFileInfoURL) DragDropUtils(com.biglybt.ui.swt.utils.DragDropUtils) ValueFormater(com.biglybt.ui.swt.components.graphics.ValueFormater) UPnPService(com.biglybt.net.upnp.UPnPService) PlatformManager(com.biglybt.platform.PlatformManager) StyledText(org.eclipse.swt.custom.StyledText) PlatformManagerCapabilities(com.biglybt.platform.PlatformManagerCapabilities) ManufacturerChooser(com.biglybt.ui.swt.devices.add.ManufacturerChooser) URL(java.net.URL) COConfigurationManager(com.biglybt.core.config.COConfigurationManager) MultipleDocumentInterfaceSWT(com.biglybt.ui.swt.mdi.MultipleDocumentInterfaceSWT) Colors(com.biglybt.ui.swt.mainwindow.Colors) PluginManager(com.biglybt.pif.PluginManager) ViewTitleInfoManager(com.biglybt.ui.common.viewtitleinfo.ViewTitleInfoManager) UIFunctionsManager(com.biglybt.ui.UIFunctionsManager) Point(org.eclipse.swt.graphics.Point) VuzeFile(com.biglybt.core.vuzefile.VuzeFile) InetAddress(java.net.InetAddress) AverageFactory(com.biglybt.core.util.average.AverageFactory) MovingAverage(com.biglybt.core.util.average.MovingAverage) com.biglybt.core.tag(com.biglybt.core.tag) StandardPlugin(com.biglybt.pif.installer.StandardPlugin) Legend(com.biglybt.ui.swt.components.Legend) ViewTitleInfo(com.biglybt.ui.common.viewtitleinfo.ViewTitleInfo) com.biglybt.ui.mdi(com.biglybt.ui.mdi) TorrentOpener(com.biglybt.ui.swt.mainwindow.TorrentOpener) SkinViewManager(com.biglybt.ui.swt.views.skin.SkinViewManager) DeviceManufacturer(com.biglybt.core.devices.DeviceManager.DeviceManufacturer) org.eclipse.swt.layout(org.eclipse.swt.layout) SkinView(com.biglybt.ui.swt.views.skin.SkinView) ImageLoader(com.biglybt.ui.swt.imageloader.ImageLoader) ImageDownloaderListener(com.biglybt.ui.swt.imageloader.ImageLoader.ImageDownloaderListener) MessageText(com.biglybt.core.internat.MessageText) PluginInitializer(com.biglybt.pifimpl.local.PluginInitializer) List(java.util.List) UnassociatedDevice(com.biglybt.core.devices.DeviceManager.UnassociatedDevice) BufferedLabel(com.biglybt.ui.swt.components.BufferedLabel) StreamManager(com.biglybt.core.download.StreamManager) TagUIUtils(com.biglybt.ui.swt.views.utils.TagUIUtils) SWT(org.eclipse.swt.SWT) BasicPluginConfigModel(com.biglybt.pif.ui.model.BasicPluginConfigModel) PeersGeneralView(com.biglybt.ui.swt.views.PeersGeneralView) UIFunctions(com.biglybt.ui.UIFunctions) DeviceTemplateChooser(com.biglybt.ui.swt.devices.add.DeviceTemplateChooser) TableRow(com.biglybt.pif.ui.tables.TableRow) java.util(java.util) UPnPWANCommonInterfaceConfig(com.biglybt.net.upnp.services.UPnPWANCommonInterfaceConfig) com.biglybt.pif.ui.menus(com.biglybt.pif.ui.menus) com.biglybt.pif.ui(com.biglybt.pif.ui) Image(org.eclipse.swt.graphics.Image) Download(com.biglybt.pif.download.Download) PlayUtils(com.biglybt.util.PlayUtils) MessageBoxShell(com.biglybt.ui.swt.shells.MessageBoxShell) PluginInterface(com.biglybt.pif.PluginInterface) com.biglybt.pif.ui.config(com.biglybt.pif.ui.config) ValueSource(com.biglybt.ui.swt.components.graphics.ValueSource) com.biglybt.net.upnpms(com.biglybt.net.upnpms) ManagerUtils(com.biglybt.ui.swt.views.utils.ManagerUtils) UPnPRootDevice(com.biglybt.net.upnp.UPnPRootDevice) CoreWaiterSWT(com.biglybt.ui.swt.shells.CoreWaiterSWT) TableManager(com.biglybt.pif.ui.tables.TableManager) UISWTViewBuilderCore(com.biglybt.ui.swt.pifimpl.UISWTViewBuilderCore) TableContextMenuItem(com.biglybt.pif.ui.tables.TableContextMenuItem) MenuItem(com.biglybt.pif.ui.menus.MenuItem) org.eclipse.swt.dnd(org.eclipse.swt.dnd) CoreFactory(com.biglybt.core.CoreFactory) Core(com.biglybt.core.Core) UISWTViewCoreEventListener(com.biglybt.ui.swt.pifimpl.UISWTViewCoreEventListener) org.eclipse.swt.events(org.eclipse.swt.events) VuzeFileHandler(com.biglybt.core.vuzefile.VuzeFileHandler) SkinViewManagerListener(com.biglybt.ui.swt.views.skin.SkinViewManager.SkinViewManagerListener) com.biglybt.ui.swt.pif(com.biglybt.ui.swt.pif) org.eclipse.swt.widgets(org.eclipse.swt.widgets) SideBar(com.biglybt.ui.swt.views.skin.sidebar.SideBar) PluginInstaller(com.biglybt.pif.installer.PluginInstaller) StyleRange(org.eclipse.swt.custom.StyleRange) MultiPlotGraphic(com.biglybt.ui.swt.components.graphics.MultiPlotGraphic) File(java.io.File) DiskManagerFileInfo(com.biglybt.pif.disk.DiskManagerFileInfo) com.biglybt.core.util(com.biglybt.core.util) CoreOperation(com.biglybt.core.CoreOperation) Color(org.eclipse.swt.graphics.Color) DiskManagerFileInfoFile(com.biglybt.core.download.DiskManagerFileInfoFile) CoreRunningListener(com.biglybt.core.CoreRunningListener) StaticUtilities(com.biglybt.pif.utils.StaticUtilities) PlatformManagerFactory(com.biglybt.platform.PlatformManagerFactory) UIExitUtilsSWT.canCloseListener(com.biglybt.ui.swt.UIExitUtilsSWT.canCloseListener) com.biglybt.ui.swt(com.biglybt.ui.swt) ClipboardCopy(com.biglybt.ui.swt.mainwindow.ClipboardCopy) com.biglybt.core.devices(com.biglybt.core.devices) UPnPDevice(com.biglybt.net.upnp.UPnPDevice) CoreOperationListener(com.biglybt.core.CoreOperationListener) UISWTViewBuilderCore(com.biglybt.ui.swt.pifimpl.UISWTViewBuilderCore)

Example 3 with UISWTViewBuilderCore

use of com.biglybt.ui.swt.pifimpl.UISWTViewBuilderCore in project BiglyBT by BiglySoftware.

the class SB_Transfers method setupTag.

public MdiEntry setupTag(final Tag tag) {
    MultipleDocumentInterfaceSWT mdi = UIFunctionsManagerSWT.getUIFunctionsSWT().getMDISWT();
    if (mdi == null) {
        return null;
    }
    if (!show_tag_tab_views) {
        return (null);
    }
    /*
			 * Can get hit here concurrently due to various threads interacting with tags...
			 */
    int tag_type = tag.getTagType().getTagType();
    synchronized (tag_setup_lock) {
        String id = "Tag." + tag_type + "." + tag.getTagID();
        String parent_id = MultipleDocumentInterface.SIDEBAR_HEADER_TRANSFERS;
        String group_id = null;
        if (show_tag_groups) {
            String tag_group = tag.getGroup();
            if (tag_group != null && !tag_group.isEmpty()) {
                if (tag.getTaggableTypes() == Taggable.TT_DOWNLOAD || tag.getTaggableTypes() == Taggable.TT_PEER) {
                    group_id = "Tag." + tag_type + ".group." + tag_group;
                    if (mdi.getEntry(group_id) == null) {
                        // Create Entry for Group
                        TagGroup group = tag.getGroupContainer();
                        String gid = group_id;
                        ViewTitleInfo viewTitleInfo = new ViewTitleInfo() {

                            @Override
                            public Object getTitleInfoProperty(int pid) {
                                if (pid == TITLE_TEXT) {
                                    return (tag_group);
                                } else if (pid == TITLE_INDICATOR_TEXT) {
                                    MdiEntry entry = mdi.getEntry(gid);
                                    if (entry != null && !entry.isExpanded()) {
                                        return (String.valueOf(group.getTags().size()));
                                    }
                                } else if (pid == TITLE_INDICATOR_COLOR) {
                                    int[] colour = group.getColor();
                                    return (colour);
                                } else if (pid == TITLE_INDICATOR_TEXT_TOOLTIP) {
                                }
                                return null;
                            }
                        };
                        TagGroupListener tgl = new TagGroupListener() {

                            @Override
                            public void tagRemoved(TagGroup group, Tag tag) {
                                update();
                            }

                            @Override
                            public void tagAdded(TagGroup group, Tag tag) {
                                update();
                            }

                            @Override
                            public void groupChanged(TagGroup group) {
                                update();
                            }

                            private void update() {
                                MdiEntry entry = mdi.getEntry(gid);
                                if (entry != null) {
                                    if (entry.isEntryDisposed()) {
                                        group.removeListener(this);
                                    } else {
                                        ViewTitleInfoManager.refreshTitleInfo(viewTitleInfo);
                                        requestRedraw(entry);
                                    }
                                }
                            }
                        };
                        group.addListener(tgl, false);
                        // find where to locate this in the sidebar
                        String prev_id = getTagPosition(mdi, parent_id, tag_type, tag_group);
                        MdiEntry entry;
                        boolean closeable = true;
                        if (tag.getTaggableTypes() == Taggable.TT_DOWNLOAD) {
                            entry = mdi.createEntryFromSkinRef(parent_id, group_id, "library", tag_group, viewTitleInfo, group, closeable, prev_id);
                        } else {
                            UISWTViewBuilderCore builder = new UISWTViewBuilderCore(group_id, null, PeersGeneralView.class);
                            builder.setParentEntryID(parent_id);
                            builder.setPreferredAfterID(prev_id).setInitialDatasource(group);
                            entry = mdi.createEntry(builder, closeable);
                            entry.setViewTitleInfo(viewTitleInfo);
                        }
                        setTagIcon(tag, entry, true);
                        entry.setUserData(TAG_TAG_OR_GROUP_KEY, group);
                        entry.addListener((e, user) -> {
                            if (user) {
                                List<Tag> kids = group.getTags();
                                for (Tag kid : kids) {
                                    kid.setVisible(false);
                                }
                            }
                        });
                        // remove header when there are no children
                        entry.addListener(new MdiChildCloseListener() {

                            boolean closed;

                            public void mdiChildEntryClosed(MdiEntry parent, MdiEntry child, boolean user) {
                                String viewID = parent.getViewID();
                                if (mdi.getChildrenOf(viewID).isEmpty()) {
                                    synchronized (this) {
                                        if (closed) {
                                            return;
                                        }
                                        closed = true;
                                    }
                                    // need to defer this in case there are outstanding sidebar
                                    // additions that are located relative to this entry...
                                    mdi.runWhenIdle(() -> {
                                        mdi.closeEntry(parent, false);
                                    });
                                }
                            }
                        });
                        if (entry instanceof MdiEntrySWT) {
                            final MdiEntrySWT entrySWT = (MdiEntrySWT) entry;
                            entry.addListener((entry1, droppedObject) -> {
                                List<Tag> tags = DragDropUtils.getTagsFromDroppedData(droppedObject);
                                if (tags.isEmpty()) {
                                    return false;
                                }
                                String groupName = tag.getGroupContainer().getName();
                                for (Tag droppedTag : tags) {
                                    droppedTag.setGroup(groupName);
                                }
                                return false;
                            });
                            entrySWT.addListener(new MdiSWTMenuHackListener() {

                                @Override
                                public void menuWillBeShown(MdiEntry entry, Menu menuTree) {
                                    if (tag.getTaggableTypes() == Taggable.TT_DOWNLOAD) {
                                        TagGroup tg = tag.getGroupContainer();
                                        addMenuCollapseAll(mdi, menuTree, entry.getViewID());
                                        new org.eclipse.swt.widgets.MenuItem(menuTree, SWT.SEPARATOR);
                                        TagUIUtils.createSideBarMenuItems(menuTree, tg);
                                    }
                                }
                            });
                        }
                    }
                    parent_id = group_id;
                }
            }
        }
        if (mdi.getEntry(id) != null) {
            return null;
        }
        // find where to locate this in the sidebar
        String prev_id = getTagPosition(mdi, parent_id, tag_type, tag.getTagName(true));
        boolean auto = tag.getTagType().isTagTypeAuto();
        ViewTitleInfo viewTitleInfo = new ViewTitleInfo() {

            @Override
            public Object getTitleInfoProperty(int pid) {
                if (pid == TITLE_TEXT) {
                    return (tag.getTagName(true));
                } else if (pid == TITLE_INDICATOR_TEXT) {
                    return (String.valueOf(tag.getTaggedCount()));
                } else if (pid == TITLE_INDICATOR_COLOR) {
                    TagType tag_type = tag.getTagType();
                    int[] def_color = tag_type.getColorDefault();
                    int[] tag_color = tag.getColor();
                    if (tag_color != def_color) {
                        return (tag_color);
                    }
                } else if (pid == TITLE_INDICATOR_TEXT_TOOLTIP) {
                    return (TagUtils.getTagTooltip(tag));
                }
                return null;
            }
        };
        MdiEntry entry;
        boolean closable = auto;
        if (tag.getTaggableTypes() == Taggable.TT_DOWNLOAD) {
            closable = true;
            String name = tag.getTagName(true);
            entry = mdi.createEntryFromSkinRef(parent_id, id, "library", name, viewTitleInfo, tag, closable, prev_id);
            addGeneralLibraryMenus(mdi, id);
        } else {
            UISWTViewBuilderCore builder = new UISWTViewBuilderCore(id, null, PeersGeneralView.class);
            builder.setParentEntryID(parent_id);
            builder.setPreferredAfterID(prev_id).setInitialDatasource(tag);
            entry = mdi.createEntry(builder, closable);
            entry.setViewTitleInfo(viewTitleInfo);
        }
        entry.setUserData(TAG_TAG_OR_GROUP_KEY, tag);
        if (closable) {
            entry.addListener(new MdiCloseListener() {

                @Override
                public void mdiEntryClosed(MdiEntry entry, boolean userClosed) {
                    if (userClosed && entry.getUserData(AUTO_CLOSE_KEY) == null) {
                        if (COConfigurationManager.getBooleanParameter("Library.TagInSideBar")) {
                            tag.setVisible(false);
                        }
                    }
                }
            });
        }
        if (entry != null) {
            setTagIcon(tag, entry, false);
        }
        if (entry instanceof SideBarEntrySWT) {
            final SideBarEntrySWT entrySWT = (SideBarEntrySWT) entry;
            entrySWT.addListener(new MdiSWTMenuHackListener() {

                @Override
                public void menuWillBeShown(MdiEntry entry, Menu menuTree) {
                    TagUIUtils.createSideBarMenuItems(menuTree, tag);
                }
            });
        }
        if (!auto && entry != null) {
            MdiEntryDropListener dl = new MdiEntryDropListener() {

                @Override
                public boolean mdiEntryDrop(MdiEntry entry, Object payload) {
                    if (!(payload instanceof String)) {
                        return false;
                    }
                    boolean[] auto = tag.isTagAuto();
                    if (auto[0] && auto[1]) {
                        return (false);
                    }
                    final String dropped = (String) payload;
                    new AEThread2("Tagger") {

                        @Override
                        public void run() {
                            dropTorrentOnTag(tag, dropped);
                        }
                    }.start();
                    return true;
                }

                private void dropTorrentOnTag(Tag tag, String dropped) {
                    List<DownloadManager> dms = DragDropUtils.getDownloadsFromDropData(dropped, true);
                    if (dms.isEmpty()) {
                        return;
                    }
                    boolean doAdd = false;
                    int mods = Utils.getDragDetectModifiers();
                    if ((mods & SWT.ALT) != 0) {
                        // / alt+drop -> addl shift+alt+drop -> remove otherwise existing togglish logic
                        doAdd = (mods & SWT.SHIFT) == 0;
                    } else {
                        for (DownloadManager dm : dms) {
                            if (!tag.hasTaggable(dm)) {
                                doAdd = true;
                                break;
                            }
                        }
                    }
                    boolean[] auto = tag.isTagAuto();
                    if (auto.length < 2 || (doAdd && auto[0]) || (!doAdd && auto[0] && auto[1])) {
                        return;
                    }
                    try {
                        tag.addTaggableBatch(true);
                        for (DownloadManager dm : dms) {
                            if (doAdd) {
                                if (!tag.hasTaggable(dm)) {
                                    tag.addTaggable(dm);
                                }
                            } else {
                                if (tag.hasTaggable(dm)) {
                                    tag.removeTaggable(dm);
                                }
                            }
                        }
                    } finally {
                        tag.addTaggableBatch(false);
                    }
                }
            };
            boolean[] tag_auto = tag.isTagAuto();
            entry.setUserData(TAG_DATA_KEY, new Object[] { dl, tag_auto });
            if (!(tag_auto[0] && tag_auto[1])) {
                entry.addListener(dl);
            }
        }
        return entry;
    }
}
Also used : SideBarEntrySWT(com.biglybt.ui.swt.views.skin.sidebar.SideBarEntrySWT) MdiSWTMenuHackListener(com.biglybt.ui.swt.mdi.MdiSWTMenuHackListener) DownloadManager(com.biglybt.core.download.DownloadManager) UISWTViewBuilderCore(com.biglybt.ui.swt.pifimpl.UISWTViewBuilderCore) MultipleDocumentInterfaceSWT(com.biglybt.ui.swt.mdi.MultipleDocumentInterfaceSWT) Menu(org.eclipse.swt.widgets.Menu) MdiEntrySWT(com.biglybt.ui.swt.mdi.MdiEntrySWT) Point(org.eclipse.swt.graphics.Point) ViewTitleInfo(com.biglybt.ui.common.viewtitleinfo.ViewTitleInfo)

Example 4 with UISWTViewBuilderCore

use of com.biglybt.ui.swt.pifimpl.UISWTViewBuilderCore in project BiglyBT by BiglySoftware.

the class SBC_TagsOverview method registerPluginViews.

private static void registerPluginViews() {
    ViewManagerSWT vm = ViewManagerSWT.getInstance();
    if (vm.areCoreViewsRegistered(PLUGIN_DS_TYPE)) {
        return;
    }
    vm.registerView(PLUGIN_DS_TYPE, new UISWTViewBuilderCore(TagSettingsView.VIEW_ID, null, TagSettingsView.class));
    vm.registerView(PLUGIN_DS_TYPE, new UISWTViewBuilderCore(MyTorrentsSubView.MSGID_PREFIX, null, MyTorrentsSubView.class));
    vm.registerView(PLUGIN_DS_TYPE, new UISWTViewBuilderCore(FilesView.MSGID_PREFIX, null, FilesView.class));
    vm.setCoreViewsRegistered(PLUGIN_DS_TYPE);
}
Also used : UISWTViewBuilderCore(com.biglybt.ui.swt.pifimpl.UISWTViewBuilderCore)

Example 5 with UISWTViewBuilderCore

use of com.biglybt.ui.swt.pifimpl.UISWTViewBuilderCore in project BiglyBT by BiglySoftware.

the class ColumnFileCount method openFilesMiniView.

private void openFilesMiniView(DownloadManager dm, TableCell cell) {
    UISWTViewBuilderCore builder = ViewManagerSWT.getInstance().getBuilder(Download.class, FilesView.MSGID_PREFIX);
    if (builder == null) {
        return;
    }
    SkinnedDialog skinnedDialog = BaseMdiEntry.buildSkinnedDialog("FilesView", dm, builder);
    if (skinnedDialog == null) {
        return;
    }
    skinnedDialog.setTitle(dm.getDisplayName());
    Shell shell = skinnedDialog.getShell();
    Rectangle bounds = ((TableCellSWT) cell).getBoundsOnDisplay();
    bounds.y += bounds.height;
    bounds.width = 630;
    bounds.height = (16 * dm.getNumFileInfos()) + 60;
    Rectangle realBounds = shell.computeTrim(0, 0, bounds.width, bounds.height);
    realBounds.width -= realBounds.x;
    realBounds.height -= realBounds.y;
    realBounds.x = bounds.x;
    realBounds.y = bounds.y;
    if (bounds.height > 500) {
        bounds.height = 500;
    }
    shell.setBounds(realBounds);
    shell.setAlpha(230);
    Utils.verifyShellRect(shell, true);
    skinnedDialog.openUnadjusted();
}
Also used : Shell(org.eclipse.swt.widgets.Shell) TableCellSWT(com.biglybt.ui.swt.views.table.TableCellSWT) UISWTViewBuilderCore(com.biglybt.ui.swt.pifimpl.UISWTViewBuilderCore) Rectangle(org.eclipse.swt.graphics.Rectangle) SkinnedDialog(com.biglybt.ui.swt.views.skin.SkinnedDialog)

Aggregations

UISWTViewBuilderCore (com.biglybt.ui.swt.pifimpl.UISWTViewBuilderCore)33 ViewManagerSWT (com.biglybt.ui.swt.views.ViewManagerSWT)9 MultipleDocumentInterfaceSWT (com.biglybt.ui.swt.mdi.MultipleDocumentInterfaceSWT)5 DownloadManager (com.biglybt.core.download.DownloadManager)4 MenuItem (com.biglybt.pif.ui.menus.MenuItem)4 PluginInterface (com.biglybt.pif.PluginInterface)3 ViewTitleInfo (com.biglybt.ui.common.viewtitleinfo.ViewTitleInfo)3 Point (org.eclipse.swt.graphics.Point)3 Core (com.biglybt.core.Core)2 CoreFactory (com.biglybt.core.CoreFactory)2 CoreRunningListener (com.biglybt.core.CoreRunningListener)2 COConfigurationManager (com.biglybt.core.config.COConfigurationManager)2 ParameterListener (com.biglybt.core.config.ParameterListener)2 UnassociatedDevice (com.biglybt.core.devices.DeviceManager.UnassociatedDevice)2 DiskManagerFileInfoFile (com.biglybt.core.download.DiskManagerFileInfoFile)2 DiskManagerFileInfoURL (com.biglybt.core.download.DiskManagerFileInfoURL)2 MessageText (com.biglybt.core.internat.MessageText)2 com.biglybt.core.util (com.biglybt.core.util)2 PluginManager (com.biglybt.pif.PluginManager)2 Download (com.biglybt.pif.download.Download)2