Package com.google.gwt.user.client.ui

Examples of com.google.gwt.user.client.ui.RadioButton


                final List<RadioButton> options = new ArrayList<RadioButton>();
                VerticalPanel vert = new VerticalPanel();
                for ( int i = 0; i < snaps.length; i++ ) {
                    // cant copy onto to itself...
                    if ( !snaps[i].getName().equals( snapshotName ) ) {
                        RadioButton existing = new RadioButton( "snapshotNameGroup",
                                                                snaps[i].getName() ); // NON-NLS
                        options.add( existing );
                        vert.add( existing );
                    }
                }

                HorizontalPanel newNameHorizontalPanel = new HorizontalPanel();
                final TextBox newNameTextBox = new TextBox();
                final String newNameText = Constants.INSTANCE.NEW()
                                           + ": ";

                final RadioButton newNameRadioButton = new RadioButton( "snapshotNameGroup",
                                                                        newNameText );
                newNameHorizontalPanel.add( newNameRadioButton );
                newNameTextBox.setEnabled( false );
                newNameRadioButton.addClickHandler( new ClickHandler() {
                    public void onClick(ClickEvent event) {
                        newNameTextBox.setEnabled( true );
                    }
                } );

                newNameHorizontalPanel.add( newNameTextBox );
                options.add( newNameRadioButton );
                vert.add( newNameHorizontalPanel );

                copy.addAttribute( Constants.INSTANCE.ExistingSnapshots(),
                                   vert );

                Button ok = new Button( Constants.INSTANCE.OK() );
                copy.addAttribute( "",
                                   ok );
                ok.addClickHandler( new ClickHandler() {
                    public void onClick(ClickEvent event) {
                        if ( !isOneButtonSelected( options ) ) {
                            Window.alert( Constants.INSTANCE.YouHaveToEnterOrChoseALabelNameForTheSnapshot() );
                            return;
                        }

                        if ( newNameRadioButton.getValue() ) {
                            if ( checkUnique( snaps,
                                              newNameTextBox.getText() ) ) {
                                serv.copyOrRemoveSnapshot( packageName,
                                                           snapshotName,
                                                           false,
View Full Code Here


        // insert row for Capture Output
        grid.setWidget(9, 0, createLabel("Capture Output"));
        HorizontalPanel btnpanel = new HorizontalPanel();
        btnpanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_BOTTOM);
        rbn = new RadioButton("outputGroup", "false");
        rby = new RadioButton("outputGroup", "true");
        rbn.setChecked(true);
        btnpanel.add(rby);
        btnpanel.add(rbn);
        grid.setWidget(9, 1, btnpanel);
View Full Code Here

        // insert row for Capture Output
        grid.setWidget(6, 0, createLabel("Capture Output"));
        HorizontalPanel btnpanel = new HorizontalPanel();
        btnpanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_BOTTOM);
        rbn = new RadioButton("outputGroup", "false");
        rby = new RadioButton("outputGroup", "true");
        rbn.setChecked(true);
        btnpanel.add(rby);
        btnpanel.add(rbn);
        grid.setWidget(6, 1, btnpanel);
View Full Code Here

        // insert row for Capture output
        grid.setWidget(9, 0, createLabel("Capture Output"));
        HorizontalPanel btnpanel = new HorizontalPanel();
        btnpanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_BOTTOM);
        rbn = new RadioButton("outputGroup", "false");
        rby = new RadioButton("outputGroup", "true");
        rbn.setChecked(true);
        btnpanel.add(rby);
        btnpanel.add(rbn);
        grid.setWidget(9, 1, btnpanel);
View Full Code Here

        // insert row for Propagate config
        grid.setWidget(4, 0, createLabel("Propagate Config"));
        HorizontalPanel radiopanel = new HorizontalPanel();
        radiopanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_BOTTOM);
        rbn = new RadioButton("propagateGroup", "false");
        rby = new RadioButton("propagateGroup", "true");
        rbn.setChecked(true);
        radiopanel.add(rby);
        radiopanel.add(rbn);
        grid.setWidget(4, 1, radiopanel);
View Full Code Here

   * key of the graph.
   */
  private RadioButton addKeyRadioButton(final Grid grid,
                                        final int row, final int col,
                                        final String pos) {
    final RadioButton rb = new RadioButton("keypos");
    rb.addClickHandler(new ClickHandler() {
      public void onClick(final ClickEvent event) {
        keypos = pos;
      }
    });
    rb.addClickHandler(refreshgraph);
    grid.setWidget(row, col, rb);
    keypos_map.put(pos, rb);
    return rb;
  }
View Full Code Here

            Label viewType = new Label(view.getType());
            Label viewTitle = new Label(view.getName());
            Label viewDate = new Label(view.getDate().toLocaleString());

            final RadioButton rButton = new RadioButton(groupId);
            buttonsToViews.put(rButton, view);
            rButton.addValueChangeHandler(new ValueChangeHandler<Boolean>() {

                @Override
                public void onValueChange(ValueChangeEvent<Boolean> event) {
                    showDialog(view.getId());
                    setSelectedButton(rButton);
View Full Code Here

        // TODO autogenerate group id
        String groupId = "group";

        VerticalPanel content = new VerticalPanel();
        for (WorkspacePreview workspace : workspacePreviews) {
            RadioButton radioButton = new RadioButton(groupId,
                    workspace.getName());
            radioButton.setValue(Boolean.FALSE);
            buttonsToWorkspaces.put(radioButton, workspace);

            // highlight + select current workspace
            if (workspace.isCurrentWorkspace()) {
                radioButton.setText(workspace.getName() + " (current)");
                radioButton.setValue(Boolean.TRUE);

                setSelectedButton(radioButton);
            }

            radioButton
                    .addValueChangeHandler(new ValueChangeHandler<Boolean>() {
                        @Override
                        public void onValueChange(
                                ValueChangeEvent<Boolean> event) {
                            if (event.getValue() == Boolean.TRUE) {
View Full Code Here

        chartControl.add(createDoNotGroupBarChartButton());
        chartControl.add(createGroupBarChartByText2Button());
    }

    private RadioButton createDoNotGroupBarChartButton() {
        RadioButton button = new RadioButton("chartSettings",
                "do not group, show NUMBER_2");
        button.addValueChangeHandler(new ValueChangeHandler<Boolean>() {
            @Override
            public void onValueChange(ValueChangeEvent<Boolean> event) {
                if (event.getValue()) {
                    doNotGroupBarChart();
                }
            }
        });
        button.setValue(true);
        return button;
    }
View Full Code Here

        button.setValue(true);
        return button;
    }

    private RadioButton createGroupBarChartByText2Button() {
        RadioButton button = new RadioButton("chartSettings",
                "group by TEXT_2 and NUMBER_3 prefix");
        button.addValueChangeHandler(new ValueChangeHandler<Boolean>() {
            @Override
            public void onValueChange(ValueChangeEvent<Boolean> event) {
                if (event.getValue()) {
                    groupBarChartByText2AndNumber3Prefix();
                }
View Full Code Here

TOP

Related Classes of com.google.gwt.user.client.ui.RadioButton

Copyright © 2018 www.massapicom. 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.