Пример #1
0
  /** bqian Comment method "initializeUI". */
  protected void initializeUI() {

    tableNebulas = new ContextNebulaGridComposite(this, this);

    tableNebulas.setLayout(new GridLayout());
    GridData gridData = new GridData(GridData.FILL_BOTH);
    tableNebulas.setLayoutData(gridData);
  }
Пример #2
0
  private void refreshView() {
    if (getContextManager() == null) {
      // this.setEnabled(false);
      tableNebulas.setEnabled(isReadOnly());
    } else {
      this.setEnabled(true);
      setTabEnable(!isReadOnly());
      toolgeRefreshContextRelitiveComposite(tableNebulas);
    }

    if (getContextManager() != null) {
      getContextManager().fireContextsChangedEvent();
    }
  }
Пример #3
0
  public void setTabEnable(boolean enable) {

    boolean flag = false;
    IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
    if (page != null) {
      if (page.getActiveEditor() instanceof MultiPageEditorPart) {
        MultiPageEditorPart editor = (MultiPageEditorPart) page.getActiveEditor();
        if (editor != null) {
          if (editor.getActivePage() == PAGE) {
            flag = true;
          }
        }
      }
    }
    if (enable) {
      tableNebulas.setEnabled(true);
    }
  }