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

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


      Label tracebackTitle = new Label("Traceback");
      tracebackTitle.addStyleName(style.tracebackHeader());
     
      callFramePanelHeader.addStyleName(globalStyles.windowframe());
      callFramePanelHeader.add(tracebackTitle);
      CheckBox showInternals = new CheckBox("Show internals");
      showInternals.setValue(panelHost_.getShowInternalFunctions());
      showInternals.addValueChangeHandler(
            new ValueChangeHandler<Boolean>()
            {
               @Override
               public void onValueChange(ValueChangeEvent<Boolean> event)
               {
                  panelHost_.setShowInternalFunctions(event.getValue());
                  // Ignore the function on the top of the stack; we always
                  // want to show it since it's the execution point
                  for (int i = 1; i < callFrameItems_.size(); i++)
                  {
                     CallFrameItem item = callFrameItems_.get(i);
                     if (!item.isNavigable() && !item.isHidden())
                     {
                        item.setVisible(event.getValue());
                     }
                  }
               }
            }
      );
      showInternals.setStylePrimaryName(style.toggleHide());
           
      callFramePanelHeader.add(showInternals);
      callFramePanelHeader.setWidgetRightWidth(
                     showInternals, 28, Style.Unit.PX,
                                    30, Style.Unit.PCT);
View Full Code Here


      HorizontalPanel panel = new HorizontalPanel();
      panel.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);
      panel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_LEFT);
     
      // checkbox
      checkBox_ = new CheckBox();
      checkBox_.setValue(value);
      checkBox_.addValueChangeHandler(new ValueChangeHandler<Boolean>() {

         @Override
         public void onValueChange(ValueChangeEvent<Boolean> event)
View Full Code Here

      VerticalPanel panel = new VerticalPanel();
      panel.add(new Label("PropA"));
      txtPropA_ = new IntegerBox();
      panel.add(txtPropA_);
      panel.add(new Label("PropB"));
      chkPropB_ = new CheckBox();
      panel.add(chkPropB_);
      panel.setSize("100%", "100%");

      PanelWithToolbars mainPanel = new PanelWithToolbars(
                                          createToolbar(commands),
View Full Code Here

         grid.setWidget(20, new Label("Options:"));
      HorizontalPanel cairoPdfPanel = new HorizontalPanel();
      String label = "Use cairo_pdf device";
      if (BrowseCap.isMacintoshDesktop())
         label = label + " (requires X11)";
      chkCairoPdf_ = new CheckBox(label);
      chkCairoPdf_.getElement().getStyle().setMarginLeft(kComponentSpacing,
                                                         Unit.PX);
      cairoPdfPanel.add(chkCairoPdf_);
      chkCairoPdf_.setValue(haveCairoPdf && options_.getCairoPdf());
      if (haveCairoPdf)
         grid.setWidget(2, 1, cairoPdfPanel);
     
      grid.setWidget(3, 0, new HTML("&nbsp;"));
     
      ThemedButton directoryButton = new ThemedButton("Directory...");
      directoryButton.setStylePrimaryName(styles.directoryButton());
      directoryButton.getElement().getStyle().setMarginLeft(-2, Unit.PX);
      grid.setWidget(4, 0, directoryButton);
      directoryButton.addClickHandler(new ClickHandler() {
         @Override
         public void onClick(ClickEvent event)
         {
            fileDialogs_.chooseFolder(
               "Choose Directory",
               fileSystemContext_,
               FileSystemItem.createDir(directoryLabel_.getTitle().trim()),
               new ProgressOperationWithInput<FileSystemItem>() {

                 public void execute(FileSystemItem input,
                                     ProgressIndicator indicator)
                 {
                    if (input == null)
                       return;
                   
                    indicator.onCompleted();
                   
                    // update default
                    ExportPlotUtils.setDefaultSaveDirectory(input);
                   
                    // set display
                    setDirectory(input)
                 }         
               });
         }
      });
     
     
      directoryLabel_ = new Label();
      setDirectory(defaultDirectory_);
      directoryLabel_.setStylePrimaryName(styles.savePdfDirectoryLabel());
      grid.setWidget(4, 1, directoryLabel_);
     
      Label fileNameLabel = new Label("File name:");
      fileNameLabel.setStylePrimaryName(styles.savePdfFileNameLabel());
      grid.setWidget(5, 0, fileNameLabel);
      fileNameTextBox_ = new TextBox();
      fileNameTextBox_.setText(defaultPlotName_);
      fileNameTextBox_.setStylePrimaryName(styles.savePdfFileNameTextBox());
      grid.setWidget(5, 1, fileNameTextBox_);
     
     
      // view after size
      viewAfterSaveCheckBox_ = new CheckBox("View plot after saving");
      viewAfterSaveCheckBox_.setStylePrimaryName(
                                       styles.savePdfViewAfterCheckbox());
      viewAfterSaveCheckBox_.setValue(options_.getViewAfterSave());
      grid.setWidget(6, 1, viewAfterSaveCheckBox_);
     
View Full Code Here

    private final HorizontalPanel panel;
    private final InputElementWrapper wrapper;

    public CheckBoxItem(String name, String title) {
        super(name, title);
        checkBox = new CheckBox();
        checkBox.setTitle("Shift click for expression input");
        checkBox.setTabIndex(0);
        checkBox.addValueChangeHandler(new ValueChangeHandler<Boolean>() {
            @Override
            public void onValueChange(ValueChangeEvent<Boolean> booleanValueChangeEvent) {
View Full Code Here

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

    final HorizontalPanel buttonPanel = new HorizontalPanel();

    final 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(final ValueChangeEvent<Boolean> booleanValueChangeEvent) {
        showErrors = booleanValueChangeEvent.getValue();
      }
    });
View Full Code Here

        HTMLPanel actions = new HTMLPanel(TEMPLATES
                .patchConflicts(Console.CONSTANTS.patch_manager_conflict_cancel_title(),
                        Console.CONSTANTS.patch_manager_conflict_cancel_body(),
                        Console.MESSAGES.patch_manager_conflict_override_title(),
                        Console.CONSTANTS.patch_manager_conflict_override_body()));
        CheckBox overrideCheck = new CheckBox(Console.CONSTANTS.patch_manager_conflict_override_check());
        overrideCheck.getElement().setId(asId(PREFIX, getClass(), "_Override"));
        overrideCheck.addValueChangeHandler(new ValueChangeHandler<Boolean>() {
            @Override
            public void onValueChange(final ValueChangeEvent<Boolean> event) {
                setEnabled(event.getValue(), true);
            }
        });
View Full Code Here

    @Override
    protected void buildOptions(UIDL uidl) {
        panel.clear();
        for (final Iterator it = uidl.getChildIterator(); it.hasNext();) {
            final UIDL opUidl = (UIDL) it.next();
            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")
                    && !isReadonly() && !isDisabled();
            op.setEnabled(enabled);
            setStyleName(op.getElement(), "v-disabled", !enabled);
            op.addClickHandler(this);
            optionsToKeys.put(op, opUidl.getStringAttribute("key"));
            panel.add(op);
        }
    }
View Full Code Here

            final Container layout = Util.getLayout((Widget) paintable);

            VerticalPanel errorDetails = new VerticalPanel();
            errorDetails.add(new Label("" + Util.getSimpleName(paintable)
                    + " inside " + Util.getSimpleName(layout)));
            final CheckBox emphasisInUi = new CheckBox(
                    "Emphasize components parent in UI (the actual component is not visible)");
            emphasisInUi.addClickHandler(new ClickHandler() {
                public void onClick(ClickEvent event) {
                    if (paintable != null) {
                        Element element2 = ((Widget) layout).getElement();
                        Widget.setStyleName(element2, "invalidlayout",
                                emphasisInUi.getValue());
                    }
                }
            });
            errorDetails.add(emphasisInUi);
            panel.add(errorDetails);
View Full Code Here

        }
        if (valueMap.containsKey("widthMsg")) {
            errorDetails.add(new Label("Width problem: "
                    + valueMap.getString("widthMsg")));
        }
        final CheckBox emphasisInUi = new CheckBox("Emphasize component in UI");
        emphasisInUi.addClickHandler(new ClickHandler() {
            public void onClick(ClickEvent event) {
                if (paintable != null) {
                    Element element2 = ((Widget) paintable).getElement();
                    Widget.setStyleName(element2, "invalidlayout",
                            emphasisInUi.getValue());
                }
            }
        });
        errorDetails.add(emphasisInUi);
        errorNode.setWidget(errorDetails);
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.