当前位置: 首页>>代码示例>>Java>>正文


Java Text.setLayoutData方法代码示例

本文整理汇总了Java中org.eclipse.swt.widgets.Text.setLayoutData方法的典型用法代码示例。如果您正苦于以下问题:Java Text.setLayoutData方法的具体用法?Java Text.setLayoutData怎么用?Java Text.setLayoutData使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.eclipse.swt.widgets.Text的用法示例。


在下文中一共展示了Text.setLayoutData方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createControl

import org.eclipse.swt.widgets.Text; //导入方法依赖的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: addDtoParentsSection

import org.eclipse.swt.widgets.Text; //导入方法依赖的package包/类
private void addDtoParentsSection(Composite parent) {
	Composite composite = createDefaultComposite(parent);

	// Label for owner field
	Label ownerLabel = new Label(composite, SWT.NONE);
	ownerLabel.setText(DTO_PARENTS_TITLE);

	// Owner text field
	dtoParentsText = new Text(composite, SWT.MULTI | SWT.BORDER | SWT.WRAP | SWT.V_SCROLL);
	GridData gridData = new GridData(GridData.FILL_BOTH);
	gridData.heightHint = 100;
	dtoParentsText.setLayoutData(gridData);

	// Populate owner text field
	String text = PropertyUtils.getDtoParentClasses(getProject());
	if (text == null) {
		text = "";
	}
	dtoParentsText.setText(text);
}
 
开发者ID:sebez,项目名称:vertigo-chroma-kspplugin,代码行数:21,代码来源:VertigoPropertyPage.java

示例3: createDialogArea

import org.eclipse.swt.widgets.Text; //导入方法依赖的package包/类
@Override
protected Control createDialogArea( Composite parent ) {
  Composite comp = (Composite) super.createDialogArea( parent );

  GridLayout layout = (GridLayout) comp.getLayout();
  layout.numColumns = 2;

  Label usernameLabel = new Label( comp, SWT.RIGHT );
  usernameLabel.setText( "Username: " );
  usernameText = new Text( comp, SWT.SINGLE | SWT.BORDER );
  usernameText.setLayoutData( new GridData( GridData.FILL_HORIZONTAL ) );

  Label passwordLabel = new Label( comp, SWT.RIGHT );
  passwordLabel.setText( "Password: " );
  passwordText = new Text( comp, SWT.SINGLE | SWT.BORDER | SWT.PASSWORD );
  passwordText.setLayoutData( new GridData( GridData.FILL_HORIZONTAL ) );

  return comp;
}
 
开发者ID:HiromuHota,项目名称:pdi-git-plugin,代码行数:20,代码来源:UsernamePasswordDialog.java

示例4: createSearchTextBox

import org.eclipse.swt.widgets.Text; //导入方法依赖的package包/类
private void createSearchTextBox(Composite headerComposite) {
	searchTextBox = new Text(headerComposite, SWT.BORDER);
	GridData gd_searchTextBox = new GridData(SWT.RIGHT, SWT.CENTER, true, true, 0, 0);
	gd_searchTextBox.widthHint = 191;
	searchTextBox.setLayoutData(gd_searchTextBox);
	searchTextBox.setForeground(CustomColorRegistry.INSTANCE.getColorFromRegistry( 128,128,128));
	searchTextBox.setText(Constants.DEFAULT_SEARCH_TEXT);
	addListnersToSearchTextBox();
	ExpressionEditorUtil.INSTANCE.addFocusListenerToSearchTextBox(searchTextBox);
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:11,代码来源:AvailableFieldsComposite.java

示例5: createGroupIdArea

import org.eclipse.swt.widgets.Text; //导入方法依赖的package包/类
private void createGroupIdArea (Composite composite) {
	Label lblNewLabel = new Label(composite, SWT.NONE);
	lblNewLabel.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, false, 4, 1));
	lblNewLabel.setText(MessageUtil.getString("mvn_group_id"));
	textGrpID = new Text(composite, SWT.BORDER);
	textGrpID.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 8, 1));
	textGrpID.addModifyListener(new ModifyListener() {
		@Override
		public void modifyText(ModifyEvent evt) {
			MavenTemplatePage.this.setGroupId(textGrpID.getText());
			validatePage();
		}
	});
	textGrpID.setText("com.company");
}
 
开发者ID:gw4e,项目名称:gw4e.project,代码行数:16,代码来源:MavenTemplatePage.java

示例6: createPageNumberDisplay

import org.eclipse.swt.widgets.Text; //导入方法依赖的package包/类
private void createPageNumberDisplay(Composite composite_3) {
	Text pageNumberDisplayTextBox = new Text(composite_3, SWT.BORDER | SWT.CENTER);
	pageNumberDisplayTextBox.setEnabled(false);
	pageNumberDisplayTextBox.setEditable(false);
	GridData gd_text = new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1);
	gd_text.widthHint = 178;
	pageNumberDisplayTextBox.setLayoutData(gd_text);

	windowControls.put(ControlConstants.PAGE_NUMBER_DISPLAY, pageNumberDisplayTextBox);
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:11,代码来源:DebugDataViewer.java

示例7: initialize

import org.eclipse.swt.widgets.Text; //导入方法依赖的package包/类
@Override
protected void initialize() {
	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;
	httpData = new Text(this, SWT.MULTI | SWT.WRAP | SWT.V_SCROLL);
	httpData.setLayoutData(gridData);
	httpData.setText("");
	this.setLayout(new GridLayout());
	setSize(new Point(300, 200));
}
 
开发者ID:convertigo,项目名称:convertigo-eclipse,代码行数:14,代码来源:SapJcoConnectorComposite.java

示例8: initialize

import org.eclipse.swt.widgets.Text; //导入方法依赖的package包/类
protected void initialize() {
	GridData gridData3 = new GridData();
	gridData3.grabExcessHorizontalSpace = false;
	GridData gridData2 = new GridData();
	gridData2.horizontalAlignment = GridData.BEGINNING;
	gridData2.grabExcessHorizontalSpace = false;
	gridData2.horizontalSpan = 2;
	gridData2.verticalAlignment = GridData.CENTER;
	GridData gridData = new GridData();
	label1 = new Label(this, SWT.NONE);
	label1.setText("Object type");
	label1.setLayoutData(gridData);
	createCombo();
	label2 = new Label(this, SWT.NONE);
	label2.setText("Substring");
	text = new Text(this, SWT.BORDER);
	text.setLayoutData(gridData3);
	checkBox = new Button(this, SWT.CHECK);
	checkBox.setText("Match case");
	checkBox.setLayoutData(gridData2);
	GridLayout gridLayout = new GridLayout();
	gridLayout.numColumns = 2;
	this.setLayout(gridLayout);
	setSize(new Point(226, 125));
	
	combo.select(0);
	text.setText("");
}
 
开发者ID:convertigo,项目名称:convertigo-eclipse,代码行数:29,代码来源:DatabaseObjectFindDialogComposite.java

示例9: GridTextInput

import org.eclipse.swt.widgets.Text; //导入方法依赖的package包/类
/**
 * Constructor.
 *
 * @param parent The parent {@link Composite}.
 * @param type The {@link Type}.
 * @param name The {@link GridTextInput} name.
 * @param labelText The {@link Label} text.
 * @param labelStyle The {@link Label} style.
 * @param labelLayoutData The {@link Label} {@link GridData layout data}.
 * @param textText The {@link Text} text.
 * @param textStyle The {@link Text} style.
 * @param textLayoutData The {@link Text} {@link GridData layout data}.
 */
public GridTextInput(Composite parent, Type type, String name, String labelText, int labelStyle,
        GridData labelLayoutData, String textText, int textStyle, GridData textLayoutData) {

    _Type = type;

    _DefaultTextValue = textText;

    if (_DefaultTextValue != null && _Type.isInteger()) {
        if (!isValidIntegerText(_DefaultTextValue)) {
            throw new IllegalArgumentException("Invalid integer value: " + _DefaultTextValue);
        }
    }

    _Name = name;

    if (labelText != null) {
        _Label = new Label(parent, labelStyle);
        _Label.setText(labelText);
        _Label.setLayoutData(labelLayoutData);
        _Label.pack();
    }

    _Text = new Text(parent, textStyle);
    if (textText != null) {
        _Text.setText(textText);
    }
    _Text.setLayoutData(textLayoutData);

    if (_Type.isInteger()) {
        _Text.setTextLimit(10);
    }

    _Text.setData(this);

}
 
开发者ID:baloise,项目名称:eZooKeeper,代码行数:49,代码来源:GridTextInput.java

示例10: createStandardText

import org.eclipse.swt.widgets.Text; //导入方法依赖的package包/类
public void createStandardText ( final Composite parent, final String attributeName, final int style, final String label, final String textMessage, final IObservableMap data, final Object valueType )
{
    final Label labelControl = this.toolkit.createLabel ( parent, label + ":" );

    final boolean multi = ( style & SWT.MULTI ) > 0;

    if ( multi )
    {
        labelControl.setLayoutData ( new GridData ( SWT.FILL, SWT.FILL, false, false ) );
    }

    final Text text = this.toolkit.createText ( parent, "", style );
    text.setMessage ( textMessage );
    final GridData gd = new GridData ( GridData.FILL, multi ? GridData.FILL : GridData.BEGINNING, true, true );
    gd.horizontalSpan = 2;
    text.setLayoutData ( gd );
    text.setToolTipText ( textMessage );

    final IObservableValue value = Observables.observeMapEntry ( data, attributeName, String.class );

    if ( valueType != null && valueType != String.class )
    {
        final WritableValue conversionValue = new WritableValue ( null, valueType );
        this.dbc.bindValue ( WidgetProperties.text ( SWT.Modify ).observe ( text ), conversionValue );
        this.dbc.bindValue ( conversionValue, value );
    }
    else
    {
        this.dbc.bindValue ( WidgetProperties.text ( SWT.Modify ).observe ( text ), value );
    }
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:32,代码来源:ConfigurationFormToolkit.java

示例11: initialize

import org.eclipse.swt.widgets.Text; //导入方法依赖的package包/类
/**
 * This method initializes this
 * 
 */
private void initialize() {
       GridData gridData2 = new org.eclipse.swt.layout.GridData();
       gridData2.horizontalSpan = 3;
       label1 = new Label(this, SWT.NONE);
       label1.setText("Please choose what kind of screen class you would like to create\nbased one detected one");
       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;
       createGroup();
       label = new Label(this, SWT.NONE);
       label.setText("Give a screen class name");
       label.setLayoutData(gridData);
       screenClassName = new Text(this, SWT.BORDER);
       screenClassName.setLayoutData(gridData1);
       screenClassName.addModifyListener(modifyListener);
       GridLayout gridLayout = new GridLayout();
       gridLayout.numColumns = 1;
       this.setLayout(gridLayout);
}
 
开发者ID:convertigo,项目名称:convertigo-eclipse,代码行数:31,代码来源:LearnScreenClassWizardComposite2.java

示例12: createDialogArea

import org.eclipse.swt.widgets.Text; //导入方法依赖的package包/类
@Override
protected Control createDialogArea( Composite parent ) {
  Composite comp = (Composite) super.createDialogArea( parent );

  GridLayout layout = (GridLayout) comp.getLayout();
  layout.numColumns = 3;

  Label nameLabel = new Label( comp, SWT.RIGHT );
  nameLabel.setText( "Name: " );
  nameLabel.setLayoutData( new GridData( GridData.END, GridData.CENTER, false, false ) );
  nameText = new Text( comp, SWT.SINGLE | SWT.BORDER );
  nameText.setText( Const.NVL( repo.getName(), "" ) );
  nameText.setLayoutData( new GridData( GridData.FILL, GridData.CENTER, true, false, 2, 1 ) );

  Label descLabel = new Label( comp, SWT.RIGHT );
  descLabel.setText( "Description: " );
  descLabel.setLayoutData( new GridData( GridData.END, GridData.CENTER, false, false ) );
  descText = new Text( comp, SWT.SINGLE | SWT.BORDER );
  descText.setLayoutData( new GridData( GridData.FILL, GridData.CENTER, true, false, 2, 1 ) );
  descText.setText( Const.NVL( repo.getDescription(), "" ) );

  Label directoryLabel = new Label( comp, SWT.RIGHT );
  directoryLabel.setText( "Directory: " );
  directoryLabel.setLayoutData( new GridData( GridData.END, GridData.CENTER, false, false ) );
  directoryText = new Text( comp, SWT.SINGLE | SWT.BORDER );
  directoryText.setLayoutData( new GridData( GridData.FILL, GridData.CENTER, true, false ) );
  directoryText.setText( Const.NVL( repo.getDirectory(), "" ) );

  Button directoryButton = new Button( comp, SWT.PUSH );
  directoryButton.setText( "Browse" );
  directoryButton.addSelectionListener( new SelectionAdapter() {
    @Override
    public void widgetSelected( SelectionEvent e ) {
      DirectoryDialog dialog = new DirectoryDialog( getShell(), SWT.OPEN );
      if ( dialog.open() != null ) {
        directoryText.setText( dialog.getFilterPath() );
      }
    }
  } );

  Label typeLabel = new Label( comp, SWT.RIGHT );
  typeLabel.setText( "Type: " );
  typeLabel.setLayoutData( new GridData( GridData.END, GridData.CENTER, false, false ) );
  typeCombo = new Combo( comp, SWT.READ_ONLY );
  typeCombo.setItems( IVCS.GIT, IVCS.SVN );
  if ( repo.getType() != null ) {
    if ( repo.getType().equals( IVCS.GIT ) ) {
      typeCombo.select( 0 );
    } else {
      typeCombo.select( 1 );
    }
  }
  typeCombo.setLayoutData( new GridData( GridData.FILL, GridData.CENTER, true, false, 2, 1 ) );
  return comp;
}
 
开发者ID:HiromuHota,项目名称:pdi-git-plugin,代码行数:56,代码来源:EditRepositoryDialog.java

示例13: initialize

import org.eclipse.swt.widgets.Text; //导入方法依赖的package包/类
protected void initialize() {
	Label urlDescription = new Label(this, SWT.NONE);
	urlDescription.setText("Please enter a valid target host url :");
	GridData data0 = new GridData ();
	data0.horizontalAlignment = GridData.FILL;
	data0.grabExcessHorizontalSpace = true;
	data0.horizontalSpan = 2;
	urlDescription.setLayoutData (data0);
	
	targetUrl = new Text(this, SWT.NONE);
	targetUrl.setText("http://www.convertigo.com");
	GridData data1 = new GridData ();
	data1.horizontalAlignment = GridData.FILL;
	data1.grabExcessHorizontalSpace = true;
	data1.horizontalSpan = 2;
	targetUrl.setLayoutData (data1);

	GridData gridData4 = new GridData();
	gridData4.verticalIndent = 5;
	gridData4.grabExcessHorizontalSpace = false;
	
	Label label6 = new Label(this, SWT.NONE);
	label6.setText("Trust all certificates");
	label6.setLayoutData(gridData4);
	
	GridData gridData5 = new GridData();
	gridData5.verticalIndent = 5;
	gridData5.horizontalIndent = 2;

	trustCertificates = new Button(this, SWT.CHECK);
	trustCertificates.setLayoutData(gridData5);

	if (modifyListener != null) {
		targetUrl.addModifyListener(modifyListener);
		trustCertificates.addSelectionListener(selectionListener);
	}
	
	GridLayout gridLayout = new GridLayout();
	gridLayout.numColumns = 2;
	this.setLayout(gridLayout);
	//setSize(new Point(402, 99));
}
 
开发者ID:convertigo,项目名称:convertigo-eclipse,代码行数:43,代码来源:NewProjectWizardComposite11.java

示例14: getSimpleTextArea

import org.eclipse.swt.widgets.Text; //导入方法依赖的package包/类
private Text getSimpleTextArea(Composite parent) {
	final Text text = new Text(parent, BORDER);
	text.setLayoutData(new GridData(FILL, CENTER, true, false, 1, 1));
	return text;
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:6,代码来源:InstallNpmDependencyDialog.java

示例15: createControl

import org.eclipse.swt.widgets.Text; //导入方法依赖的package包/类
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);
}
 
开发者ID:convertigo,项目名称:convertigo-eclipse,代码行数:54,代码来源:ObjectInfoWizardPage.java


注:本文中的org.eclipse.swt.widgets.Text.setLayoutData方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。