Java Code Examples for org.eclipse.swt.widgets.Group#setBackground()
The following examples show how to use
org.eclipse.swt.widgets.Group#setBackground() .
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: ConfigurationDialog.java From hop with Apache License 2.0 | 6 votes |
protected void optionsSectionLayout( Class<?> PKG, String prefix ) { gDetails = new Group( shell, SWT.SHADOW_ETCHED_IN ); gDetails.setText( BaseMessages.getString( PKG, prefix + ".DetailsGroup.Label" ) ); props.setLook( gDetails ); // The layout gDetails.setLayout( new FormLayout() ); fdDetails = new FormData(); fdDetails.top = new FormAttachment( wRunConfigurationControl, 15 ); fdDetails.right = new FormAttachment( 100, -15 ); fdDetails.left = new FormAttachment( 0, 15 ); gDetails.setBackground( shell.getBackground() ); // the default looks ugly gDetails.setLayoutData( fdDetails ); optionsSectionControls(); }
Example 2
Source File: ConfigurationDialog.java From pentaho-kettle with Apache License 2.0 | 6 votes |
protected void optionsSectionLayout( Class<?> PKG, String prefix ) { gDetails = new Group( cContainer, SWT.SHADOW_ETCHED_IN ); gDetails.setText( BaseMessages.getString( PKG, prefix + ".DetailsGroup.Label" ) ); props.setLook( gDetails ); // The layout gDetails.setLayout( new FormLayout() ); fdDetails = new FormData(); fdDetails.top = new FormAttachment( cRunConfiguration, Const.FORM_MARGIN ); fdDetails.right = new FormAttachment( 100, -Const.FORM_MARGIN ); fdDetails.left = new FormAttachment( 0, Const.FORM_MARGIN ); gDetails.setBackground( shell.getBackground() ); // the default looks ugly gDetails.setLayoutData( fdDetails ); optionsSectionControls(); }
Example 3
Source File: PageSettingDialog.java From erflute with Apache License 2.0 | 5 votes |
private void initDirectionGroup(Composite parent) { final GridData gridData = new GridData(); gridData.grabExcessHorizontalSpace = true; gridData.horizontalAlignment = GridData.FILL; final Group directionGroup = new Group(parent, SWT.NONE); directionGroup.setLayoutData(gridData); directionGroup.setBackground(ColorConstants.white); directionGroup.setText(DisplayMessages.getMessage("label.page.direction")); final GridLayout directionGroupLayout = new GridLayout(); directionGroupLayout.marginWidth = 20; directionGroupLayout.horizontalSpacing = 20; directionGroupLayout.numColumns = 4; directionGroup.setLayout(directionGroupLayout); final Label vImage = new Label(directionGroup, SWT.NONE); vImage.setImage(Activator.getImage(ImageKey.PAGE_SETTING_V)); vButton = new Button(directionGroup, SWT.RADIO); vButton.setBackground(ColorConstants.white); vButton.setText(DisplayMessages.getMessage("label.page.direction.v")); final Label hImage = new Label(directionGroup, SWT.NONE); hImage.setImage(Activator.getImage(ImageKey.PAGE_SETTING_H)); hButton = new Button(directionGroup, SWT.RADIO); hButton.setBackground(ColorConstants.white); hButton.setText(DisplayMessages.getMessage("label.page.direction.h")); }
Example 4
Source File: UpdaterDialog.java From developer-studio with Apache License 2.0 | 5 votes |
private Group createFeatureRepresentationGroup(Group group, GridData gridData) { final Group featureGroup = new Group(group, SWT.NONE); featureGroup.setBackground(featureGroup.getDisplay().getSystemColor(SWT.COLOR_WHITE)); gridData.horizontalSpan = 2; featureGroup.setLayout(new GridLayout(4, false)); featureGroup.setLayoutData(gridData); return featureGroup; }
Example 5
Source File: PageSettingDialog.java From ermaster-b with Apache License 2.0 | 5 votes |
private void initDirectionGroup(Composite parent) { GridData gridData = new GridData(); gridData.grabExcessHorizontalSpace = true; gridData.horizontalAlignment = GridData.FILL; Group directionGroup = new Group(parent, SWT.NONE); directionGroup.setLayoutData(gridData); directionGroup.setBackground(ColorConstants.white); directionGroup.setText(ResourceString .getResourceString("label.page.direction")); GridLayout directionGroupLayout = new GridLayout(); directionGroupLayout.marginWidth = 20; directionGroupLayout.horizontalSpacing = 20; directionGroupLayout.numColumns = 4; directionGroup.setLayout(directionGroupLayout); Label vImage = new Label(directionGroup, SWT.NONE); vImage.setImage(Activator.getImage(ImageKey.PAGE_SETTING_V)); vButton = new Button(directionGroup, SWT.RADIO); vButton.setBackground(ColorConstants.white); vButton.setText(ResourceString.getResourceString("label.page.direction.v")); Label hImage = new Label(directionGroup, SWT.NONE); hImage.setImage(Activator.getImage(ImageKey.PAGE_SETTING_H)); hButton = new Button(directionGroup, SWT.RADIO); hButton.setBackground(ColorConstants.white); hButton.setText(ResourceString.getResourceString("label.page.direction.h")); }
Example 6
Source File: CommonGui.java From CodeCheckerEclipsePlugin with Eclipse Public License 1.0 | 4 votes |
/** * Creates the resolution method group, and the package directory inputs. * * @param toolkit * The toolkit to be used. * @return The encapsulating Section. */ private Section createConfigSection(FormToolkit toolkit) { final Section packageConfigSection = toolkit.createSection(form.getBody(), ExpandableComposite.SHORT_TITLE_BAR | ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED); packageConfigSection.setEnabled(true); final Composite client = toolkit.createComposite(packageConfigSection); client.setLayout(new GridLayout(FORM_COLUMNS, false)); packageConfigSection.setClient(client); packageConfigSection.setText("Configuration"); Group resolutionType = new Group(client, SWT.NULL); resolutionType.setText("CodeChecker resolution method."); GridLayoutFactory.fillDefaults().numColumns(1).applyTo(resolutionType); GridDataFactory.fillDefaults().grab(true, false).align(SWT.FILL, SWT.CENTER) .span(FORM_COLUMNS, FORM_ONE_ROW).applyTo(resolutionType); resolutionType.setBackground(client.getBackground()); ccDirClient = toolkit.createComposite(client); GridLayoutFactory.fillDefaults().numColumns(FORM_COLUMNS).applyTo(ccDirClient); GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER).span(FORM_COLUMNS, FORM_ONE_ROW) .applyTo(ccDirClient); ccDirClient.setBackground(client.getBackground()); pathCc = toolkit.createButton(resolutionType, "Search in PATH", SWT.RADIO); pathCc.setData(ResolutionMethodTypes.PATH); pathCc.addSelectionListener(new PackageResolutionSelectionAdapter()); preBuiltCc = toolkit.createButton(resolutionType, "Pre built package", SWT.RADIO); preBuiltCc.setData(ResolutionMethodTypes.PRE); preBuiltCc.addSelectionListener(new PackageResolutionSelectionAdapter()); codeCheckerDirectoryField = addTextField(toolkit, ccDirClient, CC_BIN_LABEL, ""); codeCheckerDirectoryField.addModifyListener(new ModifyListener() { @Override public void modifyText(ModifyEvent e) { locateCodeChecker(); refreshDisplay(); } }); Button codeCheckerDirectoryFieldBrowse = new Button(ccDirClient, SWT.PUSH); codeCheckerDirectoryFieldBrowse.setText(BROSWE); codeCheckerDirectoryFieldBrowse.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent event) { FileDialog dlg = new FileDialog(client.getShell()); dlg.setFilterPath(codeCheckerDirectoryField.getText()); dlg.setText("Browse CodeChecker binary"); String dir = dlg.open(); if (dir != null) { codeCheckerDirectoryField.setText(dir); locateCodeChecker(); refreshDisplay(); } } }); changeDirectoryInputs(); return packageConfigSection; }
Example 7
Source File: FormWidgetFactory.java From birt with Eclipse Public License 1.0 | 3 votes |
/** * Creates a group as a part of the form. * * @param parent * the group parent. * @param text * the group title. * @return the composite. */ public Group createGroup( Composite parent, String text ) { Group group = new Group( parent, SWT.SHADOW_NONE ); group.setText( text ); group.setBackground( getColors( ).getBackground( ) ); group.setForeground( getColors( ).getForeground( ) ); return group; }
Example 8
Source File: TabbedPropertySheetWidgetFactory.java From bonita-studio with GNU General Public License v2.0 | 3 votes |
/** * Creates a group as a part of the form. * * @param parent * the group parent. * @param text * the group title. * @return the composite. */ public Group createGroup(Composite parent, String text) { Group group = new Group(parent, SWT.SHADOW_NONE); group.setText(text); group.setBackground(getColors().getBackground()); group.setForeground(getColors().getForeground()); return group; }