Java 类org.eclipse.swt.widgets.Label 实例源码

项目:n4js    文件:FileTypeComponent.java   
/**
 * 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();
}
项目:bdf2    文件:PropertySectionTransitionLabel.java   
@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);
}
项目:convertigo-eclipse    文件:TransactionXSDTypesDialogComposite.java   
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));
}
项目:n4js    文件:N4MFWizardNewProjectCreationPage.java   
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;
}
项目:n4js    文件:SpecProcessPage.java   
/**
 * (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);
}
项目:com.onpositive.prefeditor    文件:NewPlatformPreferenceDialog.java   
@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);
}
项目:BiglyBT    文件:ProgressReporterWindow.java   
/**
 * 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;

}
项目:time4sys    文件:ShowHideWizardPage.java   
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);
}
项目:avro-schema-editor    文件:AvroSchemaLogView.java   
@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();
}
项目:eZooKeeper    文件:ZnodeNewWizardComposite.java   
@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;
}
项目:neoscada    文件:ChartManager.java   
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 ();
        }
    } );
}
项目:BiglyBT    文件:PluginIntsParameter.java   
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);
}
项目:neoscada    文件:DefaultPage.java   
@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;
}
项目:BiglyBT    文件:BufferedLabel.java   
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());
            }
        });
}
项目:bdf2    文件:UpdateDialog.java   
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;
}
项目:neoscada    文件:QueryOfflineViewPart.java   
@Override
public void createPartControl ( final Composite parent )
{
    final GridLayout layout = new GridLayout ( 1, false );
    layout.horizontalSpacing = layout.verticalSpacing = 0;
    layout.marginHeight = layout.marginWidth = 0;

    parent.setLayout ( layout );

    this.stateLabel = new Label ( parent, SWT.NONE );
    this.stateLabel.setLayoutData ( new GridData ( SWT.FILL, SWT.FILL, true, false ) );

    final Composite wrapper = new Composite ( parent, SWT.NONE );
    wrapper.setLayoutData ( new GridData ( SWT.FILL, SWT.FILL, true, true ) );

    this.viewer = EventViewHelper.createTableViewer ( wrapper, getViewSite (), this.events );

    addSelectionListener ();
}
项目:gw4e.project    文件:GW4ELaunchConfigurationTab.java   
/**
 * @wbp.parser.entryPoint
 */
@Override
public void createControl(Composite p) {
    parent_1 = new Composite(p, SWT.NONE);
    setControl(parent_1);

    GridLayout gl_parent_1 = new GridLayout();
    gl_parent_1.numColumns = 3;
    parent_1.setLayout(gl_parent_1);

    createAllSections(parent_1);

    Dialog.applyDialogFont(parent_1);
    new Label(parent_1, SWT.NONE);

    validatePage();
    updateLaunchConfigurationDialog();
    updateConfigState();
}
项目:Hydrograph    文件:ParamterValueDialog.java   
/**
 * Create contents of the dialog.
 * @param parent
 */
@Override
protected Control createDialogArea(Composite parent) {

    getShell().setText("Parameter value dialog");

    Composite container = (Composite) super.createDialogArea(parent);
    container.setLayout(new GridLayout(1, false));

    text = new Text(container, SWT.BORDER | SWT.MULTI | SWT.VERTICAL | SWT.HORIZONTAL);
    text.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));

    Label lblNoteVaulesEntered = new Label(container, SWT.NONE);
    lblNoteVaulesEntered.setText(DIALOG_NOTE);

    if(StringUtils.isNotBlank(this.initialValue))
        text.setText(this.initialValue);

    getShell().setMinimumSize(getInitialSize());
    return container;
}
项目:vertigo-chroma-kspplugin    文件:VertigoPropertyPage.java   
private void addVersionSection(Composite parent) {
    Composite composite = createDefaultComposite(parent);

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

    // Owner text field
    legacyVersionCombo = new Combo(composite, SWT.DROP_DOWN | SWT.READ_ONLY);
    GridData gd = new GridData();
    gd.widthHint = convertWidthInCharsToPixels(COMBO_FIELD_WIDTH);
    legacyVersionCombo.setLayoutData(gd);

    // Populate owner text field
    LegacyVersion legacyVersion = LegacyManager.getInstance().getVersion(getProject());
    legacyVersionCombo.setItems(LegacyVersion.names());
    legacyVersionCombo.setText(legacyVersion.name());
}
项目:gw4e.project    文件:GW4ELaunchConfigurationTab.java   
/**
 * Create the element that allow to select a start element See the
 * GraphWalker offline command for more information
 */
private void createStartElementSection(Composite parent) {

    Label fGeneratorLabel = new Label(parent, SWT.NONE);
    fGeneratorLabel.setText("Start Element");
    gd = new GridData();
    gd.horizontalSpan = 1;
    gd.horizontalIndent = 25;
    fGeneratorLabel.setLayoutData(gd);

    fStartNodeText = new Text(parent, SWT.SINGLE | SWT.BORDER);
    fStartNodeText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
    fStartNodeText.addModifyListener(new ModifyListener() {
        @Override
        public void modifyText(ModifyEvent evt) {
            validatePage();
            updateConfigState();
            fStartNodeText.setFocus();
        }
    });
    fStartNodeText.setData(GW4E_LAUNCH_CONFIGURATION_CONTROL_ID, GW4E_LAUNCH_CONFIGURATION_TEXT_ID_START_ELEMENT);
}
项目:Hydrograph    文件:ComponentTooltip.java   
private void addLookupConfigurationDetailsInTooltip(final Composite container, String driverKey, String lookupKey, String lookupPort)
{
    Label driverKeyLabel = new Label(container, SWT.NONE);
    Label lookupKeyLabel = new Label(container, SWT.NONE);
    Label lookupPortLabel = new Label(container, SWT.NONE);
    driverKeyLabel.setText(DRIVER_KEY+driverKey);
    lookupKeyLabel.setText(LOOKUP_KEY+lookupKey);
    lookupPortLabel.setText(LOOKUP_PORT+lookupPort);
    driverKeyLabel.setBackground(container.getDisplay().getSystemColor(SWT.COLOR_INFO_BACKGROUND));
    driverKeyLabel.addListener(SWT.MouseUp, getMouseClickListener(container));
    lookupKeyLabel.setBackground(container.getDisplay().getSystemColor(SWT.COLOR_INFO_BACKGROUND));
    lookupKeyLabel.addListener(SWT.MouseUp, getMouseClickListener(container));
    lookupPortLabel.setBackground(container.getDisplay().getSystemColor(SWT.COLOR_INFO_BACKGROUND));
    lookupPortLabel.addListener(SWT.MouseUp, getMouseClickListener(container));
    showErrorMessageWhenFieldIsEmpty(driverKey,driverKeyLabel,Messages.DRIVER_KEY_ERROR_MESSAGE);
    showErrorMessageWhenFieldIsEmpty(lookupKey,lookupKeyLabel,Messages.LOOKUP_KEY_ERROR_MESSAGE);
}
项目:convertigo-eclipse    文件:LimitCharsLogsPreferenceDialog.java   
@Override
protected Control createDialogArea(Composite parent) {      

    Composite composite = new Composite(parent, SWT.NONE);

    Label labelDescription = new Label(composite, SWT.WRAP);
    labelDescription.setText("Limit chars logs");

    final Spinner spinnerBox = new Spinner(composite, SWT.WRAP);
    spinnerBox.setMaximum(MAX_LOG_CHARS);
    spinnerBox.setMinimum(MIN_LOG_CHARS);
    spinnerBox.setSelection(limitLogsChars);
    spinnerBox.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));


    spinnerBox.addModifyListener(new ModifyListener() {
        public void modifyText(ModifyEvent event) {
            limitLogsChars = Integer.parseInt(spinnerBox.getText());
        }
    });

    composite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
    composite.setLayout(new GridLayout(2, false));

    return composite;
}
项目:pdi-git-plugin    文件:UsernamePasswordDialog.java   
@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;
}
项目:scanning    文件:StatusQueueLaunchView.java   
private void createTextControl(String slabel, final String propName, Composite content) {

        final IPreferenceStore store = Activator.getDefault().getPreferenceStore();

        final Label label = new Label(content, SWT.NONE);
        label.setText(slabel);

        final Text text = new Text(content, SWT.BORDER);
        text.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
        text.setText(store.getString(propName));
        text.addModifyListener(new ModifyListener() {
            @Override
            public void modifyText(ModifyEvent e) {
                store.setValue(propName, text.getText());
            }
        });
    }
项目:pgcodekeeper    文件:NewObjectWizard.java   
@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);
}
项目:convertigo-eclipse    文件:JavelinAttributeEditorComposite.java   
private void initialize() {
    checkBoxNone = new Button(this, SWT.CHECK);
    checkBoxNone.setText("none");
    checkBoxNone
            .addSelectionListener(new org.eclipse.swt.events.SelectionAdapter() {
                public void widgetSelected(org.eclipse.swt.events.SelectionEvent e) {
                    setUIState(!((Button)e.getSource()).getSelection());
                }
            });
    GridLayout gridLayout = new GridLayout();
    gridLayout.numColumns = 2;
    this.setLayout(gridLayout);
    label = new Label(this, SWT.NONE);
    label.setText("");
    createGroupColor();
    createGroupDecoration();
    this.setSize(new org.eclipse.swt.graphics.Point(253,241));
}
项目:gw4e.project    文件:TemplateComposite.java   
private void createFirstName(Composite container) {
    Label lbtName = new Label(container, SWT.NONE);
    lbtName.setText("Name");

    GridData dataName = new GridData();
    dataName.grabExcessHorizontalSpace = true;
    dataName.horizontalAlignment = GridData.FILL;

    txtValue = new Text(container, SWT.BORDER);
    txtValue.setLayoutData(dataName);
}
项目:n4js    文件:WizardPreviewProvider.java   
private void createInfoBar() {
    Composite infoComposite = new Composite(this, SWT.BORDER);
    infoComposite
            .setLayoutData(GridDataFactory.fillDefaults()
                    .grab(true, false)
                    .create());

    infoComposite.setLayout(GridLayoutFactory.fillDefaults().numColumns(1).create());

    infoLabel = new Label(infoComposite, SWT.NONE);
    infoLabel.setLayoutData(GridDataFactory.fillDefaults().grab(true, false).create());
}
项目:bdf2    文件:ColumnDialog.java   
private void createErrorLabel(Composite container) {
    errorLabel = new Label(container, SWT.NONE);
    errorLabel.setText(DIALOG_MESSAGE);
    GridData gridData = new GridData();
    gridData.horizontalAlignment = SWT.FILL;
    gridData.grabExcessHorizontalSpace = true;
    gridData.horizontalAlignment = GridData.FILL;
    gridData.horizontalSpan = 6;
    errorLabel.setLayoutData(gridData);
}
项目:Hydrograph    文件:DisposeSchemaGridListener.java   
@Override
public void mouseAction(PropertyDialogButtonBar propertyDialogButtonBar,
        ListenerHelper helpers, Event event, Widget... widgets) {
       Table table=(Table)event.widget;
       Shell tip=(Shell) table.getData("tip");
       Label label=(Label) table.getData("label");
    if(tip!=null) 
    {
     tip.dispose();
        tip = null;
        label = null;
    }
}
项目:bdf2    文件:ModelFilePage.java   
public void createControl(Composite parent) {
    composite = new Composite(parent, SWT.NONE);
    composite.setLayout(new FormLayout());

    Label label = setCreationMethod();
    createNewModelFile(parent, label);
    selectExistingModelFile(label);
}
项目:Hydrograph    文件:CategoriesDialogTargetComposite.java   
/**
 * Create the composite.
 * 
 * @param parent
 * @param categoriesDialogSourceComposite 
 * @param style
 */
public CategoriesDialogTargetComposite(Composite parent, CategoriesDialogSourceComposite categoriesDialogSourceComposite, int style) {
    super(parent, style);
    setLayout(new GridLayout(2, false));
    new Label(this, SWT.NONE);

    Composite upperComposite = new Composite(this, SWT.NONE);
    upperComposite.setLayout(new GridLayout(2, false));
    GridData gd_upperComposite = new GridData(SWT.FILL, SWT.FILL, true, false, 0, 0);
    gd_upperComposite.heightHint = 34;
    upperComposite.setLayoutData(gd_upperComposite);

    Label lblSelectedCategories = new Label(upperComposite, SWT.NONE);
    lblSelectedCategories.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false, 1, 1));
    lblSelectedCategories.setText("Selected Packages");

    createDelButton(upperComposite);

    createMiddleLayer();

    targetList = new List(this, SWT.BORDER | SWT.MULTI | SWT.FULL_SELECTION|SWT.V_SCROLL|SWT.H_SCROLL);
    targetList.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));

    loadPackagesFromPropertyFileSettingFolder();

    addDropSupport();

    linkSourceAndTarget(categoriesDialogSourceComposite);
}
项目:Hydrograph    文件:SelectionDatabaseWidget.java   
/**
 * Create Label on Stack layout composite
 * @param labelName
 * @param compositeWithStack
 * @return
 */
private AbstractELTWidget createWidgetlabel(String labelName, ELTSubGroupCompositeWithStack compositeWithStack) {
    ELTDefaultLable label = new ELTDefaultLable(labelName).lableWidth(80);
    compositeWithStack.attachWidget(label);
    Label labelAlignment = ((Label) label.getSWTWidgetControl());
    GridData data = (GridData) labelAlignment.getLayoutData();
    data.verticalIndent = 5;

    return label;
}
项目:n4js    文件:AbstractExportToSingleFileWizardPage.java   
/**
 * 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
}
项目:n4js    文件:NpmToolRunnerPage.java   
@Override
public void createControl(Composite parent) {
    initializeDialogUnits(parent);
    Composite composite = new Composite(parent, SWT.NULL);
    composite.setLayout(new GridLayout());

    runNpmCheckbox = new Button(composite, SWT.CHECK | SWT.LEFT);
    runNpmCheckbox.setLayoutData(new GridData(SWT.LEFT, SWT.TOP, true, false));
    runNpmCheckbox.setText("Run npm tool for each project");
    runNpmCheckbox.setFont(parent.getFont());
    runNpmCheckbox.addListener(SWT.Selection, this);

    Label label = createPlainLabel(composite, "npm");
    label.setLayoutData(new GridData(SWT.LEFT, SWT.TOP, true, false));

    createOptionsGroup(composite);

    textProcessOut = new Text(composite, SWT.MULTI | SWT.READ_ONLY);
    textProcessOut.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));

    restoreWidgetValues();

    setControl(composite);

    // sync the page completion
    updatePageCompletion();
}
项目:orientdb-oda-birt    文件:CustomDataSetWizardPage.java   
/**
 * 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;
}
项目:ide-plugins    文件:CodeSWT.java   
@Override
protected Control createButtonBar(Composite parent) {
    final Composite buttonBar = (Composite) super.createButtonBar(parent);

    errorLabel = new Label(buttonBar, SWT.LEFT);
    errorLabel.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, true, 1, 1));
    errorLabel.setText("There are no defined remote functions");
    errorLabel.setForeground(display.getSystemColor(SWT.COLOR_RED));
    errorLabel.setVisible(false);
    errorLabel.setFont(topFont);
    errorLabel.moveAbove(super.buttonControl);

    return buttonBar;
}
项目:BiglyBT    文件:SubscriptionWizard.java   
private void populateHeader(Composite header) {
    header.setBackground(Colors.getSystemColor(display, SWT.COLOR_WHITE));
    title = new Label(header, SWT.WRAP);

    title.setFont(titleFont);

    FillLayout layout = new FillLayout();
    layout.marginHeight = 10;
    layout.marginWidth = 10;
    header.setLayout(layout);

}
项目:Hydrograph    文件:ELTLookupConfigGrid.java   
public Label labelWidget(Composite parent, int style, int[] bounds, String value) {
    Label label = new Label(parent, style);
    label.setBounds(bounds[0], bounds[1], bounds[2], bounds[3]);
    label.setText(value);

    return label;
}
项目:eclipse-jenkins-editor    文件:JenkinsEditorPreferencePage.java   
@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);
}