Examples of ScrolledComposite


Examples of org.eclipse.swt.custom.ScrolledComposite

    this.cmd.addObserver(this.imageComposite);
  }

  private void createCoordinateTableComposite(Composite parent) {

    ScrolledComposite scrollComposite = new ScrolledComposite(parent, SWT.NONE | SWT.H_SCROLL | SWT.V_SCROLL);
    scrollComposite.setLayout(new FillLayout());

    this.coordinateTableComposite = new CoordinateTableComposite(this.cmd, scrollComposite, SWT.NONE | SWT.NO_FOCUS);
    this.coordinateTableComposite.setLayout(new FillLayout());
    this.cmd.addObserver(coordinateTableComposite);

    // adds the parameters container to scroll composite
    scrollComposite.setContent(coordinateTableComposite);
    scrollComposite.setExpandHorizontal(true);
    scrollComposite.setExpandVertical(true);
    scrollComposite.setMinHeight(300);
  }
View Full Code Here

Examples of org.eclipse.swt.custom.ScrolledComposite

        gridData7.verticalAlignment = GridData.FILL;
        gridData7.grabExcessVerticalSpace = true;
        gridData7.grabExcessHorizontalSpace = false;
        gridData7.horizontalAlignment = GridData.FILL;

        scrolledRulesComposite = new ScrolledComposite(this, SWT.V_SCROLL | SWT.BORDER);
        scrolledRulesComposite.setLayoutData(gridData7);
        scrolledRulesComposite.setExpandHorizontal(true);
        scrolledRulesComposite.setExpandVertical(true);
        scrolledRulesComposite.setMinHeight(2000);
    }
View Full Code Here

Examples of org.eclipse.swt.custom.ScrolledComposite

     * foregroundColour = Color.BLACK; backgroundColour = Color.WHITE; location = new Point(30, 10);
     */

    public void createControl( Composite parent ) {

        ScrolledComposite scrollComposite = new ScrolledComposite(parent, SWT.H_SCROLL
                | SWT.V_SCROLL);
        Composite c = new Composite(scrollComposite, SWT.None);
        c.setLayout(new GridLayout());
        c.setLayoutData(new GridData(GridData.FILL_BOTH | GridData.GRAB_HORIZONTAL
                | GridData.GRAB_VERTICAL));

        GridData layoutData = null;
        Group propertiesGroup = new Group(c, SWT.BORDER);

        GridLayout layout2 = new GridLayout(2, true);
        propertiesGroup.setLayout(layout2);

        Label xposLabel = new Label(propertiesGroup, SWT.NONE);
        xposLabel.setLayoutData(layoutData);
        xposLabel.setText(Messages.getString("LegendGraphicStyleConfigurator.xpos")); //$NON-NLS-1$
        xposText = new Text(propertiesGroup, SWT.BORDER);
        xposText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL));

        Label yposLabel = new Label(propertiesGroup, SWT.NONE);
        yposLabel.setLayoutData(layoutData);
        yposLabel.setText(Messages.getString("LegendGraphicStyleConfigurator.ypos")); //$NON-NLS-1$
        yposText = new Text(propertiesGroup, SWT.BORDER);
        yposText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL));

        Label legWidthLabel = new Label(propertiesGroup, SWT.NONE);
        legWidthLabel.setLayoutData(layoutData);
        legWidthLabel.setText(Messages.getString("LegendGraphicStyleConfigurator.legendwidth")); //$NON-NLS-1$
        legWidthText = new Text(propertiesGroup, SWT.BORDER);
        legWidthText
                .setLayoutData(new GridData(GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL));

        Label legHeightLabel = new Label(propertiesGroup, SWT.NONE);
        legHeightLabel.setLayoutData(layoutData);
        legHeightLabel.setText(Messages.getString("LegendGraphicStyleConfigurator.legendheight")); //$NON-NLS-1$
        legHeightText = new Text(propertiesGroup, SWT.BORDER);
        legHeightText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL
                | GridData.GRAB_HORIZONTAL));

        Label boxWidthLabel = new Label(propertiesGroup, SWT.NONE);
        boxWidthLabel.setLayoutData(layoutData);
        boxWidthLabel.setText(Messages.getString("LegendGraphicStyleConfigurator.boxwidth")); //$NON-NLS-1$
        boxWidthText = new Text(propertiesGroup, SWT.BORDER);
        boxWidthText
                .setLayoutData(new GridData(GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL));

        isroundedButton = new Button(propertiesGroup, SWT.BORDER | SWT.CHECK);
        isroundedButton.setText(Messages.getString("LegendGraphicStyleConfigurator.roundedrect")); //$NON-NLS-1$
        GridData gdata = new GridData(GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL);
        gdata.horizontalSpan = 2;
        isroundedButton.setLayoutData(gdata);

        Label fontColourLabel = new Label(propertiesGroup, SWT.NONE);
        fontColourLabel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL
                | GridData.GRAB_HORIZONTAL));
        fontColourLabel.setText(Messages.getString("LegendGraphicStyleConfigurator.fontcolor")); //$NON-NLS-1$
        fontColour = new ColorEditor(propertiesGroup);

        Label backgroundColourLabel = new Label(propertiesGroup, SWT.NONE);
        backgroundColourLabel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL
                | GridData.GRAB_HORIZONTAL));
        backgroundColourLabel.setText(Messages
                .getString("LegendGraphicStyleConfigurator.backgroundcolor")); //$NON-NLS-1$
        backgroundColour = new ColorEditor(propertiesGroup);

        Label backgroundAlphaLabel = new Label(propertiesGroup, SWT.NONE);
        backgroundAlphaLabel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL
                | GridData.GRAB_HORIZONTAL));
        backgroundAlphaLabel.setText(Messages
                .getString("LegendGraphicStyleConfigurator.backgroundalpha")); //$NON-NLS-1$
        backgroundAlphaText = new Text(propertiesGroup, SWT.BORDER);
        backgroundAlphaText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL
                | GridData.GRAB_HORIZONTAL));

        Label foregroundColourLabel = new Label(propertiesGroup, SWT.NONE);
        foregroundColourLabel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL
                | GridData.GRAB_HORIZONTAL));
        foregroundColourLabel.setText(Messages
                .getString("LegendGraphicStyleConfigurator.foregroundcolor")); //$NON-NLS-1$
        foregroundColor = new ColorEditor(propertiesGroup);

        Label forgroundAlphaLabel = new Label(propertiesGroup, SWT.NONE);
        forgroundAlphaLabel.setLayoutData(layoutData);
        forgroundAlphaLabel.setText(Messages
                .getString("LegendGraphicStyleConfigurator.foregroundalpha")); //$NON-NLS-1$
        forgroundAlphaText = new Text(propertiesGroup, SWT.BORDER);
        forgroundAlphaText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL
                | GridData.GRAB_HORIZONTAL));

        c.layout();
        Point size = c.computeSize(SWT.DEFAULT, SWT.DEFAULT);
        c.setSize(size);
        scrollComposite.setContent(c);

        xposText.addModifyListener(this);
        yposText.addModifyListener(this);
        legWidthText.addModifyListener(this);
        legHeightText.addModifyListener(this);
View Full Code Here

Examples of org.eclipse.swt.custom.ScrolledComposite

     * foregroundColour = Color.BLACK; backgroundColour = Color.WHITE; location = new Point(30, 10);
     */

    public void createControl( Composite parent ) {

        ScrolledComposite scrollComposite = new ScrolledComposite(parent, SWT.H_SCROLL | SWT.V_SCROLL);
        Composite c = new Composite(scrollComposite, SWT.None);
        c.setLayout(new GridLayout());
        c.setLayoutData(new GridData(GridData.FILL_BOTH | GridData.GRAB_HORIZONTAL | GridData.GRAB_VERTICAL));

        GridData layoutData = null;
        Group chooseMapGroup = new Group(c, SWT.BORDER);
        GridLayout layout1 = new GridLayout(3, false);
        chooseMapGroup.setLayout(layout1);
        chooseMapGroup.setLayoutData(new GridData(GridData.FILL_BOTH | GridData.GRAB_HORIZONTAL | GridData.GRAB_VERTICAL));
        Label mapLabel = new Label(chooseMapGroup, SWT.NONE);
        mapLabel.setLayoutData(layoutData);
        mapLabel.setText(Messages.getString("LegendGraphicStyleConfigurator.map4legend")); //$NON-NLS-1$
        mapNameLabel = new Label(chooseMapGroup, SWT.BORDER);
        GridData gd = new GridData();
        gd.widthHint = 100;
        mapNameLabel.setLayoutData(gd);

        final Button mapButton = new Button(chooseMapGroup, SWT.BORDER | SWT.PUSH);
        GridData gd2 = new GridData();
        gd2.horizontalAlignment = GridData.HORIZONTAL_ALIGN_END;
        mapButton.setLayoutData(gd2);
        mapButton.setText(Messages.getString("LegendGraphicStyleConfigurator.browse")); //$NON-NLS-1$
        mapButton.addSelectionListener(new SelectionAdapter(){
            public void widgetSelected( SelectionEvent e ) {
                JGRasterChooserDialog cDialog = new JGRasterChooserDialog(null);
                cDialog.open(mapButton.getShell(), SWT.SINGLE);

                List<JGrassMapGeoResource> selectedResource = cDialog.getSelectedResources();
                JGrassMapGeoResource jGrassMapGeoResource = selectedResource.get(0);
                File mapFile = jGrassMapGeoResource.getMapFile();
                String name = mapFile.getName();
                mapNameLabel.setText(name);
                if (style == null)
                    checkStyle();
                style.mapPath = mapFile.getAbsolutePath();
            }
        });

        Group propertiesGroup = new Group(c, SWT.BORDER);

        GridLayout layout2 = new GridLayout(2, true);
        propertiesGroup.setLayout(layout2);

        Label titleLabel = new Label(propertiesGroup, SWT.NONE);
        titleLabel.setLayoutData(layoutData);
        titleLabel.setText(Messages.getString("LegendGraphicStyleConfigurator.title")); //$NON-NLS-1$
        titleText = new Text(propertiesGroup, SWT.BORDER);
        titleText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL));

        Label xposLabel = new Label(propertiesGroup, SWT.NONE);
        xposLabel.setLayoutData(layoutData);
        xposLabel.setText(Messages.getString("LegendGraphicStyleConfigurator.xpos")); //$NON-NLS-1$
        xposText = new Text(propertiesGroup, SWT.BORDER);
        xposText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL));

        Label yposLabel = new Label(propertiesGroup, SWT.NONE);
        yposLabel.setLayoutData(layoutData);
        yposLabel.setText(Messages.getString("LegendGraphicStyleConfigurator.ypos")); //$NON-NLS-1$
        yposText = new Text(propertiesGroup, SWT.BORDER);
        yposText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL));

        Label legWidthLabel = new Label(propertiesGroup, SWT.NONE);
        legWidthLabel.setLayoutData(layoutData);
        legWidthLabel.setText(Messages.getString("LegendGraphicStyleConfigurator.legendwidth")); //$NON-NLS-1$
        legWidthText = new Text(propertiesGroup, SWT.BORDER);
        legWidthText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL));

        Label legHeightLabel = new Label(propertiesGroup, SWT.NONE);
        legHeightLabel.setLayoutData(layoutData);
        legHeightLabel.setText(Messages.getString("LegendGraphicStyleConfigurator.legendheight")); //$NON-NLS-1$
        legHeightText = new Text(propertiesGroup, SWT.BORDER);
        legHeightText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL));

        Label boxWidthLabel = new Label(propertiesGroup, SWT.NONE);
        boxWidthLabel.setLayoutData(layoutData);
        boxWidthLabel.setText(Messages.getString("LegendGraphicStyleConfigurator.boxwidth")); //$NON-NLS-1$
        boxWidthText = new Text(propertiesGroup, SWT.BORDER);
        boxWidthText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL));

        isroundedButton = new Button(propertiesGroup, SWT.BORDER | SWT.CHECK);
        isroundedButton.setText(Messages.getString("LegendGraphicStyleConfigurator.roundedrect")); //$NON-NLS-1$
        GridData gdata = new GridData(GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL);
        gdata.horizontalSpan = 2;
        isroundedButton.setLayoutData(gdata);

        Label fontColourLabel = new Label(propertiesGroup, SWT.NONE);
        fontColourLabel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL));
        fontColourLabel.setText(Messages.getString("LegendGraphicStyleConfigurator.fontcolor")); //$NON-NLS-1$
        fontColour = new ColorEditor(propertiesGroup);

        Label backgroundColourLabel = new Label(propertiesGroup, SWT.NONE);
        backgroundColourLabel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL));
        backgroundColourLabel.setText(Messages.getString("LegendGraphicStyleConfigurator.backgroundcolor")); //$NON-NLS-1$
        backgroundColour = new ColorEditor(propertiesGroup);

        Label backgroundAlphaLabel = new Label(propertiesGroup, SWT.NONE);
        backgroundAlphaLabel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL));
        backgroundAlphaLabel.setText(Messages.getString("LegendGraphicStyleConfigurator.backgroundalpha")); //$NON-NLS-1$
        backgroundAlphaText = new Text(propertiesGroup, SWT.BORDER);
        backgroundAlphaText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL));

        Label foregroundColourLabel = new Label(propertiesGroup, SWT.NONE);
        foregroundColourLabel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL));
        foregroundColourLabel.setText(Messages.getString("LegendGraphicStyleConfigurator.foregroundcolor")); //$NON-NLS-1$
        foregroundColor = new ColorEditor(propertiesGroup);

        Label forgroundAlphaLabel = new Label(propertiesGroup, SWT.NONE);
        forgroundAlphaLabel.setLayoutData(layoutData);
        forgroundAlphaLabel.setText(Messages.getString("LegendGraphicStyleConfigurator.foregroundalpha")); //$NON-NLS-1$
        forgroundAlphaText = new Text(propertiesGroup, SWT.BORDER);
        forgroundAlphaText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL));

        c.layout();
        Point size = c.computeSize(SWT.DEFAULT, SWT.DEFAULT);
        c.setSize(size);
        scrollComposite.setContent(c);

        titleText.addModifyListener(this);
        xposText.addModifyListener(this);
        yposText.addModifyListener(this);
        legWidthText.addModifyListener(this);
View Full Code Here

Examples of org.eclipse.swt.custom.ScrolledComposite

    @SuppressWarnings("nls")
    public void createControl( Composite parent ) {
        this.parent = parent;
        parent.setLayout(new GridLayout());
        ScrolledComposite scrollComposite = new ScrolledComposite(parent, SWT.V_SCROLL);
        scrollComposite.setMinHeight(100);
        scrollComposite.setLayoutData(new GridData(GridData.FILL_BOTH | GridData.GRAB_HORIZONTAL | GridData.GRAB_VERTICAL));
        Composite c = new Composite(scrollComposite, SWT.None);
        c.setLayout(new GridLayout());
        c.setLayoutData(new GridData(GridData.FILL_BOTH | GridData.GRAB_HORIZONTAL | GridData.GRAB_VERTICAL));

        // choose mapset
        Group chooseMapsetGroup = new Group(c, SWT.BORDER);
        GridLayout layout1 = new GridLayout(3, false);
        chooseMapsetGroup.setLayout(layout1);
        chooseMapsetGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL));
        chooseMapsetGroup.setText("Ruling / Affected mapset");

        Label mapsetLabel = new Label(chooseMapsetGroup, SWT.NONE);
        mapsetLabel.setText("wind file for active region:  ");
        windPathText = new Text(chooseMapsetGroup, SWT.BORDER);
        GridData gd = new GridData();
        gd.widthHint = 100;
        windPathText.setLayoutData(gd);
        windPathText.setEditable(false);

        final Button mapsetButton = new Button(chooseMapsetGroup, SWT.BORDER | SWT.PUSH);
        GridData gd2 = new GridData();
        gd2.horizontalAlignment = GridData.HORIZONTAL_ALIGN_END;
        mapsetButton.setLayoutData(gd2);
        mapsetButton.setText("Browse");
        mapsetButton.addSelectionListener(new SelectionAdapter(){

            public void widgetSelected( SelectionEvent e ) {
                CatalogJGrassMapsetTreeViewerDialog cDialog = new CatalogJGrassMapsetTreeViewerDialog();
                cDialog.open(mapsetButton.getShell());
                List<JGrassMapsetGeoResource> selectedLayers = cDialog.getSelectedLayers();
                if (selectedLayers == null || selectedLayers.size() == 0) {
                    return;
                }
                jGrassMapsetGeoResource = selectedLayers.get(0);
                String windPath = jGrassMapsetGeoResource.getActiveRegionWindowPath();
                windPathText.setText(windPath);

                JGrassRegion jgR = jGrassMapsetGeoResource.getActiveRegionWindow();
                CoordinateReferenceSystem crs = jGrassMapsetGeoResource.getLocationCrs();

                commitToBlackboards(jgR, crs, windPath);
            }

        });

        // the group for the region
        Group regionGroup = new Group(c, SWT.BORDER);
        GridLayout layout2 = new GridLayout(2, true);
        regionGroup.setLayout(layout2);
        regionGroup.setText("Region settings");
        regionGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL));

        northLabel = new Label(regionGroup, SWT.NONE);
        northLabel.setText("north");
        northLabel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL));
        northText = new Text(regionGroup, SWT.BORDER);
        northText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL));
        southLabel = new Label(regionGroup, SWT.NONE);
        southLabel.setText("south");
        southLabel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL));
        southText = new Text(regionGroup, SWT.BORDER);
        southText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL));
        westLabel = new Label(regionGroup, SWT.NONE);
        westLabel.setText("west");
        westLabel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL));
        westText = new Text(regionGroup, SWT.BORDER);
        westText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL));
        eastLabel = new Label(regionGroup, SWT.NONE);
        eastLabel.setText("east");
        eastLabel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL));
        eastText = new Text(regionGroup, SWT.BORDER);
        eastText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL));
        rowsLabel = new Label(regionGroup, SWT.NONE);
        rowsLabel.setText("rows");
        rowsLabel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL));
        rowsText = new Text(regionGroup, SWT.BORDER);
        rowsText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL));
        colsLabel = new Label(regionGroup, SWT.NONE);
        colsLabel.setText("cols");
        colsLabel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL));
        colsText = new Text(regionGroup, SWT.BORDER);
        colsText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL));
        xresLabel = new Label(regionGroup, SWT.NONE);
        xresLabel.setText("xres");
        xresLabel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL));
        xresText = new Text(regionGroup, SWT.BORDER);
        xresText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL));
        yresLabel = new Label(regionGroup, SWT.NONE);
        yresLabel.setText("yres");
        yresLabel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL));
        yresText = new Text(regionGroup, SWT.BORDER);
        yresText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL));

        // the group for the style
        Group styleGroup = new Group(c, SWT.BORDER);
        GridLayout layout3 = new GridLayout(2, true);
        styleGroup.setLayout(layout3);
        styleGroup.setText("Style properties");
        styleGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL));

        gridButton = new Button(styleGroup, SWT.BORDER | SWT.CHECK);
        gridButton.setText("visualize active region grid");
        GridData gridData = new GridData(GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL);
        gridData.horizontalSpan = 2;
        gridButton.setLayoutData(gridData);

        Label backgroundColourLabel = new Label(styleGroup, SWT.NONE);
        backgroundColourLabel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL));
        backgroundColourLabel.setText("background color");
        backgroundColour = new ColorEditor(styleGroup);
        backgroundColour.getButton().setLayoutData(new GridData(GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL));
        Label backgroundAlphaLabel = new Label(styleGroup, SWT.NONE);
        backgroundAlphaLabel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL));
        backgroundAlphaLabel.setText("background alpha (0-1)");
        backgroundAlphaText = new Text(styleGroup, SWT.BORDER);
        backgroundAlphaText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL));
        Label foregroundColourLabel = new Label(styleGroup, SWT.NONE);
        foregroundColourLabel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL));
        foregroundColourLabel.setText("foreground color");
        foregroundColor = new ColorEditor(styleGroup);
        foregroundColor.getButton().setLayoutData(new GridData(GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL));
        Label forgroundAlphaLabel = new Label(styleGroup, SWT.NONE);
        forgroundAlphaLabel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL));
        forgroundAlphaLabel.setText("foreground alpha (0-1)");
        forgroundAlphaText = new Text(styleGroup, SWT.BORDER);
        forgroundAlphaText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL));

        // the group for the set region to map
        final Group settoGroup = new Group(c, SWT.BORDER);
        GridLayout layout4 = new GridLayout(1, true);
        settoGroup.setLayout(layout4);
        settoGroup.setText("Set region to...");
        settoGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL));

        rasterMapSetButton = new Button(settoGroup, SWT.NONE);
        rasterMapSetButton.setText("set region to raster map");
        rasterMapSetButton.setLayoutData(new GridData(GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL));
        rasterMapSetButton.addSelectionListener(new org.eclipse.swt.events.SelectionAdapter(){
            public void widgetSelected( org.eclipse.swt.events.SelectionEvent e ) {
                JGRasterChooserDialog tree = new JGRasterChooserDialog(null);
                tree.open(settoGroup.getShell(), SWT.SINGLE);

                update(tree.getSelectedResources());
            }
        });
        featuresMapSetButton = new Button(settoGroup, SWT.NONE);
        featuresMapSetButton.setText("set region to vector map");
        featuresMapSetButton.setLayoutData(new GridData(GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL));
        featuresMapSetButton.addSelectionListener(new org.eclipse.swt.events.SelectionAdapter(){
            public void widgetSelected( org.eclipse.swt.events.SelectionEvent e ) {
                FeatureChooserDialog tree = new FeatureChooserDialog();
                tree.open(settoGroup.getShell(), SWT.SINGLE);

                update(tree.getSelectedResources());
            }
        });
        resetToActiveButton = new Button(settoGroup, SWT.NONE);
        resetToActiveButton.setText("reset back to actual region");
        resetToActiveButton.setLayoutData(new GridData(GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL));
        resetToActiveButton.addSelectionListener(new org.eclipse.swt.events.SelectionAdapter(){
            public void widgetSelected( org.eclipse.swt.events.SelectionEvent e ) {
                String windPath = windPathText.getText();
                try {
                    JGrassRegion jgR = new JGrassRegion(windPath);
                    setWidgetsToWindow(jgR);
                } catch (IOException e1) {
                    e1.printStackTrace();
                }
            }
        });

        northText.addModifyListener(new org.eclipse.swt.events.ModifyListener(){

            public void modifyText( org.eclipse.swt.events.ModifyEvent e ) {
                if (isWorking)
                    return;
                textModified(bound_type);
            }
        });
        southText.addModifyListener(new org.eclipse.swt.events.ModifyListener(){
            public void modifyText( org.eclipse.swt.events.ModifyEvent e ) {
                if (isWorking)
                    return;
                textModified(bound_type);
            }
        });
        rowsText.addModifyListener(new org.eclipse.swt.events.ModifyListener(){
            public void modifyText( org.eclipse.swt.events.ModifyEvent e ) {
                if (isWorking)
                    return;
                textModified(row_type);
            }
        });
        colsText.addModifyListener(new org.eclipse.swt.events.ModifyListener(){
            public void modifyText( org.eclipse.swt.events.ModifyEvent e ) {
                if (isWorking)
                    return;
                textModified(row_type);
            }
        });
        westText.addModifyListener(new org.eclipse.swt.events.ModifyListener(){
            public void modifyText( org.eclipse.swt.events.ModifyEvent e ) {
                if (isWorking)
                    return;
                textModified(bound_type);
            }
        });
        xresText.addModifyListener(new org.eclipse.swt.events.ModifyListener(){
            public void modifyText( org.eclipse.swt.events.ModifyEvent e ) {
                if (isWorking)
                    return;
                textModified(res_type);
            }
        });
        eastText.addModifyListener(new org.eclipse.swt.events.ModifyListener(){
            public void modifyText( org.eclipse.swt.events.ModifyEvent e ) {
                if (isWorking)
                    return;
                textModified(bound_type);
            }
        });
        yresText.addModifyListener(new org.eclipse.swt.events.ModifyListener(){
            public void modifyText( org.eclipse.swt.events.ModifyEvent e ) {
                if (isWorking)
                    return;
                textModified(res_type);
            }
        });
        foregroundColor.addSelectionListener(this);
        backgroundColour.addSelectionListener(this);

        /*
         * layout
         */
        c.layout();
        Point size = c.computeSize(SWT.DEFAULT, SWT.DEFAULT);
        c.setSize(size);
        scrollComposite.setContent(c);
    }
View Full Code Here

Examples of org.eclipse.swt.custom.ScrolledComposite

       
        location = new Point(30, 10);
     */
   
    public void createControl( Composite parent) {
        ScrolledComposite scrollComposite = new ScrolledComposite(parent, SWT.H_SCROLL | SWT.V_SCROLL);
        Composite composite = new Composite(scrollComposite, SWT.BORDER);
       
        GridLayout layout = new GridLayout(2, true);
        composite.setLayout(layout);
       
        GridData layoutData = null;

        Label verticalMarginLabel = new Label(composite, SWT.NONE);
        verticalMarginLabel.setText(Messages.LegendGraphicStyleConfigurator_vertical_margin);
        verticalMarginLabel.setLayoutData(layoutData);
        verticalMargin = new Text(composite, SWT.BORDER);
        verticalMargin.setLayoutData(layoutData);
       

        Label horizontalMarginLabel = new Label(composite, SWT.NONE);
        horizontalMarginLabel.setLayoutData(layoutData);
        horizontalMarginLabel.setText(Messages.LegendGraphicStyleConfigurator_horizontal_margin);
        horizontalMargin = new Text(composite, SWT.BORDER);    
        horizontalMargin.setLayoutData(layoutData);
       
        Label verticalSpacingLabel = new Label(composite, SWT.NONE);
        verticalSpacingLabel.setLayoutData(layoutData);
        verticalSpacingLabel.setText(Messages.LegendGraphicStyleConfigurator_vertical_spacing);
        verticalSpacing = new Text(composite, SWT.BORDER);
        verticalSpacing.setLayoutData(layoutData);
       
        Label horizontalSpacingLabel = new Label(composite, SWT.NONE);
        horizontalSpacingLabel.setLayoutData(layoutData);
        horizontalSpacingLabel.setText(Messages.LegendGraphicStyleConfigurator_horizontal_spacing);
        horizontalSpacing = new Text(composite, SWT.BORDER);
        horizontalSpacing.setLayoutData(layoutData);
       
        Label indentSizeLabel = new Label(composite, SWT.NONE);
        indentSizeLabel.setLayoutData(layoutData);
        indentSizeLabel.setText(Messages.LegendGraphicStyleConfigurator_indent_size);
        indentSize = new Text(composite, SWT.BORDER);
        indentSize.setLayoutData(layoutData);
       
        Label fontColourLabel = new Label(composite, SWT.NONE);
        fontColourLabel.setLayoutData(layoutData);
        fontColourLabel.setText(Messages.LegendGraphicStyleConfigurator_font_colour);
        fontColour = new ColorEditor(composite);
      
        Label backgroundColourLabel = new Label(composite, SWT.NONE);
        backgroundColourLabel.setLayoutData(layoutData);
        backgroundColourLabel.setText(Messages.LegendGraphicStyleConfigurator_background_colour);
        backgroundColour = new ColorEditor(composite);
       
        composite.layout();
        Point size = composite.computeSize(SWT.DEFAULT, SWT.DEFAULT);
        composite.setSize(size);
        scrollComposite.setContent(composite);
        verticalMargin.addModifyListener(this);
        horizontalMargin.addModifyListener(this);
        verticalSpacing.addModifyListener(this);
        horizontalSpacing.addModifyListener(this);
View Full Code Here

Examples of org.eclipse.swt.custom.ScrolledComposite

     * @param parent the composite parent.
     * @param style the composite style.
     * @return the composite.
     */
    public ScrolledComposite createScrolledComposite( Composite parent, int style ) {
        ScrolledComposite scrolledComposite = new ScrolledComposite(parent, style);
        return scrolledComposite;
    }
View Full Code Here

Examples of org.eclipse.swt.custom.ScrolledComposite

        scroll.setMinWidth(parameterAreaSize.x);
        scroll.setMinHeight(parameterAreaSize.y);
  }
   
    private void setupGUI() {
        this.scrollingArea = new ScrolledComposite(this.parent, SWT.H_SCROLL | SWT.V_SCROLL);
        this.scrollingArea.setLayout(new GridLayout(1, true));
        this.scrollingArea.setExpandHorizontal(true);
        this.scrollingArea.setExpandVertical(true);
        this.scrollingArea.setAlwaysShowScrollBars(false);
       
View Full Code Here

Examples of org.eclipse.swt.custom.ScrolledComposite

    this.executableNameOption = executableNameOption;
    this.platformOptionProvider = platformOptionProvider;
  }
 
  public void createControl(Composite parent) {
    final ScrolledComposite scrollingContainer =
      new ScrolledComposite(parent, SWT.V_SCROLL);
    final SetupPlatformsPanel setupPlatformsPanel =
      new SetupPlatformsPanel(scrollingContainer,
                  SWT.NONE,
                  this.executableNameOption,
                  this.platformOptionProvider);
    this.setupPlatformsPanel = setupPlatformsPanel;
   
    // TODO: This control listener should maybe be on setupPlatformsPanel?
    scrollingContainer.addControlListener(new ControlAdapter() {
      public void controlResized(ControlEvent controlEvent) {
        scrollingContainer.setMinSize(
          setupPlatformsPanel.computeSize(SWT.DEFAULT, SWT.DEFAULT));
      }
    });
   
    scrollingContainer.setContent(setupPlatformsPanel);
    scrollingContainer.setExpandHorizontal(true);
    scrollingContainer.setExpandVertical(true);
   
    setControl(scrollingContainer);
  }
View Full Code Here

Examples of org.eclipse.swt.custom.ScrolledComposite

    return layout;
  }

  protected ScrolledComposite createScrollingArea() {
    ScrolledComposite scrollingArea =
      new ScrolledComposite(this, SWT.BORDER | SWT.V_SCROLL);
    scrollingArea.setLayoutData(createScrollingAreaLayoutData());
    scrollingArea.setLayout(createScrollingLayout());

    return scrollingArea;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.