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


Java Label.setText方法代码示例

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


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

示例1: initialize

import org.eclipse.swt.widgets.Label; //导入方法依赖的package包/类
private void initialize() {
	labelSyntaxe = new Label(this, SWT.NONE);
	
	labelSyntaxe.setText("SQL query syntax examples :\n");
	labelSyntaxe.setLayoutData(new GridData(SWT.FILL,SWT.CENTER,true,false));
	labelSQLQuery = new Label(this, SWT.NONE);
	labelSQLQuery.setFont(new Font(null,"Tahoma",8,1));
	labelSQLQuery.setText("SELECT * FROM EMPLOYEES WHERE (NAME='{parameter_name}')\n"
							+ "{? = CALL STORED_FUNCTION({parameter_name})}\n"
							+ "{CALL STORED_PROCEDURE({parameter_name})}\n\n");
	labelSQLQuery.setLayoutData(new GridData(SWT.FILL,SWT.CENTER,true,false));
	textAreaSQLQuery = new Text(this, SWT.MULTI | SWT.WRAP | SWT.V_SCROLL);
	textAreaSQLQuery.setFont(new Font(null,"Tahoma",10,0));
	textAreaSQLQuery.setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,true));
	GridLayout gridLayout = new GridLayout();
	this.setLayout(gridLayout);
	setSize(new org.eclipse.swt.graphics.Point(402,289));
}
 
开发者ID:convertigo,项目名称:convertigo-eclipse,代码行数:19,代码来源:SqlQueryEditorComposite.java

示例2: DescriptorLabel

import org.eclipse.swt.widgets.Label; //导入方法依赖的package包/类
public DescriptorLabel ( final Composite parent, final int style, final String text, final DataItemDescriptor descriptor )
{
    super ( parent, SWT.NONE );

    setLayout ( new FillLayout () );
    Label label = new Label ( this, style );

    if ( text != null )
    {
        label.setText ( text );
    }

    // TODO: make properties
    if ( SessionManager.getDefault ().hasRole ( "developer" ) ) //$NON-NLS-1$
    {
        label.setToolTipText ( String.format ( "%s", descriptor ) ); //$NON-NLS-1$
    }

}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:20,代码来源:DescriptorLabel.java

示例3: createProjectSection

import org.eclipse.swt.widgets.Label; //导入方法依赖的package包/类
/**
 * Create the element that allow to select a project See the GraphWalker
 * offline command for more information
 */
private void createProjectSection(Composite parent) {
	fProjLabel = new Label(parent, SWT.NONE);
	fProjLabel.setText(MessageUtil.getString("label_project"));
	GridData gd = new GridData();
	gd.horizontalIndent = 25;
	fProjLabel.setLayoutData(gd);

	fProjText = new Text(parent, SWT.SINGLE | SWT.BORDER);
	fProjText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
	fProjText.addModifyListener(new ModifyListener() {
		@Override
		public void modifyText(ModifyEvent evt) {
			validatePage();
			updateConfigState();

		}
	});
	fProjText.setData(GW4E_LAUNCH_CONFIGURATION_CONTROL_ID, GW4E_LAUNCH_CONFIGURATION_TEXT_ID_PROJECT);

}
 
开发者ID:gw4e,项目名称:gw4e.project,代码行数:25,代码来源:GW4ELaunchConfigurationTab.java

示例4: createLabelledCombo

import org.eclipse.swt.widgets.Label; //导入方法依赖的package包/类
private CCombo createLabelledCombo(Composite content, String slabel) {

		Label label = new Label(content, SWT.NONE);
		label.setBackground(content.getDisplay().getSystemColor(SWT.COLOR_WHITE));
		label.setText("    "+slabel+" ");
		label.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, true));

		CCombo ret = new CCombo(content, SWT.READ_ONLY|SWT.BORDER);
		ret.setItems(getNames());
		GridData fill = new GridData(SWT.FILL, SWT.CENTER, true, true);
		fill.widthHint=100;
		ret.setLayoutData(fill);

		return ret;
	}
 
开发者ID:eclipse,项目名称:scanning,代码行数:16,代码来源:AxesCellEditor.java

示例5: initialize

import org.eclipse.swt.widgets.Label; //导入方法依赖的package包/类
protected void initialize() {
	Label label0 = new Label (this, SWT.NONE);
	label0.setText ("Please choose an element to import into a sequence's step:");
	
	GridData data = new GridData ();
	data.horizontalAlignment = GridData.FILL;
	data.verticalAlignment = GridData.FILL;
	data.grabExcessHorizontalSpace = true;
	data.grabExcessVerticalSpace = true;
	data.heightHint = 200;
	list = new List(this, SWT.BORDER | SWT.V_SCROLL);
	list.setLayoutData (data);

       GridData gridData2 = new GridData();
	gridData2.horizontalSpan = 2;
	gridData2.verticalAlignment = GridData.CENTER;
	gridData2.horizontalAlignment = GridData.FILL;
	labelProgression = new Label(this, SWT.NONE);
	labelProgression.setText("Progression");
	labelProgression.setLayoutData(gridData2);
	
       GridData gridData4 = new GridData();
	gridData4.horizontalSpan = 2;
	gridData4.verticalAlignment = GridData.CENTER;
	gridData4.horizontalAlignment = GridData.FILL;
       progressBar = new ProgressBar(this, SWT.NONE);
       //progressBar.setBounds(new Rectangle(16, 349, 571, 17));
       progressBar.setLayoutData(gridData4);
       
	GridLayout gridLayout = new GridLayout();
	setLayout(gridLayout);
	setSize(new Point(408, 251));
}
 
开发者ID:convertigo,项目名称:convertigo-eclipse,代码行数:34,代码来源:SchemaObjectsDialogComposite.java

示例6: initialize

import org.eclipse.swt.widgets.Label; //导入方法依赖的package包/类
/**
 * This method initializes this
 * 
 */
private void initialize() {
       GridData gridData11 = new org.eclipse.swt.layout.GridData();
       gridData11.horizontalAlignment = org.eclipse.swt.layout.GridData.FILL;
       gridData11.verticalAlignment = org.eclipse.swt.layout.GridData.CENTER;
       GridData gridData2 = new org.eclipse.swt.layout.GridData();
       gridData2.horizontalSpan = 2;
       label1 = new Label(this, SWT.NONE);
       label1.setText("The chosen project template includes a CICS type connector. \n\nThis connector needs a CICS Transaction Gateway (CTG) name, server address and server port.\n\nPlease provide this information here\n\n");
       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;
       label = new Label(this, SWT.NONE);
       label.setText("CTG Configuration name");
       label.setLayoutData(gridData);
       ctgName = new Text(this, SWT.BORDER);
       ctgName.setLayoutData(gridData1);
       label2 = new Label(this, SWT.NONE);
       label2.setText("CTG Sever address");
       ctgServer = new Text(this, SWT.BORDER);
       ctgServer.setLayoutData(gridData11);
       label5 = new Label(this, SWT.NONE);
       label5.setText("CTG Server port");
       ctgPort = new Text(this, SWT.BORDER);
       ctgName.addModifyListener(modifyListener);
       ctgPort.addModifyListener(modifyListener);
       ctgServer.addModifyListener(modifyListener);
       GridLayout gridLayout = new GridLayout();
       gridLayout.numColumns = 2;
       this.setLayout(gridLayout);
}
 
开发者ID:convertigo,项目名称:convertigo-eclipse,代码行数:42,代码来源:NewProjectWizardComposite5.java

示例7: createControl

import org.eclipse.swt.widgets.Label; //导入方法依赖的package包/类
@SuppressWarnings("restriction")
@Override
public void createControl(Composite parent)
{
	Label label = new Label(parent, SWT.NULL);
	label.setText("JPF Classpath");
	setControl(label);
}
 
开发者ID:equella,项目名称:Equella,代码行数:9,代码来源:JPFClasspathContainerPage.java

示例8: labelWidget

import org.eclipse.swt.widgets.Label; //导入方法依赖的package包/类
public Label labelWidget(Composite parent, int style, int[] bounds,
		String value, Image image) {
	Label label = new Label(parent, style);
	label.setBounds(bounds[0], bounds[1], bounds[2], bounds[3]);
	label.setText(value);
	label.setImage(image);

	return label;
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:10,代码来源:ELTSWTWidgets.java

示例9: InterfacesComponent

import org.eclipse.swt.widgets.Label; //导入方法依赖的package包/类
/**
 * Creates a new interfaces component inside the parent composite using the given model.
 *
 * @param interfacesContainingModel
 *            A interface containing model
 * @param container
 *            The component container
 */
public InterfacesComponent(InterfacesContainingModel interfacesContainingModel,
		WizardComponentContainer container) {
	super(container);
	this.model = interfacesContainingModel;

	Composite parent = getParentComposite();

	Label interfacesLabel = new Label(parent, SWT.NONE);

	GridData interfacesLabelGridData = fillLabelDefaults();
	interfacesLabelGridData.verticalAlignment = SWT.TOP;
	interfacesLabel.setLayoutData(interfacesLabelGridData);

	interfacesLabel.setText("Interfaces:");

	interfacesTable = new Table(parent, SWT.BORDER | SWT.FULL_SELECTION | SWT.VIRTUAL);
	interfacesTable.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));

	Composite interfacesButtonsComposite = new Composite(parent, SWT.NONE);
	interfacesButtonsComposite.setLayoutData(GridDataFactory.fillDefaults().create());

	interfacesButtonsComposite.setLayout(GridLayoutFactory.swtDefaults().numColumns(1).margins(0, 0).create());

	interfacesAddButton = new Button(interfacesButtonsComposite, SWT.NONE);
	interfacesAddButton.setText("Add...");
	interfacesAddButton.setLayoutData(GridDataFactory.fillDefaults().grab(true, false).create());

	interfacesRemoveButton = new Button(interfacesButtonsComposite, SWT.NONE);
	interfacesRemoveButton.setText("Remove");
	interfacesRemoveButton.setLayoutData(GridDataFactory.fillDefaults().grab(true, false).create());

	setupBindings();
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:42,代码来源:InterfacesComponentProvider.java

示例10: initialize

import org.eclipse.swt.widgets.Label; //导入方法依赖的package包/类
/**
 * This method initializes this
 * 
 */
private void initialize() {
       GridData gridData2 = new org.eclipse.swt.layout.GridData();
       gridData2.horizontalSpan = 2;
       label1 = new Label(this, SWT.NONE);
       label1.setText("The chosen project template includes a ''screen type'' connector. \n\nThis connector needs a destination address as an hostname (or IP adress) and optionally a port.\n ");
       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;
       label = new Label(this, SWT.NONE);
       label.setText("Server address");
       label.setLayoutData(gridData);
       server = new Text(this, SWT.BORDER);
       server.setLayoutData(gridData1);
       label5 = new Label(this, SWT.NONE);
       label5.setText("Port");
       port = new Text(this, SWT.BORDER);
       server.addModifyListener(modifyListener);
       port.addModifyListener(modifyListener);
       GridLayout gridLayout = new GridLayout();
       gridLayout.numColumns = 2;
       this.setLayout(gridLayout);
}
 
开发者ID:convertigo,项目名称:convertigo-eclipse,代码行数:34,代码来源:NewProjectWizardComposite3.java

示例11: createLabel

import org.eclipse.swt.widgets.Label; //导入方法依赖的package包/类
/**
 * Label creation helper method
 * @param parent
 * @param text
 * @return
 */
protected Label createLabel(Composite parent, String text) {
	Label label = new Label(parent, SWT.LEFT);
	label.setText(text);
	GridData data = new GridData();
	data.horizontalAlignment = GridData.FILL;
	label.setLayoutData(data);
	return label;
}
 
开发者ID:gw4e,项目名称:gw4e.project,代码行数:15,代码来源:GraphModelPropertyPage.java

示例12: createNewFilePage

import org.eclipse.swt.widgets.Label; //导入方法依赖的package包/类
@Override
protected WizardNewFileCreationPage createNewFilePage() {
	return new NewFilePage(getSelection(), fileExt) {
		@Override
		public void createControl(Composite parent) {
			super.createControl(parent);
			Composite control = (Composite) getControl();

			Composite extensionGroup = new Composite(control, SWT.NONE);
			GridLayout layout = new GridLayout();
			layout.numColumns = 2;
			extensionGroup.setLayout(layout);
			extensionGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));

			Label refOccieLabel = new Label(extensionGroup, SWT.NONE);
			refOccieLabel.setLayoutData(new GridData(SWT.LEFT, SWT.TOP, true, true));
			refOccieLabel.setText(Messages.NewExtensionWizard_RefExtensionLabel);
			refOccieLabel.setFont(parent.getFont());

			Composite composite = new Composite(extensionGroup, SWT.NULL);
			GridData layoutData = new GridData(SWT.FILL, SWT.FILL, true, true);
			composite.setLayoutData(layoutData);
			TableColumnLayout tableLayout = new TableColumnLayout();
			composite.setLayout(tableLayout);

			Table table = new Table(composite,
					SWT.CHECK | SWT.MULTI | SWT.BORDER | SWT.FULL_SELECTION | SWT.H_SCROLL | SWT.V_SCROLL);
			refExtensionViewer = new CheckboxTableViewer(table);

			refExtensionViewer.setContentProvider(ArrayContentProvider.getInstance());

			Collection<String> registeredExtensions = new ArrayList<String>(
					OcciRegistry.getInstance().getRegisteredExtensions());
			refExtensionViewer.setInput(registeredExtensions);
		}
	};
}
 
开发者ID:occiware,项目名称:OCCI-Studio,代码行数:38,代码来源:NewConfigurationWizard.java

示例13: createDialogArea

import org.eclipse.swt.widgets.Label; //导入方法依赖的package包/类
@Override
protected Control createDialogArea ( final Composite parent )
{
    getShell ().setText ( "Time and date" );

    final Composite base = (Composite)super.createDialogArea ( parent );

    final Composite wrapper = new Composite ( base, SWT.NONE );
    wrapper.setLayout ( new GridLayout ( 2, false ) );
    wrapper.setLayoutData ( new GridData ( GridData.FILL_BOTH ) );

    final Label label = new Label ( wrapper, SWT.NONE );
    label.setText ( "Input:" );

    this.input = new Text ( wrapper, SWT.BORDER );

    this.input.addModifyListener ( new ModifyListener () {

        @Override
        public void modifyText ( final ModifyEvent e )
        {
            update ();
        }
    } );
    this.input.setLayoutData ( new GridData ( SWT.FILL, SWT.CENTER, true, false ) );

    this.resultControl = new Label ( wrapper, SWT.NONE );
    this.resultControl.setLayoutData ( new GridData ( SWT.FILL, SWT.CENTER, true, false, 2, 1 ) );

    if ( this.time != null )
    {
        this.input.setText ( String.format ( "%1$tY-%1$tm-%1$td %1$tH:%1$tM:%1$tS.%1$tL", this.time ) );
    }

    return base;
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:37,代码来源:DateTimeDialog.java

示例14: createUILabelPassword

import org.eclipse.swt.widgets.Label; //导入方法依赖的package包/类
/**
 * 
 */
private void createUILabelPassword() {
	// Create the label
	Label label = new Label(fCompositeLogin, SWT.NONE);
	label.setText("&Password:"); //NON-NLS-1
	// Configure layout data
	GridData data = new GridData();
	data.horizontalIndent = F_LABEL_HORIZONTAL_INDENT;
	label.setLayoutData(data);					
}
 
开发者ID:convertigo,项目名称:convertigo-eclipse,代码行数:13,代码来源:InteractiveSplashHandler.java

示例15: BreadcrumbItem

import org.eclipse.swt.widgets.Label; //导入方法依赖的package包/类
public BreadcrumbItem ( final BreadcrumbBar parent, final boolean last )
{
    this.horizontal = parent.isHorizontal ();

    this.parent = parent;
    this.wrapper = new Composite ( parent.getComposite (), SWT.NONE );

    parent.addChild ( this );

    final GridLayout layout = new GridLayout ( last ? 1 : 2, false );
    layout.marginHeight = layout.marginWidth = 0;
    layout.horizontalSpacing = layout.verticalSpacing = 0;

    if ( this.horizontal )
    {
        layout.horizontalSpacing = 5;
    }
    else
    {
        layout.verticalSpacing = 5;
    }

    this.wrapper.setLayout ( layout );

    this.item = new CLabel ( this.wrapper, SWT.NONE );
    this.item.setLayoutData ( new GridData ( SWT.CENTER, SWT.CENTER, true, true ) );

    if ( !last )
    {
        final Label label = new Label ( this.wrapper, SWT.NONE );
        if ( this.horizontal )
        {
            label.setText ( Messages.BreadcrumbNavigator_Splitter_Horizontal );
        }
        else
        {
            label.setText ( Messages.BreadcrumbNavigator_Splitter_Vertical );
        }
        label.setLayoutData ( new GridData ( SWT.CENTER, SWT.CENTER, true, true ) );
    }

    if ( this.horizontal )
    {
        this.wrapper.setLayoutData ( new GridData ( SWT.BEGINNING, SWT.CENTER, false, true ) );
    }
    else
    {
        this.wrapper.setLayoutData ( new GridData ( SWT.FILL, SWT.BEGINNING, true, false ) );
    }

    this.item.addMouseListener ( new MouseAdapter () {
        @Override
        public void mouseUp ( final MouseEvent e )
        {
            handleSelected ();
        }
    } );
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:59,代码来源:BreadcrumbItem.java


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