Java Code Examples for org.eclipse.swt.widgets.Composite#setFocus()

The following examples show how to use org.eclipse.swt.widgets.Composite#setFocus() . 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: ImpactNwPage.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);
	Section section = UI.section(body, toolkit,
			M.NormalizationWeightingSets);
	UI.gridData(section, true, true);
	Composite client = toolkit.createComposite(section);
	section.setClient(client);
	UI.gridLayout(client, 1);
	SashForm sashForm = createSash(client);
	setViewer = createNwSetViewer(section, sashForm);
	factorViewer = new NwFactorViewer(sashForm, editor);
	sashForm.setWeights(new int[] { 25, 75 });
	setViewer.selectFirst();
	body.setFocus();
	form.reflow(true);
	editor.getEventBus().register(this);
	editor.onSaved(() -> updateInput());
}
 
Example 2
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 3
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 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: FlowInfoPage.java    From olca-app with Mozilla Public License 2.0 5 votes vote down vote up
@Override
protected void createFormContent(IManagedForm mform) {
	form = UI.formHeader(this);
	toolkit = mform.getToolkit();
	Composite body = UI.formBody(form, toolkit);
	InfoSection infoSection = new InfoSection(getEditor());
	infoSection.render(body, toolkit);
	FlowUseSection useSection = new FlowUseSection(getModel(), Database.get());
	useSection.render(body, toolkit);
	createAdditionalInfo(infoSection, body);
	processButton(infoSection);
	body.setFocus();
	form.reflow(true);
}
 
Example 6
Source File: ProcessModelingPage.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);
	createModelingSection(body);
	createDataSourceSection(body);
	createEvaluationSection(body);
	createSourcesSection(body);
	body.setFocus();
	form.reflow(true);
}
 
Example 7
Source File: AdminInfoPage.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);
	createAdminInfoSection(body);
	body.setFocus();
	form.reflow(true);
}
 
Example 8
Source File: UnitGroupInfoPage.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(infoSection, body);
	body.setFocus();
	form.reflow(true);
}
 
Example 9
Source File: ProductSystemInfoPage.java    From olca-app with Mozilla Public License 2.0 5 votes vote down vote up
@Override
protected void createFormContent(IManagedForm mform) {
	form = UI.formHeader(this);
	FormToolkit tk = mform.getToolkit();
	Composite body = UI.formBody(form, tk);
	InfoSection infoSection = new InfoSection(getEditor());
	infoSection.render(body, tk);
	addCalculationButton(infoSection.getContainer(), tk);
	addInventoryInfo(infoSection.getContainer(), tk);
	createReferenceSection(body, tk);
	body.setFocus();
	form.reflow(true);
}
 
Example 10
Source File: CurrencyEditor.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);
	FormToolkit tk = managedForm.getToolkit();
	Composite body = UI.formBody(form, tk);
	InfoSection infoSection = new InfoSection(getEditor());
	infoSection.render(body, tk);
	createAdditionalInfo(body, tk);
	table = new CurrencyTable(getModel());
	table.create(body, tk);
	body.setFocus();
	form.reflow(true);
}
 
Example 11
Source File: FlowPropertyInfoPage.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(infoSection);
	body.setFocus();
	form.reflow(true);
}
 
Example 12
Source File: SourceInfoPage.java    From olca-app with Mozilla Public License 2.0 5 votes vote down vote up
@Override
protected void createFormContent(IManagedForm mform) {
	form = UI.formHeader(this);
	tk = mform.getToolkit();
	Composite body = UI.formBody(form, tk);
	InfoSection infoSection = new InfoSection(getEditor());
	infoSection.render(body, tk);
	additionalInfo(body);
	body.setFocus();
	form.reflow(true);
}
 
Example 13
Source File: GlobalParameterInfoPage.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 14
Source File: FlowPropertiesPage.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);
	Section section = UI.section(body, toolkit, M.FlowProperties);
	UI.gridData(section, true, true);
	Composite client = UI.sectionClient(section, toolkit, 1);
	FlowPropertyFactorViewer viewer = new FlowPropertyFactorViewer(client, Cache.getEntityCache(), editor);
	setInitialInput(viewer);
	CommentAction.bindTo(section, viewer, "flowProperties", editor.getComments());
	editor.onSaved(() -> viewer.setInput(getModel()));
	body.setFocus();
	form.reflow(true);
}
 
Example 15
Source File: SocialIndicatorEditor.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);
	FormToolkit toolkit = managedForm.getToolkit();
	Composite body = UI.formBody(form, toolkit);
	InfoSection infoSection = new InfoSection(getEditor());
	infoSection.render(body, toolkit);
	createAdditionalInfo(body, toolkit);
	createActivitySection(toolkit, body);
	body.setFocus();
	form.reflow(true);
}
 
Example 16
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 17
Source File: LocationInfoPage.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);
	InfoSection infoSection = new InfoSection(getEditor());
	infoSection.render(body, tk);
	createAdditionalInfo(body, tk);
	new MapSection(editor).render(body, tk);
	body.setFocus();
	form.reflow(true);
}
 
Example 18
Source File: ImpactMethodInfoPage.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);
	InfoSection info = new InfoSection(getEditor());
	info.render(body, tk);
	createIndicatorTable(tk, body);
	body.setFocus();
	form.reflow(true);
}
 
Example 19
Source File: ImpactCategoryEditor.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 toolkit = mform.getToolkit();
	Composite body = UI.formBody(form, toolkit);
	InfoSection info = new InfoSection(getEditor());
	info.render(body, toolkit);
	Composite comp = info.getContainer();
	text(comp, M.ReferenceUnit, "referenceUnit");
	body.setFocus();
	form.reflow(true);
}