Package org.eclipse.swt.custom

Examples of org.eclipse.swt.custom.ScrolledComposite


        final String labelText = "Layout Design";

        designLabel.setText(labelText);
        designLabel.pack();

        final ScrolledComposite deviceLayoutComposite =
                new ScrolledComposite(container, SWT.H_SCROLL | SWT.V_SCROLL);
        deviceLayoutComposite.setExpandHorizontal(true);
        deviceLayoutComposite.setExpandVertical(true);
        deviceLayoutComposite.setAlwaysShowScrollBars(true);
        deviceLayoutComposite.setLayout(new GridLayout());
        deviceLayoutComposite.setSize(container.getClientArea().width,
                container.getClientArea().height);
        data = new GridData(GridData.FILL_BOTH);
        deviceLayoutComposite.setLayoutData(data);

        deviceLayoutComposite.addControlListener(new ControlListener() {
            public void controlMoved(ControlEvent event) {
            }

            public void controlResized(ControlEvent event) {
            }
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

        GridData data = new GridData(GridData.FILL_BOTH);
        label.setLayoutData(data);
    }

    private void createFormPage(Composite parent) {
        formPage = new ScrolledComposite(parent,
                SWT.H_SCROLL | SWT.V_SCROLL);
        formPage.setExpandHorizontal(true);
        formPage.setExpandVertical(true);

        Composite scrollable = new Composite(formPage, SWT.NONE);
View Full Code Here

        super.dispose();
    }

    // Javadoc inherited
    public void createPartControl(Composite composite) {
        ScrolledComposite scroller = new ScrolledComposite(composite,
                SWT.H_SCROLL | SWT.V_SCROLL);
        scroller.setExpandHorizontal(true);
        scroller.setExpandVertical(true);

        Composite scrollable = new Composite(scroller, SWT.NONE);
        scroller.setContent(scrollable);

        scrollable.setBackground(composite.getDisplay().
                getSystemColor(SWT.COLOR_LIST_BACKGROUND));

        // TODO better get these from the appropriate place
View Full Code Here

        super.dispose();
    }

    // Javadoc inherited
    public void createPartControl(Composite composite) {
        ScrolledComposite scroller = new ScrolledComposite(composite,
                SWT.H_SCROLL | SWT.V_SCROLL);
        scroller.setExpandHorizontal(true);
        scroller.setExpandVertical(true);

        Composite scrollable = new Composite(scroller, SWT.NONE);
        scroller.setContent(scrollable);

        scrollable.setBackground(composite.getDisplay().
                getSystemColor(SWT.COLOR_LIST_BACKGROUND));

        // TODO better get these from the appropriate place
View Full Code Here

        styleCategoriesComposite.
                addCategorySelectionListener(styleCategoriesListener);

        // Create a scroll pane so that we can handle large quantities of
        // properties in a single category...
        scroller = new ScrolledComposite(displayArea, SWT.V_SCROLL);
        scroller.setExpandHorizontal(true);
        scroller.setExpandVertical(true);
        scroller.setLayoutData(new GridData(GridData.FILL_BOTH));

        // create the container for the StyleCategoryComposite panels
View Full Code Here

                context);
        GridData hierarchyData = new GridData(GridData.FILL_VERTICAL);
        deviceHierarchySection.setLayoutData(hierarchyData);

        // add a scroll area for the patterns sections
        ScrolledComposite controlsScroller = new ScrolledComposite(formContainer,
                SWT.H_SCROLL | SWT.V_SCROLL);
        controlsScroller.setLayout(new FillLayout());
        controlsScroller.setLayoutData(new GridData(GridData.FILL_BOTH));
        controlsScroller.setExpandHorizontal(true);
        controlsScroller.setExpandVertical(true);
        controlsScroller.setAlwaysShowScrollBars(false);
        controlsScroller.setBackground(white);

        // add the container for the patterns sections
        Composite patternContainer = new Composite(controlsScroller, SWT.NONE);
        GridLayout patternLayout = new GridLayout();
        patternLayout.marginHeight = 0;
        patternLayout.marginWidth = 0;
        patternLayout.verticalSpacing = VERTICAL_SPACING;
        GridData patternData = new GridData(GridData.FILL_BOTH);
        patternContainer.setLayout(patternLayout);
        patternContainer.setLayoutData(patternData);
        patternContainer.setBackground(white);

        // Add the primary patterns section
        PrimaryPatternsSection primaryPatterns =
                new PrimaryPatternsSection(patternContainer,
                        SWT.NONE,
                        context);
        primaryPatterns.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));

        // Add the secondary patterns section
        SecondaryPatternsSection secondaryPatterns =
                new SecondaryPatternsSection(patternContainer,
                        SWT.NONE,
                        context);
        secondaryPatterns.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));

        createRestoreMechanism(patternContainer);

        TACPatternsSection TACPatterns =
                new TACPatternsSection(patternContainer,
                        SWT.NONE,
                        context);
        TACPatterns.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));

        patternContainer.setSize(patternContainer.
                computeSize(SWT.DEFAULT, SWT.DEFAULT));
        patternContainer.layout();
        controlsScroller.setMinSize(
                patternContainer.computeSize(SWT.DEFAULT, SWT.DEFAULT));

        controlsScroller.setContent(patternContainer);

        layout();
    }
View Full Code Here

                            ((SectionDetailsComposite) iterator.next());
                    sdc.setVisible(attributeNames);
                }
                iterator = scrollers.iterator();
                while (iterator.hasNext()) {
                    ScrolledComposite scroller = (ScrolledComposite)iterator.next();
                    refresh(scroller);
                }
            }
        }
View Full Code Here

        stackLayout.marginHeight = 0;
        stackedContainer.setLayout(stackLayout);
        stackedContainer.setLayoutData(new GridData(GridData.FILL_BOTH));

        // Create the scrolled composite in the second column.
        controlsScroller = new ScrolledComposite(stackedContainer,
                SWT.H_SCROLL | SWT.V_SCROLL);
        controlsScroller.setLayout(new FillLayout());
        controlsScroller.setLayoutData(new GridData(GridData.FILL_BOTH));
        controlsScroller.setExpandHorizontal(true);
        controlsScroller.setExpandVertical(true);
View Full Code Here

        GridData hierarchyData = new GridData(GridData.FILL_VERTICAL);
        hierarchy.setLayoutData(hierarchyData);

        // the right hand column will be scrollable
        ScrolledComposite controlsScroller =
                    new ScrolledComposite(formContainer,
                                          SWT.H_SCROLL | SWT.V_SCROLL);
        controlsScroller.setLayout(new FillLayout());
        controlsScroller.setLayoutData(new GridData(GridData.FILL_BOTH));
        controlsScroller.setExpandHorizontal(true);
        controlsScroller.setExpandVertical(true);
        controlsScroller.setAlwaysShowScrollBars(false);
        controlsScroller.setBackground(white);

        // add the container for the identification section
        Composite column2 =
                    new Composite(controlsScroller, SWT.NONE);
        GridLayout column2Layout = new GridLayout();
        column2Layout.marginHeight = 0;
        column2Layout.marginWidth = 0;
        column2Layout.verticalSpacing = VERTICAL_SPACING;
        GridData column2Data = new GridData(GridData.FILL_BOTH);
        column2.setLayout(column2Layout);
        column2.setLayoutData(column2Data);
        column2.setBackground(white);

        // add the identification section
        identification = new DeviceIdentificationSection(
                    column2,
                    SWT.NONE,
                    accessorManager);
        GridData identificationData = new GridData(GridData.FILL_HORIZONTAL);
        identification.setLayoutData(identificationData);

        // add the policies section
        devicePolicies =
                new DevicePoliciesSection(column2,
                                          SWT.NONE, accessorManager);
        devicePolicies.setLayoutData(new GridData(GridData.FILL_BOTH));

        final ISelectionChangedListener listener =
                new ISelectionChangedListener() {
                    public void selectionChanged(SelectionChangedEvent event) {
                        updateSelection();
                    }
                };

        hierarchy.addSelectionChangedListener(listener);

        // force selection of the hierarchy. This appears to persuade the tree
        // to build its entire internal representation and therefore stops a
        // large delay from occuring when the tree first obtains focus.
        hierarchy.setSelection(new StructuredSelection(accessorManager.
                getDeviceHierarchyDocument().getRootElement().
                getChildren().get(0)));

        addDisposeListener(new DisposeListener() {
            public void widgetDisposed(DisposeEvent event) {
                hierarchy.removeSelectionChangedListener(listener);
            }
        });

        column2.setSize(column2.computeSize(SWT.DEFAULT, SWT.DEFAULT));
        column2.layout();
        controlsScroller.setMinSize(
                    column2.computeSize(SWT.DEFAULT, SWT.DEFAULT));
        controlsScroller.setContent(column2);
        layout();
    }
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.