Java Code Examples for org.eclipse.swt.layout.FormLayout
The following examples show how to use
org.eclipse.swt.layout.FormLayout.
These examples are extracted from open source projects.
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 Project: hop Author: project-hop File: HopGui.java License: Apache License 2.0 | 6 votes |
protected void addPerspectivesToolbar() { // We can't mix horizontal and vertical toolbars so we need to add a composite. // shell.setLayout( new FormLayout() ); mainHopGuiComposite = new Composite( shell, SWT.NO_BACKGROUND ); mainHopGuiComposite.setLayout( new FormLayout() ); FormData formData = new FormData(); formData.left = new FormAttachment( 0, 0 ); formData.right = new FormAttachment( 100, 0 ); formData.top = new FormAttachment( mainToolbar, 0 ); formData.bottom = new FormAttachment( 100, 0 ); mainHopGuiComposite.setLayoutData( formData ); perspectivesToolbar = new ToolBar( mainHopGuiComposite, SWT.WRAP | SWT.RIGHT | SWT.VERTICAL ); props.setLook( perspectivesToolbar, PropsUi.WIDGET_STYLE_TOOLBAR ); FormData fdToolBar = new FormData(); fdToolBar.left = new FormAttachment( 0, 0 ); fdToolBar.top = new FormAttachment( 0, 0 ); fdToolBar.bottom = new FormAttachment( 100, 0 ); perspectivesToolbar.setLayoutData( fdToolBar ); perspectivesToolbarWidgets = new GuiToolbarWidgets(); perspectivesToolbarWidgets.registerGuiPluginObject( this ); perspectivesToolbarWidgets.createToolbarWidgets( perspectivesToolbar, GUI_PLUGIN_PERSPECTIVES_PARENT_ID ); perspectivesToolbar.pack(); }
Example #2
Source Project: hop Author: project-hop File: ConfigurationDialog.java License: 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 #3
Source Project: hop Author: project-hop File: BaseDialog.java License: Apache License 2.0 | 6 votes |
/** * Returns a {@link org.eclipse.swt.events.SelectionAdapter} that is used to "submit" the dialog. */ private Display prepareLayout() { // Prep the parent shell and the dialog shell final Shell parent = getParent(); final Display display = parent.getDisplay(); shell = new Shell( parent, SWT.DIALOG_TRIM | SWT.APPLICATION_MODAL | SWT.SHEET ); shell.setImage( GuiResource.getInstance().getImageHopUi() ); props.setLook( shell ); // Detect X or ALT-F4 or something that kills this window... shell.addShellListener( new ShellAdapter() { @Override public void shellClosed( ShellEvent e ) { dispose(); } } ); final FormLayout formLayout = new FormLayout(); formLayout.marginWidth = MARGIN_SIZE; formLayout.marginHeight = MARGIN_SIZE; shell.setLayout( formLayout ); shell.setText( this.title ); return display; }
Example #4
Source Project: eclipse-cs Author: checkstyle File: CheckstylePreferencePage.java License: GNU Lesser General Public License v2.1 | 6 votes |
/** * Creates the content regarding the management of check configurations. * * @param parent * the parent composite * @return the configuration area */ private Composite createCheckConfigContents(Composite parent) { // // Create the composite for configuring check configurations. // Group configComposite = new Group(parent, SWT.NULL); configComposite.setText(Messages.CheckstylePreferencePage_titleCheckConfigs); configComposite.setLayout(new FormLayout()); mWorkingSetEditor = new CheckConfigurationWorkingSetEditor(mWorkingSet, true); final Control editorControl = mWorkingSetEditor.createContents(configComposite); FormData fd = new FormData(); fd.left = new FormAttachment(0, 3); fd.top = new FormAttachment(0, 3); fd.right = new FormAttachment(100, -3); fd.bottom = new FormAttachment(100, -3); editorControl.setLayoutData(fd); return configComposite; }
Example #5
Source Project: hop Author: project-hop File: HopGui.java License: Apache License 2.0 | 5 votes |
/** * Add a main composite where the various perspectives can parent on to show stuff... * Its area is to just below the main toolbar and to the right of the perspectives toolbar */ private void addMainPerspectivesComposite() { mainPerspectivesComposite = new Composite( mainHopGuiComposite, SWT.NO_BACKGROUND ); mainPerspectivesComposite.setLayout( new FormLayout() ); FormData fdMain = new FormData(); fdMain.top = new FormAttachment( 0, 0 ); fdMain.left = new FormAttachment( perspectivesToolbar, 0 ); fdMain.bottom = new FormAttachment( 100, 0 ); fdMain.right = new FormAttachment( 100, 0 ); mainPerspectivesComposite.setLayoutData( fdMain ); }
Example #6
Source Project: hop Author: project-hop File: CommonTransformDialog.java License: Apache License 2.0 | 5 votes |
private Display prepareLayout() { // Prep the parent shell and the dialog shell final Shell parent = getParent(); final Display display = parent.getDisplay(); shell = new Shell( parent, SWT.DIALOG_TRIM | SWT.RESIZE | SWT.MAX | SWT.MIN ); props.setLook( shell ); setShellImage( shell, meta ); // Detect X or ALT-F4 or something that kills this window... shell.addShellListener( new ShellAdapter() { @Override public void shellClosed( ShellEvent e ) { cancel(); } } ); changed = meta.hasChanged(); final FormLayout formLayout = new FormLayout(); formLayout.marginWidth = BaseDialog.MARGIN_SIZE; formLayout.marginHeight = BaseDialog.MARGIN_SIZE; shell.setLayout( formLayout ); shell.setText( getTitle() ); return display; }
Example #7
Source Project: hop Author: project-hop File: ConfigurationDialog.java License: Apache License 2.0 | 5 votes |
protected void mainLayout( String shellTitle, Image img ) { display = parent.getDisplay(); shell = new Shell( parent, SWT.DIALOG_TRIM | SWT.RESIZE | SWT.MAX ); props.setLook( shell ); shell.setImage( img ); shell.setLayout( new FormLayout() ); shell.setText( shellTitle ); }
Example #8
Source Project: hop Author: project-hop File: BrowserEnvironmentWarningDialog.java License: Apache License 2.0 | 5 votes |
/** * showWarningDialog * <p> * Shows a SWT dialog warning the user that something is wrong with the browser environment. * * @param title the title on the top of the window. * @param message the message at the center of the screen. * @param helpLink a string that contains a hyperlink to a help web page. * @param maxTextWidth the width for the text inside the dialog. */ private void showWarningDialog( String title, String message, String helpLink, EnvironmentCase environment, int maxTextWidth ) { if ( this.getParent().isDisposed() ) { return; } this.props = PropsUi.getInstance(); Display display = this.getParent().getDisplay(); shell = new Shell( this.getParent(), SWT.TITLE | SWT.APPLICATION_MODAL ); props.setLook( shell ); FormLayout formLayout = new FormLayout(); formLayout.marginWidth = margin; formLayout.marginHeight = margin; shell.setLayout( formLayout ); // setting layout shell.setText( title ); //setting title of the window setWarningIcon( display ); //adding icon setWarningText( message, maxTextWidth ); //adding text setHelpLink( display, helpLink, maxTextWidth, environment ); //adding link setCloseButton(); //adding button shell.setSize( shell.computeSize( SWT.DEFAULT, SWT.DEFAULT, true ) ); Rectangle screenSize = display.getPrimaryMonitor().getBounds(); shell.setLocation( ( screenSize.width - shell.getBounds().width ) / 2, ( screenSize.height - shell.getBounds().height ) / 2 ); closeButton.setFocus(); shell.open(); while ( !shell.isDisposed() ) { if ( !display.readAndDispatch() ) { display.sleep(); } } }
Example #9
Source Project: hop Author: project-hop File: RadioTab.java License: Apache License 2.0 | 5 votes |
public RadioTab( Composite composite, int i, String title, PropsUi props ) { super( composite, i ); this.props = props; props.setLook( this ); noMarginLayout = new FormLayout(); this.setLayout( noMarginLayout ); fdMaximize = new FormData(); fdMaximize.left = new FormAttachment( 0 ); fdMaximize.top = new FormAttachment( 0 ); fdMaximize.right = new FormAttachment( 100 ); fdMaximize.bottom = new FormAttachment( 100 ); this.setLayoutData( fdMaximize ); FormLayout marginLayout = new FormLayout(); marginLayout.marginWidth = 15; marginLayout.marginHeight = 15; radioGroup = new Group( this, i ); radioGroup.setLayout( marginLayout ); radioGroup.setText( title ); FormData fdRadioGroup = new FormData(); fdRadioGroup.top = new FormAttachment( 0 ); fdRadioGroup.left = new FormAttachment( 0 ); fdRadioGroup.right = new FormAttachment( 100 ); radioGroup.setLayoutData( fdRadioGroup ); props.setLook( radioGroup ); contentArea = new Composite( this, i ); contentArea.setLayout( noMarginLayout ); FormData fdContentArea = new FormData(); fdContentArea.left = new FormAttachment( 0 ); fdContentArea.top = new FormAttachment( radioGroup, 15 ); fdContentArea.bottom = new FormAttachment( 100 ); fdContentArea.right = new FormAttachment( 100 ); contentArea.setLayoutData( fdContentArea ); props.setLook( contentArea ); }
Example #10
Source Project: hop Author: project-hop File: AuthComposite.java License: Apache License 2.0 | 5 votes |
private void layoutComposite() { FormLayout flAuthComp = new FormLayout(); this.setLayout( flAuthComp ); //authentication group wAuthGroup = new Group( this, SWT.SHADOW_ETCHED_IN ); props.setLook( wAuthGroup ); wAuthGroup.setText( authGroupLabel ); FormLayout flAuthGroup = new FormLayout(); flAuthGroup.marginHeight = 15; flAuthGroup.marginWidth = 15; wAuthGroup.setLayout( flAuthGroup ); wAuthGroup.setLayoutData( new FormDataBuilder().fullSize().result() ); //username wlUsername = new Label( wAuthGroup, SWT.LEFT ); props.setLook( wlUsername ); wlUsername.setText( usernameLabel ); wlUsername.setLayoutData( new FormDataBuilder().left().top().result() ); wUsername = new TextVar( pipelineMeta, wAuthGroup, SWT.SINGLE | SWT.LEFT | SWT.BORDER ); props.setLook( wUsername ); wUsername.addModifyListener( lsMod ); wUsername.setLayoutData( new FormDataBuilder().top( wlUsername ).left().width( 800 ).result() ); //password wlPassword = new Label( wAuthGroup, SWT.LEFT ); props.setLook( wlPassword ); wlPassword.setText( passwordLabel ); wlPassword.setLayoutData( new FormDataBuilder().left().top( wUsername, ConstUi.MEDUIM_MARGIN ).result() ); wPassword = new PasswordTextVar( pipelineMeta, wAuthGroup, SWT.SINGLE | SWT.LEFT | SWT.BORDER ); props.setLook( wPassword ); wPassword.addModifyListener( lsMod ); wPassword.setLayoutData( new FormDataBuilder().left().top( wlPassword ).width( 800 ).result() ); }
Example #11
Source Project: hop Author: project-hop File: LabelText.java License: Apache License 2.0 | 5 votes |
public LabelText( Composite composite, int textStyle, String labelText, String toolTipText, int middle, int margin ) { super( composite, SWT.NONE ); props.setLook( this ); FormLayout formLayout = new FormLayout(); formLayout.marginWidth = 0; formLayout.marginHeight = 0; this.setLayout( formLayout ); wText = new Text( this, textStyle ); FormData fdText = new FormData(); fdText.left = new FormAttachment( middle, margin ); fdText.right = new FormAttachment( 100, 0 ); wText.setLayoutData( fdText ); wText.setToolTipText( toolTipText ); wLabel = new Label( this, SWT.RIGHT ); props.setLook( wLabel ); wLabel.setText( labelText ); FormData fdLabel = new FormData(); fdLabel.left = new FormAttachment( 0, 0 ); fdLabel.right = new FormAttachment( middle, 0 ); fdLabel.top = new FormAttachment( wText, 0, SWT.CENTER ); wLabel.setLayoutData( fdLabel ); wLabel.setToolTipText( toolTipText ); }
Example #12
Source Project: hop Author: project-hop File: LabelCombo.java License: Apache License 2.0 | 5 votes |
public LabelCombo( Composite composite, int flags, String labelText, String toolTipText ) { super( composite, SWT.NONE ); props.setLook( this ); int middle = props.getMiddlePct(); int margin = props.getMargin(); FormLayout formLayout = new FormLayout(); formLayout.marginWidth = 0; formLayout.marginHeight = 0; formLayout.marginTop = 0; formLayout.marginBottom = 0; this.setLayout( formLayout ); int textFlags = SWT.SINGLE | SWT.LEFT | SWT.BORDER; if ( flags != SWT.NONE ) { textFlags = flags; } wCombo = new CCombo( this, textFlags ); FormData fdText = new FormData(); fdText.left = new FormAttachment( middle, margin ); fdText.right = new FormAttachment( 100, 0 ); wCombo.setLayoutData( fdText ); wCombo.setToolTipText( toolTipText ); wLabel = new Label( this, SWT.RIGHT ); props.setLook( wLabel ); wLabel.setText( labelText ); FormData fdLabel = new FormData(); fdLabel.left = new FormAttachment( 0, 0 ); fdLabel.right = new FormAttachment( middle, 0 ); fdLabel.top = new FormAttachment( wCombo, 0, SWT.CENTER ); wLabel.setLayoutData( fdLabel ); wLabel.setToolTipText( toolTipText ); }
Example #13
Source Project: hop Author: project-hop File: LabelComboVar.java License: Apache License 2.0 | 5 votes |
public LabelComboVar( IVariables variables, Composite composite, int flags, String labelText, String toolTipText ) { super( composite, SWT.NONE ); props.setLook( this ); int middle = props.getMiddlePct(); int margin = props.getMargin(); FormLayout formLayout = new FormLayout(); formLayout.marginWidth = 0; formLayout.marginHeight = 0; formLayout.marginTop = 0; formLayout.marginBottom = 0; this.setLayout( formLayout ); int textFlags = SWT.SINGLE | SWT.LEFT | SWT.BORDER; if ( flags != SWT.NONE ) { textFlags = flags; } wCombo = new ComboVar( variables, this, textFlags, toolTipText ); FormData fdText = new FormData(); fdText.left = new FormAttachment( middle, margin ); fdText.right = new FormAttachment( 100, 0 ); wCombo.setLayoutData( fdText ); wCombo.getCComboWidget().setToolTipText( toolTipText ); wLabel = new Label( this, SWT.RIGHT ); props.setLook( wLabel ); wLabel.setText( labelText ); FormData fdLabel = new FormData(); fdLabel.left = new FormAttachment( 0, 0 ); fdLabel.right = new FormAttachment( middle, 0 ); fdLabel.top = new FormAttachment( wCombo, 0, SWT.CENTER ); wLabel.setLayoutData( fdLabel ); wLabel.setToolTipText( toolTipText ); }
Example #14
Source Project: hop Author: project-hop File: Translator.java License: Apache License 2.0 | 5 votes |
public void open() { shell = new Shell( display ); shell.setLayout( new FillLayout() ); shell.setText( APP_NAME ); shell.setImage( GuiResource.getInstance().getImageLogoSmall() ); try { readFiles(); } catch ( Exception e ) { new ErrorDialog( shell, "Error reading translations", "There was an unexpected error reading the translations", e ); } // Put something on the screen sashform = new SashForm( shell, SWT.HORIZONTAL ); sashform.setLayout( new FormLayout() ); addLists(); addGrid(); addListeners(); sashform.setWeights( new int[] { 30, 70 } ); sashform.setVisible( true ); shell.pack(); refresh(); wPackages.optWidth( true ); wPackages.getTable().getColumn( 1 ).setWidth( 1 ); BaseTransformDialog.setSize( shell); shell.open(); }
Example #15
Source Project: hop Author: project-hop File: TextFileImportWizardPage1.java License: Apache License 2.0 | 5 votes |
public void createControl( Composite parent ) { // create the composite to hold the widgets Composite composite = new Composite( parent, SWT.NONE ); props.setLook( composite ); FormLayout compLayout = new FormLayout(); compLayout.marginHeight = Const.FORM_MARGIN; compLayout.marginWidth = Const.FORM_MARGIN; composite.setLayout( compLayout ); MouseAdapter lsMouse = new MouseAdapter() { public void mouseDown( MouseEvent e ) { int s = getSize(); setPageComplete( s > 0 ); } }; wTable = new TableDraw( composite, props, this, fields ); wTable.setRows( rows ); props.setLook( wTable ); wTable.setFields( fields ); fdTable = new FormData(); fdTable.left = new FormAttachment( 0, 0 ); fdTable.right = new FormAttachment( 100, 0 ); fdTable.top = new FormAttachment( 0, 0 ); fdTable.bottom = new FormAttachment( 100, 0 ); wTable.setLayoutData( fdTable ); wTable.addMouseListener( lsMouse ); // set the composite as the control for this page setControl( composite ); }
Example #16
Source Project: hop Author: project-hop File: TextFileImportWizardPage1.java License: Apache License 2.0 | 5 votes |
public void createControl( Composite parent ) { // create the composite to hold the widgets Composite composite = new Composite( parent, SWT.NONE ); props.setLook( composite ); FormLayout compLayout = new FormLayout(); compLayout.marginHeight = Const.FORM_MARGIN; compLayout.marginWidth = Const.FORM_MARGIN; composite.setLayout( compLayout ); MouseAdapter lsMouse = new MouseAdapter() { public void mouseDown( MouseEvent e ) { int s = getSize(); setPageComplete( s > 0 ); } }; wTable = new TableDraw( composite, props, this, fields ); wTable.setRows( rows ); props.setLook( wTable ); wTable.setFields( fields ); fdTable = new FormData(); fdTable.left = new FormAttachment( 0, 0 ); fdTable.right = new FormAttachment( 100, 0 ); fdTable.top = new FormAttachment( 0, 0 ); fdTable.bottom = new FormAttachment( 100, 0 ); wTable.setLayoutData( fdTable ); wTable.addMouseListener( lsMouse ); // set the composite as the control for this page setControl( composite ); }
Example #17
Source Project: hop Author: project-hop File: TextFileImportWizardPage1.java License: Apache License 2.0 | 5 votes |
public void createControl( Composite parent ) { // create the composite to hold the widgets Composite composite = new Composite( parent, SWT.NONE ); props.setLook( composite ); FormLayout compLayout = new FormLayout(); compLayout.marginHeight = Const.FORM_MARGIN; compLayout.marginWidth = Const.FORM_MARGIN; composite.setLayout( compLayout ); MouseAdapter lsMouse = new MouseAdapter() { public void mouseDown( MouseEvent e ) { int s = getSize(); setPageComplete( s > 0 ); } }; wTable = new TableDraw( composite, props, this, fields ); wTable.setRows( rows ); props.setLook( wTable ); wTable.setFields( fields ); fdTable = new FormData(); fdTable.left = new FormAttachment( 0, 0 ); fdTable.right = new FormAttachment( 100, 0 ); fdTable.top = new FormAttachment( 0, 0 ); fdTable.bottom = new FormAttachment( 100, 0 ); wTable.setLayoutData( fdTable ); wTable.addMouseListener( lsMouse ); // set the composite as the control for this page setControl( composite ); }
Example #18
Source Project: kettle-beam Author: mattcasters File: BeamJobConfigDialog.java License: Apache License 2.0 | 5 votes |
private void addParametersTab() { wParametersTab = new CTabItem( wTabFolder, SWT.NONE ); wParametersTab.setText( "Parameters" ); wParametersComp = new Composite( wTabFolder, SWT.NO_BACKGROUND ); props.setLook( wParametersComp ); wParametersComp.setLayout( new FormLayout() ); ColumnInfo[] columnInfos = new ColumnInfo[] { new ColumnInfo( "Name", ColumnInfo.COLUMN_TYPE_TEXT, false, false ), new ColumnInfo( "Value", ColumnInfo.COLUMN_TYPE_TEXT, false, false ), }; wParameters = new TableView( space, wParametersComp, SWT.BORDER, columnInfos, config.getParameters().size(), null, props ); props.setLook( wParameters ); FormData fdParameters = new FormData(); fdParameters.left = new FormAttachment( 0, 0 ); fdParameters.right = new FormAttachment( 100, 0 ); fdParameters.top = new FormAttachment( 0, 0 ); fdParameters.bottom = new FormAttachment( 100, 0 ); wParameters.setLayoutData( fdParameters ); FormData fdParametersComp = new FormData(); fdParametersComp.left = new FormAttachment( 0, 0 ); fdParametersComp.right = new FormAttachment( 100, 0 ); fdParametersComp.top = new FormAttachment( 0, 0 ); fdParametersComp.bottom = new FormAttachment( 100, 0 ); wParametersComp.setLayoutData( fdParametersComp ); wParametersTab.setControl( wParametersComp ); }
Example #19
Source Project: nebula Author: eclipse File: SnippetCompositeTableDataBinding.java License: Eclipse Public License 2.0 | 5 votes |
private void doLayout() { setLayout(new FormLayout()); Label lblName = new Label(this, SWT.CENTER); lblName.setText("Name"); int index = 0; FormData data = new FormData(); data.left = new FormAttachment(cols[index], 100, 5); data.right = new FormAttachment(cols[index + 1], 100, 0); data.top = new FormAttachment(0, 100, 5); lblName.setLayoutData(data); index++; Label lblFirstname = new Label(this, SWT.CENTER); lblFirstname.setText("Firstname"); data = new FormData(); data.left = new FormAttachment(cols[index], 100, 5); data.right = new FormAttachment(cols[index + 1], 100, 0); data.top = new FormAttachment(0, 100, 5); lblFirstname.setLayoutData(data); index++; Label lblAction = new Label(this, SWT.CENTER); lblAction.setText("Action"); data = new FormData(); data.left = new FormAttachment(cols[index], 100, 5); data.right = new FormAttachment(cols[index + 1], 100, 0); data.top = new FormAttachment(0, 100, 5); lblAction.setLayoutData(data); }
Example #20
Source Project: nebula Author: eclipse File: SnippetCompositeTableDataBinding.java License: Eclipse Public License 2.0 | 5 votes |
private void doLayout() { lastname = new Text(this, SWT.BORDER); firstname = new Text(this, SWT.BORDER); action = new Button(this, SWT.NONE); action.setText("Delete"); setLayout(new FormLayout()); // column index int index = 0; FormData data = new FormData(); data.top = new FormAttachment(0, 100, 5); data.left = new FormAttachment(cols[index], 100, 5); data.right = new FormAttachment(cols[index + 1], 100, 0); lastname.setLayoutData(data); index++; data = new FormData(); data.top = new FormAttachment(0, 100, 5); data.left = new FormAttachment(cols[index], 100, 5); data.right = new FormAttachment(cols[index + 1], 100, 0); firstname.setLayoutData(data); index++; data = new FormData(); data.top = new FormAttachment(0, 100, 5); data.left = new FormAttachment(cols[index], 100, 5); data.right = new FormAttachment(cols[index + 1], 100, 0); action.setLayoutData(data); index++; }
Example #21
Source Project: nebula Author: eclipse File: SnippetCompositeTableDataBinding.java License: Eclipse Public License 2.0 | 5 votes |
private void doLayout() { setLayout(new FormLayout()); table = new CompositeTable(this, SWT.NULL); table.setBackground(getDisplay().getSystemColor(SWT.COLOR_WIDGET_BACKGROUND)); new Header(table, SWT.NULL); new Row(table, SWT.NULL); addNew = new Button(this, SWT.NONE); addNew.setText("Add new Hero"); addNew.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { PersonTitleAreaDialog d = new PersonTitleAreaDialog(getShell()); d.open(); final int result = d.getReturnCode(); if (result == Window.OK) { Hero p = d.getHero(); getModel().addHero(p); } } }); FormData data = new FormData(); data.left = new FormAttachment(0, 100, 5); data.right = new FormAttachment(100, 100, -5); data.top = new FormAttachment(0, 100, 5); data.bottom = new FormAttachment(addNew, -5, SWT.TOP); table.setLayoutData(data); table.setRunTime(true); data = new FormData(); data.right = new FormAttachment(100, 100, -5); data.bottom = new FormAttachment(100, 100, -5); addNew.setLayoutData(data); }
Example #22
Source Project: nebula Author: eclipse File: SnippetCompositeTableDataBinding.java License: Eclipse Public License 2.0 | 5 votes |
/** * Main entry point. * * @param args */ public static void main(String[] args) { final Display display = new Display(); Realm.runWithDefault(SWTObservables.getRealm(display), new Runnable() { public void run() { Shell shell = new Shell(display); shell.setText("Jules Verne's Heroes"); shell.setBounds(0, 0, 400, 200); shell.setLayout(new FormLayout()); // creation of the composite containing the table MainCompo compo = new MainCompo(shell, SWT.NONE); // position it on the shell FormData data = new FormData(); data.left = new FormAttachment(0, 100, 5); data.right = new FormAttachment(100, 100, -5); data.top = new FormAttachment(0, 100, 5); data.bottom = new FormAttachment(100, 100, -5); compo.setLayoutData(data); // add some data to the model populateModel(compo.getModel()); // binding the UI with the model compo.binding(); // start the UI shell.open(); while (!shell.isDisposed()) { if (!display.readAndDispatch()) display.sleep(); } } }); display.dispose(); }
Example #23
Source Project: eclipse-cs Author: checkstyle File: CheckstylePropertyPage.java License: GNU Lesser General Public License v2.1 | 5 votes |
/** * Creates the file sets area. * * @param fileSetsContainer * the container to add the file sets area to */ private Control createFileSetsArea(Composite fileSetsContainer) throws CheckstylePluginException { Control[] controls = fileSetsContainer.getChildren(); for (int i = 0; i < controls.length; i++) { controls[i].dispose(); } if (mProjectConfig.isUseSimpleConfig()) { mFileSetsEditor = new SimpleFileSetsEditor(this); } else { mFileSetsEditor = new ComplexFileSetsEditor(this); } mFileSetsEditor.setFileSets(mProjectConfig.getFileSets()); final Control editor = mFileSetsEditor.createContents(mFileSetsContainer); fileSetsContainer.setLayout(new FormLayout()); FormData fd = new FormData(); fd.left = new FormAttachment(0); fd.top = new FormAttachment(0); fd.right = new FormAttachment(100); fd.bottom = new FormAttachment(100); editor.setLayoutData(fd); return fileSetsContainer; }
Example #24
Source Project: eclipse-cs Author: checkstyle File: CheckstylePreferencePage.java License: GNU Lesser General Public License v2.1 | 5 votes |
/** * {@inheritDoc} */ @Override public Control createContents(Composite ancestor) { noDefaultAndApplyButton(); // // Build the top level composite with one colume. // Composite parentComposite = new Composite(ancestor, SWT.NULL); FormLayout layout = new FormLayout(); parentComposite.setLayout(layout); // // Create the general section of the screen. // final Composite generalComposite = createGeneralContents(parentComposite); FormData fd = new FormData(); fd.left = new FormAttachment(0); fd.top = new FormAttachment(0); fd.right = new FormAttachment(100); generalComposite.setLayoutData(fd); // // Create the check configuration section of the screen. // final Composite configComposite = createCheckConfigContents(parentComposite); fd = new FormData(); fd.left = new FormAttachment(0); fd.top = new FormAttachment(generalComposite, 3, SWT.BOTTOM); fd.right = new FormAttachment(100); fd.bottom = new FormAttachment(100); configComposite.setLayoutData(fd); return parentComposite; }
Example #25
Source Project: hop Author: project-hop File: HopPluginExplorePerspective.java License: Apache License 2.0 | 4 votes |
@Override public void initialize( HopGui hopGui, Composite parent ) { this.hopGui = hopGui; this.parent = parent; this.loadPlugin(); PropsUi props = PropsUi.getInstance(); composite = new Composite( parent, SWT.NONE ); composite.setLayout( new FormLayout() ); formData = new FormData(); formData.left = new FormAttachment( 0, 0 ); formData.top = new FormAttachment( 0, 0 ); formData.right = new FormAttachment( 100, 0 ); formData.bottom = new FormAttachment( 100, 0 ); composite.setLayoutData( formData ); Label label = new Label( composite, SWT.LEFT ); label.setText( "Plugin type" ); FormData fdlFields = new FormData(); fdlFields.left = new FormAttachment( 0, 0 ); fdlFields.top = new FormAttachment( 0, props.getMargin() ); label.setLayoutData( fdlFields ); wPluginType = new CCombo( composite, SWT.LEFT | SWT.READ_ONLY | SWT.BORDER ); wPluginType.setItems( pluginsType ); wPluginType.setText( selectedPluginType ); props.setLook( wPluginType ); FormData fdlSubject = new FormData(); fdlSubject.left = new FormAttachment( label, props.getMargin() ); fdlSubject.top = new FormAttachment( label, 0, SWT.CENTER ); wPluginType.setLayoutData( fdlSubject ); wPluginType.addSelectionListener( new SelectionAdapter() { @Override public void widgetSelected( SelectionEvent arg0 ) { selectedPluginType = wPluginType.getText(); refresh(); } } ); IRowMeta rowMeta = metaMap.get( selectedPluginType ); ColumnInfo[] colinf = new ColumnInfo[ rowMeta.size() ]; for ( int i = 0; i < rowMeta.size(); i++ ) { IValueMeta v = rowMeta.getValueMeta( i ); colinf[ i ] = new ColumnInfo( v.getName(), ColumnInfo.COLUMN_TYPE_TEXT, v.isNumeric() ); colinf[ i ].setToolTip( v.toStringMeta() ); colinf[ i ].setValueMeta( v ); } wPluginView = new TableView( new Variables(), composite, SWT.BORDER | SWT.FULL_SELECTION | SWT.MULTI, colinf, 0, null, props ); wPluginView.setShowingBlueNullValues( true ); FormData fdFields = new FormData(); fdFields.left = new FormAttachment( 0, 0 ); fdFields.top = new FormAttachment( wPluginType, props.getMargin() ); fdFields.right = new FormAttachment( 100, 0 ); fdFields.bottom = new FormAttachment( 100, 0 ); wPluginView.setLayoutData( fdFields ); this.refresh(); }
Example #26
Source Project: hop Author: project-hop File: HopDataOrchestrationPerspective.java License: Apache License 2.0 | 4 votes |
@Override public void initialize( HopGui hopGui, Composite parent ) { this.hopGui = hopGui; this.parent = parent; PropsUi props = PropsUi.getInstance(); composite = new Composite( parent, SWT.NONE ); //composite.setBackground( GuiResource.getInstance().getColorBackground() ); FormLayout layout = new FormLayout(); //layout.marginLeft = props.getMargin(); //layout.marginTop = props.getMargin(); layout.marginRight = props.getMargin(); layout.marginBottom = props.getMargin(); composite.setLayout( layout ); formData = new FormData(); formData.left = new FormAttachment( 0, 0 ); formData.top = new FormAttachment( 0, 0 ); formData.right = new FormAttachment( 100, 0 ); formData.bottom = new FormAttachment( 100, 0 ); composite.setLayoutData( formData ); // A tab folder covers the complete area... // tabFolder = new CTabFolder( composite, SWT.MULTI | SWT.BORDER ); props.setLook( tabFolder, Props.WIDGET_STYLE_TAB ); FormData fdLabel = new FormData(); fdLabel.left = new FormAttachment( 0, 0 ); fdLabel.right = new FormAttachment( 100, 0 ); fdLabel.top = new FormAttachment( 0, 0 ); fdLabel.bottom = new FormAttachment( 100, 0 ); tabFolder.setLayoutData( fdLabel ); tabFolder.addCTabFolder2Listener( new CTabFolder2Adapter() { @Override public void close( CTabFolderEvent event ) { handleTabCloseEvent( event ); } } ); tabFolder.addListener( SWT.Selection, event -> handTabSelectionEvent( event ) ); // Support reorder tab item new TabFolderReorder( tabFolder ); }
Example #27
Source Project: hop Author: project-hop File: PipelineExecutorDialog.java License: Apache License 2.0 | 4 votes |
private void addParametersTab() { CTabItem wParametersTab = new CTabItem( wTabFolder, SWT.NONE ); wParametersTab.setText( BaseMessages.getString( PKG, "PipelineExecutorDialog.Parameters.Title" ) ); wParametersTab.setToolTipText( BaseMessages.getString( PKG, "PipelineExecutorDialog.Parameters.Tooltip" ) ); Composite wParametersComposite = new Composite( wTabFolder, SWT.NONE ); props.setLook( wParametersComposite ); FormLayout parameterTabLayout = new FormLayout(); parameterTabLayout.marginWidth = 15; parameterTabLayout.marginHeight = 15; wParametersComposite.setLayout( parameterTabLayout ); // Add a button: get parameters // wGetParameters = new Button( wParametersComposite, SWT.PUSH ); wGetParameters.setText( BaseMessages.getString( PKG, "PipelineExecutorDialog.Parameters.GetParameters" ) ); props.setLook( wGetParameters ); FormData fdGetParameters = new FormData(); fdGetParameters.bottom = new FormAttachment( 100, 0 ); fdGetParameters.right = new FormAttachment( 100, 0 ); wGetParameters.setLayoutData( fdGetParameters ); wGetParameters.setSelection( pipelineExecutorMeta.getParameters().isInheritingAllVariables() ); wGetParameters.addSelectionListener( new SelectionAdapter() { public void widgetSelected( SelectionEvent e ) { getParametersFromPipeline( null ); // null = force reload of data on disk } } ); // Now add a table view with the 3 columns to specify: variable name, input field & optional static input // parameterColumns = new ColumnInfo[] { new ColumnInfo( BaseMessages.getString( PKG, "PipelineExecutorDialog.Parameters.column.Variable" ), ColumnInfo.COLUMN_TYPE_TEXT, false, false ), new ColumnInfo( BaseMessages.getString( PKG, "PipelineExecutorDialog.Parameters.column.Field" ), ColumnInfo.COLUMN_TYPE_CCOMBO, new String[] {}, false ), new ColumnInfo( BaseMessages.getString( PKG, "PipelineExecutorDialog.Parameters.column.Input" ), ColumnInfo.COLUMN_TYPE_TEXT, false, false ), }; parameterColumns[ 1 ].setUsingVariables( true ); PipelineExecutorParameters parameters = pipelineExecutorMeta.getParameters(); wPipelineExecutorParameters = new TableView( pipelineMeta, wParametersComposite, SWT.FULL_SELECTION | SWT.SINGLE | SWT.BORDER, parameterColumns, parameters.getVariable().length, false, lsMod, props, false ); props.setLook( wPipelineExecutorParameters ); FormData fdPipelineExecutors = new FormData(); fdPipelineExecutors.left = new FormAttachment( 0, 0 ); fdPipelineExecutors.right = new FormAttachment( 100, 0 ); fdPipelineExecutors.top = new FormAttachment( 0, 0 ); fdPipelineExecutors.bottom = new FormAttachment( wGetParameters, -10 ); wPipelineExecutorParameters.setLayoutData( fdPipelineExecutors ); wPipelineExecutorParameters.getTable().addListener( SWT.Resize, new ColumnsResizer( 0, 33, 33, 33 ) ); for ( int i = 0; i < parameters.getVariable().length; i++ ) { TableItem tableItem = wPipelineExecutorParameters.table.getItem( i ); tableItem.setText( 1, Const.NVL( parameters.getVariable()[ i ], "" ) ); tableItem.setText( 2, Const.NVL( parameters.getField()[ i ], "" ) ); tableItem.setText( 3, Const.NVL( parameters.getInput()[ i ], "" ) ); } wPipelineExecutorParameters.setRowNums(); wPipelineExecutorParameters.optWidth( true ); // Add a checkbox: inherit all variables... // wInheritAll = new Button( wParametersComposite, SWT.CHECK ); wInheritAll.setText( BaseMessages.getString( PKG, "PipelineExecutorDialog.Parameters.InheritAll" ) ); props.setLook( wInheritAll ); FormData fdInheritAll = new FormData(); fdInheritAll.top = new FormAttachment( wPipelineExecutorParameters, 15 ); fdInheritAll.left = new FormAttachment( 0, 0 ); wInheritAll.setLayoutData( fdInheritAll ); wInheritAll.setSelection( pipelineExecutorMeta.getParameters().isInheritingAllVariables() ); FormData fdParametersComposite = new FormData(); fdParametersComposite.left = new FormAttachment( 0, 0 ); fdParametersComposite.top = new FormAttachment( 0, 0 ); fdParametersComposite.right = new FormAttachment( 100, 0 ); fdParametersComposite.bottom = new FormAttachment( 100, 0 ); wParametersComposite.setLayoutData( fdParametersComposite ); wParametersComposite.layout(); wParametersTab.setControl( wParametersComposite ); }
Example #28
Source Project: hop Author: project-hop File: PipelineExecutorDialog.java License: Apache License 2.0 | 4 votes |
private void addRowGroupTab() { final CTabItem wTab = new CTabItem( wTabFolder, SWT.NONE ); wTab.setText( BaseMessages.getString( PKG, "PipelineExecutorDialog.RowGroup.Title" ) ); wTab.setToolTipText( BaseMessages.getString( PKG, "PipelineExecutorDialog.RowGroup.Tooltip" ) ); Composite wInputComposite = new Composite( wTabFolder, SWT.NONE ); props.setLook( wInputComposite ); FormLayout tabLayout = new FormLayout(); tabLayout.marginWidth = 15; tabLayout.marginHeight = 15; wInputComposite.setLayout( tabLayout ); // Group size // wlGroupSize = new Label( wInputComposite, SWT.RIGHT ); props.setLook( wlGroupSize ); wlGroupSize.setText( BaseMessages.getString( PKG, "PipelineExecutorDialog.GroupSize.Label" ) ); FormData fdlGroupSize = new FormData(); fdlGroupSize.top = new FormAttachment( 0, 0 ); fdlGroupSize.left = new FormAttachment( 0, 0 ); wlGroupSize.setLayoutData( fdlGroupSize ); wGroupSize = new TextVar( pipelineMeta, wInputComposite, SWT.SINGLE | SWT.LEFT | SWT.BORDER ); props.setLook( wGroupSize ); wGroupSize.addModifyListener( lsMod ); FormData fdGroupSize = new FormData(); fdGroupSize.width = 250; fdGroupSize.top = new FormAttachment( wlGroupSize, 5 ); fdGroupSize.left = new FormAttachment( 0, 0 ); wGroupSize.setLayoutData( fdGroupSize ); // Group field // wlGroupField = new Label( wInputComposite, SWT.RIGHT ); props.setLook( wlGroupField ); wlGroupField.setText( BaseMessages.getString( PKG, "PipelineExecutorDialog.GroupField.Label" ) ); FormData fdlGroupField = new FormData(); fdlGroupField.top = new FormAttachment( wGroupSize, 10 ); fdlGroupField.left = new FormAttachment( 0, 0 ); wlGroupField.setLayoutData( fdlGroupField ); wGroupField = new CCombo( wInputComposite, SWT.SINGLE | SWT.LEFT | SWT.BORDER ); props.setLook( wGroupField ); wGroupField.addModifyListener( lsMod ); FormData fdGroupField = new FormData(); fdGroupField.width = 250; fdGroupField.top = new FormAttachment( wlGroupField, 5 ); fdGroupField.left = new FormAttachment( 0, 0 ); wGroupField.setLayoutData( fdGroupField ); // Group time // wlGroupTime = new Label( wInputComposite, SWT.RIGHT ); props.setLook( wlGroupTime ); wlGroupTime.setText( BaseMessages.getString( PKG, "PipelineExecutorDialog.GroupTime.Label" ) ); FormData fdlGroupTime = new FormData(); fdlGroupTime.top = new FormAttachment( wGroupField, 10 ); fdlGroupTime.left = new FormAttachment( 0, 0 ); // First one in the left wlGroupTime.setLayoutData( fdlGroupTime ); wGroupTime = new TextVar( pipelineMeta, wInputComposite, SWT.SINGLE | SWT.LEFT | SWT.BORDER ); props.setLook( wGroupTime ); wGroupTime.addModifyListener( lsMod ); FormData fdGroupTime = new FormData(); fdGroupTime.width = 250; fdGroupTime.top = new FormAttachment( wlGroupTime, 5 ); fdGroupTime.left = new FormAttachment( 0, 0 ); wGroupTime.setLayoutData( fdGroupTime ); wTab.setControl( wInputComposite ); wTabFolder.setSelection( wTab ); }
Example #29
Source Project: hop Author: project-hop File: PipelineExecutorDialog.java License: Apache License 2.0 | 4 votes |
private void addResultFilesTab() { final CTabItem wTab = new CTabItem( wTabFolder, SWT.NONE ); wTab.setText( BaseMessages.getString( PKG, "PipelineExecutorDialog.ResultFiles.Title" ) ); wTab.setToolTipText( BaseMessages.getString( PKG, "PipelineExecutorDialog.ResultFiles.Tooltip" ) ); ScrolledComposite scrolledComposite = new ScrolledComposite( wTabFolder, SWT.V_SCROLL | SWT.H_SCROLL ); scrolledComposite.setLayout( new FillLayout() ); Composite wInputComposite = new Composite( scrolledComposite, SWT.NONE ); props.setLook( wInputComposite ); FormLayout tabLayout = new FormLayout(); tabLayout.marginWidth = 15; tabLayout.marginHeight = 15; wInputComposite.setLayout( tabLayout ); wlResultFilesTarget = new Label( wInputComposite, SWT.RIGHT ); props.setLook( wlResultFilesTarget ); wlResultFilesTarget.setText( BaseMessages.getString( PKG, "PipelineExecutorDialog.ResultFilesTarget.Label" ) ); FormData fdlResultFilesTarget = new FormData(); fdlResultFilesTarget.top = new FormAttachment( 0, 0 ); fdlResultFilesTarget.left = new FormAttachment( 0, 0 ); // First one in the left wlResultFilesTarget.setLayoutData( fdlResultFilesTarget ); wResultFilesTarget = new CCombo( wInputComposite, SWT.SINGLE | SWT.LEFT | SWT.BORDER ); props.setLook( wResultFilesTarget ); wResultFilesTarget.addModifyListener( lsMod ); FormData fdResultFilesTarget = new FormData(); fdResultFilesTarget.width = 250; fdResultFilesTarget.top = new FormAttachment( wlResultFilesTarget, 5 ); fdResultFilesTarget.left = new FormAttachment( 0, 0 ); // To the right wResultFilesTarget.setLayoutData( fdResultFilesTarget ); // ResultFileNameField // wlResultFileNameField = new Label( wInputComposite, SWT.RIGHT ); props.setLook( wlResultFileNameField ); wlResultFileNameField.setText( BaseMessages.getString( PKG, "PipelineExecutorDialog.ResultFileNameField.Label" ) ); FormData fdlResultFileNameField = new FormData(); fdlResultFileNameField.top = new FormAttachment( wResultFilesTarget, 10 ); fdlResultFileNameField.left = new FormAttachment( 0, 0 ); // First one in the left wlResultFileNameField.setLayoutData( fdlResultFileNameField ); wResultFileNameField = new TextVar( pipelineMeta, wInputComposite, SWT.SINGLE | SWT.LEFT | SWT.BORDER ); props.setLook( wResultFileNameField ); wResultFileNameField.addModifyListener( lsMod ); FormData fdResultFileNameField = new FormData(); fdResultFileNameField.width = 250; fdResultFileNameField.top = new FormAttachment( wlResultFileNameField, 5 ); fdResultFileNameField.left = new FormAttachment( 0, 0 ); // To the right wResultFileNameField.setLayoutData( fdResultFileNameField ); wInputComposite.pack(); Rectangle bounds = wInputComposite.getBounds(); scrolledComposite.setContent( wInputComposite ); scrolledComposite.setExpandHorizontal( true ); scrolledComposite.setExpandVertical( true ); scrolledComposite.setMinWidth( bounds.width ); scrolledComposite.setMinHeight( bounds.height ); wTab.setControl( scrolledComposite ); wTabFolder.setSelection( wTab ); }
Example #30
Source Project: hop Author: project-hop File: PipelineExecutorDialog.java License: Apache License 2.0 | 4 votes |
private void addResultRowsTab() { final CTabItem wTab = new CTabItem( wTabFolder, SWT.NONE ); wTab.setText( BaseMessages.getString( PKG, "PipelineExecutorDialog.ResultRows.Title" ) ); wTab.setToolTipText( BaseMessages.getString( PKG, "PipelineExecutorDialog.ResultRows.Tooltip" ) ); ScrolledComposite scrolledComposite = new ScrolledComposite( wTabFolder, SWT.V_SCROLL | SWT.H_SCROLL ); scrolledComposite.setLayout( new FillLayout() ); Composite wInputComposite = new Composite( scrolledComposite, SWT.NONE ); props.setLook( wInputComposite ); FormLayout tabLayout = new FormLayout(); tabLayout.marginWidth = 15; tabLayout.marginHeight = 15; wInputComposite.setLayout( tabLayout ); wlResultRowsTarget = new Label( wInputComposite, SWT.RIGHT ); props.setLook( wlResultRowsTarget ); wlResultRowsTarget.setText( BaseMessages.getString( PKG, "PipelineExecutorDialog.OutputRowsSource.Label" ) ); FormData fdlResultRowsTarget = new FormData(); fdlResultRowsTarget.top = new FormAttachment( 0, 0 ); fdlResultRowsTarget.left = new FormAttachment( 0, 0 ); // First one in the left wlResultRowsTarget.setLayoutData( fdlResultRowsTarget ); wOutputRowsSource = new CCombo( wInputComposite, SWT.SINGLE | SWT.LEFT | SWT.BORDER ); props.setLook( wOutputRowsSource ); wOutputRowsSource.addModifyListener( lsMod ); FormData fdResultRowsTarget = new FormData(); fdResultRowsTarget.width = 250; fdResultRowsTarget.top = new FormAttachment( wlResultRowsTarget, 5 ); fdResultRowsTarget.left = new FormAttachment( 0, 0 ); // To the right wOutputRowsSource.setLayoutData( fdResultRowsTarget ); wlOutputFields = new Label( wInputComposite, SWT.NONE ); wlOutputFields.setText( BaseMessages.getString( PKG, "PipelineExecutorDialog.ResultFields.Label" ) ); props.setLook( wlOutputFields ); FormData fdlResultFields = new FormData(); fdlResultFields.left = new FormAttachment( 0, 0 ); fdlResultFields.top = new FormAttachment( wOutputRowsSource, 10 ); wlOutputFields.setLayoutData( fdlResultFields ); int nrRows = ( pipelineExecutorMeta.getOutputRowsField() != null ? pipelineExecutorMeta.getOutputRowsField().length : 1 ); ColumnInfo[] ciResultFields = new ColumnInfo[] { new ColumnInfo( BaseMessages.getString( PKG, "PipelineExecutorDialog.ColumnInfo.Field" ), ColumnInfo.COLUMN_TYPE_TEXT, false, false ), new ColumnInfo( BaseMessages.getString( PKG, "PipelineExecutorDialog.ColumnInfo.Type" ), ColumnInfo.COLUMN_TYPE_CCOMBO, ValueMetaFactory.getValueMetaNames() ), new ColumnInfo( BaseMessages.getString( PKG, "PipelineExecutorDialog.ColumnInfo.Length" ), ColumnInfo.COLUMN_TYPE_TEXT, false ), new ColumnInfo( BaseMessages.getString( PKG, "PipelineExecutorDialog.ColumnInfo.Precision" ), ColumnInfo.COLUMN_TYPE_TEXT, false ), }; wOutputFields = new TableView( pipelineMeta, wInputComposite, SWT.BORDER | SWT.FULL_SELECTION | SWT.MULTI | SWT.V_SCROLL | SWT.H_SCROLL, ciResultFields, nrRows, false, lsMod, props, false ); FormData fdResultFields = new FormData(); fdResultFields.left = new FormAttachment( 0, 0 ); fdResultFields.top = new FormAttachment( wlOutputFields, 5 ); fdResultFields.right = new FormAttachment( 100, 0 ); fdResultFields.bottom = new FormAttachment( 100, 0 ); wOutputFields.setLayoutData( fdResultFields ); wOutputFields.getTable().addListener( SWT.Resize, new ColumnsResizer( 0, 25, 25, 25, 25 ) ); wInputComposite.pack(); Rectangle bounds = wInputComposite.getBounds(); scrolledComposite.setContent( wInputComposite ); scrolledComposite.setExpandHorizontal( true ); scrolledComposite.setExpandVertical( true ); scrolledComposite.setMinWidth( bounds.width ); scrolledComposite.setMinHeight( bounds.height ); wTab.setControl( scrolledComposite ); wTabFolder.setSelection( wTab ); }