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


Java Label类代码示例

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


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

示例1: initialize

import org.eclipse.swt.widgets.Label; //导入依赖的package包/类
protected void initialize() {
	Label label0 = new Label (this, SWT.NONE);
	label0.setText ("Please choose type(s) which are returned by transaction response:");
	
	list = new List(this, SWT.BORDER | SWT.MULTI | SWT.V_SCROLL);
	GridData data = new GridData ();
	data.horizontalAlignment = GridData.FILL;
	data.verticalAlignment = GridData.FILL;
	data.grabExcessHorizontalSpace = true;
	data.grabExcessVerticalSpace = true;
	data.heightHint = 200;
	list.setLayoutData (data);

	GridLayout gridLayout = new GridLayout();
	setLayout(gridLayout);
	setSize(new Point(408, 251));
}
 
开发者ID:convertigo,项目名称:convertigo-eclipse,代码行数:18,代码来源:TransactionXSDTypesDialogComposite.java

示例2: createDialogArea

import org.eclipse.swt.widgets.Label; //导入依赖的package包/类
protected Control createDialogArea(Composite parent) {
	Composite area = (Composite) super.createDialogArea(parent);
	Composite container = new Composite(area, SWT.NONE);
	RowLayout layout = new RowLayout(SWT.HORIZONTAL);
	container.setLayout(layout);
	// container.setLayoutData(new GridData(GridData.FILL_BOTH));

	// TitleArea中的Title
	setTitle("属性文件更新");

	// TitleArea中的Message
	setMessage("输入正确的url地址,以更新文件。\n可提示的属性数量会根据当前项目存在的jar包,对已有属性增加或者删除!");

	Label label = new Label(container, SWT.NONE);
	label.setText("项目URL: ");
	combo = new Combo(container, SWT.DROP_DOWN);
	String[] items = new String[getUrlMap().size()];
	getUrlMap().values().toArray(items);
	combo.setItems(items);
	String url = getPreferedUrl(projectName);
	combo.setText(url);
	combo.setLayoutData(new RowData(400, 30));

	return area;
}
 
开发者ID:bsteker,项目名称:bdf2,代码行数:26,代码来源:UpdateDialog.java

示例3: FileTypeComponent

import org.eclipse.swt.widgets.Label; //导入依赖的package包/类
/**
 * Creates a new definition file component using model in container.
 *
 * @param model
 *            The model to bind it to
 * @param container
 *            The container to create it in
 */
public FileTypeComponent(DefinitionFileModel model, WizardComponentContainer container) {
	super(container);
	this.model = model;

	Composite parent = getParentComposite();

	Label definitionFileLabel = new Label(parent, SWT.NONE);
	definitionFileLabel.setLayoutData(fillLabelDefaults());
	definitionFileLabel.setText("File type:");

	definitionFileBox = new Button(parent, SWT.CHECK);
	definitionFileBox.setText("Definition file (.n4jsd)");
	definitionFileBox.setLayoutData(fillLabelDefaults());

	WizardComponentUtils.emptyGridCell(parent);

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

示例4: createControls

import org.eclipse.swt.widgets.Label; //导入依赖的package包/类
@Override
public void createControls(Composite parent,
		TabbedPropertySheetPage aTabbedPropertySheetPage) {
	super.createControls(parent, aTabbedPropertySheetPage);
	Composite composite=this.getWidgetFactory().createFlatFormComposite(parent);
	composite.setLayout(new FormLayout());
	Label la=this.getWidgetFactory().createLabel(composite,"名称:");
	FormData laData=new FormData();
	laData.top=new FormAttachment(0,12);
	laData.left=new FormAttachment(0,10);
	la.setLayoutData(laData);
	
	this.labelText=this.getWidgetFactory().createText(composite, "");
	FormData textData=new FormData();
	textData.left=new FormAttachment(la,1);
	textData.top=new FormAttachment(0,12);
	textData.right=new FormAttachment(100,-10);
	this.labelText.setLayoutData(textData);
}
 
开发者ID:bsteker,项目名称:bdf2,代码行数:20,代码来源:PropertySectionTransitionLabel.java

示例5: initTestProjectUI

import org.eclipse.swt.widgets.Label; //导入依赖的package包/类
private Composite initTestProjectUI(DataBindingContext dbc, Composite parent) {
	// Additional test project options
	final Group testProjectOptionsGroup = new Group(parent, NONE);
	testProjectOptionsGroup.setLayout(GridLayoutFactory.fillDefaults().numColumns(1).create());

	final Button createTestGreeterFileButton = new Button(testProjectOptionsGroup, CHECK);
	createTestGreeterFileButton.setText("Create a test project greeter file");

	final Button addNormalSourceFolderButton = new Button(testProjectOptionsGroup, CHECK);
	addNormalSourceFolderButton.setText("Also create a non-test source folder");

	Label nextPageHint = new Label(testProjectOptionsGroup, NONE);
	nextPageHint.setText("The projects which should be tested can be selected on the next page");
	nextPageHint.setForeground(Display.getCurrent().getSystemColor(SWT.COLOR_TITLE_INACTIVE_FOREGROUND));

	initTestProjectBinding(dbc, addNormalSourceFolderButton, createTestGreeterFileButton);

	return testProjectOptionsGroup;
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:20,代码来源:N4MFWizardNewProjectCreationPage.java

示例6: createControl

import org.eclipse.swt.widgets.Label; //导入依赖的package包/类
/**
 * (non-Javadoc) Method declared on IDialogPage.
 */
@Override
public void createControl(Composite parent) {
	setPageComplete(true);
	initializeDialogUnits(parent);

	Composite composite = new Composite(parent, SWT.NULL);
	composite.setLayout(new GridLayout());
	composite.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_FILL | GridData.HORIZONTAL_ALIGN_FILL));

	new Label(composite, SWT.NONE).setText("Messages:");
	createErrorGroup(composite);

	Display display = getShell().getDisplay();
	highlightColor = display.getSystemColor(SWT.COLOR_RED);

	setControl(composite);
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:21,代码来源:SpecProcessPage.java

示例7: createParentControls

import org.eclipse.swt.widgets.Label; //导入依赖的package包/类
@Override
protected void createParentControls(Composite composite) {
	Label label = new Label(composite, SWT.WRAP);
       label.setText("Preference scope:");
       Composite group = new Composite(composite, SWT.NONE);
       group.setLayout(new RowLayout());
       for (int i = 0; i < SCOPE_LABELS.length; i++) {
		Button btn = new Button(group, SWT.RADIO);
		btn.setText(SCOPE_LABELS[i]);
		btn.setData(SCOPE_VALUES[i]);
		if (SCOPE_VALUES[i].equals(scope) || (scope.isEmpty() && i == 0)) {
			btn.setSelection(true);
		}
		scopeRadios[i] = btn;
	}
	super.createParentControls(composite);
}
 
开发者ID:32kda,项目名称:com.onpositive.prefeditor,代码行数:18,代码来源:NewPlatformPreferenceDialog.java

示例8: createEmptyPanel

import org.eclipse.swt.widgets.Label; //导入依赖的package包/类
/**
 * Creates just an empty panel with a message indicating there are no reports to display
 */
private void createEmptyPanel() {
	Composite emptyPanel = new Composite(scrollChild, SWT.BORDER);
	GridData gData = new GridData(SWT.FILL, SWT.FILL, true, true);
	gData.heightHint = 100;
	emptyPanel.setLayoutData(gData);
	emptyPanel.setLayout(new GridLayout());
	Label nothingToDisplay = new Label(emptyPanel, SWT.NONE);
	nothingToDisplay.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
	nothingToDisplay.setText(MessageText.getString("Progress.reporting.no.reports.to.display"));

	/*
	 * Mark this as being opened and is showing the empty panel
	 */
	isShowingEmpty = true;

}
 
开发者ID:BiglySoftware,项目名称:BiglyBT,代码行数:20,代码来源:ProgressReporterWindow.java

示例9: createSelectionComposite

import org.eclipse.swt.widgets.Label; //导入依赖的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

示例10: createPartControl

import org.eclipse.swt.widgets.Label; //导入依赖的package包/类
@Override
public void createPartControl(Composite parent) {		
	
	Composite compo = new Composite(parent, SWT.NONE);
	
	GridLayout layout = new GridLayout();
	layout.marginHeight = 0;
	layout.marginWidth = 0;
	layout.verticalSpacing = 0;
	
	compo.setLayout(layout);
	
	label = new Label(compo, SWT.NONE);
	label.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));		
	
	text = new Text(compo, SWT.MULTI | SWT.V_SCROLL | SWT.H_SCROLL );
	text.setLayoutData(new GridData(GridData.FILL_BOTH));
	
	update();
}
 
开发者ID:Talend,项目名称:avro-schema-editor,代码行数:21,代码来源:AvroSchemaLogView.java

示例11: updateStatus

import org.eclipse.swt.widgets.Label; //导入依赖的package包/类
@Override
protected GridCompositeStatus updateStatus(Object source) {

    GridCompositeStatus status = super.updateStatus(source);
    if (status.getType().isError()) {
        return status;
    }

    String message;

    if (source instanceof Label) {
        ZnodeModel parentZnodeModel = getParentZnodeModel();

        Label parentValueLabel = (Label) getControl(CONTROL_NAME_PARENT_PATH_LABEL);
        if (parentValueLabel == source && parentZnodeModel.isDestroyed()) {
            Znode parentZnode = parentZnodeModel.getData();
            String parentZnodePath = parentZnode.getPath();
            message = "Parent Znode '" + parentZnodePath + "' not available.";
            return new GridCompositeStatus(CONTROL_NAME_PARENT_PATH_LABEL, message,
                    GridCompositeStatus.Type.ERROR_INVALID);

        }
    }

    return GridCompositeStatus.OK_STATUS;
}
 
开发者ID:baloise,项目名称:eZooKeeper,代码行数:27,代码来源:ZnodeNewWizardComposite.java

示例12: ChartManager

import org.eclipse.swt.widgets.Label; //导入依赖的package包/类
public ChartManager ( final Composite parent, final int style )
{
    super ( parent, style );

    setLayout ( makeLayout () );

    // title row

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

    // row 2

    this.chartArea = new ChartArea ( this, SWT.NONE );
    this.chartArea.setLayoutData ( makeMainLayoutData () );

    addDisposeListener ( new DisposeListener () {

        @Override
        public void widgetDisposed ( final DisposeEvent e )
        {
            onDispose ();
        }
    } );
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:26,代码来源:ChartManager.java

示例13: PluginIntsParameter

import org.eclipse.swt.widgets.Label; //导入依赖的package包/类
public PluginIntsParameter(Composite pluginGroup,IntsParameter parameter) {
  controls = new Control[2];

  controls[0] = new Label(pluginGroup,SWT.NULL);
  Messages.setLanguageText(controls[0],parameter.getLabelKey());

  com.biglybt.ui.swt.config.IntListParameter ilp =
  	new com.biglybt.ui.swt.config.IntListParameter(
  	    pluginGroup,
  	    parameter.getKey(),
			parameter.getDefaultValue(),
			parameter.getLabels(),
			parameter.getValues());
  controls[1] = ilp.getControl();
  GridData gridData = new GridData();
  gridData.widthHint = 100;
  Utils.setLayoutData(controls[1], gridData);
  new Label(pluginGroup,SWT.NULL);
}
 
开发者ID:BiglySoftware,项目名称:BiglyBT,代码行数:20,代码来源:PluginIntsParameter.java

示例14: createContents

import org.eclipse.swt.widgets.Label; //导入依赖的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

示例15: BufferedLabel

import org.eclipse.swt.widgets.Label; //导入依赖的package包/类
public
BufferedLabel(
	Composite	composite,
	int			attrs )
{
	super((attrs&SWT.DOUBLE_BUFFERED)==0?new Label( composite, attrs ):new DoubleBufferedLabel( composite, attrs ));

	label = (Control)getWidget();

	ClipboardCopy.addCopyToClipMenu(
		label,
		new ClipboardCopy.copyToClipProvider()
		{
			@Override
			public String
			getText()
			{
				return( BufferedLabel.this.getText());
			}
		});
}
 
开发者ID:BiglySoftware,项目名称:BiglyBT,代码行数:22,代码来源:BufferedLabel.java


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