Examples of MdiEntry


Examples of com.aelitis.azureus.ui.mdi.MdiEntry

  public static MenuItem addCloseTabMenuItem(Menu menu) {
    final MenuItem menuItem = addMenuItem(menu, MENU_ID_CLOSE_TAB, new Listener() {
      public void handleEvent(Event event) {
        MultipleDocumentInterface mdi = UIFunctionsManager.getUIFunctions().getMDI();
        if (mdi != null) {
          MdiEntry currentEntry = mdi.getCurrentEntry();
          if (currentEntry != null && currentEntry.isCloseable()) {
            mdi.closeEntry(currentEntry.getId());
          }
        }
      }
    });
    menu.addMenuListener(new MenuListener() {
      public void menuShown(MenuEvent e) {
        MultipleDocumentInterface mdi = UIFunctionsManager.getUIFunctions().getMDI();
        if (mdi != null) {
          MdiEntry currentEntry = mdi.getCurrentEntry();
          if (currentEntry != null && currentEntry.isCloseable()) {
            menuItem.setEnabled(true);
            return;
          }
        }
        menuItem.setEnabled(false);
View Full Code Here

Examples of com.aelitis.azureus.ui.mdi.MdiEntry

      if (enabled) {
        indent(MenuFactory.addMenuItem(viewMenu, SWT.CHECK, "MainWindow.menu.view.beta",
            new Listener() {
              public void handleEvent(Event event) {
                MultipleDocumentInterface mdi = UIFunctionsManager.getUIFunctions().getMDI();
                MdiEntry entry = mdi.createEntryFromSkinRef(null,
                    "BetaProgramme", "main.area.beta",
                    "{Sidebar.beta.title}", null, null,
                    true, "");
                mdi.showEntry(entry);
              }
View Full Code Here

Examples of com.aelitis.azureus.ui.mdi.MdiEntry

          key += 'a' - 1;

        // ESC or CTRL+F4 closes current Tab
        if (key == SWT.ESC
            || (event.keyCode == SWT.F4 && event.stateMask == SWT.CTRL)) {
          MdiEntry entry = getCurrentEntry();
          if (entry != null) {
            entry.close(false);
          }
          event.doit = false;
        } else if (event.keyCode == SWT.F6
            || (event.character == SWT.TAB && (event.stateMask & SWT.CTRL) != 0)) {
          // F6 or Ctrl-Tab selects next Tab
View Full Code Here

Examples of com.aelitis.azureus.ui.mdi.MdiEntry

      index = tabFolder.getItemCount() - 1;
    }

    // instead of .setSelection, use showEntry which will ensure view de/activations
    CTabItem item = tabFolder.getItem(index);
    MdiEntry entry = (MdiEntry) item.getData("TabbedEntry");

    if (entry != null) {
      showEntry(entry);
    }
  }
View Full Code Here

Examples of com.aelitis.azureus.ui.mdi.MdiEntry

  public boolean loadEntryByID(String id, boolean activate) {
    return loadEntryByID(id, activate, false);
  }

  public boolean loadEntryByID(String id, boolean activate, boolean onlyLoadOnce) {
    MdiEntry entry = mapIdToEntry.get(id);
    if (entry != null) {
      if (activate) {
        showEntry(entry);
      }
      return true;
View Full Code Here

Examples of com.aelitis.azureus.ui.mdi.MdiEntry

  public void showEntry(final MdiEntry newEntry) {
    if (newEntry == null) {
      return;
    }
    MdiEntry oldEntry = currentEntry;
    if (newEntry == oldEntry) {
      triggerSelectionListener(newEntry, newEntry);
      return;
    }

    if (oldEntry != null) {
      oldEntry.hide();
    }

    currentEntry = (MdiEntrySWT) newEntry; // assumed MdiEntrySWT

    if (newEntry != null) {
View Full Code Here

Examples of com.aelitis.azureus.ui.mdi.MdiEntry

    triggerSelectionListener(newEntry, oldEntry);
  }

  public void updateUI() {
    MdiEntry currentEntry = getCurrentEntry();
    if (currentEntry != null) {
      currentEntry.updateUI();
    }
  }
View Full Code Here

Examples of com.aelitis.azureus.ui.mdi.MdiEntry

  }
 
  public MdiEntry createEntryFromSkinRef(String parentID, String id,
      String configID, String title, ViewTitleInfo titleInfo, Object params,
      boolean closeable, int index) {
    MdiEntry oldEntry = getEntry(id);
    if (oldEntry != null) {
      return oldEntry;
    }

    TabbedEntry entry = new TabbedEntry(this, skin, id);
View Full Code Here

Examples of com.aelitis.azureus.ui.mdi.MdiEntry

        params, closeable, "".equals(preferedAfterID) ? 0 : -1);
  }

  public MdiEntry createEntryFromEventListener(String parentID,
      UISWTViewEventListener l, String id, boolean closeable, Object datasource) {
    MdiEntry oldEntry = getEntry(id);
    if (oldEntry != null) {
      return oldEntry;
    }

    TabbedEntry entry = new TabbedEntry(this, skin, id);
View Full Code Here

Examples of com.aelitis.azureus.ui.mdi.MdiEntry

  public MdiEntry createEntryFromIViewClass(String parent, String id,
      String title, Class<?> iviewClass, Class<?>[] iviewClassArgs,
      Object[] iviewClassVals, Object datasource, ViewTitleInfo titleInfo,
      boolean closeable) {
    MdiEntry oldEntry = getEntry(id);
    if (oldEntry != null) {
      return oldEntry;
    }

    TabbedEntry entry = new TabbedEntry(this, skin, id);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.