Java Code Examples for org.eclipse.ui.forms.widgets.Section#CLIENT_INDENT
The following examples show how to use
org.eclipse.ui.forms.widgets.Section#CLIENT_INDENT .
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: PageComponentSwitchBuilder.java From bonita-studio with GNU General Public License v2.0 | 6 votes |
public Section createGroupControl(final Composite composite, final Group object) { final String desc = getDescription(object.getId()); int style = Section.NO_TITLE_FOCUS_BOX | Section.TWISTIE | Section.CLIENT_INDENT; if (desc != null && !desc.isEmpty()) { style = style | Section.DESCRIPTION; } final Section groupSection = new Section(composite, style); groupSection.setText(getLabel(object.getId())); groupSection.setFont(BonitaStudioFontRegistry.getBoldFont()); if (desc != null && !desc.isEmpty()) { groupSection.setDescription(desc); } groupSection.setBackground(Display.getDefault().getSystemColor(SWT.COLOR_WIDGET_BACKGROUND)); groupSection.setLayoutData(GridDataFactory.fillDefaults().grab(true, false).span(2, 1).create()); return groupSection; }
Example 2
Source File: ImportWorkspaceControlSupplier.java From bonita-studio with GNU General Public License v2.0 | 6 votes |
private void doCreateWorkspaceTips(Composite mainComposite) { Label workspaceTips = new Label(mainComposite, SWT.NONE); workspaceTips.setLayoutData(GridDataFactory.fillDefaults().create()); workspaceTips.setText(Messages.workspaceTips); final Section section = new Section(mainComposite, Section.TREE_NODE | Section.CLIENT_INDENT); section.setLayout(GridLayoutFactory.fillDefaults().margins(0, 0).create()); section.setLayoutData( GridDataFactory.swtDefaults().align(SWT.FILL, SWT.TOP).hint(200, SWT.DEFAULT) .grab(true, false).create()); section.setText(Messages.moreInfo); Label label = new Label(section, SWT.WRAP); label.setLayoutData(GridDataFactory.swtDefaults().create()); label.setText(Messages.importWorkspaceOverwriteBehavior); section.setClient(label); section.setExpanded(false); section.addExpansionListener(new UpdateLayoutListener(mainComposite)); }
Example 3
Source File: ImportWorkspaceControlSupplier.java From bonita-studio with GNU General Public License v2.0 | 5 votes |
private Section createStatusSection(Composite parent) { final Section section = new Section(parent, Section.TREE_NODE | Section.CLIENT_INDENT); section.setLayout(GridLayoutFactory.fillDefaults().create()); section.setLayoutData(GridDataFactory.fillDefaults().grab(true, true).create()); section.setText(Messages.importDetails); section.addExpansionListener(new UpdateLayoutListener(parent)); section.setExpanded(false); return section; }
Example 4
Source File: MessageDialogWithPrompt.java From bonita-studio with GNU General Public License v2.0 | 4 votes |
@Override protected Control createCustomArea(Composite parent) { if (detailsMessage != null) { parent.setLayout(GridLayoutFactory.swtDefaults().numColumns(2).create()); //Above Image filler Image image = getImage(); if (image != null) { Label filler = new Label(parent, SWT.NULL); filler.setImage(image); GridDataFactory.fillDefaults().align(SWT.CENTER, SWT.BEGINNING) .applyTo(filler); filler.setVisible(false); } Section section = new Section(parent, Section.TWISTIE | Section.NO_TITLE_FOCUS_BOX | Section.CLIENT_INDENT); section.setText(Messages.moreDetails); section.setLayoutData(GridDataFactory.fillDefaults().grab(true, true).create()); Composite client = new Composite(section, SWT.NONE); client.setLayoutData(GridDataFactory.fillDefaults().create()); client.setLayout(GridLayoutFactory.fillDefaults().create()); Link detailsLabel = new Link(client, getMessageLabelStyle()); linkSelectionListener.ifPresent(listener -> detailsLabel.addListener(SWT.Selection, listener)); detailsLabel.setText(detailsMessage); GridDataFactory .fillDefaults() .align(SWT.FILL, SWT.BEGINNING) .grab(true, false) .hint(convertHorizontalDLUsToPixels(IDialogConstants.MINIMUM_MESSAGE_AREA_WIDTH), SWT.DEFAULT) .applyTo(detailsLabel); section.setClient(client); section.addExpansionListener(new ExpansionAdapter() { @Override public void expansionStateChanged(ExpansionEvent e) { parent.getShell().pack(); } }); return section; } return super.createCustomArea(parent); }