Package org.eclipse.swt.widgets

Examples of org.eclipse.swt.widgets.Button.addListener()


            images.put(action.getId(), action.getImageDescriptor());
            image = images.get(action.getId());
        }
        button.setImage(image);

        button.addListener(SWT.Selection, new Listener(){
            public void handleEvent( Event event ) {
                action.runWithEvent(event);
            }
        });
    }
View Full Code Here


        final Button button = new Button(group, SWT.PUSH);
        button.setText(Messages.Font_ExampleText);
        button.setLayoutData(new GridData(SWT.RIGHT, SWT.TOP, false, false));

        button.addListener(SWT.Selection, new Listener(){

            public void handleEvent( Event event ) {

                final FontDialog dialog = new FontDialog(button.getShell());
View Full Code Here

        compRight.setFont(parent.getFont());

        Button defaultsButton = createButton(compRight, DEFAULTS_ID,
                Messages.StyleEditorDialog_defaults, false);
        defaultsButton.setEnabled(true);
        defaultsButton.addListener(SWT.Selection, new StyleEditorButtonListener(this));

        Button revertButton = createButton(compRight, REVERT_ID,
                Messages.StyleEditor_revert, false);
        revertButton.setEnabled(false);
        revertButton.addListener(SWT.Selection, new StyleEditorButtonListener(this));
View Full Code Here

        defaultsButton.addListener(SWT.Selection, new StyleEditorButtonListener(this));

        Button revertButton = createButton(compRight, REVERT_ID,
                Messages.StyleEditor_revert, false);
        revertButton.setEnabled(false);
        revertButton.addListener(SWT.Selection, new StyleEditorButtonListener(this));
       
        Button applyButton = createButton(compRight, APPLY_ID,
                Messages.StyleEditor_apply, false);
        applyButton.setEnabled(false);
        applyButton.addListener(SWT.Selection, new StyleEditorButtonListener(this));
View Full Code Here

        revertButton.addListener(SWT.Selection, new StyleEditorButtonListener(this));
       
        Button applyButton = createButton(compRight, APPLY_ID,
                Messages.StyleEditor_apply, false);
        applyButton.setEnabled(false);
        applyButton.addListener(SWT.Selection, new StyleEditorButtonListener(this));
       
        new Label(compRight, SWT.None);
       
        Button closeButton = createButton(compRight, CANCEL_ID,
                IDialogConstants.CANCEL_LABEL, false);
View Full Code Here

        new Label(compRight, SWT.None);
       
        Button closeButton = createButton(compRight, CANCEL_ID,
                IDialogConstants.CANCEL_LABEL, false);
        closeButton.setEnabled(true);
        closeButton.addListener(SWT.Selection, new StyleEditorButtonListener(this));
       
        Button okButton = createButton(compRight, OK_ID,
                IDialogConstants.OK_LABEL, false);
        okButton.setEnabled(true);
        okButton.addListener(SWT.Selection, new StyleEditorButtonListener(this));
View Full Code Here

        closeButton.addListener(SWT.Selection, new StyleEditorButtonListener(this));
       
        Button okButton = createButton(compRight, OK_ID,
                IDialogConstants.OK_LABEL, false);
        okButton.setEnabled(true);
        okButton.addListener(SWT.Selection, new StyleEditorButtonListener(this));
       
        layout.numColumns=3;
    }

    private void addImportExportButtons( Composite composite ) {
View Full Code Here

        compLeft.setLayoutData(new GridData(SWT.LEFT, SWT.BOTTOM, false, false));

        Button importButton = createButton(compLeft, IMPORT_ID,
                Messages.StyleEditor_import, false);
        importButton.setEnabled(false);
        importButton.addListener(SWT.Selection, new StyleEditorButtonListener(this));
        Button exportButton = createButton(compLeft, EXPORT_ID,
                Messages.StyleEditor_export, false);
        exportButton.setEnabled(false);
        exportButton.addListener(SWT.Selection, new StyleEditorButtonListener(this));
    }
View Full Code Here

        importButton.setEnabled(false);
        importButton.addListener(SWT.Selection, new StyleEditorButtonListener(this));
        Button exportButton = createButton(compLeft, EXPORT_ID,
                Messages.StyleEditor_export, false);
        exportButton.setEnabled(false);
        exportButton.addListener(SWT.Selection, new StyleEditorButtonListener(this));
    }

    @Override
    public void updateButtons() {
        // TODO: button logic, SLD listeners
View Full Code Here

        GridDataFactory.swtDefaults().span(4, 1).applyTo(savePassword);
       
        Button removeConnection = new Button(top, SWT.PUSH);
        GridDataFactory.swtDefaults().span(4, 1).indent(0, 10).applyTo(removeConnection);
        removeConnection.setText(localization.removeConnection);
        removeConnection.addListener(SWT.Selection, new Listener(){

            public void handleEvent( Event event ) {
                removeConnection();
            }
           
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.