Package org.eclipse.swt.layout

Examples of org.eclipse.swt.layout.RowLayout


        if (tree != null && !tree.isDisposed())
            return;

        childControl = new Composite(parent, SWT.NONE);
        final Composite composite = childControl;
        composite.setLayout(new RowLayout());
        setControl(composite);

        createTreeControl(composite);

        TreeItem osm = addOsmOptions();
View Full Code Here


   
    @Override
    protected Control buildControl(Composite infoBox) {
        display = infoBox.getDisplay();
        Composite composite = new Composite(infoBox, SWT.NONE);
        composite.setLayout(new RowLayout(SWT.VERTICAL));
               
        //region Get Style From Groups
        btnStyleGroups = new Button(composite, SWT.RADIO);
        btnStyleGroups.setSelection(true);
        btnStyleGroups.setText(Messages.Wizard_CloudMade_StyleFromGroup);
        btnStyleGroups.addSelectionListener(radioSelectionListener);
               
        Composite compositeGroups = new Composite(composite, SWT.NONE);
        compositeGroups.setLayout(new RowLayout(SWT.HORIZONTAL));
               
        gBCloudMade = new Group(compositeGroups, SWT.BORDER);
        gBCloudMade.setLayout(new RowLayout(SWT.VERTICAL));
        gBCloudMade.setText(Messages.Wizard_CloudMade_GroupCloudMade);
       
        lvCloudMade = new ListViewer(gBCloudMade);
        lvCloudMade.getList().setLayoutData(new RowData(180, 80));       
        lvCloudMade.setContentProvider(new ArrayContentProvider());
        lvCloudMade.setLabelProvider(new LabelProvider());    
       
        gBCloudMade.pack();
               
        gBFeatured = new Group(compositeGroups, SWT.BORDER);
        gBFeatured.setLayout(new RowLayout(SWT.VERTICAL));
        gBFeatured.setText(Messages.Wizard_CloudMade_GroupFeatured);
       
        lvFeatured = new ListViewer(gBFeatured);
        lvFeatured.getList().setLayoutData(new RowData(180, 80));       
        lvFeatured.setContentProvider(new ArrayContentProvider());
        lvFeatured.setLabelProvider(new LabelProvider());  
       
        gBFeatured.pack();
        //endregion
           
        //region Get Style From Id
        Button btnOwnStyle = new Button(composite, SWT.RADIO);
        btnOwnStyle.setText(Messages.Wizard_CloudMade_StyleFromId);
               
        Composite compositeStyleId = new Composite(composite, SWT.NONE);
        compositeStyleId.setLayout(new RowLayout(SWT.HORIZONTAL));
       
        lblStyleIdField = new Label (compositeStyleId, SWT.HORIZONTAL);
        lblStyleIdField.setText(Messages.Wizard_CloudMade_StyleId);
       
        txtStyleId = new Text (compositeStyleId, SWT.BORDER);
        txtStyleId.setBounds(10, 10, 200, 200);
        txtStyleId.setText(Messages.Wizard_CloudMade_DefaultStyleId);
       
        txtStyleId.addKeyListener(new KeyListener(){
            public void keyPressed(KeyEvent event) {
                if ((event.keyCode == SWT.CR) || (event.keyCode == SWT.KEYPAD_CR)) {
                    updatePreview();
                }              
            }

            public void keyReleased(KeyEvent arg0) {}          
        });
       
        txtStyleId.addListener (SWT.Verify, new Listener () {
            public void handleEvent (Event e) {
                String input = e.text;
                for (int i=0; i < input.length(); i++) {
                    if (!('0' <= input.charAt(i) && input.charAt(i) <= '9')) {
                        e.doit = false;
                        return;
                    }
                }
            }
        });
       
        btnRefresh = new Button (compositeStyleId, SWT.PUSH);
        btnRefresh.setText (Messages.Wizard_CloudMade_RefreshPreview);
        btnRefresh.addSelectionListener(new SelectionAdapter() {
            public void widgetSelected(SelectionEvent e) {
                updatePreview();
            }
        });

       
        link = new Link(composite, SWT.BORDER);
        link.setText(Messages.Wizard_CloudMade_StyleEditorInfo);
        link.setLayoutData(new RowData(400, 50));
        link.addListener (SWT.Selection, new Listener () {
            public void handleEvent(Event event) {
                Program.launch("http://maps.cloudmade.com/editor"); //$NON-NLS-1$
            }
        });
        //endregion
                
        //region Preview
        Group gBPreview = new Group(composite, SWT.BORDER);
        gBPreview.setLayout(new RowLayout(SWT.HORIZONTAL));
        gBPreview.setText(Messages.Wizard_CloudMade_Preview);
               
        Composite compositeStyleInfo = new Composite(gBPreview, SWT.NONE);
        compositeStyleInfo.setLayout(new RowLayout(SWT.VERTICAL));
        compositeStyleInfo.setLayoutData(new RowData(180, 160));
                       
        Label lblStyleName = new Label (compositeStyleInfo, SWT.HORIZONTAL | SWT.BOLD);
        lblStyleName.setText(Messages.Wizard_CloudMade_PreviewName);
        Font boldFont = JFaceResources.getFontRegistry().getBold(JFaceResources.DEFAULT_FONT);
View Full Code Here

        //region Select local file
        btnLocalFile = new Button(composite, SWT.RADIO);
        btnLocalFile.setText(Messages.Wizard_WW_LocalFile);
       
        Composite row = new Composite(composite, SWT.NONE);
        row.setLayout(new RowLayout(SWT.HORIZONTAL));
       
        txtLocalFile = new Text (row, SWT.BORDER);
        txtLocalFile.setLayoutData(new RowData(350, 20));
       
        btnOpenFileDialog = new Button (row, SWT.PUSH);
View Full Code Here

        lblValue.setText(Integer.toString(sclScaleFactor.getSelection()));
    }
   
  @Override
  protected void createFieldEditors() {
      getFieldEditorParent().setLayout(new RowLayout(SWT.VERTICAL));     
           
      //region Scale-Factor
        Group grpScaleFactor = new Group(getFieldEditorParent(), SWT.NONE);
        grpScaleFactor.setText(Messages.Preferences_ScaleFactor_Title);
       
        grpScaleFactor.setLayout(new RowLayout(SWT.VERTICAL));
        grpScaleFactor.setLayoutData(new RowData(300, 20));
       
        //region Scale-Component Description
        Composite cScaleFactorDescription = new Composite(grpScaleFactor, SWT.NONE);
        cScaleFactorDescription.setLayoutData(new RowData(400, 25));
       
        GridLayout gridLayout = new GridLayout();
        gridLayout.numColumns = 3;
        gridLayout.makeColumnsEqualWidth = false;       
       
        cScaleFactorDescription.setLayout(gridLayout);       
       
        Label lblFast = new Label (cScaleFactorDescription, SWT.HORIZONTAL);
        lblFast.setText(Messages.Preferences_ScaleFactor_FastRendering);
        lblFast.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_BEGINNING | GridData.FILL_HORIZONTAL));
       
       
        lblValue = new Label (cScaleFactorDescription, SWT.HORIZONTAL);
        lblValue.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_CENTER | GridData.FILL_HORIZONTAL));
       
        Label lblQuality = new Label (cScaleFactorDescription, SWT.HORIZONTAL | GridData.FILL_HORIZONTAL);
        lblQuality.setText(Messages.Preferences_ScaleFactor_HighestQuality);
        lblQuality.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_END));
        //endregion
       
        //region Scale-Component
        ScaleFieldEditor scaleFactorFieldEditor = new ScaleFieldEditor(
                WMTPreferenceConstants.P_WMT_SCALEFACTOR,
                "", //$NON-NLS-1$
                grpScaleFactor,
                1,
                100,
                1,
                5
        );
        scaleFactorFieldEditor.getLabelControl(grpScaleFactor).setLayoutData(new RowData());
        addField(scaleFactorFieldEditor);
       
       
        sclScaleFactor = scaleFactorFieldEditor.getScaleControl();
        sclScaleFactor.setSize(400, 30);
        sclScaleFactor.setMinimum(0);
        sclScaleFactor.setMaximum(100);
        sclScaleFactor.setIncrement(1);
        sclScaleFactor.setPageIncrement(10);
        sclScaleFactor.setSelection(50);
        sclScaleFactor.setLayoutData(new RowData(400, 30));
        sclScaleFactor.addSelectionListener(new SelectionListener() {

            public void widgetDefaultSelected(SelectionEvent arg0) {}

            public void widgetSelected(SelectionEvent event) {
                updateScaleFactorValue();
            }           
        });
       
        sclScaleFactor.addListener(SWT.Paint, new Listener() {
            /**
             * When the scale-component is painted for the first time,
             * also update the display of the scale-factor.
             */
            public void handleEvent( Event arg0 ) {
                updateScaleFactorValue();
                sclScaleFactor.removeListener(SWT.Paint, this);
            }
           
        });
        //endregion

        //region Scale-Component Label
        Composite cScaleFactorDescriptionValues = new Composite(grpScaleFactor, SWT.NONE);
        cScaleFactorDescriptionValues.setLayoutData(new RowData(400, 30));       
       
        GridLayout gridLayoutTwo = new GridLayout();
        gridLayoutTwo.numColumns = 2;
        gridLayoutTwo.makeColumnsEqualWidth = false;   
       
        cScaleFactorDescriptionValues.setLayout(gridLayoutTwo);       
       
        Label lblValue0 = new Label (cScaleFactorDescriptionValues, SWT.HORIZONTAL);
        lblValue0.setText("0"); //$NON-NLS-1$
        lblValue0.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_BEGINNING | GridData.FILL_HORIZONTAL));
       
                  
        Label lblValue100 = new Label (cScaleFactorDescriptionValues, SWT.HORIZONTAL | GridData.FILL_HORIZONTAL);
        lblValue100.setText("100"); //$NON-NLS-1$
        lblValue100.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_END));
       

        Label lblScaleFactorExpl = new Label (grpScaleFactor, SWT.HORIZONTAL | SWT.WRAP);
        lblScaleFactorExpl.setText(Messages.Preferences_ScaleFactor_Description);
        lblScaleFactorExpl.setLayoutData(new RowData(400, 50));
        //endregion
        //endregion
       
        //region Tile-Limit
        Group grpTileLimit = new Group(getFieldEditorParent(), SWT.NONE);
        grpTileLimit.setLayout(new RowLayout(SWT.VERTICAL));
        grpTileLimit.setText(Messages.Preferences_TileLimit_Title);
     
        Composite limitFields = new Composite(grpTileLimit, SWT.NONE);
       
        IntegerFieldEditor warningFieldEditor = new IntegerFieldEditor(
                WMTPreferenceConstants.P_WMT_TILELIMIT_WARNING,
                Messages.Preferences_TileLimit_Warning,
                limitFields               
        );
        addField(warningFieldEditor);

        IntegerFieldEditor errorFieldEditor = new IntegerFieldEditor(
                WMTPreferenceConstants.P_WMT_TILELIMIT_ERROR,
                Messages.Preferences_TileLimit_Error,
                limitFields               
        );
        addField(errorFieldEditor);
       

        Label lblTileLimitExpl = new Label (grpTileLimit, SWT.HORIZONTAL | SWT.WRAP);
        lblTileLimitExpl.setText(Messages.Preferences_TileLimit_Description);
        lblTileLimitExpl.setLayoutData(new RowData(400, 90));
        //endregion

        //region Reset LayoutManagers (they are set to GridLayout when the field is added)
        grpScaleFactor.setLayout(new RowLayout(SWT.VERTICAL));
        cScaleFactorDescription.setLayout(gridLayout);     
        cScaleFactorDescriptionValues.setLayout(gridLayoutTwo);    
        grpScaleFactor.pack();
        grpTileLimit.pack();
        //endregion
View Full Code Here

    }
   
    @Override
    protected Control buildControl(Composite composite) {
        Composite control = new Composite(composite, SWT.NONE);
        control.setLayout(new RowLayout(SWT.VERTICAL));
       
        Label text = new Label(control, SWT.HORIZONTAL | SWT.WRAP);
        text.setLayoutData(new RowData(400, 80));
        text.setText(Messages.Wizard_Ww_Example_Demis_Info);
       
View Full Code Here

    private static final String IMG_OSM = "osm.png"; //$NON-NLS-1$
   
    @Override
    protected Control buildControl(Composite composite) {
        Composite control = new Composite(composite, SWT.NONE);
        control.setLayout(new RowLayout(SWT.VERTICAL));
       
        Label text = new Label(control, SWT.HORIZONTAL | SWT.WRAP);
        text.setLayoutData(new RowData(400, 70));
        text.setText(Messages.Wizard_Osm_Info);
       
View Full Code Here

    }
   
    @Override
    protected Control buildControl(Composite composite) {
        Composite control = new Composite(composite, SWT.NONE);
        control.setLayout(new RowLayout(SWT.VERTICAL));
       
        //region Description
        Link text = new Link(control, SWT.HORIZONTAL | SWT.WRAP);
        text.setLayoutData(new RowData(400, 110));
        text.setText(Messages.Wizard_CS_Description);
        text.addListener (SWT.Selection, new Listener () {
            public void handleEvent(Event event) {
                Program.launch(Messages.Wizard_CS_UrlTileNames);
            }
        });
        //endregion
       
        //region URL
        Label lblUrl = new Label (control, SWT.HORIZONTAL | SWT.BOLD);
        lblUrl.setText(Messages.Wizard_CS_Url);
       
        Font boldFont = JFaceResources.getFontRegistry().getBold(JFaceResources.DEFAULT_FONT);
        lblUrl.setFont(boldFont);
       
        txtUrl = new Text (control, SWT.BORDER);
        txtUrl.setLayoutData(new RowData(380, 20));
        txtUrl.setText(Messages.Wizard_CS_UrlDefault);
        //endregion
       
        // type
        typeButton = new Button(control, SWT.CHECK);
        typeButton.setLayoutData(new RowData(380, 20));
        typeButton.setText("Handle as TMS as opposed to Google tile schema.");
        // end type
       
       
        //region Zoom-Range
        Composite compositeRow = new Composite(control, SWT.NONE);
        compositeRow.setLayout(new RowLayout(SWT.HORIZONTAL));
       
        Composite compositeZoom = new Composite(compositeRow, SWT.NONE);
        compositeZoom.setLayout(new RowLayout(SWT.VERTICAL));
        compositeZoom.setLayoutData(new RowData(200, 100));
       
        Label lblZoom = new Label (compositeZoom, SWT.HORIZONTAL | SWT.BOLD);
        lblZoom.setText(Messages.Wizard_CS_ZoomLevel);
        lblZoom.setFont(boldFont);
       
        //region Zoom-Min
        Composite compositeRowZoom = new Composite(compositeZoom, SWT.NONE);
        compositeRowZoom.setLayout(new GridLayout(2, true));
        Label lblZoomMin = new Label (compositeRowZoom, SWT.HORIZONTAL | SWT.BOLD);
        lblZoomMin.setText(Messages.Wizard_CS_Min);
               
        spZoomMin = new Spinner (compositeRowZoom, SWT.BORDER | SWT.READ_ONLY);
        spZoomMin.setMinimum(0);
        spZoomMin.setMaximum(22);
        spZoomMin.setSelection(2);
        spZoomMin.setIncrement(1);
        spZoomMin.pack();
        //endregion

        //region Zoom-Max
        Label lblZoomMax = new Label (compositeRowZoom, SWT.HORIZONTAL | SWT.BOLD);
        lblZoomMax.setText(Messages.Wizard_CS_Max);
               
        spZoomMax = new Spinner (compositeRowZoom, SWT.BORDER | SWT.READ_ONLY);
        spZoomMax.setMinimum(0);
        spZoomMax.setMaximum(22);
        spZoomMax.setSelection(18);
        spZoomMax.setIncrement(1);
        spZoomMax.pack();
        //endregion
        //endregion

        //region Tags
        Composite compositeTags = new Composite(compositeRow, SWT.NONE);
        compositeTags.setLayout(new RowLayout(SWT.VERTICAL));
       
        Label lblTags = new Label (compositeTags, SWT.HORIZONTAL | SWT.BOLD);
        lblTags.setText(Messages.Wizard_CS_AvailableTags);
        lblTags.setFont(boldFont);
View Full Code Here

    private static final String IMG_NASA = "nasa.png"; //$NON-NLS-1$
   
    @Override
    protected Control buildControl(Composite composite) {
        Composite control = new Composite(composite, SWT.NONE);
        control.setLayout(new RowLayout(SWT.VERTICAL));
       
        Label text = new Label(control, SWT.HORIZONTAL | SWT.WRAP);
        text.setLayoutData(new RowData(400, 60));
        text.setText(Messages.Wizard_Nasa_Info);
       
View Full Code Here

       
        //endregion
              
        //region build GUI
        Composite composite = new Composite(parent, SWT.NONE);
        composite.setLayout(new RowLayout(SWT.VERTICAL));
       
       
        Group groupBox = new Group(composite, SWT.BORDER);
        groupBox.setLayout(new RowLayout(SWT.VERTICAL));
        groupBox.setText(Messages.Properties_Layer_GroupBox);
       
        // Radio-Button "Automatic Selection"
        btnAutomatic = new Button(groupBox, SWT.RADIO);
        btnAutomatic.addSelectionListener(selectionListener);
        btnAutomatic.setSelection(true);
        btnAutomatic.setText(Messages.Properties_Layer_AutomaticSelection);

        // Radio-Button "Manual Selection"
        btnManual = new Button(groupBox, SWT.RADIO);
        btnManual.setText(Messages.Properties_Layer_ManualSelection);
       
        Composite compositeManual = new Composite(groupBox, SWT.NONE);
        compositeManual.setLayout(new RowLayout(SWT.VERTICAL));
       
       
        Composite compositeZoomLevelSelection = new Composite(compositeManual, SWT.NONE);
        compositeZoomLevelSelection.setLayout(new RowLayout(SWT.HORIZONTAL));
       
        lblUseZoomLevel = new Label (compositeZoomLevelSelection, SWT.HORIZONTAL);
        lblUseZoomLevel.setText(Messages.Properties_Layer_UseZoomLevel);
       
        // "Spinner": Zoom-Level-Selector
View Full Code Here

    @Override
    public void createPartControl(final Composite parent) {
        parentControl = parent;
       
        Composite composite = new Composite(parent, SWT.NONE);  
        composite.setLayout(new RowLayout(SWT.HORIZONTAL));
                
        //region Label "Layer"
        Label lblLayer = new Label (composite, SWT.HORIZONTAL);
        lblLayer.setText(Messages.ZoomLevelSwitcher_Layer);
        //endregion
View Full Code Here

TOP

Related Classes of org.eclipse.swt.layout.RowLayout

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.