Java Code Examples for org.eclipse.ui.forms.IManagedForm#addPart()
The following examples show how to use
org.eclipse.ui.forms.IManagedForm#addPart() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: IndexesPage.java From uima-uimaj with Apache License 2.0 | 6 votes |
/** * 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); }
Example 2
Source File: ResourcesPage.java From uima-uimaj with Apache License 2.0 | 6 votes |
/** * 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); }
Example 3
Source File: OverviewPage.java From uima-uimaj with Apache License 2.0 | 6 votes |
/** * 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 }); } }
Example 4
Source File: EvaluateConstantExpressionPage.java From tlaplus with MIT License | 5 votes |
@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); }
Example 5
Source File: SettingsPage.java From uima-uimaj with Apache License 2.0 | 5 votes |
/** * 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); }
Example 6
Source File: CapabilityPage.java From uima-uimaj with Apache License 2.0 | 5 votes |
/** * 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); }
Example 7
Source File: ParameterPage.java From uima-uimaj with Apache License 2.0 | 5 votes |
/** * 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); }
Example 8
Source File: TypePage.java From uima-uimaj with Apache License 2.0 | 5 votes |
/** * 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); }
Example 9
Source File: AggregatePage.java From uima-uimaj with Apache License 2.0 | 5 votes |
/** * 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); }