org.eclipse.ui.forms.IManagedForm Java Examples

The following examples show how to use org.eclipse.ui.forms.IManagedForm. 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: ReplacerDialog.java    From olca-app with Mozilla Public License 2.0 6 votes vote down vote up
@Override
protected void createFormContent(IManagedForm mform) {
	FormToolkit tk = mform.getToolkit();
	Composite comp = UI.formBody(mform.getForm(), tk);
	UI.gridLayout(comp, 1, 10, 10);
	UI.formLabel(comp, tk, "This will replace the flows in the database " +
			"(the source system) with the flows in the target system.");
	tree = new ModelCheckBoxTree(
			ModelType.PROCESS,
			ModelType.IMPACT_METHOD);
	tree.drawOn(comp, tk);
	Button delete = tk.createButton(comp,
			"Delete replaced and unused flows", SWT.CHECK);
	Controls.onSelect(delete, _e -> {
		conf.deleteMapped = delete.getSelection();
	});
}
 
Example #2
Source File: ReportViewer.java    From olca-app with Mozilla Public License 2.0 6 votes vote down vote up
@Override
protected void createFormContent(IManagedForm mform) {
	ScrolledForm form = mform.getForm();
	Composite comp = form.getBody();
	comp.setLayout(new FillLayout());
	try {
		Browser b = new Browser(comp, SWT.NONE);
		b.setJavascriptEnabled(true);
		UI.onLoaded(b, HtmlFolder.getUrl("report.html"), () -> {
			Gson gson = new Gson();
			String json = gson.toJson(report);
			String command = "setData(" + json + ")";
			b.execute(command);
		});
	} catch (Exception e) {
		Logger log = LoggerFactory.getLogger(getClass());
		log.error("failed to load report in browser", e);
	}
}
 
Example #3
Source File: GeneralSection.java    From uima-uimaj with Apache License 2.0 6 votes vote down vote up
@Override
public void initialize(IManagedForm form) {
  super.initialize(form);
  ((GridData) this.getSection().getLayoutData()).grabExcessVerticalSpace = false;
  Composite sectionClient = new2ColumnComposite(this.getSection());
  ((GridData) sectionClient.getLayoutData()).grabExcessVerticalSpace = false;
  // FrameworkImplementation choose, 2 radio buttons
  if (isAeDescriptor() || isCasConsumerDescriptor()) {
    toolkit.createLabel(sectionClient, "Implementation Language").setToolTipText(
            "Choose the implementation language here.");

    Composite buttons = new2ColumnComposite(sectionClient);
    cppButton = newRadioButton(buttons, "C/C++", "C/C++", NOT_SELECTED);
    javaButton = newRadioButton(buttons, "Java", "Java", SELECTED);

    // DescriptorType choose, 2 radio buttons
    toolkit.createLabel(sectionClient, "Engine Type").setToolTipText(
            "Choose the type of the engine here.");

    buttons = new2ColumnComposite(sectionClient);

    primitiveButton = newRadioButton(buttons, "Primitive", S_, SELECTED);
    aggregateButton = newRadioButton(buttons, "Aggregate", S_, NOT_SELECTED);
  }
}
 
Example #4
Source File: ProjectSetupPage.java    From olca-app with Mozilla Public License 2.0 6 votes vote down vote up
@Override
protected void createFormContent(IManagedForm managedForm) {
	form = UI.formHeader(this);
	toolkit = managedForm.getToolkit();
	Composite body = UI.formBody(form, toolkit);
	InfoSection infoSection = new InfoSection(getEditor());
	infoSection.render(body, toolkit);
	createButton(infoSection.getContainer());
	new ImpactSection(editor).render(body, toolkit);
	createVariantsSection(body);
	Section section = UI.section(body, toolkit, M.Parameters);
	parameterTable = new ProjectParameterTable(editor);
	parameterTable.render(section, toolkit);
	initialInput();
	new ProcessContributionSection(editor).create(body, toolkit);
	body.setFocus();
	form.reflow(true);
}
 
Example #5
Source File: AbstractFormPage.java    From typescript.java with MIT License 6 votes vote down vote up
@Override
protected void createFormContent(IManagedForm managedForm) {
	final ScrolledForm form = managedForm.getForm();
	FormToolkit toolkit = managedForm.getToolkit();
	toolkit.decorateFormHeading(form.getForm());

	IToolBarManager manager = form.getToolBarManager();
	if (contributeToToolbar(manager)) {
		form.updateToolBar();
	}
	String titleText = getFormTitleText();
	if (titleText != null) {
		form.setText(titleText);
	}
	Image titleImage = getFormTitleImage();
	if (titleImage != null) {
		form.setImage(titleImage);
	}
	toolkit.decorateFormHeading(form.getForm());
	createUI(managedForm);
}
 
Example #6
Source File: PythonEditor.java    From olca-app with Mozilla Public License 2.0 6 votes vote down vote up
@Override
protected void createFormContent(IManagedForm mform) {
	var form = UI.formHeader(mform, getTitle(), Icon.PYTHON.get());
	var tk = mform.getToolkit();
	var body = UI.formBody(form, tk);
	body.setLayout(new FillLayout());
	try {
		browser = new Browser(body, SWT.NONE);
		browser.setJavascriptEnabled(true);
		UI.onLoaded(browser,
				HtmlFolder.getUrl("python.html"), this::initScript);
	} catch (Exception e) {
		Logger log = LoggerFactory.getLogger(getClass());
		log.error("failed to create browser in Python editor", e);
	}
}
 
Example #7
Source File: PriorityListSection.java    From uima-uimaj with Apache License 2.0 6 votes vote down vote up
@Override
public void initialize(IManagedForm form) {
  super.initialize(form);

  Composite sectionClient = new2ColumnComposite(getSection());
  enableBorders(sectionClient);

  tree = newTree(sectionClient);

  final Composite buttonContainer = newButtonContainer(sectionClient);
  addSetButton = newPushButton(buttonContainer, "Add Set",
          "Click here to add another priority list.");
  addButton = newPushButton(buttonContainer, S_ADD, "Click here to add a type");
  removeButton = newPushButton(buttonContainer, S_REMOVE, S_REMOVE_TIP);
  new Button(buttonContainer, SWT.PUSH).setVisible(false); // spacer
  upButton = newPushButton(buttonContainer, S_UP,
          "Click here to move the selected item up in the priority order.");
  downButton = newPushButton(buttonContainer, S_DOWN,
          "Click here to move the selected item down in the priority order");
  exportButton = newPushButton(buttonContainer, S_EXPORT, S_EXPORT_TIP);

  toolkit.paintBordersFor(sectionClient);
}
 
Example #8
Source File: ProcessExchangePage.java    From olca-app with Mozilla Public License 2.0 6 votes vote down vote up
@Override
protected void createFormContent(IManagedForm mform) {
	form = UI.formHeader(this);
	toolkit = mform.getToolkit();
	Composite body = UI.formBody(form, toolkit);
	SashForm sash = new SashForm(body, SWT.VERTICAL);
	UI.gridData(sash, true, true);
	toolkit.adapt(sash);
	inputTable = createTable(sash, true);
	outputTable = createTable(sash, false);
	body.setFocus();
	form.reflow(true);
	sortExchanges();
	inputTable.setInput(getModel());
	outputTable.setInput(getModel());
	editor.onSaved(() -> {
		inputTable.setInput(getModel());
		outputTable.setInput(getModel());
	});
}
 
Example #9
Source File: ParameterRedefDialog.java    From olca-app with Mozilla Public License 2.0 6 votes vote down vote up
@Override
protected void createFormContent(IManagedForm mform) {
	FormToolkit toolkit = mform.getToolkit();
	UI.formHeader(mform, M.SearchParameters);
	Composite body = UI.formBody(mform.getForm(), mform.getToolkit());
	UI.gridLayout(body, 1);
	Label filterLabel = UI.formLabel(body, toolkit, M.Filter);
	filterLabel.setFont(UI.boldFont());
	filterText = UI.formText(body, SWT.SEARCH);
	filterText.addModifyListener(e -> viewer.refresh());

	Section section = UI.section(body, toolkit, M.Parameters);
	UI.gridData(section, true, true);
	Composite composite = UI.sectionClient(section, toolkit, 1);
	createViewer(composite);
}
 
Example #10
Source File: InfoPage.java    From olca-app with Mozilla Public License 2.0 6 votes vote down vote up
@Override
protected void createFormContent(IManagedForm mform) {
	ScrolledForm form = UI.formHeader(this);
	FormToolkit tk = mform.getToolkit();
	Composite body = UI.formBody(form, tk);
	InfoSection info = new InfoSection(getEditor());
	info.render(body, tk);
	checkBox(info.getContainer(),
			M.InfrastructureProcess, "infrastructureProcess");
	createButtons(info.getContainer(), tk);
	createTimeSection(body, tk);
	createGeographySection(body, tk);
	createTechnologySection(body, tk);
	new ImageSection(getEditor(), tk, body);
	createDqSection(body, tk);
	body.setFocus();
	form.reflow(true);
}
 
Example #11
Source File: NwResultPage.java    From olca-app with Mozilla Public License 2.0 6 votes vote down vote up
@Override
protected void createFormContent(IManagedForm mform) {
	ScrolledForm form = UI.formHeader(mform,
			Labels.name(setup.productSystem),
			Images.get(result));
	toolkit = mform.getToolkit();
	body = UI.formBody(form, toolkit);
	nwSetTable = loadNwSetTable();
	if (nwSetTable == null)
		return;
	if (nwSetTable.hasNormalisationFactors())
		createNormalisationSection();
	else if (nwSetTable.hasWeightingFactors())
		createWeightingSection();
	if (nwSetTable.hasNormalisationFactors()
			&& nwSetTable.hasWeightingFactors())
		createSingleScoreSection();
}
 
Example #12
Source File: InventoryPage.java    From olca-app with Mozilla Public License 2.0 6 votes vote down vote up
@Override
protected void createFormContent(IManagedForm mform) {
	ScrolledForm form = UI.formHeader(mform,
			Labels.name(setup.productSystem),
			Images.get(result));
	toolkit = mform.getToolkit();
	Composite body = UI.formBody(form, toolkit);
	TreeViewer inputTree = createTree(body, true);
	TreeViewer outputTree = createTree(body, false);
	TotalRequirementsSection reqSection = new TotalRequirementsSection(
			result, dqResult);
	reqSection.create(body, toolkit);
	form.reflow(true);
	fillTrees(inputTree, outputTree);
	reqSection.fill();
}
 
Example #13
Source File: ICEDataComponentSectionPart.java    From ice with Eclipse Public License 1.0 6 votes vote down vote up
/**
 * The Constructor
 *
 * @param section
 *            The new Section to be managed by the ICESectionPart.
 * @param formEditor
 *            The FormEditor that is managing all of the Pages and
 *            SectionParts.
 * @param managedForm
 *            The ManagedForm for the Section.
 */
public ICEDataComponentSectionPart(Section section,
		ICEFormEditor formEditor, IManagedForm managedForm) {

	// Call the parent constructor
	super(section);

	// Set the FormEditor if it is not null and throw an exception
	// otherwise.
	if (formEditor != null) {
		editor = formEditor;
	} else {
		throw new RuntimeException("Editor in ICEFormSectionPart "
				+ "constructor cannot be null.");
	}
	// Set the ManagedForm
	if (managedForm != null) {
		parentForm = managedForm;
	} else {
		throw new RuntimeException("ManagedForm in ICEFormSectionPart "
				+ "constructor cannot be null.");
	}


	return;
}
 
Example #14
Source File: ImpactFactorPage.java    From olca-app with Mozilla Public License 2.0 6 votes vote down vote up
@Override
protected void createFormContent(IManagedForm mform) {
	ScrolledForm form = UI.formHeader(this);
	FormToolkit tk = mform.getToolkit();
	Composite body = UI.formBody(form, tk);
	Section section = UI.section(body, tk, M.ImpactFactors);
	UI.gridData(section, true, true);
	Composite client = tk.createComposite(section);
	section.setClient(client);
	UI.gridLayout(client, 1);
	render(client, section);
	List<ImpactFactor> factors = impact().impactFactors;
	sortFactors(factors);
	viewer.setInput(factors);
	form.reflow(true);
}
 
Example #15
Source File: DiffEditorDialog.java    From olca-app with Mozilla Public License 2.0 6 votes vote down vote up
@Override
protected void createFormContent(IManagedForm mform) {
	String title = M.Diff;
	if (this.title != null)
		title += ": " + this.title;
	ScrolledForm form = UI.formHeader(mform, title);
	if (logo != null)
		form.setImage(logo);
	FormToolkit toolkit = mform.getToolkit();
	Composite body = form.getBody();
	UI.gridLayout(body, 1, 0, 0);
	toolkit.paintBordersFor(body);
	UI.gridData(body, true, true);
	if (editMode)
		editor = DiffEditor.forEditing(body, toolkit);
	else
		editor = DiffEditor.forViewing(body, toolkit);
	editor.initialize(root, labelProvider, dependencyResolver, action);
	UI.gridData(editor, true, true);
	form.reflow(true);
}
 
Example #16
Source File: InfoPage.java    From olca-app with Mozilla Public License 2.0 6 votes vote down vote up
@Override
protected void createFormContent(IManagedForm mform) {
	ContributionResult result = editor.result;
	ScrolledForm form = UI.formHeader(mform,
			Labels.name(editor.setup.productSystem),
			Images.get(editor.result));
	FormToolkit tk = mform.getToolkit();
	Composite body = UI.formBody(form, tk);
	InfoSection.create(body, tk, editor.setup);
	if (editor.dqResult != null) {
		new DQInfoSection(body, tk, result, editor.dqResult);
	}
	if (result.hasImpactResults()) {
		ContributionChartSection.forImpacts(editor).render(body, tk);
	}
	ContributionChartSection.forFlows(editor).render(body, tk);
	form.reflow(true);
}
 
Example #17
Source File: IndexesPage.java    From uima-uimaj with Apache License 2.0 6 votes vote down vote up
/**
 * 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 #18
Source File: ContributionTreePage.java    From olca-app with Mozilla Public License 2.0 6 votes vote down vote up
@Override
protected void createFormContent(IManagedForm mform) {
	FormToolkit tk = mform.getToolkit();
	ScrolledForm form = UI.formHeader(mform,
			Labels.name(setup.productSystem),
			Images.get(result));
	Composite body = UI.formBody(form, tk);
	Composite comp = tk.createComposite(body);
	UI.gridLayout(comp, 2);
	ResultTypeCombo selector = ResultTypeCombo
			.on(result)
			.withEventHandler(new SelectionHandler())
			.create(comp, tk);
	Composite treeComp = tk.createComposite(body);
	UI.gridLayout(treeComp, 1);
	UI.gridData(treeComp, true, true);
	createTree(tk, treeComp);
	form.reflow(true);
	selector.initWithEvent();
}
 
Example #19
Source File: ParameterDelegatesSection.java    From uima-uimaj with Apache License 2.0 6 votes vote down vote up
@Override
public void initialize(IManagedForm form) {

  parmSection = editor.getParameterPage().getParameterSection();

  super.initialize(form);
  sectionClient = newComposite(getSection());

  tree = newTree(sectionClient);
  Composite buttonContainer = new2ColumnComposite(sectionClient);
  ((GridData) buttonContainer.getLayoutData()).grabExcessVerticalSpace = false;
  createOverrideButton = newPushButton(buttonContainer, "Create Override",
          "Overrides allow an aggregate to replace a parameter's value in one or more of its delegates");
  createNonSharedOverrideButton = newPushButton(buttonContainer, "Create non-shared Override",
          "Click here to create a non-shared override for this parameter");

  tree.addListener(SWT.MouseDoubleClick, this); // edit gesture
  tree.addListener(SWT.MouseHover, this); // hover

  enableBorders(sectionClient);
  toolkit.paintBordersFor(sectionClient);
}
 
Example #20
Source File: ActorInfoPage.java    From olca-app with Mozilla Public License 2.0 5 votes vote down vote up
@Override
protected void createFormContent(IManagedForm managedForm) {
	form = UI.formHeader(this);
	toolkit = managedForm.getToolkit();
	Composite body = UI.formBody(form, toolkit);
	InfoSection infoSection = new InfoSection(getEditor());
	infoSection.render(body, toolkit);
	createAdditionalInfo(body);
	body.setFocus();
	form.reflow(true);
}
 
Example #21
Source File: HeaderPage.java    From uima-uimaj with Apache License 2.0 5 votes vote down vote up
/**
 * Setup 1 column layout.
 *
 * @param managedForm the managed form
 * @return the composite
 */
public Composite setup1ColumnLayout(IManagedForm managedForm) {
  final ScrolledForm sform = managedForm.getForm();
  final Composite form = sform.getBody();
  form.setLayout(new GridLayout(1, false)); // this is required !
  Composite xtra = toolkit.createComposite(form);
  xtra.setLayout(new GridLayout(1, false));
  xtra.setLayoutData(new GridData(GridData.FILL_BOTH));

  Control c = form.getParent();
  while (!(c instanceof ScrolledComposite))
    c = c.getParent();
  ((GridData) xtra.getLayoutData()).widthHint = c.getSize().x;
  return xtra;
}
 
Example #22
Source File: LinkingPropertiesPage.java    From olca-app with Mozilla Public License 2.0 5 votes vote down vote up
@Override
protected void createFormContent(IManagedForm mform) {
	ScrolledForm form = UI.formHeader(mform, M.LinkingProperties);
	tk = mform.getToolkit();
	Composite body = UI.formBody(form, tk);
	generalPropertiesSection(body);
	processProviderSection(body);
	flowProviderSection(body);
	form.reflow(true);
}
 
Example #23
Source File: ExtnlResBindSection.java    From uima-uimaj with Apache License 2.0 5 votes vote down vote up
@Override
public void initialize(IManagedForm form) {
  super.initialize(form);
  // set up Composite to hold widgets in the section
  sectionClient = new2ColumnComposite(getSection());

  tree = newTree(sectionClient);
  // Buttons
  Composite buttonContainer = newButtonContainer(sectionClient);

  addButton = newPushButton(buttonContainer, S_ADD,
          "Click to add a new External Resource definition");
  editButton = newPushButton(buttonContainer, S_EDIT,
          "Click to edit an External Resource definition");
  removeButton = newPushButton(buttonContainer, "Remove",
          "Click to remove selected binding or External Resource");
  bindButton = newPushButton(buttonContainer, "Bind",
          "Click to bind selected dependency with selected Resource");
  exportButton = newPushButton(buttonContainer, S_EXPORT, S_EXPORT_TIP);

  buttonContainer.pack();
  getSection().getParent().getParent().pack();
  getSection().getParent().getParent().layout();
  initialFormWidth = getSection().getSize().x;
  ((GridData) tree.getLayoutData()).widthHint = initialFormWidth - buttonContainer.getSize().x;

  enableBorders(sectionClient);
  toolkit.paintBordersFor(sectionClient);

  tree.addListener(SWT.MouseDoubleClick, this);
}
 
Example #24
Source File: SettingsPage.java    From uima-uimaj with Apache License 2.0 5 votes vote down vote up
/**
 * 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 #25
Source File: IndexSection.java    From uima-uimaj with Apache License 2.0 5 votes vote down vote up
@Override
  public void initialize(IManagedForm form) {
    super.initialize(form);

    // set up Composite to hold widgets in the section
    Composite sectionClient = new2ColumnComposite(getSection());
    enableBorders(sectionClient);

    tt = newTree(sectionClient, SWT.SINGLE | SWT.FULL_SELECTION);

//    final Table table = tt.getTable();
    tt.setHeaderVisible(true);
    newTreeColumn(tt).setText("Name");
    newTreeColumn(tt).setText("Type");
    newTreeColumn(tt).setText("Kind");

    final Composite buttonContainer = newButtonContainer(sectionClient);
    addIndexButton = newPushButton(buttonContainer, "Add Index", "Click here to add a new index.");
    addKeyButton = newPushButton(buttonContainer, "Add Key",
            "Click here to add a new key for the selected index.");
    editButton = newPushButton(buttonContainer, S_EDIT, S_EDIT_TIP);
    removeButton = newPushButton(buttonContainer, S_REMOVE, S_REMOVE_TIP);
    upButton = newPushButton(buttonContainer, S_UP, S_UP_TIP);
    downButton = newPushButton(buttonContainer, S_DOWN, S_DOWN_TIP);
    exportButton = newPushButton(buttonContainer, S_EXPORT, S_EXPORT_TIP);

    // in addition to normal keyup and mouse up:
    tt.addListener(SWT.MouseHover, this);

    toolkit.paintBordersFor(sectionClient);
  }
 
Example #26
Source File: ImportSection.java    From uima-uimaj with Apache License 2.0 5 votes vote down vote up
@Override
public void initialize(IManagedForm form) {
  super.initialize(form);

  // set up Composite to hold widgets in the section
  Composite sectionClient = newComposite(getSection());
  enableBorders(sectionClient);

  Composite buttonContainer = new2ColumnComposite(sectionClient);
  ((GridData) buttonContainer.getLayoutData()).grabExcessVerticalSpace = false;
  ((GridData) buttonContainer.getLayoutData()).grabExcessHorizontalSpace = false;
  ((GridData) buttonContainer.getLayoutData()).horizontalAlignment = SWT.RIGHT;

  addButton = newPushButton(buttonContainer, "Add...", "Click here to add an import");
  removeButton = newPushButton(buttonContainer, "Remove",
          "Click here to remove the selected import.");
  setDataPathButton = newPushButton(buttonContainer, "Set DataPath",
          "Click here to view or set the data path to use when resolving imports by name.");
  importTable = newTable(sectionClient, SWT.FULL_SELECTION, NO_MIN_HEIGHT);

  newTableColumn(importTable).setText("Kind");
  newTableColumn(importTable).setText("Location/Name");

  importTable.setHeaderVisible(true);
  packTable(importTable);

  // in addition to normal keyup and mouse up:
  importTable.addListener(SWT.MouseHover, this);
  importTable.addListener(SWT.MouseDown, this);

  toolkit.paintBordersFor(sectionClient);
}
 
Example #27
Source File: ParameterPage.java    From olca-app with Mozilla Public License 2.0 5 votes vote down vote up
@Override
protected void createFormContent(IManagedForm mform) {
	var form = UI.formHeader(this);
	toolkit = mform.getToolkit();
	body = UI.formBody(form, toolkit);
	try {
		createGlobalSection(body, toolkit);
		ParameterSection.forInputParameters(this);
		ParameterSection.forDependentParameters(this);
		body.setFocus();
		form.reflow(true);
	} catch (Exception e) {
		log.error("failed to create parameter tables", e);
	}
}
 
Example #28
Source File: GeoPage.java    From olca-app with Mozilla Public License 2.0 5 votes vote down vote up
@Override
protected void createFormContent(IManagedForm mform) {
	ScrolledForm form = UI.formHeader(this);
	FormToolkit tk = mform.getToolkit();
	Composite body = UI.formBody(form, tk);
	setupSection(body, tk);
	paramSection = new GeoParamSection(this);
	paramSection.drawOn(body, tk);
	flowSection = new GeoFlowSection(this);
	flowSection.drawOn(body, tk);
	form.reflow(true);
}
 
Example #29
Source File: ModelSelectionDialog.java    From olca-app with Mozilla Public License 2.0 5 votes vote down vote up
@Override
protected void createFormContent(IManagedForm form) {
	FormToolkit tk = form.getToolkit();
	UI.formHeader(form, getTitle());
	Composite body = UI.formBody(form.getForm(), tk);
	UI.gridLayout(body, 1);
	Label filterLabel = UI.formLabel(body, form.getToolkit(), M.Filter);
	filterLabel.setFont(UI.boldFont());
	filterText = UI.formText(body, SWT.SEARCH);
	Section section = UI.section(body, tk, M.Content);
	addSectionActions(section);
	UI.gridData(section, true, true);
	Composite composite = UI.sectionClient(section, tk, 1);
	createViewer(composite);
}
 
Example #30
Source File: ParameterSettingsSection.java    From uima-uimaj with Apache License 2.0 5 votes vote down vote up
@Override
public void initialize(IManagedForm form) {
  super.initialize(form);
  Composite sectionClient = new2ColumnComposite(this.getSection());
  enableBorders(sectionClient);
  toolkit.paintBordersFor(sectionClient);
  tree = newTree(sectionClient);

  ParameterSection ps = editor.getParameterPage().getParameterSection();
  if (null != ps)
    ps.setSettings(this);
  tree.addListener(SWT.MouseHover, this); // for Description
}