Java Code Examples for org.eclipse.swt.widgets.Label.setText()

The following are Jave code examples for showing how to use setText() of the org.eclipse.swt.widgets.Label class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
+ Save this method
Example 1
Project: convertigo-eclipse   File: SqlQueryEditorComposite.java   View Source Code Vote up 6 votes
private void initialize() {
	labelSyntaxe = new Label(this, SWT.NONE);
	
	labelSyntaxe.setText("SQL query syntax examples :\n");
	labelSyntaxe.setLayoutData(new GridData(SWT.FILL,SWT.CENTER,true,false));
	labelSQLQuery = new Label(this, SWT.NONE);
	labelSQLQuery.setFont(new Font(null,"Tahoma",8,1));
	labelSQLQuery.setText("SELECT * FROM EMPLOYEES WHERE (NAME='{parameter_name}')\n"
							+ "{? = CALL STORED_FUNCTION({parameter_name})}\n"
							+ "{CALL STORED_PROCEDURE({parameter_name})}\n\n");
	labelSQLQuery.setLayoutData(new GridData(SWT.FILL,SWT.CENTER,true,false));
	textAreaSQLQuery = new Text(this, SWT.MULTI | SWT.WRAP | SWT.V_SCROLL);
	textAreaSQLQuery.setFont(new Font(null,"Tahoma",10,0));
	textAreaSQLQuery.setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,true));
	GridLayout gridLayout = new GridLayout();
	this.setLayout(gridLayout);
	setSize(new org.eclipse.swt.graphics.Point(402,289));
}
 
Example 2
Project: neoscada   File: DescriptorLabel.java   View Source Code Vote up 6 votes
public DescriptorLabel ( final Composite parent, final int style, final String text, final DataItemDescriptor descriptor )
{
    super ( parent, SWT.NONE );

    setLayout ( new FillLayout () );
    Label label = new Label ( this, style );

    if ( text != null )
    {
        label.setText ( text );
    }

    // TODO: make properties
    if ( SessionManager.getDefault ().hasRole ( "developer" ) ) //$NON-NLS-1$
    {
        label.setToolTipText ( String.format ( "%s", descriptor ) ); //$NON-NLS-1$
    }

}
 
Example 3
Project: gw4e.project   File: GW4ELaunchConfigurationTab.java   View Source Code Vote up 6 votes
/**
 * Create the element that allow to select a project See the GraphWalker
 * offline command for more information
 */
private void createProjectSection(Composite parent) {
	fProjLabel = new Label(parent, SWT.NONE);
	fProjLabel.setText(MessageUtil.getString("label_project"));
	GridData gd = new GridData();
	gd.horizontalIndent = 25;
	fProjLabel.setLayoutData(gd);

	fProjText = new Text(parent, SWT.SINGLE | SWT.BORDER);
	fProjText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
	fProjText.addModifyListener(new ModifyListener() {
		@Override
		public void modifyText(ModifyEvent evt) {
			validatePage();
			updateConfigState();

		}
	});
	fProjText.setData(GW4E_LAUNCH_CONFIGURATION_CONTROL_ID, GW4E_LAUNCH_CONFIGURATION_TEXT_ID_PROJECT);

}
 
Example 4
Project: scanning   File: AxesCellEditor.java   View Source Code Vote up 5 votes
private CCombo createLabelledCombo(Composite content, String slabel) {

		Label label = new Label(content, SWT.NONE);
		label.setBackground(content.getDisplay().getSystemColor(SWT.COLOR_WHITE));
		label.setText("    "+slabel+" ");
		label.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, true));

		CCombo ret = new CCombo(content, SWT.READ_ONLY|SWT.BORDER);
		ret.setItems(getNames());
		GridData fill = new GridData(SWT.FILL, SWT.CENTER, true, true);
		fill.widthHint=100;
		ret.setLayoutData(fill);

		return ret;
	}
 
Example 5
Project: convertigo-eclipse   File: SchemaObjectsDialogComposite.java   View Source Code Vote up 5 votes
protected void initialize() {
	Label label0 = new Label (this, SWT.NONE);
	label0.setText ("Please choose an element to import into a sequence's step:");
	
	GridData data = new GridData ();
	data.horizontalAlignment = GridData.FILL;
	data.verticalAlignment = GridData.FILL;
	data.grabExcessHorizontalSpace = true;
	data.grabExcessVerticalSpace = true;
	data.heightHint = 200;
	list = new List(this, SWT.BORDER | SWT.V_SCROLL);
	list.setLayoutData (data);

       GridData gridData2 = new GridData();
	gridData2.horizontalSpan = 2;
	gridData2.verticalAlignment = GridData.CENTER;
	gridData2.horizontalAlignment = GridData.FILL;
	labelProgression = new Label(this, SWT.NONE);
	labelProgression.setText("Progression");
	labelProgression.setLayoutData(gridData2);
	
       GridData gridData4 = new GridData();
	gridData4.horizontalSpan = 2;
	gridData4.verticalAlignment = GridData.CENTER;
	gridData4.horizontalAlignment = GridData.FILL;
       progressBar = new ProgressBar(this, SWT.NONE);
       //progressBar.setBounds(new Rectangle(16, 349, 571, 17));
       progressBar.setLayoutData(gridData4);
       
	GridLayout gridLayout = new GridLayout();
	setLayout(gridLayout);
	setSize(new Point(408, 251));
}
 
Example 6
Project: convertigo-eclipse   File: NewProjectWizardComposite5.java   View Source Code Vote up 5 votes
/**
 * This method initializes this
 * 
 */
private void initialize() {
       GridData gridData11 = new org.eclipse.swt.layout.GridData();
       gridData11.horizontalAlignment = org.eclipse.swt.layout.GridData.FILL;
       gridData11.verticalAlignment = org.eclipse.swt.layout.GridData.CENTER;
       GridData gridData2 = new org.eclipse.swt.layout.GridData();
       gridData2.horizontalSpan = 2;
       label1 = new Label(this, SWT.NONE);
       label1.setText("The chosen project template includes a CICS type connector. \n\nThis connector needs a CICS Transaction Gateway (CTG) name, server address and server port.\n\nPlease provide this information here\n\n");
       label1.setLayoutData(gridData2);
       GridData gridData1 = new org.eclipse.swt.layout.GridData();
       gridData1.grabExcessHorizontalSpace = true;
       gridData1.verticalAlignment = org.eclipse.swt.layout.GridData.CENTER;
       gridData1.horizontalAlignment = org.eclipse.swt.layout.GridData.FILL;
       GridData gridData = new org.eclipse.swt.layout.GridData();
       gridData.grabExcessHorizontalSpace = false;
       gridData.horizontalAlignment = org.eclipse.swt.layout.GridData.BEGINNING;
       gridData.verticalAlignment = org.eclipse.swt.layout.GridData.CENTER;
       gridData.grabExcessVerticalSpace = false;
       label = new Label(this, SWT.NONE);
       label.setText("CTG Configuration name");
       label.setLayoutData(gridData);
       ctgName = new Text(this, SWT.BORDER);
       ctgName.setLayoutData(gridData1);
       label2 = new Label(this, SWT.NONE);
       label2.setText("CTG Sever address");
       ctgServer = new Text(this, SWT.BORDER);
       ctgServer.setLayoutData(gridData11);
       label5 = new Label(this, SWT.NONE);
       label5.setText("CTG Server port");
       ctgPort = new Text(this, SWT.BORDER);
       ctgName.addModifyListener(modifyListener);
       ctgPort.addModifyListener(modifyListener);
       ctgServer.addModifyListener(modifyListener);
       GridLayout gridLayout = new GridLayout();
       gridLayout.numColumns = 2;
       this.setLayout(gridLayout);
}
 
Example 7
Project: Equella   File: JPFClasspathContainerPage.java   View Source Code Vote up 5 votes
@SuppressWarnings("restriction")
@Override
public void createControl(Composite parent)
{
	Label label = new Label(parent, SWT.NULL);
	label.setText("JPF Classpath");
	setControl(label);
}
 
Example 8
Project: Hydrograph   File: ELTSWTWidgets.java   View Source Code Vote up 5 votes
public Label labelWidget(Composite parent, int style, int[] bounds,
		String value, Image image) {
	Label label = new Label(parent, style);
	label.setBounds(bounds[0], bounds[1], bounds[2], bounds[3]);
	label.setText(value);
	label.setImage(image);

	return label;
}
 
Example 9
Project: n4js   File: InterfacesComponentProvider.java   View Source Code Vote up 5 votes
/**
 * Creates a new interfaces component inside the parent composite using the given model.
 *
 * @param interfacesContainingModel
 *            A interface containing model
 * @param container
 *            The component container
 */
public InterfacesComponent(InterfacesContainingModel interfacesContainingModel,
		WizardComponentContainer container) {
	super(container);
	this.model = interfacesContainingModel;

	Composite parent = getParentComposite();

	Label interfacesLabel = new Label(parent, SWT.NONE);

	GridData interfacesLabelGridData = fillLabelDefaults();
	interfacesLabelGridData.verticalAlignment = SWT.TOP;
	interfacesLabel.setLayoutData(interfacesLabelGridData);

	interfacesLabel.setText("Interfaces:");

	interfacesTable = new Table(parent, SWT.BORDER | SWT.FULL_SELECTION | SWT.VIRTUAL);
	interfacesTable.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));

	Composite interfacesButtonsComposite = new Composite(parent, SWT.NONE);
	interfacesButtonsComposite.setLayoutData(GridDataFactory.fillDefaults().create());

	interfacesButtonsComposite.setLayout(GridLayoutFactory.swtDefaults().numColumns(1).margins(0, 0).create());

	interfacesAddButton = new Button(interfacesButtonsComposite, SWT.NONE);
	interfacesAddButton.setText("Add...");
	interfacesAddButton.setLayoutData(GridDataFactory.fillDefaults().grab(true, false).create());

	interfacesRemoveButton = new Button(interfacesButtonsComposite, SWT.NONE);
	interfacesRemoveButton.setText("Remove");
	interfacesRemoveButton.setLayoutData(GridDataFactory.fillDefaults().grab(true, false).create());

	setupBindings();
}
 
Example 10
Project: convertigo-eclipse   File: NewProjectWizardComposite3.java   View Source Code Vote up 5 votes
/**
 * This method initializes this
 * 
 */
private void initialize() {
       GridData gridData2 = new org.eclipse.swt.layout.GridData();
       gridData2.horizontalSpan = 2;
       label1 = new Label(this, SWT.NONE);
       label1.setText("The chosen project template includes a ''screen type'' connector. \n\nThis connector needs a destination address as an hostname (or IP adress) and optionally a port.\n ");
       label1.setLayoutData(gridData2);
       GridData gridData1 = new org.eclipse.swt.layout.GridData();
       gridData1.grabExcessHorizontalSpace = true;
       gridData1.verticalAlignment = org.eclipse.swt.layout.GridData.CENTER;
       gridData1.horizontalAlignment = org.eclipse.swt.layout.GridData.FILL;
       GridData gridData = new org.eclipse.swt.layout.GridData();
       gridData.grabExcessHorizontalSpace = false;
       gridData.horizontalAlignment = org.eclipse.swt.layout.GridData.BEGINNING;
       gridData.verticalAlignment = org.eclipse.swt.layout.GridData.CENTER;
       gridData.grabExcessVerticalSpace = false;
       label = new Label(this, SWT.NONE);
       label.setText("Server address");
       label.setLayoutData(gridData);
       server = new Text(this, SWT.BORDER);
       server.setLayoutData(gridData1);
       label5 = new Label(this, SWT.NONE);
       label5.setText("Port");
       port = new Text(this, SWT.BORDER);
       server.addModifyListener(modifyListener);
       port.addModifyListener(modifyListener);
       GridLayout gridLayout = new GridLayout();
       gridLayout.numColumns = 2;
       this.setLayout(gridLayout);
}
 
Example 11
Project: gw4e.project   File: GraphModelPropertyPage.java   View Source Code Vote up 5 votes
/**
 * Label creation helper method
 * @param parent
 * @param text
 * @return
 */
protected Label createLabel(Composite parent, String text) {
	Label label = new Label(parent, SWT.LEFT);
	label.setText(text);
	GridData data = new GridData();
	data.horizontalAlignment = GridData.FILL;
	label.setLayoutData(data);
	return label;
}
 
Example 12
Project: OCCI-Studio   File: NewConfigurationWizard.java   View Source Code Vote up 5 votes
@Override
protected WizardNewFileCreationPage createNewFilePage() {
	return new NewFilePage(getSelection(), fileExt) {
		@Override
		public void createControl(Composite parent) {
			super.createControl(parent);
			Composite control = (Composite) getControl();

			Composite extensionGroup = new Composite(control, SWT.NONE);
			GridLayout layout = new GridLayout();
			layout.numColumns = 2;
			extensionGroup.setLayout(layout);
			extensionGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));

			Label refOccieLabel = new Label(extensionGroup, SWT.NONE);
			refOccieLabel.setLayoutData(new GridData(SWT.LEFT, SWT.TOP, true, true));
			refOccieLabel.setText(Messages.NewExtensionWizard_RefExtensionLabel);
			refOccieLabel.setFont(parent.getFont());

			Composite composite = new Composite(extensionGroup, SWT.NULL);
			GridData layoutData = new GridData(SWT.FILL, SWT.FILL, true, true);
			composite.setLayoutData(layoutData);
			TableColumnLayout tableLayout = new TableColumnLayout();
			composite.setLayout(tableLayout);

			Table table = new Table(composite,
					SWT.CHECK | SWT.MULTI | SWT.BORDER | SWT.FULL_SELECTION | SWT.H_SCROLL | SWT.V_SCROLL);
			refExtensionViewer = new CheckboxTableViewer(table);

			refExtensionViewer.setContentProvider(ArrayContentProvider.getInstance());

			Collection<String> registeredExtensions = new ArrayList<String>(
					OcciRegistry.getInstance().getRegisteredExtensions());
			refExtensionViewer.setInput(registeredExtensions);
		}
	};
}
 
Example 13
Project: neoscada   File: DateTimeDialog.java   View Source Code Vote up 5 votes
@Override
protected Control createDialogArea ( final Composite parent )
{
    getShell ().setText ( "Time and date" );

    final Composite base = (Composite)super.createDialogArea ( parent );

    final Composite wrapper = new Composite ( base, SWT.NONE );
    wrapper.setLayout ( new GridLayout ( 2, false ) );
    wrapper.setLayoutData ( new GridData ( GridData.FILL_BOTH ) );

    final Label label = new Label ( wrapper, SWT.NONE );
    label.setText ( "Input:" );

    this.input = new Text ( wrapper, SWT.BORDER );

    this.input.addModifyListener ( new ModifyListener () {

        @Override
        public void modifyText ( final ModifyEvent e )
        {
            update ();
        }
    } );
    this.input.setLayoutData ( new GridData ( SWT.FILL, SWT.CENTER, true, false ) );

    this.resultControl = new Label ( wrapper, SWT.NONE );
    this.resultControl.setLayoutData ( new GridData ( SWT.FILL, SWT.CENTER, true, false, 2, 1 ) );

    if ( this.time != null )
    {
        this.input.setText ( String.format ( "%1$tY-%1$tm-%1$td %1$tH:%1$tM:%1$tS.%1$tL", this.time ) );
    }

    return base;
}
 
Example 14
Project: convertigo-eclipse   File: InteractiveSplashHandler.java   View Source Code Vote up 5 votes
/**
 * 
 */
private void createUILabelPassword() {
	// Create the label
	Label label = new Label(fCompositeLogin, SWT.NONE);
	label.setText("&Password:"); //NON-NLS-1
	// Configure layout data
	GridData data = new GridData();
	data.horizontalIndent = F_LABEL_HORIZONTAL_INDENT;
	label.setLayoutData(data);					
}
 
Example 15
Project: neoscada   File: BreadcrumbItem.java   View Source Code Vote up 4 votes
public BreadcrumbItem ( final BreadcrumbBar parent, final boolean last )
{
    this.horizontal = parent.isHorizontal ();

    this.parent = parent;
    this.wrapper = new Composite ( parent.getComposite (), SWT.NONE );

    parent.addChild ( this );

    final GridLayout layout = new GridLayout ( last ? 1 : 2, false );
    layout.marginHeight = layout.marginWidth = 0;
    layout.horizontalSpacing = layout.verticalSpacing = 0;

    if ( this.horizontal )
    {
        layout.horizontalSpacing = 5;
    }
    else
    {
        layout.verticalSpacing = 5;
    }

    this.wrapper.setLayout ( layout );

    this.item = new CLabel ( this.wrapper, SWT.NONE );
    this.item.setLayoutData ( new GridData ( SWT.CENTER, SWT.CENTER, true, true ) );

    if ( !last )
    {
        final Label label = new Label ( this.wrapper, SWT.NONE );
        if ( this.horizontal )
        {
            label.setText ( Messages.BreadcrumbNavigator_Splitter_Horizontal );
        }
        else
        {
            label.setText ( Messages.BreadcrumbNavigator_Splitter_Vertical );
        }
        label.setLayoutData ( new GridData ( SWT.CENTER, SWT.CENTER, true, true ) );
    }

    if ( this.horizontal )
    {
        this.wrapper.setLayoutData ( new GridData ( SWT.BEGINNING, SWT.CENTER, false, true ) );
    }
    else
    {
        this.wrapper.setLayoutData ( new GridData ( SWT.FILL, SWT.BEGINNING, true, false ) );
    }

    this.item.addMouseListener ( new MouseAdapter () {
        @Override
        public void mouseUp ( final MouseEvent e )
        {
            handleSelected ();
        }
    } );
}
 
Example 16
Project: pgcodekeeper   File: FilterDialog.java   View Source Code Vote up 4 votes
@Override
protected Control createDialogArea(Composite parent) {
    Composite container = new Composite(parent, SWT.NONE);
    container.setLayout(new GridLayout(2, true));
    container.setLayoutData(new GridData(GridData.FILL_BOTH));

    Composite searchComposite = new Composite(container, SWT.NONE);
    GridLayout layout = new GridLayout(2, false);
    layout.marginHeight = 0;
    layout.marginWidth = 0;
    searchComposite.setLayout(layout);
    searchComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false, 2, 1));

    Label txtFilter = new Label(searchComposite, SWT.NONE);
    txtFilter.setText(Messages.CodeFilter_search_by_code);
    txtFilter.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false, 2, 1));

    text = new Text(searchComposite, SWT.BORDER | SWT.SEARCH | SWT.ICON_SEARCH | SWT.ICON_CANCEL);
    text.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
    text.setText(filter.getPattern());

    btnRegEx = new Button(searchComposite, SWT.CHECK);
    btnRegEx.setText(Messages.diffTableViewer_use_regular_expressions);
    btnRegEx.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, false));
    btnRegEx.setSelection(filter.isUseRegex());

    new Label(container, SWT.NONE).setText(Messages.FilterDialog_show_object_types);

    new Label(container, SWT.NONE).setText(Messages.FilterDialog_show_change_types);

    objViewer = CheckboxTableViewer.newCheckList(container, SWT.BORDER);
    objViewer.add(new DbObjType[] {DbObjType.SCHEMA, DbObjType.EXTENSION, DbObjType.TYPE,
            DbObjType.DOMAIN, DbObjType.SEQUENCE, DbObjType.FUNCTION, DbObjType.TABLE,
            DbObjType.VIEW, DbObjType.CONSTRAINT, DbObjType.INDEX, DbObjType.TRIGGER,
            DbObjType.RULE});

    objViewer.setCheckedElements(types.toArray());
    objViewer.getControl().setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));

    chgViewer = CheckboxTableViewer.newCheckList(container, SWT.BORDER);
    chgViewer.getControl().setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
    chgViewer.setContentProvider(ArrayContentProvider.getInstance());
    chgViewer.setLabelProvider(new LabelProvider() {

        @Override
        public String getText(Object element) {
            switch (((DiffSide) element)) {
            case BOTH: return "edit"; //$NON-NLS-1$
            case LEFT: return "project"; //$NON-NLS-1$
            case RIGHT: return "remote"; //$NON-NLS-1$
            default: return null;
            }
        }
    });

    chgViewer.setInput(DiffSide.values());
    chgViewer.setCheckedElements(sides.toArray());

    return searchComposite;
}
 
Example 17
Project: convertigo-eclipse   File: ObjectInfoWizardPage.java   View Source Code Vote up 4 votes
public void createControl(Composite parent) {
	container = new Composite(parent, SWT.NONE);
	GridLayout layout = new GridLayout();
	container.setLayout(layout);
	layout.numColumns = 2;
	layout.verticalSpacing = 9;

	Label label = new Label(container, SWT.NULL);
	label.setText("&Name:");

	beanName = new Text(container, SWT.BORDER | SWT.SINGLE);
	GridData gd = new GridData(GridData.FILL_HORIZONTAL);
	beanName.setLayoutData(gd);
	beanName.addModifyListener(new ModifyListener() {
		public void modifyText(ModifyEvent e) {
			dialogChanged();
		}
	});
	
	if (parentObject instanceof CouchDbConnector || parentObject instanceof FullSyncConnector) {
		couchVariablesComposite = new CouchVariablesComposite(container, SWT.V_SCROLL);
		
		GridData couchVarData = new GridData(GridData.FILL_BOTH);
		couchVarData.horizontalSpan = 2;
		
		couchVariablesComposite.setLayoutData(couchVarData);
		
	} else {
		tree = new Tree(container, SWT.SINGLE | SWT.BORDER);
		tree.setHeaderVisible(false);
		GridData gridData = new GridData(SWT.FILL, SWT.FILL, true, true);
		gridData.verticalSpan = 20;
		gridData.horizontalSpan = 2;
		tree.setLayoutData(gridData);		
		tree.addListener(SWT.Selection, new Listener() {
			public void handleEvent(final Event event) {
				TreeItem item = (TreeItem) event.item;
				treeItemName = item.getText();
				String suffix = getBeanName().endsWith(ScHandlerStatement.EVENT_ENTRY_HANDLER) ? 
						ScHandlerStatement.EVENT_ENTRY_HANDLER:
							getBeanName().endsWith(ScHandlerStatement.EVENT_EXIT_HANDLER) ?
									ScHandlerStatement.EVENT_EXIT_HANDLER : "";
				setBeanName("on"+ treeItemName + suffix);
				dialogChanged();
			}
		});
		tree.setVisible(false);
	}
	
	initialize();
	dialogChanged();
	setControl(container);
}
 
Example 18
Project: convertigo-eclipse   File: PrintDialogArea.java   View Source Code Vote up 4 votes
private void initialize() {	
			
	//table of 3 columns
	GridLayout gridLayout = new GridLayout();
	gridLayout.numColumns = 3;
	setLayout(gridLayout);
	
	//******************line 1**********************/
	//layout
	GridData gridData = new org.eclipse.swt.layout.GridData();
	gridData.horizontalAlignment = org.eclipse.swt.layout.GridData.BEGINNING;
	gridData.grabExcessHorizontalSpace = true;
	gridData.verticalAlignment = org.eclipse.swt.layout.GridData.CENTER;
	gridData.horizontalSpan = 2;
	
	//content
	label = new Label(this, SWT.NONE);
	label.setText("Output type : ");
			
	combo = new Combo(this, SWT.NONE);	
	combo.add("PDF");	
	combo.add("HTML");
	combo.select(0);	
	combo.setLayoutData(gridData);
	
	//******************line 2**********************/
	//content
	Label labelLocation = new Label(this, SWT.NONE);
	labelLocation.setText("Output location :");

	fileLocation = new Text(this, SWT.BORDER);
	
	Button button = new Button(this, SWT.PUSH);
	button.setText("Browse");
	button.addSelectionListener(new SelectionAdapter() {
		public void widgetSelected(SelectionEvent e) {
			DirectoryDialog dialog = new DirectoryDialog(shell, SWT.NULL);
			dialog.setFilterPath(fileLocation.getText());
			String path = dialog.open();
			System.out.println("path: " + path);
			if (path != null) {
				fileLocation.setText(path);

			}
		}

	});

	//******************line 3**********************/
	//layout
	GridData gridData2 = new org.eclipse.swt.layout.GridData();
	gridData2.horizontalSpan = 2;
	gridData2.verticalAlignment = org.eclipse.swt.layout.GridData.CENTER;
	gridData2.horizontalAlignment = org.eclipse.swt.layout.GridData.FILL;
	
	//content
	label3 = new Label(this, SWT.NONE);
	label3.setText("Progression : ");
	
	progressBar = new ProgressBar(this, SWT.NONE);
	progressBar.setLayoutData(gridData2);
	
	//******************line 4**********************/
	//layout
	GridData gridData3 = new org.eclipse.swt.layout.GridData();
	gridData3.horizontalAlignment = org.eclipse.swt.layout.GridData.FILL;
	gridData3.verticalAlignment = org.eclipse.swt.layout.GridData.CENTER;
	gridData3.horizontalSpan = 2;	
	
			
	new Label(this, SWT.NONE).setText("Status : ");
	
	//content
	progressLabel = new Label(this, SWT.NONE);		
	progressLabel.setLayoutData(gridData3);		
	
	
}
 
Example 19
Project: OCCI-Studio   File: NewConnectorWizard.java   View Source Code Vote up 4 votes
@Override
public void createControl(Composite parent) {
	super.createControl(parent);
	Composite control = (Composite) getControl();

	Composite extensionGroup = new Composite(control, SWT.NONE);
	GridLayout layout = new GridLayout();
	layout.numColumns = 2;
	extensionGroup.setLayout(layout);
	extensionGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));

	Label refOccieLabel = new Label(extensionGroup, SWT.NONE);
	refOccieLabel.setLayoutData(new GridData(SWT.LEFT, SWT.TOP, true, true));
	refOccieLabel.setText(Messages.NewConnectorWizard_RefExtensionLabel);
	refOccieLabel.setFont(parent.getFont());

	Composite composite = new Composite(extensionGroup, SWT.NULL);
	GridData layoutData = new GridData(SWT.FILL, SWT.FILL, true, true);
	composite.setLayoutData(layoutData);
	TableColumnLayout tableLayout = new TableColumnLayout();
	composite.setLayout(tableLayout);

	Table table = new Table(composite,
			SWT.CHECK | SWT.SINGLE | SWT.BORDER | SWT.FULL_SELECTION | SWT.H_SCROLL | SWT.V_SCROLL);
	refExtensionViewer = new CheckboxTableViewer(table);

	refExtensionViewer.setContentProvider(ArrayContentProvider.getInstance());

	refExtensionViewer.addSelectionChangedListener(new ISelectionChangedListener() {
		@Override
		public void selectionChanged(SelectionChangedEvent event) {
			setPageComplete(validatePage());
		}
	});

	Collection<String> registeredExtensions = new ArrayList<String>(
			OcciRegistry.getInstance().getRegisteredExtensions());
	// removed the OCCI core extension as it is added by default.
	registeredExtensions.remove(OcciCoreConstants.OCCI_CORE_SCHEME);
	refExtensionViewer.setInput(registeredExtensions);
}
 
Example 20
Project: SWET   File: PopupDialog.java   View Source Code Vote up 3 votes
/**
 * Creates the optional info text area. This method is only called if the
 * <code>hasInfoArea()</code> method returns true. Subclasses typically
 * need not override this method, but may do so.
 * 
 * <p>
 * If this method is overridden, the returned control's layout data must be
 * an instance of <code>GridData</code>. This method must not modify the
 * parent's layout.
 * 
 * 
 * @param parent
 *            The parent composite.
 * @return The control representing the info text area.
 * 
 * @see PopupDialog#hasInfoArea()
 * @see PopupDialog#createTitleControl(Composite)
 */
protected Control createInfoTextArea(Composite parent) {
	// Status label
	infoLabel = new Label(parent, SWT.RIGHT);
	infoLabel.setText(infoText);

	GridDataFactory.fillDefaults().grab(true, false)
			.align(SWT.FILL, SWT.BEGINNING).applyTo(infoLabel);
	Display display = parent.getDisplay();
	infoColor = new Color(display,
			blend(display.getSystemColor(SWT.COLOR_INFO_BACKGROUND).getRGB(),
					display.getSystemColor(SWT.COLOR_INFO_FOREGROUND).getRGB(), 0.56f));
	infoLabel.setForeground(infoColor);
	return infoLabel;
}