Package org.eclipse.ui.forms.widgets

Examples of org.eclipse.ui.forms.widgets.Section


    @Override
    public void createSection(Composite parent) {
        super.createSection(parent);
        FormToolkit toolkit = getFormToolkit(parent.getDisplay());

        Section section = toolkit.createSection(parent, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED
                | ExpandableComposite.TITLE_BAR | Section.DESCRIPTION | ExpandableComposite.FOCUS_TITLE);
        section.setText("Connection");
        section.setDescription("Connection details for this server");
        section.setLayoutData(new GridData(GridData.FILL_HORIZONTAL | GridData.VERTICAL_ALIGN_FILL));

        // ports
        Composite composite = toolkit.createComposite(section);

        GridLayout layout = new GridLayout();
        layout.numColumns = 2;
        layout.marginHeight = 8;
        layout.marginWidth = 8;
        composite.setLayout(layout);
        GridData gridData = new GridData(GridData.VERTICAL_ALIGN_FILL | GridData.FILL_HORIZONTAL);
        composite.setLayoutData(gridData);
        toolkit.paintBordersFor(composite);
        section.setClient(composite);

        createLabel(toolkit, composite, "Port");
        portText = createText(toolkit, composite, SWT.SINGLE);

        createLabel(toolkit, composite, "Debug Port");
View Full Code Here


    protected abstract void createSection(Section section, FormToolkit toolkit)
        throws CoreException;

    protected void setTitle(String title)
    {
        Section section = getSection();
        section.setText(title);

        TableWrapLayout layout = new TableWrapLayout();

        layout.topMargin = 2;
        layout.bottomMargin = 2;
        layout.leftMargin = 2;
        layout.rightMargin = 2;

        layout.horizontalSpacing = 0;
        layout.verticalSpacing = 0;

        layout.makeColumnsEqualWidth = false;
        layout.numColumns = 1;

        section.setLayout(layout);

        TableWrapData data = new TableWrapData(TableWrapData.FILL_GRAB);
        section.setLayoutData(data);
    }
View Full Code Here

        file.getFile().deleteMarkers(null, true, IResource.DEPTH_INFINITE);
    }

    protected Composite createTableWrapBody(int columns, FormToolkit toolkit)
    {
        Section section = getSection();
        Composite client = toolkit.createComposite(section);

        TableWrapLayout layout = new TableWrapLayout();
        layout.leftMargin = layout.rightMargin = toolkit.getBorderStyle() != SWT.NULL ? 0
            : 2;
        layout.numColumns = columns;
        client.setLayout(layout);
        client.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB));

        section.setClient(client);

        return client;
    }
View Full Code Here

    }

    protected Composite createGridBody(int columns, boolean columnsSameWidth,
        FormToolkit toolkit)
    {
        Section section = getSection();
        Composite client = toolkit.createComposite(section);

        GridLayout layout = new GridLayout();

        layout.makeColumnsEqualWidth = columnsSameWidth;
        layout.numColumns = columns;
        client.setLayout(layout);

        client.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB));

        section.setClient(client);

        return client;
    }
View Full Code Here

    @Override
    public void createSection(Composite parent) {
        super.createSection(parent);
        FormToolkit toolkit = getFormToolkit(parent.getDisplay());

        Section section = toolkit.createSection(parent, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED
                | ExpandableComposite.TITLE_BAR | Section.DESCRIPTION | ExpandableComposite.FOCUS_TITLE);
        section.setText("Install");
        section.setDescription("Specify how to install bundles on the server");
        section.setLayoutData(new GridData(GridData.FILL_HORIZONTAL | GridData.VERTICAL_ALIGN_FILL));

        // ports
        Composite composite = toolkit.createComposite(section);

        GridLayout layout = new GridLayout();
        layout.numColumns = 2;
        layout.marginHeight = 8;
        layout.marginWidth = 8;
        composite.setLayout(layout);
        GridData gridData = new GridData(GridData.VERTICAL_ALIGN_FILL | GridData.FILL_HORIZONTAL);
        composite.setLayoutData(gridData);
        toolkit.paintBordersFor(composite);
        section.setClient(composite);

       
        bundleLocalInstallButton = toolkit.createButton(composite, "Install bundles via bundle upload", SWT.RADIO);
        GridData data = new GridData(SWT.FILL, SWT.FILL, true, false, 2, 1);
        bundleLocalInstallButton.setLayoutData(data);
View Full Code Here

     * @param parent the parent composite
     */
    private void createKerberosServerSection( FormToolkit toolkit, Composite parent )
    {
        // Creation of the section
        Section section = toolkit.createSection( parent, Section.TITLE_BAR );
        section.setText( Messages.getString( "KerberosServerPage.KerberosServer" ) ); //$NON-NLS-1$
        section.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );
        Composite composite = toolkit.createComposite( section );
        toolkit.paintBordersFor( composite );
        GridLayout gridLayout = new GridLayout( 4, false );
        gridLayout.marginHeight = gridLayout.marginWidth = 0;
        composite.setLayout( gridLayout );
        section.setClient( composite );

        // Enable Kerberos Server Checkbox
        enableKerberosCheckbox = toolkit.createButton( composite,
            Messages.getString( "KerberosServerPage.EnableKerberosServer" ), SWT.CHECK ); //$NON-NLS-1$
        enableKerberosCheckbox
View Full Code Here

     * @param parent the parent composite
     */
    private void createKerberosSettingsSection( FormToolkit toolkit, Composite parent )
    {
        // Creation of the section
        Section section = toolkit.createSection( parent, Section.TITLE_BAR );
        section.setText( Messages.getString( "KerberosServerPage.KerberosSettings" ) ); //$NON-NLS-1$
        section.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );
        Composite composite = toolkit.createComposite( section );
        toolkit.paintBordersFor( composite );
        GridLayout glayout = new GridLayout( 2, false );
        composite.setLayout( glayout );
        section.setClient( composite );

        // KDC Principal Text
        toolkit.createLabel( composite, Messages.getString( "KerberosServerPage.KdcPrincipal" ) ); //$NON-NLS-1$
        kdcPrincipalText = toolkit.createText( composite, "" ); //$NON-NLS-1$
        setGridDataWithDefaultWidth( kdcPrincipalText, new GridData( SWT.FILL, SWT.NONE, true, false ) );
View Full Code Here

     * @param parent the parent composite
     */
    private void createTicketSettingsSection( FormToolkit toolkit, Composite parent )
    {
        // Creation of the section
        Section section = toolkit.createSection( parent, Section.TITLE_BAR );
        section.setText( Messages.getString( "KerberosServerPage.TicketSettings" ) ); //$NON-NLS-1$
        section.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );
        Composite composite = toolkit.createComposite( section );
        toolkit.paintBordersFor( composite );
        GridLayout layout = new GridLayout( 2, false );
        composite.setLayout( layout );
        section.setClient( composite );

        // Verify Body Checksum Checkbox
        verifyBodyChecksumCheckbox = toolkit.createButton( composite,
            Messages.getString( "KerberosServerPage.VerifyBodyChecksum" ), SWT.CHECK ); //$NON-NLS-1$
        verifyBodyChecksumCheckbox
View Full Code Here

     * Creates the section of the form where the graph is drawn
     *
     * @param parent
     */
    private void createGraphSection(Composite parent) {
        Section section = this.toolkit.createSection(parent, Section.TITLE_BAR);
        thumbnailNavigator = new ThumbnailNavigator(section, SWT.NONE);
        viewer = new InternalGraphViewer(thumbnailNavigator, SWT.NONE);
        viewer.getGraphControl().setVerticalScrollBarVisibility(FigureCanvas.NEVER);
        viewer.getGraphControl().setHorizontalScrollBarVisibility(FigureCanvas.NEVER);
        thumbnailNavigator.setGraph((Graph) viewer.getControl());
        thumbnailNavigator.setSize(100, 25);
        section.setClient(thumbnailNavigator);
    }
View Full Code Here

        createOptionsSection(sash);
        sash.setWeights(new int[] { 10, 2 });
    }

    private void createOptionsSection(Composite parent) {
        Section controls = this.toolkit.createSection(parent, Section.TITLE_BAR | Section.EXPANDED);

        controls.setText("Options");
        Composite controlComposite = new Composite(controls, SWT.NONE) {
            public Point computeSize(int hint, int hint2, boolean changed) {
                return new Point(0, 0);
            }
        };
        this.toolkit.adapt(controlComposite);
        controlComposite.setLayout(new GridLayout());

        Section autoSelectOptions = this.toolkit.createSection(controlComposite, Section.EXPANDED);
        autoSelectOptions.setText("Auto Selection");
        autoSelectOptions.setLayout(new FillLayout());
        Composite autoSelectOptionsComposite = this.toolkit.createComposite(autoSelectOptions);
        autoSelectOptionsComposite.setLayout(new TableWrapLayout());

        showShortestRootPath = this.toolkit
                .createButton(autoSelectOptionsComposite, "Shortest path to root", SWT.RADIO);
        showShortestRootPath.setLayoutData(new TableWrapData(TableWrapData.FILL));
        showShortestRootPath.setSelection(true);
        showShortestRootPath.addSelectionListener(new SelectionAdapter() {
            public void widgetSelected(SelectionEvent e) {
                view.setAutoSelectDecorator(new ShortestRootPathAlgorithm());
            }
        });

        showAllRootPaths = this.toolkit.createButton(autoSelectOptionsComposite, "All paths to root", SWT.RADIO);
        showAllRootPaths.setLayoutData(new TableWrapData(TableWrapData.FILL));
        showAllRootPaths.addSelectionListener(new SelectionAdapter() {
            public void widgetSelected(SelectionEvent e) {
                view.setAutoSelectDecorator(new AllRootPathsAlgorithm());
            }
        });

        showAllCallers = this.toolkit.createButton(autoSelectOptionsComposite, "All callers", SWT.RADIO);
        showAllCallers.setLayoutData(new TableWrapData(TableWrapData.FILL));
        showAllCallers.addSelectionListener(new SelectionAdapter() {
            public void widgetSelected(SelectionEvent e) {
                view.setAutoSelectDecorator(new AllCallersAlgorithm());
            }
        });

        showAllDependencies = this.toolkit.createButton(autoSelectOptionsComposite, "All dependencies", SWT.RADIO);
        showAllDependencies.setLayoutData(new TableWrapData(TableWrapData.FILL));
        showAllDependencies.addSelectionListener(new SelectionAdapter() {
            public void widgetSelected(SelectionEvent e) {
                view.setAutoSelectDecorator(new AllDependencyAlgorithm());
            }
        });

        showSameModuleId = this.toolkit.createButton(autoSelectOptionsComposite, "Other revisions", SWT.RADIO);
        showSameModuleId.setLayoutData(new TableWrapData(TableWrapData.FILL));
        showSameModuleId.addSelectionListener(new SelectionAdapter() {
            public void widgetSelected(SelectionEvent e) {
                view.setAutoSelectDecorator(new SameModuleIdAlgorithm());
            }
        });

        autoSelectOptions.setClient(autoSelectOptionsComposite);

        Section filterOptions = this.toolkit.createSection(controlComposite, Section.EXPANDED);
        filterOptions.setText("Filter Options");
        filterOptions.setLayout(new FillLayout());
        Composite filterOptionsComposite = this.toolkit.createComposite(filterOptions);
        filterOptionsComposite.setLayout(new TableWrapLayout());

        evictionFilterEnablement = this.toolkit.createButton(filterOptionsComposite, "Hide evicted nodes", SWT.CHECK);
        evictionFilterEnablement.setLayoutData(new TableWrapData(TableWrapData.FILL));
        evictionFilterEnablement.setSelection(true);
        evictionFilter.setEnabled(true);
        evictionFilterEnablement.addSelectionListener(new SelectionAdapter() {
            public void widgetSelected(SelectionEvent e) {
                if (evictionFilterEnablement.getSelection()) {
                    evictionFilter.setEnabled(true);
                    view.refresh();
                } else {
                    evictionFilter.setEnabled(false);
                    view.refresh();
                }
            }
        });

        depthLimitFilterEnablement = this.toolkit.createButton(filterOptionsComposite, "Limit depth", SWT.CHECK);
        depthLimitFilterEnablement.setLayoutData(new TableWrapData(TableWrapData.FILL));
        depthLimitFilterEnablement.addSelectionListener(new SelectionAdapter() {
            public void widgetSelected(SelectionEvent e) {
                if (depthLimitFilterEnablement.getSelection()) {
                    depthFilter.setDepth(depthLimit.getSelection());
                    depthFilter.setEnabled(true);
                    view.refresh();
                    depthLimit.setEnabled(true);
                } else {
                    depthFilter.setEnabled(false);
                    view.refresh();
                    depthLimit.setEnabled(false);
                }
            }
        });

        depthLimit = new Spinner(filterOptionsComposite, 0);
        toolkit.adapt(depthLimit);
        depthLimit.setMinimum(1);
        depthLimit.setSelection(2);
        depthLimit.setIncrement(1);
        depthLimit.setSize(150, 40);
        depthLimit.setBackground(new Color(Display.getDefault(), 216, 228, 248));
        depthLimit.setEnabled(false);
        depthLimit.addModifyListener(new ModifyListener() {
            public void modifyText(ModifyEvent e) {
                depthFilter.setDepth(depthLimit.getSelection());
                depthFilter.setEnabled(true);
                view.refresh();
            }
        });

        filterOptions.setClient(filterOptionsComposite);

        controls.setClient(controlComposite);
    }
View Full Code Here

TOP

Related Classes of org.eclipse.ui.forms.widgets.Section

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.