Package org.eclipse.swt.custom

Examples of org.eclipse.swt.custom.ScrolledComposite


        Section section =
                SectionFactory.createSection(this, SWT.NONE, title, message);
        GridData data = new GridData(GridData.FILL_BOTH);
        section.setLayoutData(data);

        displayArea = new ScrolledComposite(section,
                SWT.H_SCROLL | SWT.V_SCROLL);
        section.setClient(displayArea);

        displayArea.setExpandHorizontal(true);
        displayArea.setExpandVertical(true);
View Full Code Here


        Composite comboContainer = new Composite(topLevel, SWT.NONE);
        GridLayout gridLayout = new GridLayout();
        comboContainer.setLayout(gridLayout);
        comboContainer.setLayoutData(new GridData(GridData.FILL_BOTH));

        scroller = new ScrolledComposite(topLevel,
                SWT.H_SCROLL | SWT.V_SCROLL);
        scroller.setExpandHorizontal(true);
        scroller.setExpandVertical(true);
        scroller.setAlwaysShowScrollBars(false);
        scroller.setLayoutData(new GridData(GridData.FILL_BOTH));
View Full Code Here

                    sdc.setVisible(list.getSelection());
                }
//                tabFolder.layout();
                iterator = scrollers.iterator();
                while (iterator.hasNext()) {
                    ScrolledComposite scroller = (ScrolledComposite)iterator.next();
                    refresh(scroller);
//                    scroller.layout();
//                    ((Composite)scroller.getContent()).layout();
                }
            }
View Full Code Here

                                            List sections,
                                            IProject project,
                                            ODOMSelectionFilter filter,
                                            List sectionDetailsComposites) {

        final ScrolledComposite scroller = new ScrolledComposite(tabFolder,
                SWT.H_SCROLL | SWT.V_SCROLL);

        scroller.getVerticalBar().setIncrement(VERTICAL_SCROLL_INCREMENT);
        scroller.getHorizontalBar().setIncrement(HORIZONTAL_SCROLL_INCREMENT);

        scroller.setExpandHorizontal(true);
        scroller.setExpandVertical(true);

        final Composite scrollable = new Composite(scroller, SWT.NONE);
        scroller.setLayoutData(new GridData(GridData.FILL_BOTH));
        scroller.setContent(scrollable);
        scrollers.add(scroller);

        GridLayout layout = new GridLayout();
        layout.marginHeight = MARGIN_HEIGHT;
        layout.marginWidth = MARGIN_WIDTH;
View Full Code Here

    outerGroup.setText(message); // + " - " + possibleItems.size());
    outerGroup.setLayout(new GridLayout());

    outerGroup.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 2, 1));

    final ScrolledComposite scroll = new ScrolledComposite(outerGroup,
      SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);

    scroll.setLayout(new GridLayout());
    scroll.setExpandHorizontal(true);
    scroll.setExpandVertical(true);

    scroll.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));

    final Composite itemsGroup = new Composite(scroll, SWT.NONE);
    scroll.setContent(itemsGroup);
    grLy = new GridLayout();
    grLy.numColumns = 1;
    itemsGroup.setLayout(grLy);

    itemsGroup.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
   
    ButtonAdapter adapter = new ButtonAdapter();

    itemButtonArray = new Button[possibleItems.size()];
    int i = 0;

    for (String text : possibleItems)
    {
      Button itemBox = new Button(itemsGroup, multipleSelect ? SWT.CHECK : SWT.RADIO);
      itemButtonArray[i++] = itemBox;
      itemBox.setLayoutData(new GridData(SWT.BEGINNING, SWT.FILL, true, false));

      but2orig.put(itemBox, text);

      if (use3dots)
      {
        String txt = truncate(text, itemBox.getFont(), width - 87);
        if (!txt.equals(text))
        {
          itemBox.setToolTipText(text);
          text = txt;
        }
      }

      itemBox.setText(text);

      itemBox.addSelectionListener(adapter);
      itemBox.setSelection(selectedItems.contains(but2orig.get(itemBox)));
    }

    itemsGroup.pack();
    scroll.setMinSize(itemsGroup.getSize());

    Composite leftButtonsGroup = new Composite(shell, SWT.NONE);
    leftButtonsGroup.setLayoutData(new GridData(SWT.CENTER, SWT.FILL, false, false));
    leftButtonsGroup.setLayout(new RowLayout());
View Full Code Here

    ((GridData) compTop.getLayoutData()).widthHint = c.getSize().x;
    ((GridData) compTop.getLayoutData()).heightHint = c.getSize().y;

    compTop.setLayoutData(new GridData(GridData.FILL_BOTH)); // needed

    ScrolledComposite leftScrolled = new ScrolledComposite(compTop, SWT.H_SCROLL | SWT.V_SCROLL); // toolkit.createComposite(sashFormOverview);
    leftScrolled.setExpandHorizontal(true);
    leftScrolled.setExpandVertical(true);
    leftScrolled.setLayoutData(new GridData(GridData.FILL_BOTH));
    leftScrolled.setLayout(new GridLayout(1, false));
    Composite servicePane = toolkit.createComposite(leftScrolled);
    TableWrapLayout layout = new TableWrapLayout();
    servicePane.setLayout(layout);
    servicePane.setLayoutData(new GridData(GridData.FILL_BOTH));
    leftScrolled.setContent(servicePane);

    ScrolledComposite rightScrolled = new ScrolledComposite(compTop, SWT.H_SCROLL | SWT.V_SCROLL); // toolkit.createComposite(sashFormOverview);
    rightScrolled.setExpandHorizontal(true);
    rightScrolled.setExpandVertical(true);
    rightScrolled.setLayoutData(new GridData(GridData.FILL_BOTH));
    rightScrolled.setLayout(new GridLayout(1, false));
    Composite rightPane = toolkit.createComposite(rightScrolled);
    layout = new TableWrapLayout();
    rightPane.setLayout(layout);
    rightPane.setLayoutData(new GridData(GridData.FILL_BOTH));
    rightScrolled.setContent(rightPane);
   
    createIdentitySection(rightPane, toolkit);
    createServiceSection(servicePane, toolkit);
   
    leftScrolled.setMinSize(servicePane.computeSize(SWT.DEFAULT, SWT.DEFAULT));
    rightScrolled.setMinSize(rightPane.computeSize(SWT.DEFAULT, SWT.DEFAULT));
  }
View Full Code Here

    this.textRulerView = textRulerView;

    initImages();
    initGUI();

    ScrolledComposite sComp = new ScrolledComposite(parent, SWT.BORDER | SWT.V_SCROLL
            | SWT.H_SCROLL);
    this.setParent(sComp);
    sComp.setMinSize(this.getSize());
    sComp.setContent(this);
    sComp.setExpandHorizontal(true);
    sComp.setExpandVertical(true);
  }
View Full Code Here

    super(parent, style);
    // initImages();
    clipboard = new Clipboard(parent.getDisplay());
    initGUI();

    ScrolledComposite sComp = new ScrolledComposite(parent, SWT.BORDER | SWT.V_SCROLL
            | SWT.H_SCROLL);
    this.setParent(sComp);
    sComp.setMinSize(this.getSize());
    sComp.setContent(this);
    sComp.setExpandHorizontal(true);
    sComp.setExpandVertical(true);
  }
View Full Code Here

        Composite composite = new Composite(parent, SWT.NONE);
        composite.setLayoutData(new GridData(GridData.FILL_BOTH));
        composite.setLayout(new GridLayout());

        ScrolledComposite scrolledComposite = new ScrolledComposite(composite, SWT.V_SCROLL | SWT.BORDER);
        scrolledComposite.setExpandHorizontal(true);
        scrolledComposite.setExpandVertical(true);
        scrolledComposite.setLayoutData(new GridData(GridData.FILL_BOTH));

        Composite clientArea = new Composite(scrolledComposite, SWT.BORDER);
        clientArea.setLayoutData(new GridData(GridData.FILL_BOTH));
        clientArea.setLayout(new GridLayout());

        scrolledComposite.setContent(clientArea);

        for (ExtraCopyAction copyAction : actions) {
            final Button button = new Button(clientArea, SWT.CHECK);
            button.setText(copyAction.getDisplayName());
            button.setSelection(copyAction.isEnabled());
            button.setData(copyAction);
            button.addSelectionListener(new SelectionAdapter() {
                @Override
                public void widgetSelected(SelectionEvent e) {
                    ((ExtraCopyAction) button.getData()).setEnabled(button.getSelection());
                }
            });
            button.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
        }
        clientArea.layout(true, true);
        scrolledComposite.setMinHeight(clientArea.computeSize(SWT.DEFAULT, SWT.DEFAULT).y);

        return composite;
    }
View Full Code Here

        tabItem1.setText(Messages.getString("BSHEditor.title.constructor"));
        tabItem1.setControl(constructorView);

        constructorHeader = new ErrorHeaderComposite(constructorView);

        ScrolledComposite scrolledComposite = new ScrolledComposite(constructorView, SWT.V_SCROLL | SWT.BORDER);
        scrolledComposite.setExpandHorizontal(true);
        scrolledComposite.setExpandVertical(true);
        scrolledComposite.setMinHeight(200);
        scrolledComposite.setLayoutData(new GridData(GridData.FILL_BOTH));

        constructor = new Composite(scrolledComposite, SWT.NONE);

        scrolledComposite.setContent(constructor);

        GridLayout gridLayout = new GridLayout();
        gridLayout.numColumns = 5;
        constructor.setLayout(gridLayout);
        constructor.setLayoutData(new GridData(GridData.FILL_BOTH));
View Full Code Here

TOP

Related Classes of org.eclipse.swt.custom.ScrolledComposite

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.