Examples of RadioButton


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

     * Builds the Insert LaTeX Header form.
     */
  @Override
  protected void buildForm() {
    content.setWidth("500px");
    alignTop = new RadioButton("alignment", "Align at top line");
    alignCenter = new RadioButton("alignment", "Align at center of table");
    alignCenter.setValue(true);
    alignBottom = new RadioButton("alignment", "Align at bottom line");
    HorizontalPanel alignment = new HorizontalPanel();
    alignment.add(alignTop);
    alignment.add(alignCenter);
    alignment.add(alignBottom);
    centerHorizontal = new CheckBox("Center horizontal");
      centerHorizontal.setValue(true);
    insertAsFloat = new CheckBox("Insert as float");
      insertAsFloat.setValue(true);
      insertAsFloat.addValueChangeHandler(new ValueChangeHandler<Boolean>() {
      @Override
      public void onValueChange(ValueChangeEvent<Boolean> event) {
        boolean value = event.getValue();
        for (int i=7; i<=10; i++) {
          content.getRowFormatter().setVisible(i, value);
        }
        center();
      }
      });
    caption = new TextBox();
    caption.setWidth("250px");
    label = new TextBox();
    label.setWidth("250px");
    herePosition = new CheckBox("Here");
    topPosition = new CheckBox("Top of the page");
      topPosition.setValue(true);
    bottomPosition = new CheckBox("Bottom of the page");
      bottomPosition.setValue(true);
    floatPosition = new CheckBox("Page of floats");
      floatPosition.setValue(true);
      FlexTable position = new FlexTable();
      position.setWidth("100%");
      position.insertRow(0);
      position.insertCell(0, 0);
      position.insertCell(0, 1);
      position.insertRow(1);
      position.insertCell(1, 0);
      position.insertCell(1, 1);
      position.setWidget(0, 0, herePosition);
      position.setWidget(0, 1, topPosition);
      position.setWidget(1, 0, bottomPosition);
      position.setWidget(1, 1, floatPosition);
    oneColumn = new RadioButton("expansion", "One column");
      oneColumn.setValue(true);
    twoColumns = new RadioButton("expansion", "Two columns");
    HorizontalPanel expansion = new HorizontalPanel();
    expansion.add(oneColumn);
    expansion.add(twoColumns);
    addHeader("Caption");
      addField(caption, "Caption:");
View Full Code Here

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

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

      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

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

      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

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

            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

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

    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

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

        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

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

        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

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

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

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

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