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


Java GridData.HORIZONTAL_ALIGN_FILL屬性代碼示例

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


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

示例1: createDialogArea

@Override
protected Control createDialogArea(Composite parent) {
	Composite composite = (Composite) super.createDialogArea(parent);

	try {
		Constructor<? extends Composite> constructor = dialogAreaClass.getConstructor(new Class[] {
				Composite.class, int.class, AbstractDialogCellEditor.class });

		GridData gridData = new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.FILL_BOTH);

		dialogComposite = (AbstractDialogComposite) constructor.newInstance(new Object[] { composite,
				new Integer(SWT.NONE), cellEditor });
		dialogComposite.setLayoutData(gridData);
		dialogComposite.setParentDialog(this);
	} catch (Exception e) {
		ConvertigoPlugin.logException(e, "Unexpected exception");
	}

	
	return composite;
}
 
開發者ID:convertigo,項目名稱:convertigo-eclipse,代碼行數:21,代碼來源:EditorFrameworkDialog.java

示例2: createDialogArea

@Override
protected Control createDialogArea(Composite parent) {
	Composite composite = (Composite) super.createDialogArea(parent);
	
	try {
		GridData gridData = new GridData (GridData.HORIZONTAL_ALIGN_FILL | GridData.FILL_BOTH);
		
		if (xml == null)
			schemaObjectsDialogComposite = new XmlStructureDialogComposite(composite, SWT.NONE, parentObject);
		else
			schemaObjectsDialogComposite = new XmlStructureDialogComposite(composite, SWT.NONE, parentObject, xml);
		
		schemaObjectsDialogComposite.setLayoutData(gridData);
		labelProgression = schemaObjectsDialogComposite.labelProgression;
		progressBar = schemaObjectsDialogComposite.progressBar;
	}
	catch(Exception e) {
		
	}
	
	return composite;
}
 
開發者ID:convertigo,項目名稱:convertigo-eclipse,代碼行數:22,代碼來源:XmlStructureDialog.java

示例3: createDialogArea

@Override
protected Control createDialogArea(Composite parent) {
	Composite composite = (Composite) super.createDialogArea(parent);
	
	try {
		Constructor<? extends Composite> constructor = dialogAreaClass.getConstructor(new Class[] { Composite.class, int.class });

		GridData gridData = new GridData (GridData.HORIZONTAL_ALIGN_FILL | GridData.FILL_BOTH);
		
		dialogComposite = (MyAbstractDialogComposite) constructor.newInstance(new Object[] { composite, new Integer(SWT.NONE) });
		dialogComposite.setLayoutData(gridData);
		dialogComposite.initialize();
		dialogComposite.setParentDialog(this);
	}
	catch(Exception e) {
		ConvertigoPlugin.logException(e, "Unexpected exception");
	}
	
	return composite;
}
 
開發者ID:convertigo,項目名稱:convertigo-eclipse,代碼行數:20,代碼來源:MyAbstractDialog.java

示例4: createDestinationGroup

/**
 * 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,代碼行數:39,代碼來源:AbstractExportToSingleFileWizardPage.java

示例5: createPageControl

/**
 * Creates custom control for user-defined query text.
 */
private Control createPageControl( Composite parent )
{
    Composite composite = new Composite( parent, SWT.NONE );
    composite.setLayout( new GridLayout( 1, false ) );
    GridData gridData = new GridData( GridData.HORIZONTAL_ALIGN_FILL
            | GridData.VERTICAL_ALIGN_FILL );

    composite.setLayoutData( gridData );

    Label fieldLabel = new Label( composite, SWT.NONE );
    fieldLabel.setText( "&Query Text:" );
    
    m_queryTextField = new Text( composite, SWT.BORDER
            | SWT.V_SCROLL | SWT.H_SCROLL );
    GridData data = new GridData( GridData.FILL_HORIZONTAL );
    data.heightHint = 100;
    m_queryTextField.setLayoutData( data );
    m_queryTextField.addModifyListener( new ModifyListener( ) 
    {
        public void modifyText( ModifyEvent e )
        {
            validateData();
        }
    } );
   
    setPageComplete( false );
    return composite;
}
 
開發者ID:OrienteerBAP,項目名稱:orientdb-oda-birt,代碼行數:31,代碼來源:CustomDataSetWizardPage.java

示例6: createFieldEditors

@Override
protected void createFieldEditors() {

	createJenkinsCLIFieldEditors();

	Label spacer2 = new Label(getFieldEditorParent(), SWT.LEFT);
	GridData gd2 = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
	gd2.horizontalSpan = 2;
	gd2.heightHint = convertHeightInCharsToPixels(1) / 2;
	spacer2.setLayoutData(gd2);

	/* -------------------------------------------------------------- */
	/* ------------------------ APPEARANCE -------------------------- */
	/* -------------------------------------------------------------- */
	GridData appearanceLayoutData = new GridData();
	appearanceLayoutData.horizontalAlignment = GridData.FILL;
	appearanceLayoutData.verticalAlignment = GridData.BEGINNING;
	appearanceLayoutData.grabExcessHorizontalSpace = true;
	appearanceLayoutData.grabExcessVerticalSpace = false;
	appearanceLayoutData.verticalSpan = 2;
	appearanceLayoutData.horizontalSpan = 3;

	Composite appearanceComposite = new Composite(getFieldEditorParent(), SWT.NONE);
	GridLayout layout = new GridLayout();
	layout.numColumns = 2;
	appearanceComposite.setLayout(layout);
	appearanceComposite.setLayoutData(appearanceLayoutData);

	createOtherFieldEditors(appearanceComposite);

	createBracketsFieldEditors(appearanceComposite);
}
 
開發者ID:de-jcup,項目名稱:eclipse-jenkins-editor,代碼行數:32,代碼來源:JenkinsEditorPreferencePage.java

示例7: createDialogArea

@Override
protected Control createDialogArea(Composite parent) {
	Composite composite = (Composite) super.createDialogArea(parent);
	
	try {
		GridData gridData = new GridData (GridData.HORIZONTAL_ALIGN_FILL | GridData.FILL_BOTH);
		
		objectsExplorerComposite = new ObjectsExplorerComposite(composite, SWT.NONE,
				parentObject, ExtractionRule.class);
		objectsExplorerComposite.setLayoutData(gridData);
	}
	catch(Exception e) {;}
	
	return composite;
}
 
開發者ID:convertigo,項目名稱:convertigo-eclipse,代碼行數:15,代碼來源:CreateExtractionRuleDialog.java

示例8: createDialogArea

@Override
protected Control createDialogArea(Composite parent) {
	Composite composite = (Composite) super.createDialogArea(parent);
	
	try {
		GridData gridData = new GridData (GridData.HORIZONTAL_ALIGN_FILL | GridData.FILL_BOTH);
		
		createHandlerDialogComposite = new CreateHandlerDialogComposite(composite,SWT.NONE,parentObject);
		createHandlerDialogComposite.setLayoutData(gridData);
	}
	catch(Exception e) {;}
	
	return composite;
}
 
開發者ID:convertigo,項目名稱:convertigo-eclipse,代碼行數:14,代碼來源:CreateHandlerDialog.java

示例9: setButtonLayoutData

protected void setButtonLayoutData(FontMetrics metrics, Control button,
		boolean visible) {
	GridData data = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
	int widthHint = Dialog.convertHorizontalDLUsToPixels(metrics,
			IDialogConstants.BUTTON_WIDTH);
	Point minSize = button.computeSize(SWT.DEFAULT, SWT.DEFAULT, true);
	data.widthHint = Math.max(widthHint, minSize.x);
	data.exclude = !visible;
	button.setLayoutData(data);
}
 
開發者ID:capitalone,項目名稱:Hydrograph,代碼行數:10,代碼來源:HydrographInstallationDialog.java

示例10: createDestinationGroup

/**
 * Create the export destination specification widgets
 *
 * @param parent
 *            org.eclipse.swt.widgets.Composite
 */
@SuppressWarnings("unused")
@Override
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("npm Target Folder");
	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);
	BidiUtils.applyBidiProcessing(destinationNameField, StructuredTextTypeHandlerFactory.FILE);

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

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

示例11: fill

protected GridData fill(Control control, int span) {
	GridData gd = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
	gd.horizontalSpan = span;
	control.setLayoutData(gd);
	return gd;
}
 
開發者ID:eclipse,項目名稱:gemoc-studio,代碼行數:6,代碼來源:AbstractChoiceOption.java

示例12: createDialogArea

protected Control createDialogArea(Composite parent) {
      // create composite
      Composite composite = (Composite) super.createDialogArea(parent);
      // create message
      if (message != null) {
          Label label = new Label(composite, SWT.WRAP);
          label.setText(message);
          GridData data = new GridData(GridData.GRAB_HORIZONTAL
                  | GridData.GRAB_VERTICAL | GridData.HORIZONTAL_ALIGN_FILL
                  | GridData.VERTICAL_ALIGN_CENTER);
          data.widthHint = convertHorizontalDLUsToPixels(IDialogConstants.MINIMUM_MESSAGE_AREA_WIDTH);
          label.setLayoutData(data);
          label.setFont(parent.getFont());
      }
      viewer = new ComboViewer(composite);
      viewer.setContentProvider(new ArrayContentProvider());
      viewer.addSelectionChangedListener(new ISelectionChangedListener() {
	
	@Override
	public void selectionChanged(
			SelectionChangedEvent event) {
		valueSelected(valueFromSelection(event.getSelection())); 
	}
});
      viewer.setLabelProvider(new LabelProvider() {
      	@Override
      	public String getText(Object element) {
      		if (element instanceof String) {
      			return PrefUIUtil.getFolderLabel((String) element, MAX_FOLDER_PATH_LEN);
      		}
      		return super.getText(element);
      	}
      });
      viewer.getControl().setLayoutData(new GridData(GridData.GRAB_HORIZONTAL
              | GridData.HORIZONTAL_ALIGN_FILL));
      
      createLink(composite, "From folder", ()->addFolder());
      
      createLink(composite, "From workspace prefs", ()->addWorkspace());
      
      createLink(composite, "From installation", ()->addInstallation());
      
      createLink(composite, "From launch config", ()->addLaunchCfg());
      
      errorMessageText = new Text(composite, SWT.READ_ONLY | SWT.WRAP);
      errorMessageText.setLayoutData(new GridData(GridData.GRAB_HORIZONTAL
              | GridData.HORIZONTAL_ALIGN_FILL));
      errorMessageText.setBackground(errorMessageText.getDisplay()
              .getSystemColor(SWT.COLOR_WIDGET_BACKGROUND));
      // Set the error message text
      // See https://bugs.eclipse.org/bugs/show_bug.cgi?id=66292
      setErrorMessage(errorMessage);

      applyDialogFont(composite);
      return composite;
  }
 
開發者ID:32kda,項目名稱:com.onpositive.prefeditor,代碼行數:56,代碼來源:FolderSelectionDialog.java


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