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


Java Label.setLayoutData方法代码示例

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


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

示例1: CustomElementSelectionForm

import org.eclipse.swt.widgets.Label; //导入方法依赖的package包/类
/**
 * Create the composite.
 */
public CustomElementSelectionForm(Composite parent, int style) {
	super(parent, style);
	setLayout(new GridLayout(2, false));

	treeViewer = new TreeViewer(this, SWT.BORDER);
	Tree tree = getTreeViewer().getTree();

	// Set a minimum height to prevent weird dialog dimensions
	tree.setLayoutData(GridDataFactory.fillDefaults().grab(true, true).span(2, 1).minSize(0, 200).create());

	elementLabel = new Label(this, SWT.NONE);
	elementLabel.setLayoutData(GridDataFactory.swtDefaults().create());
	elementLabel.setText("New Label");

	elementInput = new SuffixText(this, SWT.BORDER);// new Text(this, SWT.BORDER);
	elementInput.setLayoutData(GridDataFactory.fillDefaults().grab(true, false).create());
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:21,代码来源:CustomElementSelectionForm.java

示例2: createComposite

import org.eclipse.swt.widgets.Label; //导入方法依赖的package包/类
/**
 * This method initializes composite
 * 
 */
private void createComposite() {
	GridData gridData7 = new org.eclipse.swt.layout.GridData();
	gridData7.horizontalAlignment = org.eclipse.swt.layout.GridData.FILL;
	gridData7.verticalAlignment = org.eclipse.swt.layout.GridData.CENTER;
	GridData gridData4 = new org.eclipse.swt.layout.GridData();
	gridData4.horizontalAlignment = org.eclipse.swt.layout.GridData.FILL;
	gridData4.grabExcessHorizontalSpace = false;
	gridData4.verticalAlignment = org.eclipse.swt.layout.GridData.CENTER;
	GridLayout gridLayout4 = new GridLayout();
	gridLayout4.numColumns = 2;
	compositeOutputFooter = new Composite(compositeOutput, SWT.NONE);
	compositeOutputFooter.setBackground(new Color(Display.getCurrent(), 162, 194, 250));
	compositeOutputFooter.setLayout(gridLayout4);
	compositeOutputFooter.setLayoutData(gridData4);
	label1 = new Label(compositeOutputFooter, SWT.NONE);
	label1.setBackground(new Color(Display.getCurrent(), 162, 194, 250));
	label1.setText("Last detected screen class:");
	label1.setToolTipText("Displays the current screen class name");

	labelLastDetectedScreenClass = new Label(compositeOutputFooter, SWT.NONE);
	labelLastDetectedScreenClass.setBackground(new Color(Display.getCurrent(), 162, 194, 250));
	labelLastDetectedScreenClass.setText("(unknown)");
	labelLastDetectedScreenClass.setLayoutData(gridData7);
	labelLastDetectedScreenClass.setToolTipText("Displays the current screen class name");
}
 
开发者ID:convertigo,项目名称:convertigo-eclipse,代码行数:30,代码来源:ConnectorEditorPart.java

示例3: createToolBarManagerWithTitle

import org.eclipse.swt.widgets.Label; //导入方法依赖的package包/类
protected void createToolBarManagerWithTitle(Composite parent, ToolBarConfiguration toolBarConfiguration, String toolBarId) {
	
	Composite compo = new Composite(composite, SWT.NONE);
	GridLayout layout = new GridLayout(3, false);
	layout.marginHeight = 0;
	layout.marginWidth = 0;
	layout.verticalSpacing = 0;
	compo.setLayout(layout);
	compo.setLayoutData(new  GridData(GridData.FILL_HORIZONTAL));
	
	Label imageLabel = new Label(compo, SWT.NONE);
	imageLabel.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING));
	imageLabel.setImage(AvroSchemaEditorActivator.getNoneImage());
	toolBarImageLabels.put(toolBarId, imageLabel);
	
	Label titleLabel = new Label(compo, SWT.NONE);
	titleLabel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
	toolBarTextLabels.put(toolBarId, titleLabel);
	
	createToolBarManager(compo, toolBarConfiguration, toolBarId);
}
 
开发者ID:Talend,项目名称:avro-schema-editor,代码行数:22,代码来源:SchemaViewer.java

示例4: 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

示例5: addErrorLabel

import org.eclipse.swt.widgets.Label; //导入方法依赖的package包/类
/**
 * 	
 * @param container
 */
private void addErrorLabel(Composite container) {
		
	lblPropertyError = new Label(container, SWT.NONE);
	lblPropertyError.setLayoutData(new GridData(SWT.FILL,SWT.CENTER,true,true,0,0));
	lblPropertyError.setForeground(CustomColorRegistry.INSTANCE.getColorFromRegistry( 255, 0, 0));
	lblPropertyError.setText(Messages.HIVE_FIELD_DIALOG_ERROR);
	lblPropertyError.setVisible(false);
	lblPropertyError.setData("Error", lblPropertyError);
	keyValueTableViewer.setData("Error", lblPropertyError);
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:15,代码来源:HivePartitionKeyValueDialog.java

示例6: createTitleComposite

import org.eclipse.swt.widgets.Label; //导入方法依赖的package包/类
private void createTitleComposite(Composite mainComposite) {
	Composite titleComposite = new Composite(mainComposite, SWT.NONE);
	titleComposite.setLayout(new GridLayout(1, false));
	titleComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false, 1, 1));
	
	Label title = new Label(titleComposite, SWT.NONE);
	title.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
	title.setText(Messages.JDK_PATH_DIALOG_MESSAGE);
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:10,代码来源:JdkPathDialog.java

示例7: 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

示例8: createStatsView

import org.eclipse.swt.widgets.Label; //导入方法依赖的package包/类
private GridComposite createStatsView(GridComposite parent) {
    GridComposite c = null;
    if (true) {
        c = new GridComposite(parent, SWT.BORDER_DOT);

        c.initLayout(2, false, GridData.VERTICAL_ALIGN_BEGINNING | GridData.FILL_HORIZONTAL);
        c.noMargins();


        c.getGridData().horizontalIndent = 0;
        c.getGridData().verticalIndent = 0;
        // c.debugLayout(SWT.COLOR_BLUE);

    } else {
        c = parent;
    }

    for (BookElement s : elems) {


        String labelName = getName(s);
        Label l = c.newLabel();
        l.setText(Translate.getInstance().labelName(labelName) + ": ");
        l.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING));
        l.setFont(FontShop.tableFontBold());
        l.setBackground(bgColor);

        Label d = c.newLabel();
        d.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
        d.setFont(FontShop.tableFont());
        d.setBackground(bgColor);
        d.setData(s);
        stats[s.ordinal()] = d;
    }
    return c;
}
 
开发者ID:openaudible,项目名称:openaudible,代码行数:37,代码来源:BookInfoPanel.java

示例9: 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 = 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

示例10: 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

示例11: createContent

import org.eclipse.swt.widgets.Label; //导入方法依赖的package包/类
@Override
public void createContent ( final Composite parent )
{
    parent.setLayout ( new GridLayout ( 1, false ) );

    final Label label = new Label ( parent, SWT.NONE );
    label.setText ( System.getProperty ( Properties.MAIN_PAGE_TEXT, "Administration Console" ) );
    label.setData ( RWT.CUSTOM_VARIANT, "mainLabel" );

    final GridData gd = new GridData ( SWT.CENTER, SWT.BEGINNING, true, true );
    gd.verticalIndent = 20;
    label.setLayoutData ( gd );
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:14,代码来源:MainPage.java

示例12: createXPath

import org.eclipse.swt.widgets.Label; //导入方法依赖的package包/类
private void createXPath(Composite parent) {
       GridData gridData = new GridData();
       gridData.horizontalSpan = numColumns;
       gridData.horizontalAlignment = GridData.FILL;
	
	Label label = new Label(parent, SWT.NULL);
	label.setLayoutData(gridData);
	label.setText("&XPath : " + xpath);
}
 
开发者ID:convertigo,项目名称:convertigo-eclipse,代码行数:10,代码来源:XMLTableWizardPage.java

示例13: attachAddRowButton

import org.eclipse.swt.widgets.Label; //导入方法依赖的package包/类
private void attachAddRowButton(Composite composite) {
	Label btnAdd = new Label(composite, SWT.NONE);
	GridData gd_btnAdd = getGridControlButtonLayout();
	btnAdd.setLayoutData(gd_btnAdd);
	btnAdd.setText("");
	btnAdd.setImage(ImagePathConstant.ADD_BUTTON.getImageFromRegistry());
	
	attachAddRowButtonListener(btnAdd);
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:10,代码来源:ParameterGridDialog.java

示例14: createControl

import org.eclipse.swt.widgets.Label; //导入方法依赖的package包/类
public void createControl(Composite parent) {		
	container = new Composite(parent, SWT.NONE);
	container.setLayout(new GridLayout(1, true));
	
	Label label = new Label(container, SWT.WRAP);
	label.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
	label.setText("A new Convertigo workspace will be created in:\n\n" +
			"\t'" + Engine.PROJECTS_PATH + "'\n\n" +
			"This action will be completed when this wizard finishes.");
	
	setControl(container);
}
 
开发者ID:convertigo,项目名称:convertigo-eclipse,代码行数:13,代码来源:WorkspaceCreationPage.java

示例15: createControl

import org.eclipse.swt.widgets.Label; //导入方法依赖的package包/类
@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.NewConnectorWizard_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.SINGLE | SWT.BORDER | SWT.FULL_SELECTION | SWT.H_SCROLL | SWT.V_SCROLL);
	refExtensionViewer = new CheckboxTableViewer(table);

	refExtensionViewer.setContentProvider(ArrayContentProvider.getInstance());

	refExtensionViewer.addSelectionChangedListener(new ISelectionChangedListener() {
		@Override
		public void selectionChanged(SelectionChangedEvent event) {
			setPageComplete(validatePage());
		}
	});

	Collection<String> registeredExtensions = new ArrayList<String>(
			OcciRegistry.getInstance().getRegisteredExtensions());
	// removed the OCCI core extension as it is added by default.
	registeredExtensions.remove(OcciCoreConstants.OCCI_CORE_SCHEME);
	refExtensionViewer.setInput(registeredExtensions);
}
 
开发者ID:occiware,项目名称:OCCI-Studio,代码行数:42,代码来源:NewConnectorWizard.java


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