Examples of RowLayout


Examples of org.eclipse.swt.layout.RowLayout

        createFunctionsTable(container);
    }

    private void createPatternButtonsPanel(final Composite parent) {
        final Composite container = new Composite(parent, SWT.NONE);
        container.setLayout(new RowLayout());

        // "Add" button
        Button button = new Button(container, SWT.PUSH | SWT.CENTER);
        button.setText("New pattern");
        button.setToolTipText("Add new trace pattern");
View Full Code Here

Examples of org.eclipse.swt.layout.RowLayout

        createNodesTable(container);
    }

    private void createNodeButtonsPanel(final Composite parent) {
        final Composite container = new Composite(parent, SWT.NONE);
        container.setLayout(new RowLayout());

        // "Add" button
        Button button = new Button(container, SWT.PUSH | SWT.CENTER);
        button.setText("New node");
        button.setToolTipText("Add new node you want to trace");
View Full Code Here

Examples of org.eclipse.swt.layout.RowLayout

    }

    private void createButtons(Composite parent) {
        Composite buttons = new Composite(parent, SWT.NONE);
        setBackground(buttons);
        RowLayout rowLayout = new RowLayout(SWT.HORIZONTAL);
        rowLayout.wrap = true;
        rowLayout.pack = false;
        rowLayout.justify = false;
        rowLayout.marginLeft = 10;
        rowLayout.marginRight = 10;
View Full Code Here

Examples of org.eclipse.swt.layout.RowLayout

        // gridData.horizontalAlignment = GridData.FILL;
        // gridData.horizontalSpan = 2;
        // selectionList.setLayoutData(gridData);

        // GridLayout layout = new GridLayout();
        final RowLayout layout = new RowLayout();
        layout.spacing = 5;
        layout.center = true;

        composite.setLayout(layout);
View Full Code Here

Examples of org.eclipse.swt.layout.RowLayout

        shell.setLayout(new GridLayout(2, false));

        Group fieldGroup = new Group(shell, SWT.SHADOW_ETCHED_IN);
        fieldGroup.setText("Select fields to include:");
        fieldGroup.setLayout(new RowLayout(SWT.VERTICAL));
        GridData fieldGroupLayoutData = new GridData();
        fieldGroupLayoutData.verticalSpan = 2;
    fieldGroup.setLayoutData(fieldGroupLayoutData);

        List<IField> fields = generator.findAllFIelds(compilationUnit);
        final List<Button> fieldButtons = new ArrayList<Button>();
        for(IField field: fields) {
          Button button = new Button(fieldGroup, SWT.CHECK);
          button.setText(generator.getName(field) + "(" + generator.getType(field) + ")");
          button.setData(field);
          button.setSelection(true);
          fieldButtons.add(button);
        }

        Button btnSelectAll = new Button(shell, SWT.PUSH);
        btnSelectAll.setText("Select All");
        GridData btnSelectAllLayoutData = new GridData(SWT.FILL, SWT.FILL, true, false);
        btnSelectAllLayoutData.verticalIndent = 10;
    btnSelectAll.setLayoutData(btnSelectAllLayoutData);
        btnSelectAll.addSelectionListener(new SelectionAdapter() {
          public void widgetSelected(SelectionEvent event) {
            for (Button button : fieldButtons) {
          button.setSelection(true);
        }
          }
        });
        Button btnSelectNone = new Button(shell, SWT.PUSH);
        btnSelectNone.setText("Deselect All");
        GridData selectNoneGridData = new GridData();
        selectNoneGridData.verticalAlignment = SWT.BEGINNING;
    btnSelectNone.setLayoutData(selectNoneGridData);
        btnSelectNone.addSelectionListener(new SelectionAdapter() {
          public void widgetSelected(SelectionEvent event) {
            for (Button button : fieldButtons) {
          button.setSelection(false);
        }
          }
        });

        Group optionGroup = new Group(shell, SWT.SHADOW_ETCHED_IN);
        optionGroup.setText("Options:");
        optionGroup.setLayout(new RowLayout(SWT.VERTICAL));
        GridData optionGridData = new GridData();
        optionGridData.horizontalSpan = 2;
        optionGridData.horizontalAlignment = SWT.FILL;
    optionGroup.setLayoutData(optionGridData);
View Full Code Here

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

Examples of org.eclipse.swt.layout.RowLayout

   
    @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

Examples of org.eclipse.swt.layout.RowLayout

        //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

Examples of org.eclipse.swt.layout.RowLayout

        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

Examples of org.eclipse.swt.layout.RowLayout

    }
   
    @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
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.