org.eclipse.ui.forms.IManagedForm#addPart ( )源码实例Demo

下面列出了org.eclipse.ui.forms.IManagedForm#addPart ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: uima-uimaj   文件: IndexesPage.java
/**
 * Called by the 3.0 framework to fill in the contents
 *
 * @param managedForm the managed form
 */
@Override
protected void createFormContent(IManagedForm managedForm) {

  final Form2Panel form2Panel = setup2ColumnLayout(managedForm, EQUAL_WIDTH);
  managedForm.getForm().setText(
          (isLocalProcessingDescriptor() || isIndexDescriptor()) ? "Indexes" : "Type Priorities");
  if (!isTypePriorityDescriptor()) {
    managedForm.addPart(indexSection = new IndexSection(editor, form2Panel.left));
    managedForm.addPart(indexImportSection = new IndexImportSection(editor, form2Panel.right));
  }
  if (!isIndexDescriptor()) {
    managedForm.addPart(priorityListSection = new PriorityListSection(editor, form2Panel.left));
    managedForm.addPart(typePriorityImportSection = new TypePriorityImportSection(editor,
            form2Panel.right));
  }
  createToolBarActions(managedForm);
}
 
源代码2 项目: uima-uimaj   文件: ResourcesPage.java
/**
 * Called by the framework to fill in the contents.
 *
 * @param managedForm the managed form
 */
@Override
protected void createFormContent(IManagedForm managedForm) {

  // Only primitive engines can declare Resource Dependencies
  // Both Primitive and aggregates can delcare External Resources and their bindings
  // Bindings always refer to a primitive, if needed via
  // annotatorkey / key / key ... / declaredDependencyName
  // Bindings for same dependencyName at multiple levels:
  // outer ones override inner ones.

  managedForm.getForm().setText("Resources");
  Form2Panel form2panel = setup2ColumnLayout(managedForm, 50, 50);

  managedForm.addPart(extnlResBindSection = new ExtnlResBindSection(editor, form2panel.left));
  managedForm.addPart(resBindImportSection = new ImportResBindSection(editor, form2panel.left));
  managedForm.addPart(resourceDependencySection = new ResourceDependencySection(editor,
          form2panel.right));
  createToolBarActions(managedForm);
}
 
源代码3 项目: uima-uimaj   文件: OverviewPage.java
/**
 * Called by the 3.0 framework to fill in the contents
 *
 * @param managedForm the managed form
 */
@Override
protected void createFormContent(IManagedForm managedForm) {
  final Form2Panel form = setup2ColumnLayout(managedForm, EQUAL_WIDTH);
  managedForm.getForm().setText("Overview");

  if (isLocalProcessingDescriptor()) {
    managedForm.addPart(new GeneralSection(editor, form.left));
    managedForm.addPart(primitiveSection = new PrimitiveSection(editor, form.left));
    managedForm.addPart(metadataSection= new MetaDataSection(editor, form.right));
  } else {
    managedForm.addPart(metadataSection = new MetaDataSection(editor, form.left));
  }
  createToolBarActions(managedForm);
  sashForm.setOrientation(SWT.HORIZONTAL);
  vaction.setChecked(false);
  haction.setChecked(true);
  if (!isLocalProcessingDescriptor()) {
    sashForm.setWeights(new int[] { 95, 5 });
  }
}
 
源代码4 项目: tlaplus   文件: EvaluateConstantExpressionPage.java
@Override
protected void createBodyContent(IManagedForm managedForm) {
       final int sectionFlags = Section.TITLE_BAR | Section.TREE_NODE | Section.EXPANDED | SWT.WRAP;
       final int textFieldFlags = SWT.MULTI | SWT.V_SCROLL | SWT.READ_ONLY | SWT.FULL_SELECTION | SWT.WRAP;

       final FormToolkit toolkit = managedForm.getToolkit();
       final Composite body = managedForm.getForm().getBody();
       final GridLayout gl = new GridLayout();
       gl.marginHeight = 0;
       gl.marginWidth = 0;
       body.setLayout(gl);
       
	final BodyContentAssets bca = createBodyContent(body, toolkit, sectionFlags, textFieldFlags,
			getExpansionListener(), (ModelEditor)getEditor());
	m_expressionInput = bca.getExpressionInput();
	m_expressionOutput = bca.getExpressionOutput();
	m_toggleButton = bca.m_toggleButton;

	m_validateableCalculatorSection = new ValidateableSectionPart(bca.getSection(), this, SEC_EXPRESSION);
       // This ensures that when the part is made dirty, the model appears unsaved.
       managedForm.addPart(m_validateableCalculatorSection);

       // This makes the widget unsaved when text is entered.
       m_expressionInput.getTextWidget().addModifyListener(new DirtyMarkingListener(m_validateableCalculatorSection, false));

       getDataBindingManager().bindSection(m_validateableCalculatorSection, SEC_EXPRESSION, getId());
       getDataBindingManager().bindAttribute(Model.MODEL_EXPRESSION_EVAL, m_expressionInput, m_validateableCalculatorSection);
}
 
源代码5 项目: uima-uimaj   文件: SettingsPage.java
/**
 * Called by the framework to fill in the contents.
 *
 * @param managedForm the managed form
 */
@Override
protected void createFormContent(IManagedForm managedForm) {

  final Form2Panel form2Panel = setup2ColumnLayout(managedForm, EQUAL_WIDTH);

  managedForm.getForm().setText("Parameter Settings");
  managedForm.addPart(parameterSettingsSection = new ParameterSettingsSection(editor,
          form2Panel.left));
  managedForm.addPart(valueSection = new ValueSection(editor, form2Panel.right));
  createToolBarActions(managedForm);
}
 
源代码6 项目: uima-uimaj   文件: CapabilityPage.java
/**
 * Called by the framework to fill in the contents.
 *
 * @param managedForm the managed form
 */
@Override
protected void createFormContent(IManagedForm managedForm) {
  final Form2Panel form2Panel = setup2ColumnLayout(managedForm, editor.isAggregate() ? 50 : 90,
          editor.isAggregate() ? 50 : 10);
  managedForm.getForm().setText("Capabilities: Inputs and Outputs");
  managedForm.addPart(/* inputSection = */new CapabilitySection(editor, form2Panel.left));
  managedForm.addPart(sofaMapSection = new SofaMapSection(editor, form2Panel.right));
  createToolBarActions(managedForm);
  sashForm.setOrientation(SWT.VERTICAL);
  vaction.setChecked(true);
  haction.setChecked(false);
  managedForm.getForm().reflow(true);
}
 
源代码7 项目: uima-uimaj   文件: ParameterPage.java
/**
 * Called by the framework to fill in the contents.
 *
 * @param managedForm the managed form
 */
@Override
protected void createFormContent(IManagedForm managedForm) {
  managedForm.getForm().setText("Parameter Definitions");
  Form2Panel form2Panel = setup2ColumnLayout(managedForm, 55, 45);
  managedForm.addPart(parameterSection = new ParameterSection(editor, form2Panel.left));
  managedForm.addPart(parameterDelegatesSection = new ParameterDelegatesSection(editor,
          form2Panel.right));
  createToolBarActions(managedForm);
}
 
源代码8 项目: uima-uimaj   文件: TypePage.java
/**
 * Called by the framework to fill in the contents.
 *
 * @param managedForm the managed form
 */
@Override
protected void createFormContent(IManagedForm managedForm) {
  // always show same screen layout - user could dynamically switch
  managedForm.getForm().setText("Type System Definition");
  Form2Panel form2Panel = setup2ColumnLayout(managedForm, 60, 40);
  managedForm.addPart(typeSection = new TypeSection(editor, form2Panel.left));
  managedForm.addPart(typeImportSection = new TypeImportSection(editor, form2Panel.right));
  createToolBarActions(managedForm);
}
 
源代码9 项目: uima-uimaj   文件: AggregatePage.java
/**
 *  Called by the framework to fill in the contents.
 *
 * @param managedForm the managed form
 */
@Override
protected void createFormContent(IManagedForm managedForm) {

  final Form2Panel form = setup2ColumnLayout(managedForm, !EQUAL_WIDTH);
  managedForm.getForm().setText("Aggregate Delegates and Flows");

  managedForm.addPart(aggregateSection = new AggregateSection(editor, form.left));
  managedForm.addPart(flowSection = new FlowSection(editor, form.right));
  createToolBarActions(managedForm);
}