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

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


    public void onValueChange(ValueChangeEvent<Boolean> event) {
        setView(!useCustom.getValue());
    }
    };
    VerticalPanel usage = new VerticalPanel();
    useDefault = new RadioButton("usage", "Use the default LaTeX Lab compiler.");
    useDefault.setValue(true);
    useDefault.addValueChangeHandler(changeHandler);
    useCustom = new RadioButton("usage");
    useCustom.setHTML("Use a third party <a href=\"http://code.google.com/p/common-latex-service-interface/\" target=\"_blank\">CLSI</a> provider.");
    useCustom.addValueChangeHandler(changeHandler);
    useMikTex = new RadioButton("usage");
    useMikTex.setEnabled(false);
    String devUrl = Window.Location.getHref().replace("/docs.", "/dev.");
    useMikTex.setHTML("Use a local <a href=\"http://miktex.org/\" target=\"_blank\">MikTeX</a> installation. <a href=\"" + devUrl + "\">Available in development version</a>");
    useMikTex.addValueChangeHandler(changeHandler);
    useTexLive = new RadioButton("usage");
    useTexLive.setEnabled(false);
    useTexLive.setHTML("Use a local <a href=\"http://www.tug.org/texlive/\" target=\"_blank\">TeX Live</a> installation.");
    useTexLive.addValueChangeHandler(changeHandler);
    usage.add(useDefault);
    usage.add(useMikTex);
View Full Code Here


      this.value = value;
    this.panel = new HorizontalPanel();
    this.panel.setSpacing(4);
    if (checkable) {
    if (uniqueSelection) {
      this.checkBox = new RadioButton("et", label);
    } else {
      this.checkBox = new CheckBox(label);
    }
    this.panel.add(this.checkBox);
    } else {
View Full Code Here

      grid.setWidget(1, 0, new Label("Orientation:"));
      HorizontalPanel orientationPanel = new HorizontalPanel();
      orientationPanel.setSpacing(kComponentSpacing);
      VerticalPanel orientationGroupPanel = new VerticalPanel();
      final String kOrientationGroup = new String("Orientation");
      portraitRadioButton_ = new RadioButton(kOrientationGroup, "Portrait");
      orientationGroupPanel.add(portraitRadioButton_);
      landscapeRadioButton_ = new RadioButton(kOrientationGroup, "Landscape");
      orientationGroupPanel.add(landscapeRadioButton_);
      orientationPanel.add(orientationGroupPanel);
      grid.setWidget(1, 1, orientationPanel);
     
      boolean haveCairoPdf = sessionInfo_.isCairoPdfAvailable();
View Full Code Here

            CheckBox op;
            if (isMultiselect()) {
                op = new VCheckBox();
                op.setText(opUidl.getStringAttribute("caption"));
            } else {
                op = new RadioButton(id, opUidl.getStringAttribute("caption"));
                op.setStyleName("v-radiobutton");
            }
            op.addStyleName(CLASSNAME_OPTION);
            op.setValue(opUidl.getBooleanAttribute("selected"));
            boolean enabled = !opUidl.getBooleanAttribute("disabled")
View Full Code Here

    String lowerAns = question.getLowerAnswer();
    GWT.log("[QuestionTable] order is " + (order?"asc":"desc"));
    final Label statLabel = new Label(statement);
    this.setWidget(0, 0, statLabel);

    radios[0] = new RadioButton(statement, order?upperAns:lowerAns);
    radios[0].addValueChangeHandler(new ValueChangeHandler<Boolean>(){
      @Override
      public void onValueChange(ValueChangeEvent<Boolean> event){
        if(event.getValue().booleanValue()){
          score = order?2:-2;
        }
      }
    });
    radios[0].setValue(false);
    this.setWidget(1, 0, radios[0]);
   
    radios[1] = new RadioButton(statement, ANS_UPPER);
    radios[1].addValueChangeHandler(new ValueChangeHandler<Boolean>(){
      @Override
      public void onValueChange(ValueChangeEvent<Boolean> event){
        if(event.getValue().booleanValue()){
          score = order?1:-1;
        }
      }
    });
    radios[1].setValue(false);
    this.setWidget(2, 0, radios[1]);
   
    radios[2] = new RadioButton(statement, ANS_MIDDLE);
    radios[2].addValueChangeHandler(new ValueChangeHandler<Boolean>(){
      @Override
      public void onValueChange(ValueChangeEvent<Boolean> event){
        if(event.getValue().booleanValue()){
          score = 0;
        }
      }
    });
    radios[2].setValue(true);
    this.setWidget(3, 0, radios[2]);
   
    radios[3] = new RadioButton(statement, ANS_LOWER);
    radios[3].addValueChangeHandler(new ValueChangeHandler<Boolean>(){
      @Override
      public void onValueChange(ValueChangeEvent<Boolean> event){
        if(event.getValue().booleanValue()){
          score = order?-1:1;
        }
      }
    });
    radios[3].setValue(false);
    this.setWidget(4, 0, radios[3]);
   
    radios[4] = new RadioButton(statement, order?lowerAns:upperAns);
    radios[4].addValueChangeHandler(new ValueChangeHandler<Boolean>(){
      @Override
      public void onValueChange(ValueChangeEvent<Boolean> event){
        if(event.getValue().booleanValue()){
          score = order?-2:2;
View Full Code Here

        flexTextPanel.setWidget(flexTextPanel.getRowCount(), 0, input);
        flexTextPanel.setWidget(flexTextPanel.getRowCount(), 0, input2);
       
        MethodSelector methodSelector = new MethodSelector();
       
        method1 = new RadioButton("method1", "Runge-Kutta");
        method1.setValue(true);
        method1.addClickHandler(methodSelector);
       
        method2 = new RadioButton("method2", "method 2");
        method2.addClickHandler(methodSelector);
       
        method3 = new RadioButton("method3", "method 3");
        method3.addClickHandler(methodSelector);
       
        method4 = new RadioButton("method4", "method 4");
        method4.addClickHandler(methodSelector);
       
        HorizontalPanel hp2 = new HorizontalPanel();
        hp2.setSpacing(10);
        hp2.add(method1);
View Full Code Here

        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.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

        // UI above the results table
        layout = new FormStyleLayout();
        final VerticalPanel container = new VerticalPanel();
        final VerticalPanel buildResults = new VerticalPanel();

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

        RepositoryServiceFactory.getPackageService().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].getName() ); // 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.addClickHandler( new ClickHandler() {
                                                                         public void onClick(ClickEvent event) {
                                                                             newName.setEnabled( true );
                                                                         }

                                                                     } );
View Full Code Here

          namingDepthTextBox.setStyleName("restDescribe-error");
        }
      }    
    });
   
    final RadioButton useParameterAsNameRadio = new RadioButton("paramOrEndpoint", GuiFactory.strings.useParam());
    useParameterAsNameRadio.setChecked(!useEndpointAsName);
    useParameterAsNameRadio.addClickListener(new ClickListener() {
      public void onClick(Widget sender) {       
        useEndpointAsName = !useParameterAsNameRadio.isChecked();       
      }     
    });
   
    final RadioButton useEndpointAsNameRadio = new RadioButton("paramOrEndpoint", GuiFactory.strings.useEndpoint());
    useEndpointAsNameRadio.setChecked(useEndpointAsName);
    useEndpointAsNameRadio.addClickListener(new ClickListener() {
      public void onClick(Widget sender) {       
        useEndpointAsName = useEndpointAsNameRadio.isChecked();
      }     
    });
   
    final TextBox indentWidthTextBox = new TextBox();
    indentWidthTextBox.setWidth(panelHeight);
    indentWidthTextBox.setText(indentWidth + "");
    indentWidthTextBox.addChangeListener(new ChangeListener() {
      public void onChange(Widget sender) {
        try {
          indentWidth = Integer.parseInt(indentWidthTextBox.getText());
          indentWidthTextBox.removeStyleName("restDescribe-error");
          if (SettingsDialog.indentWidth == 0) {
            indentWidthTextBox.setStyleName("restDescribe-error");
          }
        } catch (NumberFormatException e) {   
          indentWidthTextBox.setStyleName("restDescribe-error");
        }       
      }     
    });
   
    final HorizontalPanel indentMiniPanel = new HorizontalPanel();
    final RadioButton indentWithSpacesRadio = new RadioButton("indent", GuiFactory.strings.indentSpaces());
    indentWithSpacesRadio.setChecked(indentWithSpaces);
    indentWithSpacesRadio.addClickListener(new ClickListener() {
      public void onClick(Widget sender) {       
        indentWithSpaces = indentWithSpacesRadio.isChecked();
        indentMiniPanel.setVisible(true);
      }     
    });
   
    final RadioButton indentWithTabsRadio = new RadioButton("indent", GuiFactory.strings.indentTabs());
    indentWithTabsRadio.setChecked(!indentWithSpaces);
    indentWithTabsRadio.addClickListener(new ClickListener() {
      public void onClick(Widget sender) {       
        indentWithSpaces = !indentWithTabsRadio.isChecked();
        indentMiniPanel.setVisible(false);
      }     
    });
   
    final TextBox classSuffixTextBox = new TextBox();
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.