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

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


      titleBar.add(titleBarLabel);
      titleBar.setCellVerticalAlignment(titleBarLabel, HasVerticalAlignment.ALIGN_MIDDLE);

      HorizontalPanel buttonPanel = new HorizontalPanel();

      CheckBox showFurtherErrors = new CheckBox();
      showFurtherErrors.setValue(showErrors);
      showFurtherErrors.setText("Show further errors");
      showFurtherErrors.getElement().getStyle().setFontSize(10, Style.Unit.PT);
      showFurtherErrors.getElement().getStyle().setColor("white");

      showFurtherErrors.addValueChangeHandler(new ValueChangeHandler<Boolean>() {
        @Override
        public void onValueChange(ValueChangeEvent<Boolean> booleanValueChangeEvent) {
          showErrors = booleanValueChangeEvent.getValue();
        }
      });
View Full Code Here


    addCheckBox(optionsPanel, caption, initValue, handler);
  }

  private void addCheckBox(Panel panel, String caption, boolean initValue,
      ValueChangeHandler<Boolean> handler) {
    CheckBox box = new CheckBox(caption);
    box.setValue(initValue);
    box.addValueChangeHandler(handler);
    panel.add(box);
  }
View Full Code Here

  private CheckBox toggleEditCheck1;

  private CheckBox toggleEditCheck2;

  private CheckBox createEditToggleCheckBox(final Editor editor) {
    CheckBox check = new CheckBox("Toggle edit");
    check.addValueChangeHandler(new ValueChangeHandler<Boolean>() {
      @Override
      public void onValueChange(ValueChangeEvent<Boolean> event) {
        setEditing(editor, event.getValue());
      }
    });
View Full Code Here

    }

    private Widget doUpdate() {
        HorizontalPanel hp = new HorizontalPanel();

        final CheckBox cb = new CheckBox();
        cb.setValue( editingCol.isUpdate() );
        cb.setText( "" );
        cb.addClickHandler( new ClickHandler() {
            public void onClick(ClickEvent arg0) {
                if ( sce.isGlobalVariable( editingCol.getBoundName() ) ) {
                    cb.setEnabled( false );
                    editingCol.setUpdate( false );
                } else {
                    editingCol.setUpdate( cb.getValue() );
                }
            }
        } );
        hp.add( cb );
        hp.add( new InfoPopup( constants.UpdateFact(),
View Full Code Here

        builtInSelectorLayout.addRow( new HTML( "&nbsp;&nbsp;<i>"
                                                + constants.BuildPackageUsingFollowingAssets()
                                                + "</i>" ) );

        HorizontalPanel builtInSelectorStatusPanel = new HorizontalPanel();
        final CheckBox enableStatusCheckBox = new CheckBox();
        enableStatusCheckBox.setValue( false );
        builtInSelectorStatusPanel.add( enableStatusCheckBox );
        builtInSelectorStatusPanel.add( new HTML( "&nbsp;&nbsp;<i>"
                                                  + constants.BuildPackageUsingBuiltInSelectorStatus()
                                                  + " </i>" ) );
        final ListBox statusOperator = new ListBox();
        String[] vals = new String[]{"=", "!="};
        for ( int i = 0; i < vals.length; i++ ) {
            statusOperator.addItem( vals[i],
                                    vals[i] );
        }
        builtInSelectorStatusPanel.add( statusOperator );

        final TextBox statusValue = new TextBox();
        statusValue.setTitle( constants.WildCardsSearchTip() );
        builtInSelectorStatusPanel.add( statusValue );

        builtInSelectorLayout.addRow( builtInSelectorStatusPanel );

        HorizontalPanel builtInSelectorCatPanel = new HorizontalPanel();
        final CheckBox enableCategoryCheckBox = new CheckBox();
        enableCategoryCheckBox.setValue( false );
        builtInSelectorCatPanel.add( enableCategoryCheckBox );
        builtInSelectorCatPanel.add( new HTML( "&nbsp;&nbsp;<i>"
                                               + constants.BuildPackageUsingBuiltInSelectorCat()
                                               + " </i>" ) );
        final ListBox catOperator = new ListBox();
        String[] catVals = new String[]{"=", "!="};
        for ( int i = 0; i < catVals.length; i++ ) {
            catOperator.addItem( catVals[i],
                                 catVals[i] );
        }
        builtInSelectorCatPanel.add( catOperator );
        final CategoryExplorerWidget catChooser = new CategoryExplorerWidget( new CategorySelectHandler() {
            public void selected(String selectedPath) {
            }
        } );
        ScrollPanel catScroll = new ScrollPanel( catChooser );
        catScroll.setAlwaysShowScrollBars( true );
        catScroll.setSize( "300px",
                           "130px" );

        builtInSelectorCatPanel.add( catScroll );
        builtInSelectorLayout.addRow( builtInSelectorCatPanel );

        layout.addRow( builtInSelectorLayout );

        // Custom selector layout
        customSelectorLayout.setVisible( false );
        HorizontalPanel customSelectorPanel = new HorizontalPanel();
        customSelectorPanel.add( new HTML( "&nbsp;&nbsp;<i>"
                                           + constants.BuildPackageUsingCustomSelectorSelector()
                                           + " </i>" ) ); // NON-NLS

        final ListBox customSelector = new ListBox();
        customSelector.setTitle( constants.WildCardsSearchTip() );
        customSelectorPanel.add( customSelector );
        loadCustomSelectorList( customSelector );

        customSelectorLayout.addRow( customSelectorPanel );
        layout.addRow( customSelectorLayout );

        final Button b = new Button( constants.BuildPackage() );
        b.setTitle( constants.ThisWillValidateAndCompileAllTheAssetsInAPackage() );
        b.addClickHandler( new ClickHandler() {
            public void onClick(ClickEvent event) {
                doBuild( buildResults,
                         statusOperator.getValue( statusOperator.getSelectedIndex() ),
                         statusValue.getText(),
                         enableStatusCheckBox.getValue(),
                         catOperator.getValue( catOperator.getSelectedIndex() ),
                         catChooser.getSelectedPath(),
                         enableCategoryCheckBox.getValue(),
                         customSelector.getSelectedIndex() != -1 ? customSelector.getValue( customSelector.getSelectedIndex() ) : null );
            }
        } );
        HorizontalPanel buildStuff = new HorizontalPanel();
        buildStuff.add( b );
View Full Code Here

    }

    private Widget doInsertLogical() {
        HorizontalPanel hp = new HorizontalPanel();

        final CheckBox cb = new CheckBox();
        cb.setValue( editingCol.isInsertLogical() );
        cb.setText( "" );
        cb.addClickHandler( new ClickHandler() {
            public void onClick(ClickEvent arg0) {
                if ( sce.isGlobalVariable( editingCol.getBoundName() ) ) {
                    cb.setEnabled( false );
                    editingCol.setInsertLogical( false );
                } else {
                    editingCol.setInsertLogical( cb.getValue() );
                }
            }
        } );
        hp.add( cb );
        hp.add( new InfoPopup( constants.UpdateFact(),
View Full Code Here

        return horiz;
    }

    private Widget checkBoxEditor(final RuleAttribute at) {
        final CheckBox box = new CheckBox();
        if ( at.value == null ) {
            box.setValue( true );
            at.value = TRUE_VALUE;
        } else {
            box.setValue( (at.value.equals( TRUE_VALUE )) );
        }

        box.addClickHandler( new ClickHandler() {
            public void onClick(ClickEvent event) {
                at.value = (box.getValue()) ? TRUE_VALUE : FALSE_VALUE;
            }
        } );
        return box;
    }
View Full Code Here

            public void onClick(ClickEvent event) {
                hide();
            }
        } );

        CheckBox chkOnlyDisplayDSLConditions = new CheckBox();
        chkOnlyDisplayDSLConditions.setText( constants.OnlyDisplayDSLActions() );
        chkOnlyDisplayDSLConditions.setValue( bOnlyShowDSLConditions );
        chkOnlyDisplayDSLConditions.addValueChangeHandler( new ValueChangeHandler<Boolean>() {

            public void onValueChange(ValueChangeEvent<Boolean> event) {
                bOnlyShowDSLConditions = event.getValue();
                choicesPanel.setWidget( makeChoicesListBox() );
            }
View Full Code Here

        layoutA.setHTML( 2,
                         0,
                         constants.UseJndi() );

        final CheckBox useJndi = new CheckBox();
        useJndi.setChecked( rdbmsConf.isJndi() );
        useJndi.addClickHandler( new ClickHandler() {
            public void onClick(ClickEvent w) {
                // do not change this to isEnabled..it will always return true.
                boolean checked = ((CheckBox) w.getSource()).getValue();
                rdbmsConf.setJndi( checked );
                if ( checked ) {
                    noJndiInfo.setVisible( false );
                    jndiInfo.setVisible( true );
                } else {
                    noJndiInfo.setVisible( true );
                    jndiInfo.setVisible( false );
                }
                repoDisplayArea.setVisible( false );
                saveRepoConfigForm.setVisible( false );
            }
        } );
        layoutA.setWidget( 2,
                           1,
                           useJndi );

        Button continueButton = new Button( "Continue" );
        continueButton.addClickHandler( new ClickHandler() {
            public void onClick(ClickEvent w) {
                if ( databaseList.getSelectedIndex() == 0 ) {
                    Window.alert( constants.PleaseSelectRdbmsType() );
                    return;
                }
                if ( !useJndi.getValue() ) {
                    jndiInfo.setVisible( false );
                }
                vPanel2.setVisible( true );
            }
        } );
View Full Code Here

        PrettyFormLayout form = new PrettyFormLayout();
        form.addHeader( images.ruleVerification(),
                        new HTML( constants.EditRulesVerificationConfiguration() ) );
        form.startSection( constants.AutomaticVerification() );

        final CheckBox enableOnlineValidator = new CheckBox();
        enableOnlineValidator.setValue( WorkingSetManager.getInstance().isAutoVerifierEnabled() );
        form.addAttribute( constants.Enabled(),
                           enableOnlineValidator );

        HorizontalPanel actions = new HorizontalPanel();

        form.addAttribute( "",
                           actions );

        Button btnSave = new Button( constants.SaveChanges() );
        btnSave.setTitle( constants.SaveAllChanges() );
        btnSave.addClickHandler( new ClickHandler() {
            public void onClick(ClickEvent event) {
                WorkingSetManager.getInstance().setAutoVerifierEnabled( enableOnlineValidator.getValue() );
                Window.alert( constants.AllChangesHaveBeenSaved() );
            }
        } );

        actions.add( btnSave );
View Full Code Here

TOP

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

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.