当前位置: 首页>>代码示例>>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;未经允许,请勿转载。