Examples of Button


Examples of org.eclipse.swt.widgets.Button

      latency_factor.setLayoutData(gridData);

        Label reset_label = new Label(cSection, SWT.NULL );
        Messages.setLanguageText(reset_label, CFG_PREFIX + "reset");

        Button reset_button = new Button(cSection, SWT.PUSH);

        Messages.setLanguageText(reset_button, CFG_PREFIX + "reset.button" );

        reset_button.addListener(SWT.Selection,
            new Listener()
          {
                public void
            handleEvent(Event event)
                {
View Full Code Here

Examples of org.eclipse.swt.widgets.Button

    final Group gRadio = new Group(cMode, SWT.WRAP);
    Messages.setLanguageText(gRadio, "ConfigView.section.mode.title");
    gRadio.setLayoutData(gridData);
    gRadio.setLayout(new RowLayout(SWT.HORIZONTAL));

    Button button0 = new Button (gRadio, SWT.RADIO);
    Messages.setLanguageText(button0, "ConfigView.section.mode.beginner");
    button0.setData("iMode", "0");
    button0.setData("sMode", "beginner.text");
   
    Button button1 = new Button (gRadio, SWT.RADIO);
    Messages.setLanguageText(button1, "ConfigView.section.mode.intermediate");
    button1.setData("iMode", "1");
    button1.setData("sMode", "intermediate.text");
   
    Button button2 = new Button (gRadio, SWT.RADIO);
    Messages.setLanguageText(button2, "ConfigView.section.mode.advanced");
    button2.setData("iMode", "2");
    button2.setData("sMode", "advanced.text");
   
    if ( userMode == 0) {
      initsMode = "beginner.text";
      button0.setSelection(true);
    } else if ( userMode == 1) {
      initsMode = "intermediate.text";
      button1.setSelection(true);
    } else {
      initsMode = "advanced.text";
      button2.setSelection(true);
    }

   
    gridData = new GridData(GridData.FILL_HORIZONTAL);
    final Label label = new Label(cMode, SWT.WRAP);
    gridData.horizontalSpan = 4;
    label.setLayoutData(gridData);
  text[0] = MessageText.getString("ConfigView.section.mode." + initsMode);
  label.setText(text[0]);
  label.addListener (SWT.Selection, new Listener () {
    public void handleEvent(Event event) {
      Utils.launch(event.text);
    }
  });
 
  Group gWiki = new Group(cMode, SWT.WRAP);
    gridData = new GridData();
    gridData.widthHint = 350;
    gWiki.setLayoutData(gridData);
    layout = new GridLayout();
    layout.numColumns = 1;
    layout.marginHeight = 1;
    gWiki.setLayout(layout);
   
    gWiki.setText(MessageText.getString("Utils.link.visit"));

      final Label linkLabel = new Label(gWiki, SWT.NULL);
      linkLabel.setText( MessageText.getString( messTexts[userMode] ) );
      linkLabel.setData( links[userMode] );
      linkLabel.setCursor(linkLabel.getDisplay().getSystemCursor(SWT.CURSOR_HAND));
      linkLabel.setForeground(Colors.blue);
      gridData = new GridData(GridData.FILL_HORIZONTAL);
      gridData.horizontalIndent = 10;
      linkLabel.setLayoutData( gridData );
      linkLabel.addMouseListener(new MouseAdapter() {
        public void mouseDoubleClick(MouseEvent arg0) {
          Utils.launch((String) ((Label) arg0.widget).getData());
        }
        public void mouseUp(MouseEvent arg0) {
          Utils.launch((String) ((Label) arg0.widget).getData());
        }
      });
     
      final Label linkLabel1 = new Label(gWiki, SWT.NULL);
      linkLabel1.setText( (userMode == 1)?MessageText.getString(messTexts[3]):"");
      linkLabel1.setData( links[3] );
      linkLabel1.setCursor(linkLabel1.getDisplay().getSystemCursor(SWT.CURSOR_HAND));
      linkLabel1.setForeground(Colors.blue);
      gridData = new GridData(GridData.FILL_HORIZONTAL);
      gridData.horizontalIndent = 10;
      linkLabel1.setLayoutData( gridData );
      linkLabel1.addMouseListener(new MouseAdapter() {
        public void mouseDoubleClick(MouseEvent arg0) {
          Utils.launch((String) ((Label) arg0.widget).getData());
        }
        public void mouseUp(MouseEvent arg0) {
          Utils.launch((String) ((Label) arg0.widget).getData());
        }
      });

   
    Listener radioGroup = new Listener () {
      public void handleEvent (Event event) {
       
        Control [] children = gRadio.getChildren ();
       
        for (int j=0; j<children.length; j++) {
           Control child = children [j];
           if (child instanceof Button) {
             Button button = (Button) child;
             if ((button.getStyle () & SWT.RADIO) != 0) button.setSelection (false);
           }
        }

        Button button = (Button) event.widget;
        button.setSelection (true);
        int mode = Integer.parseInt((String)button.getData("iMode"));
        text[0] = MessageText.getString("ConfigView.section.mode." + (String)button.getData("sMode"));
        label.setText(text[0]);
        linkLabel.setText( MessageText.getString(messTexts[mode]) );
        linkLabel.setData( links[mode] );
        if(mode == 1){
          linkLabel1.setText( MessageText.getString(messTexts[3]) );
          linkLabel1.setData( links[3] );
        } else{
          linkLabel1.setText( "" );
          linkLabel1.setData( "" );
        }
        COConfigurationManager.setParameter("User Mode", Integer.parseInt((String)button.getData("iMode")));
        }
    };
   
    button0.addListener (SWT.Selection, radioGroup);
    button1.addListener (SWT.Selection, radioGroup);
    button2.addListener (SWT.Selection, radioGroup);

    Label padding = new Label(cMode, SWT.NULL );
    gridData = new GridData();
    gridData.horizontalSpan = 3;
    padding.setLayoutData( gridData );
   
      // reset to defaults
   
  Composite gReset = new Composite(cMode, SWT.WRAP);
    gridData = new GridData();
    gridData.horizontalSpan = 4;
    gReset.setLayoutData(gridData);
    layout = new GridLayout();
    layout.numColumns = 3;
    gReset.setLayout(layout);

    Label reset_label = new Label(gReset, SWT.NULL );
    Messages.setLanguageText(reset_label, "ConfigView.section.mode.resetdefaults" );
   
    Button reset_button = new Button(gReset, SWT.PUSH);

    Messages.setLanguageText(reset_button, "Button.reset" );

    reset_button.addListener(SWT.Selection,
    new Listener()
    {
          public void
      handleEvent(Event event)
          {
View Full Code Here

Examples of org.eclipse.swt.widgets.Button

    });
    file.setText(((NewTorrentWizard) wizard).singlePath);
    GridData gridData = new GridData(GridData.FILL_HORIZONTAL);
    file.setLayoutData(gridData);
   
    Button browse = new Button(panel, SWT.PUSH);
    browse.addListener(SWT.Selection, new Listener() {
      /*
       * (non-Javadoc)
       *
       * @see org.eclipse.swt.widgets.Listener#handleEvent(org.eclipse.swt.widgets.Event)
       */
 
View Full Code Here

Examples of org.eclipse.swt.widgets.Button

   
    label = new Label(shell,SWT.WRAP);
   
    combo = new Combo(shell,SWT.READ_ONLY);
   
    Button ok = new Button(shell,SWT.PUSH);
    ok.addListener(SWT.Selection, new Listener() {
      public void handleEvent(Event arg0) {
       result = combo.getText();
       shell.dispose();      
      }
    });
    ok.setText(MessageText.getString("Button.ok"));
   
    Button cancel = new Button(shell,SWT.PUSH);
    cancel.addListener(SWT.Selection, new Listener() {
      public void handleEvent(Event arg0) {
       
        result = null;
      
       shell.dispose();      
      }
    });
    cancel.setText(MessageText.getString("Button.cancel"));
   
   
    shell.addListener(SWT.Dispose,new Listener() {
      public void handleEvent(Event arg0) {
      }
    });
   
    data = new GridData(GridData.FILL_HORIZONTAL);
    data.horizontalSpan = 2;
    data.heightHint = 30;
    label.setLayoutData(data);
   
    data = new GridData(GridData.FILL_HORIZONTAL);
    data.horizontalSpan = 2;
    combo.setLayoutData(data);
       
    data = new GridData();
    data.widthHint = 80;
    data.grabExcessHorizontalSpace = true;
    data.grabExcessVerticalSpace = true;
    data.verticalAlignment = SWT.END;
    data.horizontalAlignment = SWT.END;
    ok.setLayoutData(data);
   
    data = new GridData();
    data.grabExcessVerticalSpace = true;
    data.verticalAlignment = SWT.END;
    data.widthHint = 80;   
    cancel.setLayoutData(data);
   
    shell.setSize(300,150);
    shell.layout();
   
    Utils.centerWindowRelativeTo(shell,parentShell);
View Full Code Here

Examples of org.eclipse.swt.widgets.Button

    gLayout.marginWidth = 25;
    gLayout.marginTop = 0;
    gLayout.marginBottom = 0;
    toolbarPanel.setLayout(gLayout);

    final Button autoClearButton = new Button(toolbarPanel, SWT.CHECK);
    autoClearButton.setText(MessageText.getString("Progress.reporting.window.remove.auto"));
    autoClearButton.setToolTipText(MessageText.getString("Progress.reporting.window.remove.auto.tooltip"));
    autoClearButton.setLayoutData(new GridData(SWT.BEGINNING, SWT.CENTER,
        false, false));

    autoClearButton.setSelection(COConfigurationManager.getBooleanParameter("auto_remove_inactive_items"));

    Label dummy = new Label(toolbarPanel, SWT.NONE);
    dummy.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));

    final Button clearInActiveButton = new Button(toolbarPanel, SWT.NONE);
    clearInActiveButton.setText(MessageText.getString("Progress.reporting.window.remove.now"));
    clearInActiveButton.setToolTipText(MessageText.getString("Progress.reporting.window.remove.now.tooltip"));
    clearInActiveButton.setLayoutData(new GridData(SWT.END, SWT.CENTER, false,
        false));
    clearInActiveButton.setEnabled(!COConfigurationManager.getBooleanParameter("auto_remove_inactive_items"));

    /*
     * Toggles the checked state of auto remove
     */
    autoClearButton.addSelectionListener(new SelectionListener() {
      public void widgetSelected(SelectionEvent e) {
        COConfigurationManager.setParameter("auto_remove_inactive_items",
            autoClearButton.getSelection());

        /*
         * Disable clearInActiveButton if auto remove is checked
         */
        clearInActiveButton.setEnabled(!autoClearButton.getSelection());

        isAutoRemove = autoClearButton.getSelection();

        /*
         * Removes any inactive panels that may already be in the window if this option is set to true
         */
        if (true == isAutoRemove) {
          removeInActivePanels();
        }

      }

      public void widgetDefaultSelected(SelectionEvent e) {
        widgetSelected(e);
      }

    });

    /*
     * Remove inactive when clicked
     */
    clearInActiveButton.addSelectionListener(new SelectionListener() {
      public void widgetSelected(SelectionEvent e) {
        removeInActivePanels();
      }

      public void widgetDefaultSelected(SelectionEvent e) {
View Full Code Here

Examples of org.flexdock.view.Button

    private class ToggleListener implements ItemListener {
        public void itemStateChanged(ItemEvent e) {
            if(e.getStateChange()!=ItemEvent.SELECTED && e.getStateChange()!=ItemEvent.DESELECTED)
                return;

            Button button = (Button)e.getSource();
            updateTooltip(button);
        }
View Full Code Here

Examples of org.getspout.spoutapi.gui.Button

                String flag = null;
                String player = null;
                ClaimedResidence res = null;
                String group = null;
                boolean resadmin = (Boolean)popup.getMetaData().get("admin");
                Button button = event.getButton();
                if (button.getText().equalsIgnoreCase("Close")) {
                    event.getPlayer().getMainScreen().removeWidget(screen);
                    return;
                } else if (button.getText().equalsIgnoreCase("RemoveAll")) {
                    flagval = "removeall";
                } else if (button.getText().equalsIgnoreCase("SetTrue")) {
                    flagval = "true";
                } else if (button.getText().equalsIgnoreCase("SetFalse")) {
                    flagval = "false";
                } else if (button.getText().equalsIgnoreCase("Remove")) {
                    flagval = "remove";
                }
                player = ((GenericTextField) popup.getWidget("PlayerName")).getText();
                group = ((GenericTextField)popup.getWidget("GroupName")).getText();
                flag = ((GenericTextField) popup.getWidget("FlagName")).getText();
View Full Code Here

Examples of org.gnome.gtk.Button

        this.glade = glade;

        dialog = (Window)glade.getWidget("wnd_preferences");
        dialog.showAll();

        Button ok = (Button)glade.getWidget("btn_ok1");
        ok.connect(new GUIEventPipe(this, "ok"));

        Button cancel = (Button)glade.getWidget("btn_cancel1");
        cancel.connect(new GUIEventPipe(this, "cancel"));

        SpinButton spinner = (SpinButton)glade.getWidget("spn_segments");
        spinner.setValue(Configuration.get().getNumberOfSegments());
    }
View Full Code Here

Examples of org.gwtoolbox.widget.client.button.version2.Button

        tabs.addTab(tab1);
        tabs.addTab("Tab 2", new HTML("Tab 2 Content"));
        tabs.addTab("Tab 3", new HTML("Tab 3 Content"));
        final TabSpec tab4 = new TabSpec("tab4", "Tab 4", null, new HTML("Tab 4 Content"), true);
        tabs.addTab(tab4);
        Button button = new Button("Add Tab 4");
        button.addClickHandler(new ClickHandler() {
            public void onClick(ClickEvent event) {
                tabs.addTab(tab4, 3);
            }
        });
        FlowPanel content5 = new FlowPanel();
        content5.add(button);

        button = new Button("Highlight 3");
        button.addClickHandler(new ClickHandler() {
            public void onClick(ClickEvent event) {
                tabs.setTabHightlighted("Tab 3", true);
            }
        });
        content5.add(button);

        button = new Button("Rename 6", new ClickHandler() {
            public void onClick(ClickEvent event) {
                tabs.renameTab("tab6", "Tab 6 *");
            }
        });
        content5.add(button);
View Full Code Here

Examples of org.joshy.gfx.node.control.Button

        });
        listview.setOrientation(ListView.Orientation.Horizontal);
        scroll.setContent(listview);

        VFlexBox toolbar = new VFlexBox();
        Button bt = new Button("+");

        final DocumentActions.AddNewPage act = new DocumentActions.AddNewPage(context,context.getMain());
        bt.onClicked(new Callback<ActionEvent>() {
            public void call(ActionEvent actionEvent) throws Exception {
                try {
                    act.execute();
                } catch (Exception e) {
                    e.printStackTrace();
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.