Examples of RowData


Examples of org.eclipse.swt.layout.RowData

    }

    // Show/hide action buttons based on server state
    if (state == IServer.STATE_STOPPED || state == IServer.STATE_UNKNOWN) {

      RowData data = new RowData();
      data.exclude = false;
      startAppButton.setLayoutData(data);
      startAppButton.setVisible(true);

      data = new RowData();
      data.exclude = true;
      restartAppButton.setCompositeLayoutData(data);
      restartAppButton.setVisible(false);

      data = new RowData();
      data.exclude = true;
      stopAppButton.setLayoutData(data);
      stopAppButton.setVisible(false);

    }
    else {

      RowData data = new RowData();
      data.exclude = true;
      startAppButton.setLayoutData(data);
      startAppButton.setVisible(false);

      data = new RowData();
      data.exclude = false;
      restartAppButton.setCompositeLayoutData(data);
      restartAppButton.setVisible(true);

      data = new RowData();
      data.exclude = false;
      stopAppButton.setLayoutData(data);
      stopAppButton.setVisible(true);
    }

    // handle the update and restart button
    // Do not show the update button if there is not accessible
    // module project in the workspace, as no source update would be
    // possible within Eclipse
    if (state == IServer.STATE_STOPPED
        || state == IServer.STATE_UNKNOWN
        || !CloudFoundryProperties.isModuleProjectAccessible
            .testProperty(new IModule[] { module }, cloudServer)) {
      RowData data = new RowData();
      data.exclude = true;
      updateRestartAppButton.setCompositeLayoutData(data);
      updateRestartAppButton.setVisible(false);
    }
    else {
      RowData data = new RowData();
      data.exclude = false;
      updateRestartAppButton.setCompositeLayoutData(data);
      updateRestartAppButton.setVisible(true);
    }
View Full Code Here

Examples of org.eclipse.swt.layout.RowData

      }
    });

    // If debugging is not supported, permanently hide the debug buttons
    if (!isDebugAllowed()) {
      RowData data = new RowData();
      data.exclude = true;
      debugControl.setLayoutData(data);
      debugControl.setVisible(false);

      data = new RowData();
      data.exclude = true;
      connectToDebugger.setLayoutData(data);
      connectToDebugger.setVisible(false);

      buttonComposite.layout(true, true);
View Full Code Here

Examples of org.eclipse.swt.layout.RowData

        });

        // Text field
        traceIndexField = new Text(buttonsPanel, SWT.SINGLE | SWT.BORDER);
        traceIndexField.setToolTipText("Select index of first trace event to display");
        traceIndexField.setLayoutData(new RowData(60, SWT.DEFAULT));
        traceIndexField.addListener(SWT.Modify, new Listener() {

            @Override
            public void handleEvent(final Event event) {
                try {
                    correctInput = false;
                    final Long value = new Long(traceIndexField.getText());

                    if (value >= 1
                            && value <= TraceBackend.getInstance().getActiveResultSet()
                                    .getSize()) {
                        index = value;
                        showButton.setEnabled(nextButton.isEnabled()
                                || previousButton.isEnabled());
                        correctInput = true;
                    } else {
                        showButton.setEnabled(false);
                    }
                } catch (final Exception e) {
                    showButton.setEnabled(false);
                }
            }
        });
        traceIndexField.addKeyListener(new KeyListener() {

            @Override
            public void keyReleased(final KeyEvent e) {
                if (e.keyCode == SWT.CR && correctInput) {
                    doSelection();
                }
            }

            @Override
            public void keyPressed(final KeyEvent e) {
            }
        });

        // label
        label = new Label(buttonsPanel, SWT.NONE);
        label.setLayoutData(new RowData(200, SWT.DEFAULT));

        updateButtonsPanel();
    }
View Full Code Here

Examples of org.eclipse.swt.layout.RowData

        final Button loadConfigButton = new Button(container, SWT.PUSH | SWT.CENTER);
        final Button deleteConfigButton = new Button(container, SWT.PUSH | SWT.CENTER);
        final Button saveConfigButton = new Button(container, SWT.PUSH | SWT.CENTER);
        final Button saveAsConfigButton = new Button(container, SWT.PUSH | SWT.CENTER);
        final Label configNameLabel = new Label(container, SWT.NULL);
        configNameLabel.setLayoutData(new RowData(120, SWT.DEFAULT));

        // "Load patterns" button
        loadConfigButton.setToolTipText("Load pattern set...");
        loadConfigButton.setImage(PlatformUI.getWorkbench().getSharedImages()
                .getImage(ISharedImages.IMG_OBJ_FOLDER));
View Full Code Here

Examples of org.eclipse.swt.layout.RowData

        final Button loadConfigButton = new Button(container, SWT.PUSH | SWT.CENTER);
        final Button deleteConfigButton = new Button(container, SWT.PUSH | SWT.CENTER);
        final Button saveConfigButton = new Button(container, SWT.PUSH | SWT.CENTER);
        final Button saveAsConfigButton = new Button(container, SWT.PUSH | SWT.CENTER);
        final Label configNameLabel = new Label(container, SWT.NULL);
        configNameLabel.setLayoutData(new RowData(120, SWT.DEFAULT));

        // "Load nodes config" button
        loadConfigButton.setToolTipText("Load nodes configuration...");
        loadConfigButton.setImage(PlatformUI.getWorkbench().getSharedImages()
                .getImage(ISharedImages.IMG_OBJ_FOLDER));
View Full Code Here

Examples of org.eclipse.swt.layout.RowData

    }

    private void createTreeControl( final Composite composite ) {
        tree = new Tree(composite, SWT.BORDER | SWT.CHECK);
        tree.setLayoutData(new RowData(300, 442));
        tree.addListener(SWT.Selection, new org.eclipse.swt.widgets.Listener(){
            public void handleEvent( Event event ) {
                TreeItem item = (TreeItem) event.item;

                displayInfoControl(item);

                if (event.detail == SWT.CHECK) {
                    // Check child items
                    boolean checked = item.getChecked();
                    checkItems(item, checked);
                    checkPath(item.getParentItem(), checked, false);

                    // now update the buttons
                    if (noItemChecked()) {
                        setPageComplete(false);
                    } else {
                        setPageComplete(true);
                    }
                    getWizard().getContainer().updateButtons();
                }
            }
        });

        infoBox = new Composite(composite, SWT.NONE);
        stackLayoutInfoBox = new StackLayout();
        infoBox.setLayout(stackLayoutInfoBox);
        infoBox.setLayoutData(new RowData(430, 470));
    }
View Full Code Here

Examples of org.eclipse.swt.layout.RowData

        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);
        lblStyleName.setFont(boldFont);
       
        lblStyleNameValue = new Label (compositeStyleInfo, SWT.HORIZONTAL);
        lblStyleNameValue.setText(""); //$NON-NLS-1$
       
        Label lblStyleId = new Label (compositeStyleInfo, SWT.HORIZONTAL);
        lblStyleId.setText(Messages.Wizard_CloudMade_PreviewId);
        lblStyleId.setFont(boldFont);
       
        lblStyleIdValue = new Label (compositeStyleInfo, SWT.HORIZONTAL);
        lblStyleIdValue.setText(""); //$NON-NLS-1$
       
        Label lblStyleAuthor = new Label (compositeStyleInfo, SWT.HORIZONTAL);
        lblStyleAuthor.setText(Messages.Wizard_CloudMade_PreviewAuthor);
        lblStyleAuthor.setFont(boldFont);
       
        lblStyleAuthorValue = new Label (compositeStyleInfo, SWT.HORIZONTAL);
        lblStyleAuthorValue.setText(""); //$NON-NLS-1$
       
        previewImage = new Composite(gBPreview, SWT.NONE);
        previewImage.setLayoutData(new RowData(233, 160));
        previewImage.setCursor(new Cursor(display, SWT.CURSOR_HAND));
        previewImage.setToolTipText(Messages.Wizard_CloudMade_PreviewGetFullMap);
        previewImage.addMouseListener(new MouseListener() {

            public void mouseDoubleClick(MouseEvent arg0) {}
View Full Code Here

Examples of org.eclipse.swt.layout.RowData

       
        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);
        btnOpenFileDialog.setText (Messages.Wizard_WW_SelectFile);
        final Shell shell = parent.getShell();
        btnOpenFileDialog.addSelectionListener(new SelectionAdapter() {
View Full Code Here

Examples of org.eclipse.swt.layout.RowData

      //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);     
View Full Code Here

Examples of org.eclipse.swt.layout.RowData

    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);
       
        imageCache = new ImageRegistry(composite.getDisplay());
        ImageDescriptor desc = ImageDescriptor.createFromFile(getClass(),
                WWControl.IMG_DEMIS);
        imageCache.put(WWControl.IMG_DEMIS, desc);
       
        Composite imgControl = new Composite(control, SWT.NONE);
        imgControl.setLayoutData(new RowData(300, 100));
        imgControl.setBackgroundImage(imageCache.get(WWControl.IMG_DEMIS));
       
        Link link = new Link(control, SWT.BORDER);
        link.setText(Messages.Wizard_Ww_Example_Demis_Link);
        link.setLayoutData(new RowData(400, 40));
        link.addListener (SWT.Selection, new Listener () {
            public void handleEvent(Event event) {
                Program.launch(Messages.Wizard_Ww_Example_Demis_LinkUrl);
            }
        });
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.