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

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


      Grid grid = new Grid(errorStatuses.size(), 2);     
      horizontalErrorPanel.add(grid);
      while (errorIterator.hasNext()) {       
        final String error = (String) errorIterator.next();
        reallyAddFaults.add(error);
        final CheckBox checkBox = new CheckBox();
        checkBox.setChecked(true);
        checkBox.addClickListener(new ClickListener() {
          public void onClick(Widget sender) {
            if (checkBox.isChecked() &&
                !reallyAddFaults.contains(error)) {             
              reallyAddFaults.add(error);
            }          
            else {
              if (reallyAddFaults.contains(error)) {
                reallyAddFaults.remove(error);
              }
            }
          }         
        });
       
        grid.setWidget(i, 0, checkBox);       
        grid.setText(i, 1, error);      
        i++;
      }     
      addErrorsButton.setEnabled(false);
      addErrorsButton.addClickListener(new ClickListener() {
        public void onClick(Widget sender) {
          // TODO         
        }
       
      });
      containerPanel.add(addErrorsButton);
    }
   
    // schema locations
    final Button addSchemaButton = new Button(GuiFactory.strings.addSchema());
    if (!schemaLocations.isEmpty()) {
      final Vector reallyAddSchemaLocations = new Vector();
      containerPanel.add(new HTML("<br />" + GuiFactory.strings.schemaLocations()));
      ScrollPanel schemaLocationContainerPanel = new ScrollPanel();
      schemaLocationContainerPanel.setStyleName("restDescribe-wadlArea");
      schemaLocationContainerPanel.setHeight(panelHeight);
      VerticalPanel schemaLocationPanel = new VerticalPanel();
      schemaLocationContainerPanel.add(schemaLocationPanel);
      containerPanel.add(schemaLocationContainerPanel);
     
      Iterator schemaLocationIterator = schemaLocations.iterator();
      int i = 0;
      HorizontalPanel horizontalSchemaPanel = new HorizontalPanel();
      schemaLocationPanel.add(horizontalSchemaPanel);
      Grid grid = new Grid(schemaLocations.size(), 2);
      horizontalSchemaPanel.add(grid);
      while (schemaLocationIterator.hasNext()) {       
        final String schemaLocation = (String) schemaLocationIterator.next();
        reallyAddSchemaLocations.add(schemaLocation);
        final CheckBox checkBox = new CheckBox();
        checkBox.setChecked(true);
        checkBox.addClickListener(new ClickListener() {
          public void onClick(Widget sender) {
            if (checkBox.isChecked() &&
                !reallyAddSchemaLocations.contains(schemaLocation)) {             
              reallyAddSchemaLocations.add(schemaLocation);
            }          
            else {
              if (reallyAddSchemaLocations.contains(schemaLocation)) {
                reallyAddSchemaLocations.remove(schemaLocation);
              }
            }
          }         
        });
       
        grid.setWidget(i, 0, checkBox);       
        grid.setText(i, 1, schemaLocation);
        i++;
      }           
      addSchemaButton.addClickListener(new ClickListener() {
        public void onClick(Widget sender) {                   
          Iterator addSchemaIterator = reallyAddSchemaLocations.iterator();
          while (addSchemaIterator.hasNext()) {
            String include = (String) addSchemaIterator.next();
            if (Analyzer.application.getGrammars() == null) {
              Analyzer.application.addGrammars(new GrammarsNode(Analyzer.application));
            }
            Analyzer.application.grammars.addInclude(include);
          }
          WadlTreeRoot wadlTreeRoot = new WadlTreeRoot();
          Tree wadlTree = wadlTreeRoot.buildTree(Analyzer.application);
          WadlPanel.wadlArea.clear();
          WadlPanel.wadlArea.setWidget(wadlTree);
        }         
      });
      containerPanel.add(addSchemaButton);
    }

    // default namespace
    final Button addNamespaceButton = new Button(GuiFactory.strings.addNamespace());
    if (!defaultNamespace.isEmpty()) {
      final Vector reallyAddDefaultNamespace = new Vector();
      containerPanel.add(new HTML("<br />" + GuiFactory.strings.defaultNamespaces()));
      ScrollPanel defaultNamespaceContainerPanel = new ScrollPanel();
      defaultNamespaceContainerPanel.setStyleName("restDescribe-wadlArea");
      defaultNamespaceContainerPanel.setHeight(panelHeight);
      VerticalPanel defaultNamespacePanel = new VerticalPanel();
      defaultNamespaceContainerPanel.add(defaultNamespacePanel);
      containerPanel.add(defaultNamespaceContainerPanel);
     
      Iterator defaultNamespaceIterator = defaultNamespace.iterator();
      int i = 0;
      HorizontalPanel horizontalNamespacePanel = new HorizontalPanel();
      defaultNamespacePanel.add(horizontalNamespacePanel);
      Grid grid = new Grid(defaultNamespace.size(), 2);
      horizontalNamespacePanel.add(grid);
      while (defaultNamespaceIterator.hasNext()) {       
        final String defaultNamespace = (String) defaultNamespaceIterator.next();
        reallyAddDefaultNamespace.add(defaultNamespace);
        final CheckBox checkBox = new CheckBox();
        checkBox.setChecked(true);
        checkBox.addClickListener(new ClickListener() {
          public void onClick(Widget sender) {
            if (checkBox.isChecked() &&
                !reallyAddDefaultNamespace.contains(defaultNamespace)) {             
              reallyAddDefaultNamespace.add(defaultNamespace);
            }          
            else {
              if (reallyAddDefaultNamespace.contains(defaultNamespace)) {
                reallyAddDefaultNamespace.remove(defaultNamespace);
              }
            }
          }         
        });
       
        grid.setWidget(i, 0, checkBox);       
        grid.setText(i, 1, defaultNamespace);
        i++;
      }           
      addNamespaceButton.addClickListener(new ClickListener() {
        public void onClick(Widget sender) {
          Iterator addNamespaceIterator = reallyAddDefaultNamespace.iterator();
          while (addNamespaceIterator.hasNext()) {
            String namespace = (String) addNamespaceIterator.next();           
            Analyzer.application.addNamespace(
                new NamespaceAttribute(null, namespace));
          }
          WadlTreeRoot wadlTreeRoot = new WadlTreeRoot();
          Tree wadlTree = wadlTreeRoot.buildTree(Analyzer.application);
          WadlPanel.wadlArea.clear();
          WadlPanel.wadlArea.setWidget(wadlTree);
        }         
      });
      containerPanel.add(addNamespaceButton);
    }
    final Button addOtherNamespacesButton = new Button(GuiFactory.strings.addOtherNamespace());
    // other namespaces
    if (!otherNamespaces.isEmpty()) {
      final Vector reallyAddOtherNamespaces = new Vector();
      containerPanel.add(new HTML("<br />" + GuiFactory.strings.otherNamespaces()));
      ScrollPanel otherNamespacesContainerPanel = new ScrollPanel();
      otherNamespacesContainerPanel.setStyleName("restDescribe-wadlArea");     
      otherNamespacesContainerPanel.setHeight(panelHeight);
      VerticalPanel otherNamespacesPanel = new VerticalPanel();
      otherNamespacesContainerPanel.add(otherNamespacesPanel);
      containerPanel.add(otherNamespacesContainerPanel);
     
      Iterator otherNamespacesIterator = otherNamespaces.iterator();
      int i = 0;
      HorizontalPanel horizontalNamespacePanel = new HorizontalPanel();
      otherNamespacesPanel.add(horizontalNamespacePanel);
      Grid grid = new Grid(otherNamespaces.size(), 2);
      horizontalNamespacePanel.add(grid);
      while (otherNamespacesIterator.hasNext()) {       
        final String otherNamespace = (String) otherNamespacesIterator.next();
        reallyAddOtherNamespaces.add(otherNamespace);
        final CheckBox checkBox = new CheckBox();
        checkBox.setChecked(true);
        checkBox.addClickListener(new ClickListener() {
          public void onClick(Widget sender) {
            if (checkBox.isChecked() &&
                !reallyAddOtherNamespaces.contains(otherNamespace)) {             
              reallyAddOtherNamespaces.add(otherNamespace);
            }          
            else {
              if (reallyAddOtherNamespaces.contains(otherNamespace)) {
View Full Code Here


      public void onClick(Widget sender) {
        updateAndDisplayConfirmLink(languageListBox.getItemText(languageListBox.getSelectedIndex()), confirmLink, confirmLangChange);
      }    
    });
    
    final CheckBox detailsCheckBox = new CheckBox();
    detailsCheckBox.setChecked(alwaysShowDetails);
    detailsCheckBox.addClickListener(new ClickListener() {
      public void onClick(Widget sender) {
        if (detailsCheckBox.isChecked()) {
          alwaysShowDetailsTemp = true;       
        }
        else {
          alwaysShowDetailsTemp = false;
        }
      }
    });
      
    final CheckBox treesCheckBox = new CheckBox();
    treesCheckBox.setChecked(treeItemsAlwaysOpen);
    treesCheckBox.addClickListener(new ClickListener() {
      public void onClick(Widget sender) {
        if (treesCheckBox.isChecked()) {
          treeItemsAlwaysOpenTemp = true;       
        }
        else {
          treeItemsAlwaysOpenTemp = false;
        }
      }
    });
   
    final HorizontalPanel miniSepTextPanel = new HorizontalPanel();
    final CheckBox useSeparationCharacterCheckBox = new CheckBox();
    useSeparationCharacterCheckBox.setChecked(useSeparationCharacter);
    useSeparationCharacterCheckBox.addClickListener(new ClickListener() {
      public void onClick(Widget sender) {       
        if (useSeparationCharacterCheckBox.isChecked()) {
          useSeparationCharacterTemp = true;       
        }
        else {
          useSeparationCharacterTemp = false;
        }
View Full Code Here

        Widget table = makeSelectionTable(dataProvider);

        layout.add(table);

        CheckBox enableBox = new CheckBox(Console.CONSTANTS.common_label_enable() + " " + deployment.getName());
        enableBox.setValue(Boolean.TRUE);
        layout.add(enableBox);

        DialogueOptions options = new DialogueOptions(new GroupSelectSubmitHandler(this.deployment, window, enableBox), new CancelHandler(window));
        Widget content = new WindowContentBuilder(layout, options).build();
        window.trapWidget(content);
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

      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

      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

      listBox_.setVisibleItemCount(15);
      listBox_.setWidth("350px");

      setEncodings(commonEncodings_, currentEncoding_);

      CheckBox showAll = new CheckBox("Show all encodings");
      showAll.addValueChangeHandler(new ValueChangeHandler<Boolean>()
      {
         public void onValueChange(ValueChangeEvent<Boolean> e)
         {
            if (e.getValue())
               setEncodings(allEncodings_, currentEncoding_);
            else
               setEncodings(commonEncodings_, currentEncoding_);
         }
      });
      setCheckBoxMargins(showAll, 8, 12);

      VerticalPanel panel = new VerticalPanel();
      panel.add(listBox_);
      panel.add(showAll);

      if (includeSaveAsDefault_)
      {
         saveAsDefault_ = new CheckBox("Set as default encoding for " +
                                       "source files");
         setCheckBoxMargins(showAll, 8, 0);
         setCheckBoxMargins(saveAsDefault_, 3, 12);
         panel.add(saveAsDefault_);
      }
View Full Code Here

{
   @Inject
   public ProjectEditingPreferencesPane(final SourceServerOperations server)
   {
      // source editing options
      enableCodeIndexing_ = new CheckBox("Index source files (for code search/navigation)", false);
      enableCodeIndexing_.addStyleName(RESOURCES.styles().enableCodeIndexing());
      add(enableCodeIndexing_);
     
      chkSpacesForTab_ = new CheckBox("Insert spaces for tab", false);
      chkSpacesForTab_.addStyleName(RESOURCES.styles().useSpacesForTab());
      add(chkSpacesForTab_);
     
      numSpacesForTab_ = new NumericValueWidget("Tab width");
      numSpacesForTab_.addStyleName(RESOURCES.styles().numberOfTabs());
      add(numSpacesForTab_);
     
      chkAutoAppendNewline_ = new CheckBox("Ensure that source files end with newline");
      chkAutoAppendNewline_.addStyleName(RESOURCES.styles().editingOption());
      add(chkAutoAppendNewline_);
     
      chkStripTrailingWhitespace_ = new CheckBox("Strip trailing horizontal whitespace when saving");
      chkStripTrailingWhitespace_.addStyleName(RESOURCES.styles().editingOption());
      add(chkStripTrailingWhitespace_);
     
      encoding_ = new TextBoxWithButton(
            "Text encoding:",
View Full Code Here

     
      HorizontalPanel optionsPanel = null;
      if (getOptionsSideBySide())
         optionsPanel = new HorizontalPanel();
     
      chkGitInit_ = new CheckBox("Create a git repository");
      chkGitInit_.addStyleName(styles.wizardCheckbox());
      if (sessionInfo.isVcsAvailable(VCSConstants.GIT_ID))
      { 
         chkGitInit_.setValue(uiPrefs.newProjGitInit().getValue());
         chkGitInit_.getElement().getStyle().setMarginRight(7, Unit.PX);
         if (optionsPanel != null)
         {
            optionsPanel.add(chkGitInit_);
         }
         else
         {
            addSpacer();
            addWidget(chkGitInit_);
         }
      }
     
      // Initialize project with packrat
      chkPackratInit_ = new CheckBox("Use packrat with this project");
      chkPackratInit_.setValue(uiPrefs.newProjUsePackrat().getValue());
     
      if (optionsPanel != null)
      {
         optionsPanel.add(chkPackratInit_);
View Full Code Here

            operation);
   
      setOkButtonCaption("Create Project");
     
      openInNewWindow_ = new CheckBox("Open in new window");
      addLeftWidget(openInNewWindow_);
      openInNewWindow_.setVisible(false);
     
     
      addPage(new NewDirectoryNavigationPage(sessionInfo));
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.