Package org.eclipse.jface.layout

Examples of org.eclipse.jface.layout.GridDataFactory


        });

        // Layout
        composite.setLayout(new GridLayout(2, false));
        table.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 4));
        GridDataFactory buttonGD = GridDataFactory.swtDefaults().align(SWT.FILL,
            SWT.CENTER);
        btnAdd.setLayoutData(buttonGD.create());
        btnEdit.setLayoutData(buttonGD.create());
        btnRemove.setLayoutData(buttonGD.create());
    }
View Full Code Here


    container.setLayout(layout);
    layout.numColumns = 3;
    layout.verticalSpacing = 9;
    layout.marginBottom = 10;

        GridDataFactory singleRowGridDataFactory = GridDataFactory.swtDefaults().align(SWT.LEFT, SWT.CENTER)
                .span(layout.numColumns, 1);

    useExistingServer = new Button(container, SWT.RADIO);
      useExistingServer.setText("Add to existing server");
        singleRowGridDataFactory.applyTo(useExistingServer);

      Label existingServerLabel = new Label(container, SWT.NONE);
      GridData locationLabelData = new GridData();
        locationLabelData.horizontalIndent = HORIZONTAL_INDENT;
      existingServerLabel.setLayoutData(locationLabelData);
      existingServerLabel.setText("Location:");
      existingServerLabel.setEnabled(true);

        existingServerCombo = new SlingLaunchpadCombo(container, null);
        existingServerCombo.getWidget().addModifyListener(new ModifyListener() {
        public void modifyText(ModifyEvent e) {
          dialogChanged();
        }
      });
        existingServerCombo.refreshRepositoryList(new NullProgressMonitor());
        existingServerCombo.getWidget().setEnabled(true);

        {
            startExistingServerButton = new Button(container, SWT.CHECK);
            GridData gd = new GridData(SWT.FILL, SWT.FILL, true, false, 2, 1);
            gd.horizontalIndent = HORIZONTAL_INDENT;
            startExistingServerButton.setLayoutData(gd);
            startExistingServerButton.setText("Start server after project creation (if server not yet started).");
            startExistingServerButton.setSelection(true);
        }

        skipServerConfiguration = new Button(container, SWT.RADIO);
        skipServerConfiguration.setText("Don't deploy on a server");
        singleRowGridDataFactory.applyTo(skipServerConfiguration);

        setupNewServer = new Button(container, SWT.RADIO);
        setupNewServer.setText("Setup new server");
        singleRowGridDataFactory.applyTo(setupNewServer);
     
        newLabel(container, "Server name:");
        newServerName = newText(container);
     
        newLabel(container, "Host name:");
View Full Code Here

        bold = new Font(body.getDisplay(), fd[0].getName(), fd[0].getHeight(),
                SWT.BOLD);

        GridLayout layout = new GridLayout(2, false);
        body.setLayout(layout);
        GridDataFactory defaultGridData = GridDataFactory.fillDefaults();

        String className = wrapper.getMBeanInfo().getClassName();

        toolkit.createLabel(body, Messages.className);
        Label classNameLabel = toolkit.createLabel(body, className, SWT.WRAP
                | SWT.READ_ONLY);
        classNameLabel.setFont(bold);
        classNameLabel.setLayoutData(defaultGridData.create());

        String description = wrapper.getMBeanInfo().getDescription();

        toolkit.createLabel(body, Messages.description);
        Text descriptionText = toolkit.createText(body, description, SWT.MULTI
                | SWT.WRAP | SWT.READ_ONLY);
        descriptionText.setLayoutData(defaultGridData.create());

        Section notifSection = toolkit.createSection(body, Section.TITLE_BAR
                | Section.TWISTIE | Section.TWISTIE);
        notifSection.setText(Messages.InfoPage_notificationsSectionTitle);
        GridDataFactory.fillDefaults().span(2, 1).grab(true, true).applyTo(
View Full Code Here

  public LayoutChoicesControl(Composite parent, Style style) {
    super(parent, SWT.NONE);
    style.getLayoutFactory().applyTo(this);

    GridDataFactory gridDataBldr = GridDataFactory.fillDefaults()
        .grab(true, true)
        .align(SWT.FILL, SWT.CENTER);

    Label layoutLabel = new Label(this, SWT.NONE);
    layoutLabel.setText("Layout graph: ");
    gridDataBldr.applyTo(layoutLabel);

    layoutPicker = new LayoutPickerControl(this);
    gridDataBldr.applyTo(layoutPicker);

    Label relSetLabel = new Label(this, SWT.NONE);
    relSetLabel.setText("Layout relations: ");
    gridDataBldr.applyTo(relSetLabel);

    relSetPicker = new RelationshipSetPickerControl(this);
    gridDataBldr.applyTo(relSetPicker);
  }
View Full Code Here

    rebaseSection.setClient(rebaseComposite);

    rebaseSection.setLayoutData(GridDataFactory.fillDefaults().create());
    rebaseComposite.setLayout(GridLayoutFactory.fillDefaults()
        .numColumns(3).equalWidth(true).create());
    GridDataFactory buttonGridData = GridDataFactory.fillDefaults().align(
        SWT.FILL, SWT.CENTER);

    this.rebaseAbortButton = toolkit.createButton(rebaseComposite,
        UIText.StagingView_RebaseAbort, SWT.PUSH);
    rebaseAbortButton.addSelectionListener(new SelectionAdapter() {
      @Override
      public void widgetSelected(SelectionEvent e) {
        rebaseAbort();
      }
    });
    rebaseAbortButton.setImage(getImage(UIIcons.REBASE_ABORT));
    buttonGridData.applyTo(rebaseAbortButton);

    this.rebaseSkipButton = toolkit.createButton(rebaseComposite,
        UIText.StagingView_RebaseSkip, SWT.PUSH);
    rebaseSkipButton.addSelectionListener(new SelectionAdapter() {
      @Override
      public void widgetSelected(SelectionEvent e) {
        rebaseSkip();
      }
    });
    rebaseSkipButton.setImage(getImage(UIIcons.REBASE_SKIP));
    buttonGridData.applyTo(rebaseSkipButton);

    this.rebaseContinueButton = toolkit.createButton(rebaseComposite,
        UIText.StagingView_RebaseContinue, SWT.PUSH);
    rebaseContinueButton.addSelectionListener(new SelectionAdapter() {
      @Override
      public void widgetSelected(SelectionEvent e) {
        rebaseContinue();
      }
    });
    rebaseContinueButton.setImage(getImage(UIIcons.REBASE_CONTINUE));
    buttonGridData.applyTo(rebaseContinueButton);

    showControl(rebaseSection, false);

    commitMessageSection = toolkit.createSection(rebaseAndCommitComposite,
        ExpandableComposite.TITLE_BAR);
View Full Code Here

    /**
     * Create the scale control.
     */
    private void createText(Composite parent, int gridColumns)
    {
        final GridDataFactory factory = GUIFactory.editorGridData();

        final GridData layoutData = factory.create();
        layoutData.horizontalSpan = gridColumns;
        layoutData.grabExcessHorizontalSpace = false;
        layoutData.verticalAlignment = SWT.CENTER;

        text = new Text(parent, SWT.RIGHT | SWT.SINGLE);
View Full Code Here

     *
     */
    @Override
    public void createEditor(Composite parent, int gridColumns)
    {
        final GridDataFactory factory = GUIFactory.editorGridData();

        final GridData spinnerLayoutData = factory.create();
        spinnerLayoutData.horizontalSpan = 1;
        spinnerLayoutData.grabExcessHorizontalSpace = false;
        spinnerLayoutData.verticalAlignment = SWT.CENTER;

        final GridData scaleLayoutData = factory.span(gridColumns - 1, 1).grab(true,
            false).create();

        if (minBounded && maxBounded)
        {
            createScale(parent);
View Full Code Here

    /**
     * Create the scale control.
     */
    private void createText(Composite parent, int gridColumns)
    {
        final GridDataFactory factory = GUIFactory.editorGridData();

        final GridData layoutData = factory.create();
        layoutData.horizontalSpan = gridColumns;
        layoutData.grabExcessHorizontalSpace = false;
        layoutData.verticalAlignment = SWT.CENTER;

        text = new Text(parent, SWT.LEAD | SWT.SINGLE | SWT.BORDER);
View Full Code Here

        this.setLayout(layout);

        /*
         * Create visual components for editors.
         */
        final GridDataFactory labelFactory = GridDataFactory.fillDefaults().span(
            maxColumns, 1);

        boolean firstEditor = true;
        for (String key : sortedKeys)
        {
            final AttributeDescriptor descriptor = attributeDescriptors.get(key);
            final IAttributeEditor editor = editors.get(key);
            final AttributeEditorInfo editorInfo = editorInfos.get(key);

            if (editor == null)
            {
                // Skip attributes without the editor.
                continue;
            }

            final Object defaultValue;
            if (currentValues != null && currentValues.get(key) != null)
            {
                defaultValue = currentValues.get(key);
            }
            else
            {
                defaultValue = attributeDescriptors.get(key).defaultValue;
            }

            // Add label to editors that do not have it.
            if (!editorInfo.displaysOwnLabel)
            {
                final Label label = new Label(this, SWT.LEAD);
                final GridData gd = labelFactory.create();
                if (!firstEditor)
                {
                    gd.verticalIndent = SPACE_BEFORE_LABEL;
                }
                label.setLayoutData(gd);
View Full Code Here

    }

    @Override
    protected void createFormElements(Composite editArea)
    {
        GridDataFactory gdf = GridDataFactory.fillDefaults().align(SWT.FILL, SWT.FILL).grab(true, false);

        // portfolio from
        Label label = new Label(editArea, SWT.NONE);
        label.setText(Messages.ColumnPortfolioFrom);
        ComboViewer comboFrom = new ComboViewer(editArea, SWT.READ_ONLY);
        comboFrom.setContentProvider(ArrayContentProvider.getInstance());
        comboFrom.setInput(getModel().getClient().getActivePortfolios().toArray());
        gdf.applyTo(comboFrom.getControl());
        final IViewerObservableValue observableFrom = ViewersObservables.observeSingleSelection(comboFrom);

        // portfolio to
        label = new Label(editArea, SWT.NONE);
        label.setText(Messages.ColumnPortfolioTo);
        ComboViewer comboTo = new ComboViewer(editArea, SWT.READ_ONLY);
        comboTo.setContentProvider(ArrayContentProvider.getInstance());
        comboTo.setInput(getModel().getClient().getActivePortfolios().toArray());
        gdf.applyTo(comboTo.getControl());
        final IViewerObservableValue observableTo = ViewersObservables.observeSingleSelection(comboTo);

        // security
        List<Security> securities = new ArrayList<Security>();
        securities.addAll(ClientSnapshot.create(getModel().getClient(), Dates.today()).getJointPortfolio()
View Full Code Here

TOP

Related Classes of org.eclipse.jface.layout.GridDataFactory

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.