Package com.aelitis.azureus.ui.swt.mdi

Examples of com.aelitis.azureus.ui.swt.mdi.MultipleDocumentInterfaceSWT


      }
 
      TableView tv = SelectedContentManager.getCurrentlySelectedTableView();
      boolean hasRealDM = tv != null;
      if (!hasRealDM) {
        MultipleDocumentInterfaceSWT mdi = UIFunctionsManagerSWT.getUIFunctionsSWT().getMDISWT();
        if (mdi != null) {
          MdiEntrySWT entry = mdi.getCurrentEntrySWT();
          if (entry != null) {
            if (entry.getDatasource() instanceof DownloadManager) {
              hasRealDM = true;
            } else if ((entry.getIView() instanceof UIPluginView)
                && (((UIPluginView) entry.getIView()).getDataSource() instanceof DownloadManager)) {
View Full Code Here


  }
 

  protected void refreshView() {
    String key = "Subscription_" + ByteFormatter.encodeString(subs.getPublicKey());
    MultipleDocumentInterfaceSWT mdi = UIFunctionsManagerSWT.getUIFunctionsSWT().getMDISWT();
    if (mdi != null) {
      MdiEntrySWT entry = mdi.getEntrySWT(key);
      if (entry != null) {
        IView view = entry.getIView();
        if (view instanceof SubscriptionView) {
          SubscriptionView subsView = (SubscriptionView) view;
          subsView.updateBrowser( false );
View Full Code Here

  }

  // @see com.aelitis.azureus.ui.swt.UIFunctionsSWT#openPluginView(org.gudy.azureus2.ui.swt.views.AbstractIView, java.lang.String)
  public void openPluginView(AbstractIView view, String name) {
    try {
      MultipleDocumentInterfaceSWT mdi = getMDISWT();
      if (mdi == null) {
        return;
      }
      if (mdi.createEntryFromIView(
          MultipleDocumentInterface.SIDEBAR_HEADER_PLUGINS, view, name, null,
          true, true, true) != null) {
        return;
      }
    } catch (Exception e) {
View Full Code Here

  // @see com.aelitis.azureus.ui.swt.UIFunctionsSWT#openPluginView(java.lang.String, java.lang.String, org.gudy.azureus2.ui.swt.plugins.UISWTViewEventListener, java.lang.Object, boolean)
  public void openPluginView(String sParentID, String sViewID,
      UISWTViewEventListener l, Object dataSource, boolean bSetFocus) {
    try {
      MultipleDocumentInterfaceSWT mdi = getMDISWT();

      if (mdi != null) {
       
        String sidebarParentID = null;
       
        if (UISWTInstance.VIEW_MYTORRENTS.equals(sParentID)) {
          sidebarParentID = SideBar.SIDEBAR_HEADER_TRANSFERS;
        } else if (UISWTInstance.VIEW_MAIN.equals(sParentID)) {
          sidebarParentID = MultipleDocumentInterface.SIDEBAR_HEADER_PLUGINS;
        } else {
          System.err.println("Can't find parent " + sParentID + " for " + sViewID);
        }
       
        MdiEntry entry = mdi.createEntryFromEventListener(sidebarParentID, l, sViewID,
            true, dataSource);
        if (bSetFocus) {
          mdi.showEntryByID(sViewID);
        } else if (entry instanceof BaseMdiEntry) {
          // Some plugins (CVS Updater) want their view's composite initialized
          // on OpenPluginView, otherwise they won't do logic users expect
          // (like check for new snapshots).  So, enforce loading entry.
          ((BaseMdiEntry) entry).build();
View Full Code Here

  private Composite parent;

  // @see com.aelitis.azureus.ui.swt.views.skin.SkinView#skinObjectInitialShow(com.aelitis.azureus.ui.swt.skin.SWTSkinObject, java.lang.Object)
  public Object skinObjectInitialShow(SWTSkinObject skinObject, Object params) {

    MultipleDocumentInterfaceSWT mdi = UIFunctionsManagerSWT.getUIFunctionsSWT().getMDISWT();
    if (mdi != null) {
      MdiEntrySWT entry = mdi.getEntryFromSkinObject(skinObject);
      if (entry != null) {
        device = (DeviceMediaRenderer) entry.getDatasource();
      }
    }
   
View Full Code Here

  // Only accessed in SWT thread
  private static List<Long> listAlreadyCalledLoginRPC = new ArrayList<Long>();

  // @see com.aelitis.azureus.ui.swt.skin.SWTSkinObjectAdapter#skinObjectCreated(com.aelitis.azureus.ui.swt.skin.SWTSkinObject, java.lang.Object)
  public Object skinObjectCreated(SWTSkinObject skinObject, Object params) {
    MultipleDocumentInterfaceSWT mdi = UIFunctionsManagerSWT.getUIFunctionsSWT().getMDISWT();
    if (mdi != null) {
      MdiEntry entry = mdi.getEntryBySkinView(this);
      if (entry != null) {
        entry.addListener(this);
      }
    }
View Full Code Here

      }
    }

    browserSkinObject = SWTSkinUtils.findBrowserSO(soMain);

    final MultipleDocumentInterfaceSWT mdi = UIFunctionsManagerSWT.getUIFunctionsSWT().getMDISWT();
    if (mdi != null) {
      final MdiEntry entry = mdi.getEntryBySkinView(this);
      if (entry != null) {
        vitalityImage = entry.addVitalityImage("image.sidebar.vitality.dots");
        vitalityImage.setVisible(false);

        mdi.addListener(new MdiListener() {
          long lastSelect = 0;

          public void mdiEntrySelected(MdiEntry newEntry,
              MdiEntry oldEntry) {
            if (entry == newEntry) {
              if (entry == oldEntry) {
                if (lastSelect < SystemTime.getOffsetTime(-1000)) {
                  if (browserSkinObject != null) {
                    browserSkinObject.restart();
                  }
                }
              } else {
                lastSelect = SystemTime.getCurrentTime();
              }
            }
          }
        });
      }
    }

    browserSkinObject.addListener(new SWTSkinObjectListener() {
   
      public Object eventOccured(SWTSkinObject skinObject, int eventType,
          Object params) {
        if (eventType == EVENT_SHOW) {
          browserSkinObject.removeListener(this);

          browserSkinObject.addListener(new BrowserContext.loadingListener() {
            public void browserLoadingChanged(boolean loading, String url) {
              if (vitalityImage != null) {
                vitalityImage.setVisible(loading);
              }
            }
          });

          browserSkinObject.getContext().setContentNetworkID(contentNetwork.getID());

         
          browserSkinObject.setStartURL(ContentNetworkUtils.getUrl(contentNetwork,
              ContentNetwork.SERVICE_BIG_BROWSE));
        }
        return null;
      }
    });

    PluginInterface pi = PluginInitializer.getDefaultInterface();
    UIManager uim = pi.getUIManager();
    MenuManager menuManager = uim.getMenuManager();

    String menuID = "sidebar."
        + ContentNetworkUtils.getTarget(contentNetwork);
   
    MenuItem item = menuManager.addMenuItem(menuID, "Button.reload");
    item.addListener(new MenuItemListener() {
      public void selected(MenuItem menu, Object target) {
        browserSkinObject.refresh();
      }
    });
   
   
    if (org.gudy.azureus2.core3.util.Constants.isCVSVersion()) {
      MenuItem parent = menuManager.addMenuItem(menuID, "CVS Only");
      parent.setStyle(MenuItem.STYLE_MENU);
     
     
      MenuItem menuItem = menuManager.addMenuItem(parent, "Button.reset");
      menuItem.addListener(new MenuItemListener() {
        public void selected(MenuItem menu, Object target) {
          browserSkinObject.getContext().executeInBrowser("sendMessage('display','reset-url', {});");
          //browserSkinObject.restart();
        }
      });

      menuItem = menuManager.addMenuItem(parent, "Tux RPC Test");
      menuItem.addListener(new MenuItemListener() {
        public void selected(MenuItem menu, Object target) {
          browserSkinObject.setURL("c:\\test\\BrowserMessaging.html");
        }
      });

      menuItem = menuManager.addMenuItem(parent, "URL..");
      menuItem.addListener(new MenuItemListener() {
        public void selected(MenuItem menu, Object target) {
          SimpleTextEntryWindow entryWindow = new SimpleTextEntryWindow("", "!URL!");
          entryWindow.prompt(new UIInputReceiverListener() {
            public void UIInputReceiverClosed(UIInputReceiver entryWindow) {
              if (entryWindow.hasSubmittedInput()) {
                browserSkinObject.setURL(entryWindow.getSubmittedInput());
              }
            }
          });
        }
      });

      if (contentNetwork != ConstantsVuze.getDefaultContentNetwork()) {
        menuItem = menuManager.addMenuItem(parent, "Remove HD Network");
        menuItem.addListener(new MenuItemListener() {
          public void selected(MenuItem menu, Object target) {
            if (mdi != null) {
              MdiEntry entry = mdi.getEntryBySkinView(Browse.this);
              if (entry != null) {
                entry.removeListener(Browse.this);
              }
              mdi.closeEntry(ContentNetworkUtils.getTarget(contentNetwork));
            }
            contentNetwork.remove();
          }
        });

        menuItem = menuManager.addMenuItem(parent, "Reset IP Flag && Close");
        menuItem.addListener(new MenuItemListener() {
          public void selected(MenuItem menu, Object target) {
            contentNetwork.setPersistentProperty(
                ContentNetwork.PP_AUTH_PAGE_SHOWN, Boolean.FALSE);
            if (mdi != null) {
              MdiEntry entry = mdi.getEntryBySkinView(Browse.this);
              if (entry != null) {
                entry.removeListener(Browse.this);
              }
              mdi.closeEntry(ContentNetworkUtils.getTarget(contentNetwork));
            }
          }
        });
      }
      menuItem = menuManager.addMenuItem(parent, "Source Ref: "
View Full Code Here

    return null;
  }

  public Object skinObjectShown(SWTSkinObject skinObject, Object params) {
    MultipleDocumentInterfaceSWT mdi = UIFunctionsManagerSWT.getUIFunctionsSWT().getMDISWT();
    if (mdi != null) {
      MdiEntrySWT entry = mdi.getCurrentEntrySWT();
      entry.addToolbarEnabler(this);
    }
    return super.skinObjectShown(skinObject, params);
  }
View Full Code Here

  private MdiEntry entry;

  public Object skinObjectInitialShow(final SWTSkinObject skinObject,
      Object params) {

    MultipleDocumentInterfaceSWT mdi = UIFunctionsManagerSWT.getUIFunctionsSWT().getMDISWT();
    if (mdi != null) {
      entry = mdi.getEntryFromSkinObject(skinObject);
    }

    browserSkinObject = (SWTSkinObjectBrowser) skin.getSkinObject("plus-ftux",
        soMain);
View Full Code Here

          setViewMode(MODE_BIGTABLE, true);
        }
      });
    }

    MultipleDocumentInterfaceSWT mdi = UIFunctionsManagerSWT.getUIFunctionsSWT().getMDISWT();
    if (mdi != null) {
      MdiEntry entry = mdi.getEntryFromSkinObject(skinObject);
      if (entry != null) {
        entry.addToolbarEnabler(SBC_LibraryView.this);
      }
    }
View Full Code Here

TOP

Related Classes of com.aelitis.azureus.ui.swt.mdi.MultipleDocumentInterfaceSWT

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.