Package org.eclipse.swt.widgets

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


    button.setText(label);
    button.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_BEGINNING
            | GridData.HORIZONTAL_ALIGN_FILL));
    // button.pack();
    button.setToolTipText(tip);
    button.addListener(SWT.Selection, this);
    return button;
  }

  protected void newErrorMessage(Composite c) {
    newErrorMessage(c, 1);
View Full Code Here


//    adapter.setProposalAcceptanceStyle(ContentProposalAdapter.PROPOSAL_REPLACE);
   
    Button browseButton = newPushButton(tc, "Browse", "Click here to browse possible types");
    browseButton.removeListener(SWT.Selection, this);
    final AbstractSection finalSection = aSection;
    browseButton.addListener(SWT.Selection, new Listener() {
      public void handleEvent(Event event) {
        errorMessageUI.setText("");
        SelectTypeDialog dialog = new SelectTypeDialog(finalSection, candidatesToPickFrom);
//          OpenTypeSystemSelectionDialog dialog =
//              new OpenTypeSystemSelectionDialog(getShell(), typeList);
View Full Code Here

        top.setLayoutData(new GridData(SWT.CENTER, SWT.FILL, false, false));
        top.setLayout(new GridLayout(4, false));

        Button startButton = new Button(top, SWT.PUSH);
        startButton.setText("<<"); //$NON-NLS-1$
        startButton.addListener(SWT.Selection, this);

        Button backButton = new Button(top, SWT.PUSH);
        backButton.setText("<"); //$NON-NLS-1$
        backButton.addListener(SWT.Selection, this);
View Full Code Here

        startButton.setText("<<"); //$NON-NLS-1$
        startButton.addListener(SWT.Selection, this);

        Button backButton = new Button(top, SWT.PUSH);
        backButton.setText("<"); //$NON-NLS-1$
        backButton.addListener(SWT.Selection, this);

        Button forwardButton = new Button(top, SWT.PUSH);
        forwardButton.setText(">"); //$NON-NLS-1$
        forwardButton.addListener(SWT.Selection, this);
View Full Code Here

        backButton.setText("<"); //$NON-NLS-1$
        backButton.addListener(SWT.Selection, this);

        Button forwardButton = new Button(top, SWT.PUSH);
        forwardButton.setText(">"); //$NON-NLS-1$
        forwardButton.addListener(SWT.Selection, this);

        Button endButton = new Button(top, SWT.PUSH);
        endButton.setText(">>"); //$NON-NLS-1$
        endButton.addListener(SWT.Selection, this);
    }
View Full Code Here

        forwardButton.setText(">"); //$NON-NLS-1$
        forwardButton.addListener(SWT.Selection, this);

        Button endButton = new Button(top, SWT.PUSH);
        endButton.setText(">>"); //$NON-NLS-1$
        endButton.addListener(SWT.Selection, this);
    }

    private void createLabel( Composite top ) {
        Label label = new Label(top, SWT.NONE);
        label.setText("SQL");
View Full Code Here

    }

    private void createTestButton( Composite top ) {
        Button testButton = new Button(top, SWT.PUSH);
        testButton.setText("Test");
        testButton.addListener(SWT.Selection, new Listener(){

            public void handleEvent( Event event ) {
                // TODO implement test button
            }
View Full Code Here

        text.setLayoutData(layout);
       
        Button button = new Button(parent, SWT.PUSH);
        button.setLayoutData(new GridData());
        button.setText(Messages.CharSetFieldEditor_select);
        button.addListener(SWT.Selection, new Listener(){

            public void handleEvent( Event event ) {
                CharsetSelectionDialog dialog = new CharsetSelectionDialog(parent.getShell(), false, text.getText());
                dialog.open();
                text.setText(((Charset) dialog.getFirstResult()).name());
View Full Code Here

        Button remove = new Button(listComp, SWT.PUSH);
        remove.setText(Messages.MapSelectorPage_Remove);
        gridData = new GridData();
        gridData.horizontalAlignment = SWT.FILL;
        remove.setLayoutData(gridData);       
        remove.addListener(SWT.Selection, new Listener(){

            @SuppressWarnings("unchecked")
            public void handleEvent( Event event ) {
                IStructuredSelection selection = (IStructuredSelection) viewer.getSelection();
                Iterator iter = selection.iterator();
View Full Code Here

        GridData gridData = new GridData();
        gridData.verticalAlignment = SWT.BOTTOM;
        gridData.horizontalAlignment = SWT.FILL;
        scale.setLayoutData(gridData);
       
        scale.addListener(SWT.Selection, new Listener(){
            public void handleEvent( Event event ) {
                Collection<IMap> maps = getMaps();
                for( IMap map : maps ) {
                    map.getBlackboard().put(SCALE, null);
                }
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.