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

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


        this.conf = conf;
        this.editEvent = editEvent;

        final SimplePanel buildResults = new SimplePanel();

        RadioButton wholePackageRadioButton = new RadioButton( "action",
                                                               constants.BuildWholePackage() );
        RadioButton builtInSelectorRadioButton = new RadioButton( "action",
                                                                  constants.BuildPackageUsingBuiltInSelector() );
        RadioButton customSelectorRadioButton = new RadioButton( "action",
                                                                 constants.BuildPackageUsingCustomSelector() );
        wholePackageRadioButton.addClickListener( new ClickListener() {
            public void onClick(Widget w) {
                buildWholePackageLayout.setVisible( true );
                builtInSelectorLayout.setVisible( false );
                customSelectorLayout.setVisible( false );
                buildMode = "buildWholePackage";
            }
        } );
        builtInSelectorRadioButton.addClickListener( new ClickListener() {
            public void onClick(Widget w) {
                buildWholePackageLayout.setVisible( false );
                builtInSelectorLayout.setVisible( true );
                customSelectorLayout.setVisible( false );
                buildMode = "builtInSelector";
            }
        } );
        customSelectorRadioButton.addClickListener( new ClickListener() {
            public void onClick(Widget arg0) {
                buildWholePackageLayout.setVisible( false );
                builtInSelectorLayout.setVisible( false );
                customSelectorLayout.setVisible( true );
                buildMode = "customSelector";
View Full Code Here


        RepositoryServiceFactory.getService().listSnapshots( packageName,
                                                             new GenericCallback<SnapshotInfo[]>() {
                                                                 public void onSuccess(SnapshotInfo[] result) {
                                                                     for ( int i = 0; i < result.length; i++ ) {
                                                                         RadioButton existing = new RadioButton( "snapshotNameGroup",
                                                                                                                 result[i].name ); //NON-NLS
                                                                         radioList.add( existing );
                                                                         vert.add( existing );
                                                                     }
                                                                     HorizontalPanel newSnap = new HorizontalPanel();

                                                                     final RadioButton newSnapRadio = new RadioButton( "snapshotNameGroup",
                                                                                                                       newSnapshotText ); //NON-NLS
                                                                     newSnap.add( newSnapRadio );
                                                                     newName.setEnabled( false );
                                                                     newSnapRadio.addClickListener( new ClickListener() {

                                                                         public void onClick(Widget w) {
                                                                             newName.setEnabled( true );
                                                                         }

                                                                     } );

                                                                     newSnap.add( newName );
                                                                     radioList.add( newSnapRadio );
                                                                     vert.add( newSnap );

                                                                     LoadingPopup.close();
                                                                 }
                                                             } );

        final TextBox comment = new TextBox();
        form.addAttribute( constants.Comment(),
                           comment );

        Button create = new Button( constants.CreateNewSnapshot() );
        form.addAttribute( "",
                           create );

        create.addClickListener( new ClickListener() {
            String name = "";

            public void onClick(Widget w) {
                boolean replace = false;
                for ( Iterator iter = radioList.iterator(); iter.hasNext(); ) {
                    RadioButton but = (RadioButton) iter.next();
                    if ( but.isChecked() ) {
                        name = but.getText();
                        if ( !but.getText().equals( newSnapshotText ) ) {
                            replace = true;
                        }
                        break;
                    }
                }
View Full Code Here

        newPackageLayout.addAttribute( constants.DescriptionColon(),
                                       descBox );

        nameBox.setTitle( constants.PackageNameTip() );

        RadioButton newPackage = new RadioButton( "action",
                                                  constants.CreateNewPackageRadio() ); //NON-NLS
        RadioButton importPackage = new RadioButton( "action",
                                                     constants.ImportFromDrlRadio() ); //NON-NLS

        newPackage.setValue(true);
        newPackageLayout.setVisible( true );

        newPackage.addClickHandler(new ClickHandler() {
      public void onClick(ClickEvent arg0) {
                newPackageLayout.setVisible( true );
                importLayout.setVisible( false );       
      }         
        });

        this.setAfterShow( new Command() {
            public void execute() {
                nameBox.setFocus( true );
            }
        } );

        importLayout.setVisible( false );
        importPackage.addClickHandler(new ClickHandler() {
      public void onClick(ClickEvent arg0) {
                newPackageLayout.setVisible( false );
                importLayout.setVisible( true );       
      }         
        });
View Full Code Here

        this.showCats = showCats;
        this.format = format;

        this.afterCreate = afterCreate;
       
    RadioButton newPackage = new RadioButton("layoutgroup", constants.CreateNewAsset()); // NON-NLS
    RadioButton importPackage = new RadioButton("layoutgroup", constants.CreateLinkedAsset()); // NON-NLS
    newPackage.setChecked(true);
    newAssetLayout.setVisible(true);

    newPackage.addClickListener(new ClickListener() {
      public void onClick(Widget w) {
        newAssetLayout.setVisible(true);
        importAssetLayout.setVisible(false);
      }
    });
    importAssetLayout.setVisible(false);
    importPackage.addClickListener(new ClickListener() {
      public void onClick(Widget arg0) {
        newAssetLayout.setVisible(false);
        importAssetLayout.setVisible(true);
      }
    });
View Full Code Here

                                                                                            Format.format( constants.CopySnapshotText(),
                                                                                                           snapshotName ) );
                                            final List<RadioButton> options = new ArrayList<RadioButton>();
                                            VerticalPanel vert = new VerticalPanel();
                                            for ( int i = 0; i < snaps.length; i++ ) {
                                                RadioButton existing = new RadioButton( "snapshotNameGroup",
                                                                                        snaps[i].name ); //NON-NLS
                                                options.add( existing );
                                                vert.add( existing );
                                            }
                                           
                                HorizontalPanel newNameHorizontalPanel = new HorizontalPanel();
                                            final TextBox newNameTextBox = new TextBox();
                                        final String newNameText = constants.NEW() + ": ";

                                final RadioButton newNameRadioButton = new RadioButton( "snapshotNameGroup",
                                    newNameText);
                                newNameHorizontalPanel.add(newNameRadioButton);
                                newNameTextBox.setEnabled(false);
                                newNameRadioButton.addClickListener(new ClickListener() {
                                  public void onClick(Widget w) {
                                    newNameTextBox.setEnabled(true);
                                  }
                                });

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

                                            copy.addAttribute(constants.ExistingSnapshots(),
                                                               vert );

                                            Button ok = new Button( constants.OK() );
                                            copy.addAttribute( "", ok );
                                            ok.addClickListener( new ClickListener() {
                                                public void onClick(Widget w) {
                                                 
                                              boolean oneButtonIsSelected = false;
                                              for ( RadioButton rb : options ) {
                                                        if ( rb.isChecked() ) {
                                                          oneButtonIsSelected = true;
                                                          break;
                                                        }
                                              }
                                            if (!oneButtonIsSelected) {
                                              Window.alert(constants.YouHaveToEnterOrChoseALabelNameForTheSnapshot());
                                              return;
                                            }
                                           
                                           
                                                    if ( newNameRadioButton.isChecked() ) {
                                                        if ( checkUnique( snaps,
                                                                          newNameTextBox.getText() ) ) {
                                                            serv.copyOrRemoveSnapshot( packageName,
                                                                                       snapshotName,
                                                                                       false,
View Full Code Here

                                       descBox );
        newPackageLayout.addAttribute(constants.ParentPackage(), parentPackage);

        nameBox.setTitle( constants.PackageNameTip() );

        RadioButton newPackage = new RadioButton( "action",
                                                  constants.CreateNewPackageRadio() ); //NON-NLS
        RadioButton importPackage = new RadioButton( "action",
                                                     constants.ImportFromDrlRadio() ); //NON-NLS
        newPackage.setChecked( true );
        newPackageLayout.setVisible( true );

        newPackage.addClickListener( new ClickListener() {
            public void onClick(Widget w) {
                newPackageLayout.setVisible( true );
                importLayout.setVisible( false );
            }
        } );

        this.setAfterShow( new Command() {
            public void execute() {
                nameBox.setFocus( true );
            }
        } );

        importLayout.setVisible( false );

        importPackage.addClickListener( new ClickListener() {
            public void onClick(Widget arg0) {
                newPackageLayout.setVisible( false );
                importLayout.setVisible( true );
            }
        } );
View Full Code Here

    //Window.alert(String.valueOf(data.length()));
    formContainer.add(new HTML("Versions:"));
    for (int i=0; i<data.length(); i++){
      final int j = i;
      //Window.alert(String.valueOf(i));
      RadioButton button = new RadioButton("versions");
      button.setFormValue(String.valueOf(i));
      if (i == 0) {
        button.setValue(true);
      }
      button.setText(data.get(i).getVersion());
      formContainer.add(button);
      button.addClickHandler(new ClickHandler() {
            public void onClick(ClickEvent event) {
              selectedVersion = j;
            }
      });
    }
View Full Code Here

                         clientFactory ) );
        this.format = format;
        this.clientFactory = clientFactory;
        this.eventBus = eventBus;

        RadioButton newPackage = new RadioButton( "layoutgroup",
                                                  Constants.INSTANCE.CreateNewAsset() ); // NON-NLS
        newPackage.setValue( true );
        RadioButton importPackage = new RadioButton( "layoutgroup",
                                                     Constants.INSTANCE.CreateLinkedAsset() ); // NON-NLS

        newAssetLayout.setVisible( true );

        createClickHandlerForNewPackageButton( newPackage );
View Full Code Here

        }

    }

    private TreeItem createTreeItem(final String label, final String moduleName, final String link) {
        TreeItem treeItem = new TreeItem(new RadioButton("pkgResourceGroup", label));
        treeItem.setUserObject(new TreeItemData(moduleName, label, link));

        return treeItem;
    }
View Full Code Here

        newPackageLayout.addAttribute( Constants.INSTANCE.ParentPackage(),
                                       parentPackage );

        nameBox.setTitle( Constants.INSTANCE.PackageNameTip() );

        RadioButton newPackage = new RadioButton( "action",
                                                  Constants.INSTANCE.CreateNewPackageRadio() ); //NON-NLS
        RadioButton importPackage = new RadioButton( "action",
                                                     Constants.INSTANCE.ImportFromDrlRadio() ); //NON-NLS
        newPackage.setValue( true );
        newPackageLayout.setVisible( true );

        newPackage.addClickHandler( new ClickHandler() {
            public void onClick(ClickEvent event) {
                newPackageLayout.setVisible( true );
                importLayout.setVisible( false );
            }
        } );

        this.setAfterShow( new Command() {
            public void execute() {
                nameBox.setFocus( true );
            }
        } );

        importLayout.setVisible( false );

        importPackage.addClickHandler( new ClickHandler() {
            public void onClick(ClickEvent event) {
                newPackageLayout.setVisible( false );
                importLayout.setVisible( true );
            }
        } );
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.