當前位置: 首頁>>代碼示例>>Java>>正文


Java GridLayout類代碼示例

本文整理匯總了Java中org.eclipse.swt.layout.GridLayout的典型用法代碼示例。如果您正苦於以下問題:Java GridLayout類的具體用法?Java GridLayout怎麽用?Java GridLayout使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


GridLayout類屬於org.eclipse.swt.layout包,在下文中一共展示了GridLayout類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: createControl

import org.eclipse.swt.layout.GridLayout; //導入依賴的package包/類
@Override
public void createControl(Composite parent) {
    Composite area = new Composite(parent, SWT.NONE);
    area.setLayout(new GridLayout(2, false));
    area.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));

    new Label(area, SWT.NONE).setText(Messages.PgObject_project_name);
    viewerProject = new ComboViewer(area, SWT.READ_ONLY | SWT.DROP_DOWN);

    new Label(area, SWT.NONE).setText(Messages.PgObject_object_type);
    viewerType = new ComboViewer(area, SWT.READ_ONLY | SWT.DROP_DOWN);

    new Label(area, SWT.NONE).setText(Messages.PgObject_object_name);
    final Text txtName = new Text(area, SWT.BORDER);
    txtName.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
    txtName.addModifyListener(e -> {
        name = txtName.getText();
        getWizard().getContainer().updateButtons();
    });
    fillProjects();
    fillTypes();
    setControl(area);
}
 
開發者ID:pgcodekeeper,項目名稱:pgcodekeeper,代碼行數:24,代碼來源:NewObjectWizard.java

示例2: initialize

import org.eclipse.swt.layout.GridLayout; //導入依賴的package包/類
/**
 * This method initializes this
 * 
 */
private void initialize() {		
	if(display==null)display = Display.getDefault();
	
	composite = new CompositeCheckWidget(tabManager, SWT.NONE);
	
	GridLayout gl = new GridLayout(1,false);
	gl.marginHeight = gl.marginWidth = gl.verticalSpacing = 0;
       composite.setLayout(gl);
       
       createToolBar();
       createXulContainer();
       //toolBar.setMozillaBrowser(mozillaBrowser);
       
       composite.setSize(new org.eclipse.swt.graphics.Point(347,141));
       
	tabManager.add(this, composite, true);
	
       toolBar.setXulWebViewer(this);
}
 
開發者ID:convertigo,項目名稱:convertigo-eclipse,代碼行數:24,代碼來源:XulWebViewerImpl.java

示例3: createDialogArea

import org.eclipse.swt.layout.GridLayout; //導入依賴的package包/類
@Override
protected Control createDialogArea(final Composite parent) {
	final Composite composite = (Composite) super.createDialogArea(parent);

	createMessageArea(composite);
	final Composite inner = new Composite(composite, SWT.NONE);
	inner.setLayoutData(new GridData(GridData.FILL_BOTH));
	final GridLayout layout = new GridLayout();
	layout.numColumns = 2;
	layout.marginHeight = 0;
	layout.marginWidth = 0;
	inner.setLayout(layout);
	createTableViewer(inner);
	createOrderButtons(inner);
	// New, Edit and Remove is allowed only for mutable managers.
	if (manager instanceof MutableWorkingSetManager) {
		createModifyButtons(composite);
	}
	tableViewer.setInput(allWorkingSets);
	applyDialogFont(composite);

	return composite;
}
 
開發者ID:eclipse,項目名稱:n4js,代碼行數:24,代碼來源:WorkingSetConfigurationDialog.java

示例4: createContents

import org.eclipse.swt.layout.GridLayout; //導入依賴的package包/類
@Override
protected Control createContents ( final Composite parent )
{
    final Composite wrapper = new Composite ( parent, SWT.NONE );
    wrapper.setLayout ( new GridLayout ( 1, false ) );

    final Label label = new Label ( wrapper, SWT.NONE );
    label.setText ( "Preferences for Eclipse SCADA Security" );

    final Button testButton = new Button ( wrapper, SWT.NONE );
    testButton.setText ( "Test key selection…" );
    testButton.addSelectionListener ( new SelectionAdapter () {
        @Override
        public void widgetSelected ( final SelectionEvent e )
        {
            openDialog ();
        }
    } );

    return wrapper;
}
 
開發者ID:eclipse,項目名稱:neoscada,代碼行數:22,代碼來源:DefaultPage.java

示例5: createCompositeOutput

import org.eclipse.swt.layout.GridLayout; //導入依賴的package包/類
private void createCompositeOutput() {
	GridLayout gridLayout = new GridLayout();
	gridLayout.horizontalSpacing = 0;
	gridLayout.marginHeight = 0;
	gridLayout.verticalSpacing = 0;
	gridLayout.numColumns = 1;
	gridLayout.marginWidth = 0;
	GridData gridData = new org.eclipse.swt.layout.GridData();
	gridData.horizontalAlignment = org.eclipse.swt.layout.GridData.FILL;
	gridData.grabExcessHorizontalSpace = true;
	gridData.grabExcessVerticalSpace = true;
	gridData.verticalAlignment = org.eclipse.swt.layout.GridData.FILL;
	compositeOutput = new Composite(tabFolderOutputDesign, SWT.NONE);
	compositeOutput.setLayout(gridLayout);
	createCompositeOutputHeader();
	createSashForm();
	createComposite();
}
 
開發者ID:convertigo,項目名稱:convertigo-eclipse,代碼行數:19,代碼來源:ConnectorEditorPart.java

示例6: createControl

import org.eclipse.swt.layout.GridLayout; //導入依賴的package包/類
public void createControl(Composite parent) {
	Composite fileSelectionArea = new Composite(parent, SWT.NONE);
	GridData fileSelectionData = new GridData(GridData.GRAB_HORIZONTAL
			| GridData.FILL_HORIZONTAL);
	fileSelectionArea.setLayoutData(fileSelectionData);

	GridLayout fileSelectionLayout = new GridLayout();
	fileSelectionLayout.numColumns = 3;
	fileSelectionLayout.makeColumnsEqualWidth = false;
	fileSelectionLayout.marginWidth = 0;
	fileSelectionLayout.marginHeight = 0;
	fileSelectionArea.setLayout(fileSelectionLayout);
	
	editor = new ProjectFileFieldEditor("fileSelect","Select File: ",fileSelectionArea);
	editor.getTextControl(fileSelectionArea).addModifyListener(new ModifyListener(){
		public void modifyText(ModifyEvent e) {
			IPath path = new Path(ImportWizardPage.this.editor.getStringValue());
			filePath = path.toString();
			updateStatus();
		}
	});
	fileSelectionArea.moveAbove(null);
	updateStatus();
	setControl(fileSelectionArea);		
}
 
開發者ID:convertigo,項目名稱:convertigo-eclipse,代碼行數:26,代碼來源:ImportWizardPage.java

示例7: OperationComposite

import org.eclipse.swt.layout.GridLayout; //導入依賴的package包/類
/**
 * Create the composite.
 * 
 * @param parent
 * @param style
 */
public OperationComposite(FilterExpressionOperationDialog dialog, Composite parent, int style) {
	super(parent, style);
	this.dialog = dialog;
	this.operationDataStructure = dialog.getDataStructure().getOperationClassData();

	setLayout(new GridLayout(1, false));
	setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));

	Composite middleComposite = new Composite(this, SWT.BORDER);
	middleComposite.setLayout(new GridLayout(2, false));
	middleComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));

	inputFieldComposite = new InputFieldsComposite(middleComposite, dialog,SWT.NONE,
			operationDataStructure.getInputFields());
	GridData gd_composite2 = new GridData(SWT.FILL, SWT.FILL, false, true, 1, 1);
	gd_composite2.widthHint = 170;
	inputFieldComposite.setLayoutData(gd_composite2);

	createOtherFieldComposite(middleComposite);

	createExternalComposite();

	refresh();
}
 
開發者ID:capitalone,項目名稱:Hydrograph,代碼行數:31,代碼來源:OperationComposite.java

示例8: createSelectionComposite

import org.eclipse.swt.layout.GridLayout; //導入依賴的package包/類
private void createSelectionComposite(final Composite parent) {
    final Composite pane = new Composite(parent, SWT.NONE);
    final GridData gridData = new GridData(SWT.FILL, SWT.FILL, true, true);
    gridData.horizontalAlignment = SWT.FILL;
    gridData.widthHint = 200;
    pane.setLayoutData(gridData);

    final GridLayout gridLayout = new GridLayout();
    gridLayout.marginHeight = 0;
    gridLayout.marginWidth = 0;
    gridLayout.numColumns = 1;
    pane.setLayout(gridLayout);

    final Label label = new Label(pane, SWT.NONE);
    label.setText(selectedValuesMessage);
    final GridData labelGridData = new GridData();
    labelGridData.verticalAlignment = SWT.FILL;
    labelGridData.horizontalAlignment = SWT.FILL;
    label.setLayoutData(labelGridData);

    selectedElementsTableViewer = createTableViewer(pane);
    selectedElementsTableViewer.setInput(this.selectedElements);
}
 
開發者ID:polarsys,項目名稱:time4sys,代碼行數:24,代碼來源:ShowHideWizardPage.java

示例9: createButtonBar

import org.eclipse.swt.layout.GridLayout; //導入依賴的package包/類
@Override
protected Control createButtonBar(Composite parent) {
    final Composite buttonBar = new Composite(parent, SWT.NONE);
    buttonBar.setBackground(backColor);
    		
    final GridLayout layout = new GridLayout();
    layout.marginLeft = 10;
    layout.numColumns = 2;
    layout.makeColumnsEqualWidth = false;
    layout.horizontalSpacing = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING);
    buttonBar.setLayout(layout);

    final GridData data = new GridData(SWT.FILL, SWT.CENTER, true, false);
    data.grabExcessHorizontalSpace = true;
    data.grabExcessVerticalSpace = false;
    buttonBar.setLayoutData(data);

    buttonBar.setFont(parent.getFont());

    // add the dialog's button bar to the right
    buttonControl = super.createButtonBar(buttonBar);
    buttonControl.setBackground(backColor);
    buttonControl.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, true, false));

    return buttonBar;
}
 
開發者ID:gluonhq,項目名稱:ide-plugins,代碼行數:27,代碼來源:PluginDialog.java

示例10: createSaveJobPromtGroup

import org.eclipse.swt.layout.GridLayout; //導入依賴的package包/類
/**
 * @param selection
 */
private void createSaveJobPromtGroup(String selection) {
	HydroGroup hydroGroup = new HydroGroup(this, SWT.NONE);
	hydroGroup.setHydroGroupText(Messages.SAVE_JOBS_BEFORE_LAUNCHING_MESSAGE);
	hydroGroup.setLayout(new GridLayout(1, false));
	hydroGroup.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false, 1, 1));
	hydroGroup.getHydroGroupClientArea().setLayout(new GridLayout(2, false));
	hydroGroup.getHydroGroupClientArea().setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));

	btnRadioButtonAlways = new Button(hydroGroup.getHydroGroupClientArea(), SWT.RADIO);
	btnRadioButtonAlways.setText(StringUtils.capitalize((MessageDialogWithToggle.ALWAYS)));

	btnRadioButtonPrompt = new Button(hydroGroup.getHydroGroupClientArea(), SWT.RADIO);
	btnRadioButtonPrompt.setText(StringUtils.capitalize(MessageDialogWithToggle.PROMPT));

	if (StringUtils.equals(selection, MessageDialogWithToggle.ALWAYS)) {
		btnRadioButtonAlways.setSelection(true);
	} else {
		btnRadioButtonPrompt.setSelection(true);
	}
}
 
開發者ID:capitalone,項目名稱:Hydrograph,代碼行數:24,代碼來源:JobRunPreferenceComposite.java

示例11: createShell

import org.eclipse.swt.layout.GridLayout; //導入依賴的package包/類
@Override
protected Shell createShell(Display display) throws Exception {

	this.viewer = new ScannableViewer();

	Shell shell = new Shell(display);
	shell.setText("Monitors");
	shell.setLayout(new GridLayout(1, false));
       viewer.createPartControl(shell);

	shell.pack();
	shell.setSize(500, 500);
	shell.open();

	return shell;
}
 
開發者ID:eclipse,項目名稱:scanning,代碼行數:17,代碼來源:ScannableViewerTest.java

示例12: createPropertiesGroup

import org.eclipse.swt.layout.GridLayout; //導入依賴的package包/類
/**
 * @generated
 */
protected Composite createPropertiesGroup(FormToolkit widgetFactory, final Composite parent) {
	Section propertiesSection = widgetFactory.createSection(parent, Section.TITLE_BAR | Section.TWISTIE | Section.EXPANDED);
	propertiesSection.setText(AnalysisMessages.EventModelPropertiesEditionPart_PropertiesGroupLabel);
	GridData propertiesSectionData = new GridData(GridData.FILL_HORIZONTAL);
	propertiesSectionData.horizontalSpan = 3;
	propertiesSection.setLayoutData(propertiesSectionData);
	Composite propertiesGroup = widgetFactory.createComposite(propertiesSection);
	GridLayout propertiesGroupLayout = new GridLayout();
	propertiesGroupLayout.numColumns = 3;
	propertiesGroup.setLayout(propertiesGroupLayout);
	propertiesSection.setClient(propertiesGroup);
	return propertiesGroup;
}
 
開發者ID:polarsys,項目名稱:time4sys,代碼行數:17,代碼來源:EventModelPropertiesEditionPartForm.java

示例13: createFigure

import org.eclipse.swt.layout.GridLayout; //導入依賴的package包/類
/**
 * {@inheritDoc}
 * 
 * @see org.eclipse.emf.eef.runtime.api.parts.IFormPropertiesEditionPart#
 *  createFigure(org.eclipse.swt.widgets.Composite, org.eclipse.ui.forms.widgets.FormToolkit)
 * @generated
 */
public Composite createFigure(final Composite parent, final FormToolkit widgetFactory) {
	ScrolledForm scrolledForm = widgetFactory.createScrolledForm(parent);
	Form form = scrolledForm.getForm();
	view = form.getBody();
	GridLayout layout = new GridLayout();
	layout.numColumns = 3;
	view.setLayout(layout);
	createControls(widgetFactory, view);
	return scrolledForm;
}
 
開發者ID:polarsys,項目名稱:time4sys,代碼行數:18,代碼來源:SchedulerParameterValuePropertiesEditionPartForm.java

示例14: addChild

import org.eclipse.swt.layout.GridLayout; //導入依賴的package包/類
void addChild ( final BreadcrumbItem item )
{
    this.items.add ( item );

    if ( this.horizontal )
    {
        ( (GridLayout)this.composite.getLayout () ).numColumns = this.items.size ();
    }
    this.composite.layout ();
}
 
開發者ID:eclipse,項目名稱:neoscada,代碼行數:11,代碼來源:BreadcrumbBar.java

示例15: createDestinationGroup

import org.eclipse.swt.layout.GridLayout; //導入依賴的package包/類
/**
 * Create the export destination specification widgets
 */
protected void createDestinationGroup(Composite parent) {
	Font font = parent.getFont();
	// destination specification group
	Composite destinationSelectionGroup = new Composite(parent, SWT.NONE);
	GridLayout layout = new GridLayout();
	layout.numColumns = 3;
	destinationSelectionGroup.setLayout(layout);
	destinationSelectionGroup.setLayoutData(new GridData(
			GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_FILL));
	destinationSelectionGroup.setFont(font);

	Label destinationLabel = new Label(destinationSelectionGroup, SWT.NONE);
	destinationLabel.setText(getTargetLabel());
	destinationLabel.setFont(font);

	// destination name entry field
	destinationNameField = new Combo(destinationSelectionGroup, SWT.SINGLE
			| SWT.BORDER);
	destinationNameField.addListener(SWT.Modify, this);
	destinationNameField.addListener(SWT.Selection, this);
	GridData data = new GridData(GridData.HORIZONTAL_ALIGN_FILL
			| GridData.GRAB_HORIZONTAL);
	data.widthHint = SIZING_TEXT_FIELD_WIDTH;
	destinationNameField.setLayoutData(data);
	destinationNameField.setFont(font);

	// destination browse button
	destinationBrowseButton = new Button(destinationSelectionGroup,
			SWT.PUSH);
	destinationBrowseButton.setText(N4ExportMessages.DataTransfer_browse);
	destinationBrowseButton.addListener(SWT.Selection, this);
	destinationBrowseButton.setFont(font);
	setButtonLayoutData(destinationBrowseButton);

	// new Label(parent, SWT.NONE); // vertical spacer
}
 
開發者ID:eclipse,項目名稱:n4js,代碼行數:40,代碼來源:AbstractExportToSingleFileWizardPage.java


注:本文中的org.eclipse.swt.layout.GridLayout類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。