コード例 #1
0
  // TabViews Functions
  public void addTabView(UISWTViewCore view) {
    if (view == null || tabFolder == null) {
      return;
    }

    triggerTabViewDataSourceChanged(view);

    CTabItem item = new CTabItem(tabFolder, SWT.NULL);
    item.setData("IView", view);
    Messages.setLanguageText(item, view.getTitleID());
    view.initialize(tabFolder);
    item.setControl(view.getComposite());
    tabViews.add(view);
  }
コード例 #2
0
  public UISWTViewCore getActiveSubView() {
    if (!tv.isTabViewsEnabled()
        || tabFolder == null
        || tabFolder.isDisposed()
        || tabFolder.getMinimized()) {
      return null;
    }

    CTabItem item = tabFolder.getSelection();
    if (item != null) {
      return (UISWTViewCore) item.getData("IView");
    }

    return null;
  }