Java Code Examples for org.eclipse.swt.layout.GridData#HORIZONTAL_ALIGN_BEGINNING

The following examples show how to use org.eclipse.swt.layout.GridData#HORIZONTAL_ALIGN_BEGINNING . 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: OptionsConfigurationBlock.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 6 votes vote down vote up
protected Combo addInversedComboBox(Composite parent, String label, Key key, String[] values, String[] valueLabels, int indent) {
	GridData gd= new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
	gd.horizontalIndent= indent;
	gd.horizontalSpan= 3;

	Composite composite= new Composite(parent, SWT.NONE);
	GridLayout layout= new GridLayout();
	layout.marginHeight= 0;
	layout.marginWidth= 0;
	layout.numColumns= 2;
	composite.setLayout(layout);
	composite.setLayoutData(gd);

	Combo comboBox= newComboControl(composite, key, values, valueLabels);
	comboBox.setFont(JFaceResources.getDialogFont());
	comboBox.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL));

	Label labelControl= new Label(composite, SWT.LEFT | SWT.WRAP);
	labelControl.setText(label);
	labelControl.setLayoutData(new GridData());

	fLabels.put(comboBox, labelControl);
	return comboBox;
}
 
Example 2
Source File: MarkerIconDialog.java    From birt with Eclipse Public License 1.0 6 votes vote down vote up
/**
 * List Area locates in the left middle of the dialog.
 * 
 * @param parent
 *            dialog composite
 */
private void createListArea( Composite parent )
{
	Composite listArea = new Composite( parent, SWT.NONE );
	GridData gd = new GridData( GridData.FILL_BOTH
			| GridData.HORIZONTAL_ALIGN_BEGINNING );
	gd.widthHint = 300;
	gd.heightHint = 260;
	listArea.setLayoutData( gd );
	listArea.setLayout( new GridLayout( ) );

	GridLayout gl = new GridLayout( );
	gl.marginWidth = 0;
	gl.marginHeight = 0;

	// Input Area is various depending on the selection (URI or Local).
	inputArea = new Composite( listArea, SWT.NONE );
	GridData gdInputArea = new GridData( GridData.FILL_BOTH
			| GridData.HORIZONTAL_ALIGN_BEGINNING );
	inputArea.setLayoutData( gdInputArea );
	inputArea.setLayout( gl );
}
 
Example 3
Source File: AbstractPydevPrefs.java    From Pydev with Eclipse Public License 1.0 5 votes vote down vote up
protected Label addLabel(Composite parent, String label, int indentation) {
    Label labelWidget = new Label(parent, SWT.None);
    labelWidget.setText(label);

    GridData gd = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
    gd.horizontalIndent = indentation;
    gd.horizontalSpan = 2;
    labelWidget.setLayoutData(gd);

    return labelWidget;
}
 
Example 4
Source File: SWTFactory.java    From xds-ide with Eclipse Public License 1.0 5 votes vote down vote up
public static ColorSelector createColorSelector(Composite composite, int hspan) {
  	ColorSelector cs = new ColorSelector(composite);
GridData gd = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
gd.horizontalSpan = hspan;
cs.getButton().setLayoutData(gd);
return cs;
  }
 
Example 5
Source File: AbstractPydevPrefs.java    From Pydev with Eclipse Public License 1.0 5 votes vote down vote up
protected Button addCheckBox(Composite parent, String label, String key, int indentation) {
    Button checkBox = new Button(parent, SWT.CHECK);
    checkBox.setText(label);

    GridData gd = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
    gd.horizontalIndent = indentation;
    gd.horizontalSpan = 2;
    checkBox.setLayoutData(gd);
    checkBox.addSelectionListener(fCheckBoxListener);

    fCheckBoxes.put(checkBox, key);

    return checkBox;
}
 
Example 6
Source File: ExpressionSection.java    From birt with Eclipse Public License 1.0 5 votes vote down vote up
protected Label getLabelControl( Composite parent )
{
	Label label = super.getLabelControl( parent );
	if ( multi )
	{
		GridData gd = new GridData( GridData.HORIZONTAL_ALIGN_BEGINNING
				| GridData.VERTICAL_ALIGN_BEGINNING );
		gd.horizontalSpan = 2;
		label.setLayoutData( gd );
	}
	return label;
}
 
Example 7
Source File: OptionsConfigurationBlock.java    From birt with Eclipse Public License 1.0 5 votes vote down vote up
protected Combo addInversedComboBox( Composite parent, String label,
		Key key, String[] values, String[] valueLabels, int indent )
{
	GridData gd = new GridData( GridData.HORIZONTAL_ALIGN_BEGINNING );
	gd.horizontalIndent = indent;
	gd.horizontalSpan = 3;

	Composite composite = new Composite( parent, SWT.NONE );
	GridLayout layout = new GridLayout( );
	layout.marginHeight = 0;
	layout.marginWidth = 0;
	layout.numColumns = 2;
	composite.setLayout( layout );
	composite.setLayoutData( gd );

	Combo comboBox = newComboControl( composite, key, values, valueLabels );
	comboBox.setFont( JFaceResources.getDialogFont( ) );
	comboBox.setLayoutData( new GridData( GridData.HORIZONTAL_ALIGN_FILL ) );

	Label labelControl = new Label( composite, SWT.LEFT | SWT.WRAP );
	labelControl.setText( label );
	labelControl.setLayoutData( new GridData( ) );

	fLabels.put( comboBox, labelControl );

	updateCombo( comboBox );

	return comboBox;
}
 
Example 8
Source File: SQLDataSetEditorPage.java    From birt with Eclipse Public License 1.0 5 votes vote down vote up
/**
 * 
 * @param group
 */
private void setupIncludeSchemaCheckBox( Group group )
{
	GridData layoutData = new GridData( GridData.HORIZONTAL_ALIGN_BEGINNING );
	layoutData.horizontalSpan = 2;
	includeSchemaCheckBox = new Button( group, SWT.CHECK );
	includeSchemaCheckBox.setText( JdbcPlugin.getResourceString( "tablepage.button.includeSchemaInfo" ) ); //$NON-NLS-1$
	includeSchemaCheckBox.setSelection( true );
	includeSchemaCheckBox.setLayoutData( layoutData );
	includeSchemaCheckBox.setEnabled( true );
}
 
Example 9
Source File: SQLDataSetEditorPage.java    From birt with Eclipse Public License 1.0 5 votes vote down vote up
private void setupShowAliasCheckBox(Group group)
{
	GridData layoutData = new GridData( GridData.HORIZONTAL_ALIGN_BEGINNING );
	layoutData.horizontalSpan = 2;
	showAliasCheckBox = new Button( group, SWT.CHECK );
	showAliasCheckBox.setText( JdbcPlugin.getResourceString( "tablepage.button.showAlias" ) ); //$NON-NLS-1$
	showAliasCheckBox.setSelection( true );
	showAliasCheckBox.setLayoutData( layoutData );
	showAliasCheckBox.setEnabled( true );
}
 
Example 10
Source File: SQLDataSetEditorPage.java    From birt with Eclipse Public License 1.0 5 votes vote down vote up
/**
 * 
 * @param group
 */
private void setupShowSystemTableCheckBox( Group group )
{
	GridData layoutData = new GridData( GridData.HORIZONTAL_ALIGN_BEGINNING );
	layoutData.horizontalSpan = 2;
	showSystemTableCheckBox = new Button( group, SWT.CHECK );
	showSystemTableCheckBox.setText( JdbcPlugin.getResourceString( "tablepage.button.showSystemTables" ) ); //$NON-NLS-1$
	showSystemTableCheckBox.setSelection( false );
	showSystemTableCheckBox.setLayoutData( layoutData );
	showSystemTableCheckBox.setEnabled( true );
}
 
Example 11
Source File: ImageDialog.java    From birt with Eclipse Public License 1.0 5 votes vote down vote up
private void createInputArea( Composite parent )
{
	inputArea = new Composite( parent, SWT.NONE );
	GridData gd = new GridData( GridData.FILL_BOTH
			| GridData.HORIZONTAL_ALIGN_BEGINNING );
	gd.widthHint = 300;
	gd.heightHint = 300;
	inputArea.setLayoutData( gd );
	inputArea.setLayout( new GridLayout( ) );
}
 
Example 12
Source File: HeadStyleAttributeComposite.java    From birt with Eclipse Public License 1.0 5 votes vote down vote up
private void placeComponents( )
{
	FillLayout flMain = new FillLayout( );
	flMain.marginHeight = 0;
	flMain.marginWidth = 0;

	GridLayout glContent = new GridLayout( );
	glContent.verticalSpacing = 5;
	glContent.horizontalSpacing = 5;
	glContent.marginHeight = 4;
	glContent.marginWidth = 4;
	glContent.numColumns = 6;

	this.setLayout( flMain );

	cmpContent = new Composite( this, SWT.NONE );
	cmpContent.setLayout( glContent );

	lblHeadStyle = new Label( cmpContent, SWT.NONE );
	GridData gdLHeadStyle = new GridData( GridData.HORIZONTAL_ALIGN_BEGINNING );
	lblHeadStyle.setLayoutData( gdLHeadStyle );
	lblHeadStyle.setText( Messages.getString( "HeadStyleAttributeComposite.Lbl.HeadStyle" ) ); //$NON-NLS-1$

	cmbHeadStyle = context.getUIFactory( ).createHeadStyleChooserComposite( cmpContent,
			SWT.DROP_DOWN | SWT.READ_ONLY,
			laCurrent.getValue( ),
			eParent,
			sProperty );
	GridData gdCBHeadStyle = new GridData( GridData.FILL_HORIZONTAL );
	gdCBHeadStyle.horizontalSpan = 5;
	cmbHeadStyle.setLayoutData( gdCBHeadStyle );
	cmbHeadStyle.addListener( HeadStyleChooserComposite.SELECTION_EVENT,
			this );
}
 
Example 13
Source File: WizardUtils.java    From XPagesExtensionLibrary with Apache License 2.0 5 votes vote down vote up
public static Button createRadio(Composite parent, String text, int span, SelectionListener listener) {
    Button btn = new Button(parent, SWT.RADIO);
    btn.setText(" " + text);
    GridData gridData = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
    gridData.horizontalSpan = span;
    btn.setLayoutData(gridData);
    if (listener != null) {
        btn.addSelectionListener(listener);            
    }                
    return btn;
}
 
Example 14
Source File: WizardUtils.java    From XPagesExtensionLibrary with Apache License 2.0 5 votes vote down vote up
public static Button createCheckBox(Composite parent, String text, int span, boolean select) {
    Button btn = new Button(parent, SWT.CHECK);
    btn.setText(" " + text);
    GridData gridData = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
    gridData.horizontalSpan = span;
    btn.setLayoutData(gridData);
    btn.setSelection(select);
    
    return btn;
}
 
Example 15
Source File: MarkOccurrencesConfigurationBlock.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 5 votes vote down vote up
private Button addCheckBox(Composite parent, String label, String key, int indentation) {
	Button checkBox= new Button(parent, SWT.CHECK);
	checkBox.setText(label);

	GridData gd= new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
	gd.horizontalIndent= indentation;
	gd.horizontalSpan= 2;
	checkBox.setLayoutData(gd);
	checkBox.addSelectionListener(fCheckBoxListener);

	fCheckBoxes.put(checkBox, key);

	return checkBox;
}
 
Example 16
Source File: JavaEditorHoverConfigurationBlock.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 5 votes vote down vote up
private Button addCheckBox(Composite parent, String label, String key, int indentation) {
	Button checkBox= new Button(parent, SWT.CHECK);
	checkBox.setText(label);

	GridData gd= new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
	gd.horizontalIndent= indentation;
	gd.horizontalSpan= 2;
	checkBox.setLayoutData(gd);
	checkBox.addSelectionListener(fCheckBoxListener);

	fCheckBoxes.put(checkBox, key);

	return checkBox;
}
 
Example 17
Source File: AbstractConfigurationBlock.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 5 votes vote down vote up
protected Button addCheckBox(Composite parent, String label, String key, int indentation) {
	Button checkBox= new Button(parent, SWT.CHECK);
	checkBox.setText(label);

	GridData gd= new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
	gd.horizontalIndent= indentation;
	gd.horizontalSpan= 2;
	checkBox.setLayoutData(gd);
	checkBox.addSelectionListener(fCheckBoxListener);
	makeScrollableCompositeAware(checkBox);

	fCheckBoxes.put(checkBox, key);

	return checkBox;
}
 
Example 18
Source File: JavaEditorAppearanceConfigurationBlock.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 5 votes vote down vote up
private Button addButton(Composite parent, int style, String label, int indentation, SelectionListener listener) {
	Button button= new Button(parent, style);
	button.setText(label);

	GridData gd= new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
	gd.horizontalIndent= indentation;
	gd.horizontalSpan= 2;
	button.setLayoutData(gd);
	button.addSelectionListener(listener);
	makeScrollableCompositeAware(button);

	return button;
}
 
Example 19
Source File: DefaultJavaFoldingPreferenceBlock.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 5 votes vote down vote up
private Button addCheckBox(Composite parent, String label, String key, int indentation) {
	Button checkBox= new Button(parent, SWT.CHECK);
	checkBox.setText(label);

	GridData gd= new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
	gd.horizontalIndent= indentation;
	gd.horizontalSpan= 1;
	gd.grabExcessVerticalSpace= false;
	checkBox.setLayoutData(gd);
	checkBox.addSelectionListener(fCheckBoxListener);

	fCheckBoxes.put(checkBox, key);

	return checkBox;
}
 
Example 20
Source File: PyDevCodeFoldingPrefPage.java    From Pydev with Eclipse Public License 1.0 5 votes vote down vote up
protected Button addCheckBox(Composite parent, String label, String key, int indentation) {
    Button checkBox = new Button(parent, SWT.CHECK);
    checkBox.setText(label);

    GridData gd = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
    gd.horizontalIndent = indentation;
    gd.horizontalSpan = 2;
    checkBox.setLayoutData(gd);
    checkBox.addSelectionListener(fCheckBoxListener);

    fCheckBoxes.put(checkBox, key);

    return checkBox;
}