/*
     * (non-Javadoc)
     *
     * @seecom.google.gwt.widgetideas.table.client.filter.ColumnFilter#
     * createFilterWidget()
     */
    public Widget createFilterWidget() {
      filterTextBox = new TextBox();
      filterTextBox.addStyleName("textBox");
      filterTextBox.addKeyboardListener(
          new KeyboardListener() {
            public void onKeyDown(Widget sender, char keyCode, int modifiers) {}

            public void onKeyPress(Widget sender, char keyCode, int modifiers) {}

            public void onKeyUp(Widget sender, char keyCode, int modifiers) {
              fireColumnFilterChanged(
                  new TextColumnFilterInfo(getColumn(), filterTextBox.getText(), operator));
            }
          });
      if (supportedOperators.length > 1) {
        operatorButton = new PushButton();
        setButtonText(operatorButton, operator);
        operatorButton.addClickListener(clickListener);
        operatorButton.addStyleName("operatorButton");
        HorizontalPanel horizontalPanel = new HorizontalPanel();
        horizontalPanel.addStyleName("columnTextFilter");
        horizontalPanel.setVerticalAlignment(HorizontalPanel.ALIGN_MIDDLE);
        horizontalPanel.add(operatorButton);
        horizontalPanel.add(filterTextBox);
        horizontalPanel.setCellWidth(operatorButton, "30px");
        horizontalPanel.setCellWidth(filterTextBox, "100%");
        horizontalPanel.setSpacing(2);
        return horizontalPanel;
      } else {
        return filterTextBox;
      }
    }
  @Inject
  public SubTabStorageVmBackupView(
      SearchableDetailModelProvider<VM, StorageListModel, VmBackupModel> modelProvider) {
    super(modelProvider);
    initVmTable();
    initApplicationsTable();
    initWidget(ViewUiBinder.uiBinder.createAndBindUi(this));

    vmTableContainer.add(getTable());
    applicationsTableContainer.add(applicationsTable);

    mainContainer.setCellWidth(vmTableContainer, "50%"); // $NON-NLS-1$
    mainContainer.setCellWidth(applicationsTableContainer, "50%"); // $NON-NLS-1$
  }
  public PainelPesquisarView() {
    hpPainelPesquisar = new HorizontalPanel();
    hpPainelPesquisar.setStyleName("hpPainelPesquisar");

    tbPesquisar = new TextBox();
    tbPesquisar.setStyleName("tbPesquisar");

    btnPesquisar = new Button("");
    btnPesquisar.setStyleName("btnPesquisar");

    hpPainelPesquisar.add(tbPesquisar);
    hpPainelPesquisar.add(btnPesquisar);
    hpPainelPesquisar.setCellWidth(tbPesquisar, "38%");

    hpPainelLabelContatos = new HorizontalPanel();
    hpPainelLabelContatos.setStyleName("hpPainelLabelContatos");

    lbContatos = new Label("Contatos");
    lbContatos.setStyleName("lbContatos");

    hpPainelLabelContatos.add(lbContatos);
    hpPainelLabelContatos.setHorizontalAlignment(VerticalPanel.ALIGN_CENTER);
    hpPainelLabelContatos.setVerticalAlignment(VerticalPanel.ALIGN_MIDDLE);

    vpPainelPesquisar = new VerticalPanel();
    vpPainelPesquisar.setStyleName("vpPainelPesquisar");

    vpPainelPesquisar.add(hpPainelPesquisar);
    vpPainelPesquisar.add(hpPainelLabelContatos);

    initWidget(vpPainelPesquisar);
  }
  /** Initializes and assembles all commands into buttons in the toolbar. */
  public DesignToolbar() {
    super();

    projectNameLabel = new Label();
    projectNameLabel.setStyleName("ya-ProjectName");
    HorizontalPanel toolbar = (HorizontalPanel) getWidget();
    toolbar.insert(projectNameLabel, 0);
    toolbar.setCellWidth(projectNameLabel, "222px"); // width of palette minus
    // cellspacing/border of buttons

    addButton(new ToolbarItem(WIDGET_NAME_SAVE, MESSAGES.saveButton(), new SaveAction()));
    addButton(new ToolbarItem(WIDGET_NAME_SAVE_AS, MESSAGES.saveAsButton(), new SaveAsAction()));
    addButton(
        new ToolbarItem(
            WIDGET_NAME_CHECKPOINT, MESSAGES.checkpointButton(), new CheckpointAction()));
    if (AppInventorFeatures.allowMultiScreenApplications()) {
      addButton(
          new ToolbarItem(WIDGET_NAME_ADDFORM, MESSAGES.addFormButton(), new AddFormAction()));
      addButton(
          new ToolbarItem(
              WIDGET_NAME_REMOVEFORM, MESSAGES.removeFormButton(), new RemoveFormAction()));
    }

    List<ToolbarItem> connectToItems = Lists.newArrayList();
    addDropDownButton(WIDGET_NAME_CONNECT_TO, MESSAGES.connectToButton(), connectToItems, true);
    updateConnectToDropDownButton(false, false, false);

    List<ToolbarItem> screenItems = Lists.newArrayList();
    addDropDownButton(WIDGET_NAME_SCREENS_DROPDOWN, MESSAGES.screensButton(), screenItems, true);
    addButton(
        new ToolbarItem(
            WIDGET_NAME_SWITCH_TO_FORM_EDITOR,
            MESSAGES.switchToFormEditorButton(),
            new SwitchToFormEditorAction()),
        true);
    addButton(
        new ToolbarItem(
            WIDGET_NAME_SWITCH_TO_BLOCKS_EDITOR,
            MESSAGES.switchToBlocksEditorButton(),
            new SwitchToBlocksEditorAction()),
        true);

    List<ToolbarItem> buildItems = Lists.newArrayList();
    buildItems.add(
        new ToolbarItem(
            WIDGET_NAME_BUILD_BARCODE, MESSAGES.showBarcodeButton(), new BarcodeAction()));
    buildItems.add(
        new ToolbarItem(
            WIDGET_NAME_BUILD_DOWNLOAD, MESSAGES.downloadToComputerButton(), new DownloadAction()));
    if (AppInventorFeatures.hasYailGenerationOption() && Ode.getInstance().getUser().getIsAdmin()) {
      buildItems.add(
          new ToolbarItem(
              WIDGET_NAME_BUILD_YAIL, MESSAGES.generateYailButton(), new GenerateYailAction()));
    }
    addDropDownButton(WIDGET_NAME_BUILD, MESSAGES.buildButton(), buildItems, true);
    toggleEditor(false); // Gray out the Designer button and enable the blocks button
  }
Beispiel #5
0
  public StatusBarWidget() {
    Binder binder = GWT.create(Binder.class);
    HorizontalPanel hpanel = binder.createAndBindUi(this);
    hpanel.setVerticalAlignment(HorizontalPanel.ALIGN_TOP);

    hpanel.setCellWidth(hpanel.getWidget(2), "100%");

    initWidget(hpanel);

    height_ = 16;
  }
Beispiel #6
0
  // GWT module entry point method.
  public void onModuleLoad() {
    /*
     * Asynchronously loads the Maps API.
     *
     * The first parameter should be a valid Maps API Key to deploy this
     * application on a public server, but a blank key will work for an
     * application served from localhost.
     */
    //   Maps.loadMapsApi("AIzaSyBjDoqh_8ZFoxVvvW4ETGdJvADLzTX6-sI", "2", false, new Runnable() {
    //      public void run() {
    //        buildUi();
    //      }
    //    });
    //

    //   Maps.loadMapsApi("", "2", false, new Runnable() {
    //	      public void run() {
    //	        buildUi();
    //	        findLocation(map, "whistler");
    //	      }
    //	    });

    propertyMap theMap = new propertyMap();
    theMap.buildUi();
    // Add map to the container
    // mapContainerPanel.add(theMap.getMap());

    // build streetview map

    // Add street view map to the container
    // streetViewContainerPanel.add(streetMap.getMap());

    // assemble map panel
    // mapsPanel.add(mapContainerPanel);
    // mapsPanel.add(streetViewContainerPanel);

    Button theButton = new Button();
    theButton.setText("test");
    HorizontalPanel panel = new HorizontalPanel();
    // panel.setSize("100%","500px");
    // SimplePanel sp = new SimplePanel();
    // sp.setSize("100%", "100%");
    panel.add(theMap.getMap());
    // panel.add(sp);
    panel.add(theButton);
    panel.setCellWidth(theMap.getMap(), "500px");
    panel.setCellHeight(theMap.getMap(), "500px");
    panel.setCellHorizontalAlignment(theMap.getMap(), HorizontalPanel.ALIGN_LEFT);
    panel.setCellHorizontalAlignment(theButton, HorizontalPanel.ALIGN_RIGHT);

    panel.setWidth("100%");
    RootPanel.get().add(panel);
  }
Beispiel #7
0
  private HorizontalPanel getConcept() {
    HorizontalPanel conceptHp = new HorizontalPanel();
    conceptHp.add(conceptLabel);
    conceptLabel.addStyleName("gwt-Textbox");
    conceptBrowse = new Image("images/browseButton3-grey.gif");
    conceptBrowse.setStyleName(Style.Link);
    conceptBrowse.addClickHandler(
        new ClickHandler() {
          public void onClick(ClickEvent event) {
            final ConceptBrowser cb = ((MainApp) RootPanel.get().getWidget(0)).conceptBrowser;
            cb.showBrowser();
            cb.addSubmitClickHandler(
                new ClickHandler() {
                  public void onClick(ClickEvent event) {
                    conceptLabel.setValue(cb.getSelectedItem(), cb.getTreeObject());
                    exp.setConceptURI(cb.getTreeObject().getUri());
                  }
                });
          }
        });
    conceptHp.add(conceptBrowse);

    conceptClear = new Image("images/trash-grey.gif");
    conceptClear.setTitle(constants.buttonClear());
    conceptClear.setStyleName(Style.Link);
    conceptClear.addClickHandler(
        new ClickHandler() {
          public void onClick(ClickEvent event) {
            conceptLabel.setText("");
            exp.setConceptURI(null);
          }
        });
    conceptHp.add(conceptClear);

    conceptChildren = new CheckBox(constants.exportIncludeChildren(), true);
    conceptChildren.addClickHandler(
        new ClickHandler() {
          public void onClick(ClickEvent event) {
            exp.setIncludeChildren(((CheckBox) event.getSource()).getValue());
          }
        });
    conceptHp.add(conceptChildren);
    conceptHp.setSpacing(3);
    conceptHp.setWidth("100%");
    conceptHp.setCellHorizontalAlignment(conceptLabel, HasHorizontalAlignment.ALIGN_LEFT);
    conceptHp.setCellHorizontalAlignment(conceptBrowse, HasHorizontalAlignment.ALIGN_RIGHT);
    conceptHp.setCellHorizontalAlignment(conceptChildren, HasHorizontalAlignment.ALIGN_LEFT);
    conceptHp.setCellWidth(conceptLabel, "80%");
    return conceptHp;
  }
Beispiel #8
0
 @Override
 public void setPlatform(Platform platform) {
   Image image = new Image(Utils.getPlatformIcon(platform));
   image.setTitle(Utils.getPlatformText(platform));
   image.getElement().getStyle().setVerticalAlign(VerticalAlign.MIDDLE);
   Label label = new Label(Utils.getPlatformText(platform));
   targetPlatformPanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);
   targetPlatformPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER);
   targetPlatformPanel.add(image);
   targetPlatformPanel.setCellWidth(image, "32px");
   targetPlatformPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_LEFT);
   targetPlatformPanel.add(label);
   label.getElement().getStyle().setPaddingLeft(8, Unit.PX);
 }
Beispiel #9
0
  /** Status */
  public Status() {
    super(false, true);
    hPanel = new HorizontalPanel();
    image = new Image(OKMBundleResources.INSTANCE.indicator());
    msg = new HTML("");
    space = new HTML("");

    hPanel.add(image);
    hPanel.add(msg);
    hPanel.add(space);

    hPanel.setCellVerticalAlignment(image, HasAlignment.ALIGN_MIDDLE);
    hPanel.setCellVerticalAlignment(msg, HasAlignment.ALIGN_MIDDLE);
    hPanel.setCellHorizontalAlignment(image, HasAlignment.ALIGN_CENTER);
    hPanel.setCellWidth(image, "30px");
    hPanel.setCellWidth(space, "7px");

    hPanel.setHeight("25px");

    msg.setStyleName("okm-NoWrap");

    super.hide();
    setWidget(hPanel);
  }
Beispiel #10
0
 /**
  * Add a special element to the toolbar. Support for separator and glue.
  *
  * @param key id of element to add
  */
 public void add(int key) {
   switch (key) {
     case Toolbar.SEPARATOR:
       Image img = new Image("style/images/toolbarDivider.png"); // $NON-NLS-1$
       bar.add(img);
       bar.setCellVerticalAlignment(img, ALIGN_MIDDLE);
       break;
     case Toolbar.GLUE:
       SimplePanel panel = new SimplePanel();
       bar.add(panel);
       bar.setCellWidth(panel, "100%"); // $NON-NLS-1$
       break;
     default:
       // add error logging message
   }
 }
  /**
   * Maak een nieuw infopanel.
   *
   * @param message Het weer te geven bericht
   */
  public InfoPanel(String message) {
    HorizontalPanel container = new HorizontalPanel();
    Image imgInfo = new Image(Resources.INSTANCE.icon_info());
    lblMessage.setHTML(message);

    container.add(imgInfo);
    container.add(lblMessage);
    container.setCellWidth(imgInfo, "70px");
    container.setCellHorizontalAlignment(imgInfo, HasHorizontalAlignment.ALIGN_CENTER);
    container.setCellVerticalAlignment(lblMessage, HasVerticalAlignment.ALIGN_MIDDLE);
    container.setCellVerticalAlignment(imgInfo, HasVerticalAlignment.ALIGN_MIDDLE);

    initWidget(container);
    setStyleName("infopanel");
    setSize("480px", "60px");
  }
  public void createSocialBar(HorizontalPanel socialBar, final MAnnotation annotation) {
    try {
      socialBar.clear();

      if (((BooleanPreference)
              _domeo
                  .getPreferences()
                  .getPreferenceItem(Domeo.class.getName(), Domeo.PREF_ALLOW_COMMENTING))
          .getValue()) {
        Resources resource = Domeo.resources;

        Image commentIcon = new Image(resource.littleCommentIcon());
        commentIcon.setTitle("Comment on Item");
        commentIcon.setStyleName(ATileComponent.tileResources.css().button());
        commentIcon.addClickHandler(
            ActionCommentAnnotation.getClickHandler(_domeo, this, annotation));
        commentIcon.addClickHandler(
            new ClickHandler() {
              @Override
              public void onClick(ClickEvent event) {
                _curationPopup.hide();
              }
            });
        socialBar.add(commentIcon);
        socialBar.add(new Label("(10)"));

        Image usersIcon = new Image(resource.usersIcon());
        usersIcon.setTitle("Involved users");
        usersIcon.setStyleName(ATileComponent.tileResources.css().button());
        usersIcon.addClickHandler(
            ActionCommentAnnotation.getClickHandler(_domeo, this, annotation));
        usersIcon.addClickHandler(
            new ClickHandler() {
              @Override
              public void onClick(ClickEvent event) {
                _curationPopup.hide();
              }
            });
        socialBar.add(usersIcon);
        socialBar.setCellWidth(usersIcon, "24px");
        socialBar.setCellHorizontalAlignment(usersIcon, HasHorizontalAlignment.ALIGN_RIGHT);
        socialBar.add(new Label("(2)"));
      }
    } catch (Exception e) {
      _domeo.getLogger().exception(this, "create social bar" + e.getMessage());
    }
  }
Beispiel #13
0
 @Override
 public void setFeatures(List<Feature> features) {
   for (int i = 0; i < features.size(); i++) {
     Feature feature = features.get(i);
     Image image = new Image(Utils.getFeatureIcon(feature));
     image.setTitle(Utils.getFeatureText(feature));
     image.getElement().getStyle().setVerticalAlign(VerticalAlign.MIDDLE);
     Label label = new Label(Utils.getFeatureText(feature));
     featuresPanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);
     featuresPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER);
     featuresPanel.add(image);
     featuresPanel.setCellWidth(image, "32px");
     featuresPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_LEFT);
     featuresPanel.add(label);
     if (i < features.size() - 1) {
       label.getElement().getStyle().setPaddingRight(10, Unit.PX);
     }
     label.getElement().getStyle().setPaddingLeft(8, Unit.PX);
   }
 }
Beispiel #14
0
  @SuppressWarnings("unused")
  private HorizontalPanel getTermCode() {

    termCodeBox.addValueChangeHandler(
        new ValueChangeHandler<String>() {
          public void onValueChange(ValueChangeEvent<String> event) {
            String value = ((TextBox) (event.getSource())).getValue();
            exp.setTermCode(value.equals("") ? null : value);
          }
        });

    HorizontalPanel conceptHp = new HorizontalPanel();
    conceptHp.add(termCodeBox);
    conceptHp.setSpacing(3);
    conceptHp.setWidth("100%");
    conceptHp.setCellHorizontalAlignment(conceptBrowse, HasHorizontalAlignment.ALIGN_RIGHT);
    conceptHp.setCellHorizontalAlignment(termCodeBox, HasHorizontalAlignment.ALIGN_LEFT);
    conceptHp.setCellWidth(termCodeBox, "100%");
    return conceptHp;
  }
Beispiel #15
0
  private HorizontalPanel getExportFormat() {
    // format.addItem("--None--", "--None--");
    format.addItem(ExportFormat.SKOSXL, ExportFormat.SKOSXL);
    format.addItem(ExportFormat.SKOS, ExportFormat.SKOS);
    // format.addItem(constants.exportSQL(), ExportFormat.RDBMS_SQL_FORMAT);
    format.setWidth("100%");
    format.addChangeHandler(
        new ChangeHandler() {
          public void onChange(ChangeEvent event) {
            if (!format.getValue((format.getSelectedIndex())).equals("")
                && !format.getValue(format.getSelectedIndex()).equals("--None--")) {
              exp.setFormat(format.getValue(format.getSelectedIndex()));
            } else {
              exp.setFormat(null);
            }
          }
        });

    includeLabelsOfRelatedConcepts =
        new CheckBox(constants.exportIncludeLabelsOfRelatedConcepts(), true);
    includeLabelsOfRelatedConcepts.addClickHandler(
        new ClickHandler() {
          public void onClick(ClickEvent event) {
            exp.setIncludeLabelsOfRelatedConcepts(((CheckBox) event.getSource()).getValue());
          }
        });

    HorizontalPanel conceptHp = new HorizontalPanel();

    conceptHp.add(format);
    conceptHp.add(includeLabelsOfRelatedConcepts);
    conceptHp.setSpacing(3);
    conceptHp.setWidth("100%");
    conceptHp.setCellHorizontalAlignment(format, HasHorizontalAlignment.ALIGN_LEFT);
    conceptHp.setCellHorizontalAlignment(
        includeLabelsOfRelatedConcepts, HasHorizontalAlignment.ALIGN_RIGHT);
    conceptHp.setCellWidth(format, "80%");
    return conceptHp;
  }
Beispiel #16
0
  public ColorPicker() {
    // UI Drawing
    // ------------------

    hue = 0;
    saturation = 100;
    brightness = 100;
    red = 255;
    green = 0;
    blue = 0;

    HorizontalPanel panel = new HorizontalPanel();
    FlexTable table = new FlexTable();

    // Add the large slider map
    slidermap = new SliderMap(this);
    panel.add(slidermap);
    panel.setCellWidth(slidermap, "258px");
    panel.setCellHeight(slidermap, "258px");

    // Add the small slider bar
    sliderbar = new SliderBar(this);
    panel.add(sliderbar);
    panel.setCellWidth(sliderbar, "40px");
    panel.setCellHeight(sliderbar, "258px");

    // Define the Flextable's content
    // Color preview at the top
    colorpreview = new HTML("");
    colorpreview.setWidth("50px");
    colorpreview.setHeight("50px");
    DOM.setStyleAttribute(colorpreview.getElement(), "border", "1px solid black");

    // Radio buttons
    rbHue = new RadioButton("color", "H:");
    rbHue.addClickHandler(this);
    rbSaturation = new RadioButton("color", "S:");
    rbSaturation.addClickHandler(this);
    rbBrightness = new RadioButton("color", "V:");
    rbBrightness.addClickHandler(this);
    rbRed = new RadioButton("color", "R:");
    rbRed.addClickHandler(this);
    rbGreen = new RadioButton("color", "G:");
    rbGreen.addClickHandler(this);
    rbBlue = new RadioButton("color", "B:");
    rbBlue.addClickHandler(this);

    // Textboxes
    tbHue = new TextBox();
    tbHue.setText(new Integer(hue).toString());
    tbHue.setMaxLength(3);
    tbHue.setVisibleLength(4);
    tbHue.addKeyPressHandler(this);
    tbHue.addChangeHandler(this);
    tbSaturation = new TextBox();
    tbSaturation.setText(new Integer(saturation).toString());
    tbSaturation.setMaxLength(3);
    tbSaturation.setVisibleLength(4);
    tbSaturation.addKeyPressHandler(this);
    tbSaturation.addChangeHandler(this);
    tbBrightness = new TextBox();
    tbBrightness.setText(new Integer(brightness).toString());
    tbBrightness.setMaxLength(3);
    tbBrightness.setVisibleLength(4);
    tbBrightness.addKeyPressHandler(this);
    tbBrightness.addChangeHandler(this);
    tbRed = new TextBox();
    tbRed.setText(new Integer(red).toString());
    tbRed.setMaxLength(3);
    tbRed.setVisibleLength(4);
    tbRed.addKeyPressHandler(this);
    tbRed.addChangeHandler(this);
    tbGreen = new TextBox();
    tbGreen.setText(new Integer(green).toString());
    tbGreen.setMaxLength(3);
    tbGreen.setVisibleLength(4);
    tbGreen.addKeyPressHandler(this);
    tbGreen.addChangeHandler(this);
    tbBlue = new TextBox();
    tbBlue.setText(new Integer(blue).toString());
    tbBlue.setMaxLength(3);
    tbBlue.setVisibleLength(4);
    tbBlue.addKeyPressHandler(this);
    tbBlue.addChangeHandler(this);
    tbHexColor = new TextBox();
    tbHexColor.setText("ff0000");
    tbHexColor.setMaxLength(6);
    tbHexColor.setVisibleLength(6);
    tbHexColor.addKeyPressHandler(this);
    tbHexColor.addChangeHandler(this);

    // Put together the FlexTable
    table.setWidget(0, 0, colorpreview);
    table.getFlexCellFormatter().setColSpan(0, 0, 3);
    table.setWidget(1, 0, rbHue);
    table.setWidget(1, 1, tbHue);
    table.setWidget(1, 2, new HTML("&deg;"));
    table.setWidget(2, 0, rbSaturation);
    table.setWidget(2, 1, tbSaturation);
    table.setText(2, 2, "%");
    table.setWidget(3, 0, rbBrightness);
    table.setWidget(3, 1, tbBrightness);
    table.setText(3, 2, "%");
    table.setWidget(4, 0, rbRed);
    table.setWidget(4, 1, tbRed);
    table.setWidget(5, 0, rbGreen);
    table.setWidget(5, 1, tbGreen);
    table.setWidget(6, 0, rbBlue);
    table.setWidget(6, 1, tbBlue);
    table.setText(7, 0, "#:");
    table.setWidget(7, 1, tbHexColor);
    table.getFlexCellFormatter().setColSpan(7, 1, 2);

    // Final setup
    panel.add(table);
    rbSaturation.setValue(true);
    setPreview("ff0000");
    DOM.setStyleAttribute(colorpreview.getElement(), "cursor", "default");

    // First event
    onClick(rbSaturation);

    initWidget(panel);
  }
Beispiel #17
0
  /** SearchControl */
  public SearchControl() {
    table = new FlexTable();
    table.setCellPadding(2);
    table.setCellSpacing(2);
    scrollPanel = new ScrollPanel(table);
    advancedView = new CheckBox(Main.i18n("search.view.advanced"));
    advancedView.addClickHandler(
        new ClickHandler() {
          @Override
          public void onClick(ClickEvent event) {
            if (advancedView.getValue()) {
              clean();
              switchSearchMode(SEARCH_MODE_ADVANCED);
            } else {
              clean();
              switchSearchMode(SEARCH_MODE_SIMPLE);
            }
          }
        });
    compactResultsView = new CheckBox(Main.i18n("search.view.compact.results"));
    compactResultsView.addClickHandler(
        new ClickHandler() {
          @Override
          public void onClick(ClickEvent event) {
            if (compactResultsView.getValue()) {
              switchResultsViewMode(RESULTS_VIEW_COMPACT);
              table.getCellFormatter().setVisible(2, 0, false); // hide view property groups
            } else {
              switchResultsViewMode(RESULTS_VIEW_NORMAL);
              table.getCellFormatter().setVisible(2, 0, true); // show view property groups
            }
          }
        });
    showPropertyGroups = new CheckBox(Main.i18n("search.view.propety.groups"));
    showPropertyGroups.addClickHandler(
        new ClickHandler() {
          @Override
          public void onClick(ClickEvent event) {
            if (searchButton.isEnabled()) {
              executeSearch();
            }
          }
        });
    saveUserNews = new CheckBox(Main.i18n("search.save.as.news"));
    searchSavedName = new TextBox();
    searchSavedName.setWidth("200");
    controlSearch = new ControlSearchIn();
    resultPage = new ListBox();
    resultPage.addItem("10", "10");
    resultPage.addItem("20", "20");
    resultPage.addItem("30", "30");
    resultPage.addItem("50", "50");
    resultPage.addItem("100", "100");

    keyUpHandler =
        new KeyUpHandler() {
          @Override
          public void onKeyUp(KeyUpEvent event) {
            evaluateSearchButtonVisible();

            if (KeyCodes.KEY_ENTER == event.getNativeKeyCode() && searchButton.isEnabled()) {
              executeSearch();
            }
          }
        };

    searchButton =
        new Button(
            Main.i18n("button.search"),
            new ClickHandler() {
              @Override
              public void onClick(ClickEvent event) {
                executeSearch();
              }
            });

    cleanButton =
        new Button(
            Main.i18n("button.clean"),
            new ClickHandler() {
              @Override
              public void onClick(ClickEvent event) {
                clean();
              }
            });

    saveSearchButton =
        new Button(
            Main.i18n("button.save.search"),
            new ClickHandler() {
              @Override
              public void onClick(ClickEvent event) {
                long domain = 0;
                SearchNormal searchNormal =
                    Main.get().mainPanel.search.searchBrowser.searchIn.searchNormal;
                SearchAdvanced searchAdvanced =
                    Main.get().mainPanel.search.searchBrowser.searchIn.searchAdvanced;
                String operator = GWTQueryParams.OPERATOR_AND;
                params = new GWTQueryParams();

                if (!searchAdvanced.path.getText().equals("")) {
                  params.setPath(searchAdvanced.path.getText());
                } else {
                  params.setPath(
                      searchNormal.context.getValue(searchNormal.context.getSelectedIndex()));
                }

                if (!searchAdvanced.categoryUuid.equals("")) {
                  params.setCategoryUuid(searchAdvanced.categoryUuid);
                  params.setCategoryPath(
                      searchAdvanced.categoryPath.getText().substring(16)); // removes /okm:category
                }

                params.setContent(searchNormal.content.getText());
                params.setName(searchNormal.name.getText());
                params.setKeywords(searchNormal.keywords.getText());
                params.setProperties(
                    Main.get().mainPanel.search.searchBrowser.searchIn.getProperties());
                params.setAuthor(
                    searchNormal.userListBox.getValue(searchNormal.userListBox.getSelectedIndex()));
                params.setLastModifiedFrom(searchNormal.modifyDateFrom);
                params.setLastModifiedTo(searchNormal.modifyDateTo);
                params.setDashboard(saveUserNews.getValue());
                params.setMailFrom(searchAdvanced.from.getText());
                params.setMailTo(searchAdvanced.to.getText());
                params.setMailSubject(searchAdvanced.subject.getText());

                if (searchAdvanced.typeDocument.getValue()) {
                  domain += GWTQueryParams.DOCUMENT;
                }

                if (searchAdvanced.typeFolder.getValue()) {
                  domain += GWTQueryParams.FOLDER;
                }

                if (searchAdvanced.typeMail.getValue()) {
                  domain += GWTQueryParams.MAIL;
                }

                params.setDomain(domain);

                if (searchTypeAnd.getValue()) {
                  operator = GWTQueryParams.OPERATOR_AND;
                } else {
                  operator = GWTQueryParams.OPERATOR_OR;
                }

                params.setOperator(operator);

                // Removes dates if dashboard is checked
                if (saveUserNews.getValue()) {
                  params.setLastModifiedFrom(null);
                  params.setLastModifiedTo(null);
                }

                params.setMimeType(
                    searchAdvanced.mimeTypes.getValue(searchAdvanced.mimeTypes.getSelectedIndex()));

                if (!searchSavedName.getText().equals("")) {
                  saveSearchButton.setEnabled(false);
                  params.setQueryName(searchSavedName.getText());
                  isUserNews = params.isDashboard();
                  saveSearch(params, "sql");
                }
              }
            });

    searchSavedName.addKeyUpHandler(
        new KeyUpHandler() {
          @Override
          public void onKeyUp(KeyUpEvent event) {
            evalueSaveSearchButtonVisible();
          }
        });

    searchButton.setEnabled(false);
    saveSearchButton.setEnabled(false);

    // Type of search
    searchTypePanel = new HorizontalPanel();
    searchTypePanel.setVisible(true); // On OpenKM 4.0 has hidden AND / OR option list
    searchTypeAnd = new CheckBox("AND");
    searchTypeOr = new CheckBox("OR");
    searchTypeAnd.setValue(true);
    searchTypeOr.setValue(false);

    searchTypeAnd.addClickHandler(
        new ClickHandler() {
          @Override
          public void onClick(ClickEvent event) {
            searchTypeOr.setValue(
                !searchTypeAnd.getValue()); // Always set changed between and and or type
          }
        });

    searchTypeOr.addClickHandler(
        new ClickHandler() {
          @Override
          public void onClick(ClickEvent event) {
            searchTypeAnd.setValue(
                !searchTypeOr.getValue()); // Always set changed between and and or type
          }
        });

    HTML space1 = new HTML("");
    searchTypePanel.add(searchTypeAnd);
    searchTypePanel.add(space1);
    searchTypePanel.add(searchTypeOr);
    searchTypePanel.setCellWidth(space1, "10");

    table.setWidget(0, 0, advancedView);
    table.setWidget(1, 0, compactResultsView);
    table.setWidget(2, 0, showPropertyGroups);
    table.setWidget(3, 0, saveUserNews);
    table.setWidget(4, 0, saveSearchButton);
    table.setWidget(4, 1, searchSavedName);

    resultsPageText = new HTML(Main.i18n("search.page.results"));
    table.setWidget(5, 0, resultsPageText);
    table.setWidget(5, 1, resultPage);

    searchTypeText = new HTML(Main.i18n("search.type"));
    table.setHTML(6, 0, Main.i18n("search.type"));
    table.setWidget(6, 1, searchTypePanel);

    table.setWidget(6, 0, cleanButton);
    table.setWidget(6, 1, searchButton);

    table.setWidget(7, 0, controlSearch);

    table.getCellFormatter().setHorizontalAlignment(4, 0, HasAlignment.ALIGN_RIGHT);
    table.getCellFormatter().setHorizontalAlignment(5, 0, HasAlignment.ALIGN_RIGHT);
    table.getCellFormatter().setHorizontalAlignment(6, 0, HasAlignment.ALIGN_RIGHT);
    table.getFlexCellFormatter().setColSpan(0, 0, 2);
    table.getFlexCellFormatter().setColSpan(1, 0, 2);
    table.getFlexCellFormatter().setColSpan(2, 0, 2);
    table.getFlexCellFormatter().setColSpan(3, 0, 2);
    table.getFlexCellFormatter().setColSpan(7, 0, 2);

    // By default is enabled search mode simple
    table.getCellFormatter().setVisible(3, 0, false);
    table.getCellFormatter().setVisible(4, 0, false);
    table.getCellFormatter().setVisible(4, 1, false);

    searchButton.setStyleName("okm-YesButton");
    saveSearchButton.setStyleName("okm-AddButton");
    saveSearchButton.addStyleName("okm-NoWrap");
    cleanButton.setStyleName("okm-NoButton");
    searchSavedName.setStyleName("okm-Input");
    resultPage.setStyleName("okm-Input");

    initWidget(scrollPanel);
  }
Beispiel #18
0
  public void layout() {

    // clear any backgrounded processes.
    for (Timer t : bgList) {
      t.cancel();
    }

    table = new FlexTable();
    mainPanel.clear();
    if (!StringUtils.isEmpty(name) || !StringUtils.isEmpty(helpId)) {

      String n = StringUtils.isEmpty(name) ? "" : name.trim();
      HorizontalPanel h = new HorizontalPanel();
      h.setWidth("100%");
      HTML lname = new HTML("<b>" + n + "</b>");
      if (shortDesc != null) {
        lname.setTitle(shortDesc);
      }
      GwtUtil.setStyles(lname, "textAlign", "center");
      h.add(lname);
      h.setCellWidth(lname, "100%");

      if (!StringUtils.isEmpty(helpId)) {
        final Widget helpIcon = HelpManager.makeHelpIcon(helpId);
        h.add(helpIcon);
        GwtUtil.setStyles(helpIcon, "marginRight", "11px");
      }
      mainPanel.addNorth(h, 20);
    }

    // setup group by selection
    if (groupByCols != null && groupByCols.size() > 1) {
      EnumFieldDef gb = new EnumFieldDef("groupBy");
      gb.setLabel("Group By");
      gb.setDesc("Select a group by column to update the data table");
      gb.setPreferWidth(200);
      gb.setDefaultValue(curGroupByName);
      for (TableDataView.Column item : headers) {
        if (groupByCols.contains(item.getName())) {
          gb.addItem(item.getName(), item.getTitle());
        }
      }
      final SimpleInputField sif = SimpleInputField.createByDef(gb);
      mainPanel.addNorth(sif, 28);
      sif.getField()
          .addValueChangeHandler(
              new ValueChangeHandler() {
                public void onValueChange(ValueChangeEvent ve) {
                  curGroupByName = sif.getValue();
                  layout();
                }
              });
    }

    ScrollPanel sp = new ScrollPanel();
    sp.add(table);

    mainPanel.add(sp);

    table.setStyleName("firefly-summary-table");
    table.setSize("100%", "100%");
    iconColIdx = headers.size();
    String titleCol = null;

    // render headers
    int colIdx = 0;
    for (int i = 0; i < headers.size(); i++) {
      TableDataView.Column col = headers.get(i);
      if (curGroupByName == null || !curGroupByName.equals(col.getName())) {
        table.setText(0, colIdx, col.getTitle());
        table.getCellFormatter().setStyleName(0, colIdx, "title-bar");
        colIdx++;
        if (titleCol == null) {
          titleCol = col.getName();
        }
      }
    }
    table.setText(0, headers.size(), "");
    table.getCellFormatter().setWidth(0, headers.size(), "100%");

    ArrayList<SearchSummaryItem> itemList = searchItems;

    if (!StringUtils.isEmpty(curGroupByName)) {
      itemList = new ArrayList<SearchSummaryItem>();

      GroupFinder finder = new GroupFinder("");
      List<GroupedSummaryItem> groupList = new ArrayList<GroupedSummaryItem>();
      for (int i = 0; i < searchItems.size(); i++) {
        SearchSummaryItem dsi = searchItems.get(i);
        String cGroupValue = dsi.getValue(curGroupByName);
        GroupedSummaryItem cGroup =
            CollectionUtil.findFirst(groupList, finder.setName(cGroupValue));
        if (cGroup == null) {
          cGroup = new GroupedSummaryItem(cGroupValue);
          groupList.add(cGroup);
          itemList.add(cGroup);
        }
        cGroup.addChild(dsi);
      }
    }

    for (SearchSummaryItem ssi : itemList) {
      ssi.setTitleCol(titleCol);
      layout(ssi, 0);
    }
  }
Beispiel #19
0
  /** Sets up the tool bar. */
  private void setupToolbar() {
    btnNewForm = new PushButton(FormUtil.createImage(images.newform()));
    btnOpenForm = new PushButton(FormUtil.createImage(images.open()));
    btnSaveForm = new PushButton(FormUtil.createImage(images.save()));

    btnAddNewItem = new PushButton(FormUtil.createImage(images.add()));
    btnAddNewChildItem = new PushButton(FormUtil.createImage(images.addchild()));
    btnDeleteItem = new PushButton(FormUtil.createImage(images.delete()));
    btnMoveItemUp = new PushButton(FormUtil.createImage(images.moveup()));
    btnMoveItemDown = new PushButton(FormUtil.createImage(images.movedown()));

    btnAlignLeft = new PushButton(FormUtil.createImage(images.justifyleft()));
    btnAlignRight = new PushButton(FormUtil.createImage(images.justifyright()));
    btnAlignTop = new PushButton(FormUtil.createImage(images.alignTop()));
    btnAlignBottom = new PushButton(FormUtil.createImage(images.alignBottom()));
    btnSameWidth = new PushButton(FormUtil.createImage(images.samewidth()));
    btnSameHeight = new PushButton(FormUtil.createImage(images.sameheight()));
    btnSameSize = new PushButton(FormUtil.createImage(images.samesize()));

    btnCut = new PushButton(FormUtil.createImage(images.cut()));
    btnCopy = new PushButton(FormUtil.createImage(images.copy()));
    btnPaste = new PushButton(FormUtil.createImage(images.paste()));
    btnRefresh = new PushButton(FormUtil.createImage(images.refresh()));

    btnUndo = new PushButton(FormUtil.createImage(images.undo()));
    btnRedo = new PushButton(FormUtil.createImage(images.redo()));

    btnNewForm.setTitle(LocaleText.get("newForm"));
    btnSaveForm.setTitle(LocaleText.get("save"));

    btnAddNewItem.setTitle(LocaleText.get("addNew"));
    btnAddNewChildItem.setTitle(LocaleText.get("addNewChild"));
    btnDeleteItem.setTitle(LocaleText.get("deleteSelected"));
    btnMoveItemUp.setTitle(LocaleText.get("moveUp"));
    btnMoveItemDown.setTitle(LocaleText.get("moveDown"));

    btnCut.setTitle(LocaleText.get("cut"));
    btnCopy.setTitle(LocaleText.get("copy"));
    btnPaste.setTitle(LocaleText.get("paste"));
    btnRefresh.setTitle(LocaleText.get("refresh"));

    btnAlignLeft.setTitle(LocaleText.get("alignLeft"));
    btnAlignRight.setTitle(LocaleText.get("alignRight"));
    btnAlignTop.setTitle(LocaleText.get("alignTop"));
    btnAlignBottom.setTitle(LocaleText.get("alignBottom"));
    btnSameWidth.setTitle(LocaleText.get("makeSameWidth"));
    btnSameHeight.setTitle(LocaleText.get("makeSameHeight"));
    btnSameSize.setTitle(LocaleText.get("makeSameSize"));

    btnUndo.setTitle(LocaleText.get("undo"));
    btnRedo.setTitle(LocaleText.get("redo"));

    if (Context.isOfflineMode()) panel.add(btnNewForm);

    panel.add(btnOpenForm);

    panel.add(btnSaveForm);

    panel.add(separatorWidget);

    panel.add(btnAddNewItem);
    panel.add(btnAddNewChildItem);
    panel.add(btnDeleteItem);
    panel.add(separatorWidget);
    panel.add(btnMoveItemUp);
    panel.add(btnMoveItemDown);

    panel.add(separatorWidget);
    panel.add(btnCut);
    panel.add(btnCopy);
    panel.add(btnPaste);

    panel.add(separatorWidget);
    panel.add(btnRefresh);

    panel.add(separatorWidget);
    panel.add(btnAlignLeft);
    panel.add(btnAlignRight);
    panel.add(btnAlignTop);
    panel.add(btnAlignBottom);

    panel.add(separatorWidget);
    panel.add(btnSameWidth);
    panel.add(btnSameHeight);
    panel.add(btnSameSize);

    panel.add(separatorWidget);
    panel.add(btnUndo);
    panel.add(btnRedo);

    Label label = new Label(FormDesignerUtil.getTitle());
    panel.add(label);
    panel.setCellWidth(label, "100%");
    panel.setCellHorizontalAlignment(label, HasHorizontalAlignment.ALIGN_CENTER);

    label = new Label(LocaleText.get("language"));
    panel.add(label);
    panel.setCellHorizontalAlignment(label, HasHorizontalAlignment.ALIGN_RIGHT);

    populateLocales();

    cbLanguages.addChangeHandler(
        new ChangeHandler() {
          public void onChange(ChangeEvent event) {
            int index = getLocaleIndex(Context.getLocale().getKey());
            ListBox listBox = (ListBox) event.getSource();
            Locale newLocale =
                new Locale(
                    listBox.getValue(listBox.getSelectedIndex()),
                    listBox.getItemText(listBox.getSelectedIndex()));
            if (!controller.changeLocale(newLocale)) cbLanguages.setSelectedIndex(index);
          }
        });

    panel.add(cbLanguages);
    panel.setCellHorizontalAlignment(cbLanguages, HasHorizontalAlignment.ALIGN_RIGHT);

    // Set a 3 pixels spacing between tool bar buttons.
    panel.setSpacing(3);
  }
  private void loadCommentWidget(final boolean forceOpen) {
    clear();
    if (permissibleObject.isAllowComments()) {

      String fileName = permissibleObject.getName();
      final DisclosurePanel commentDisclosurePanel =
          new DisclosurePanel("View comments (" + numComments + ") for " + fileName);

      VerticalPanel commentsPanel = new VerticalPanel();
      commentsPanel.setSpacing(0);
      if (numComments > 0) {
        commentsPanel.setStyleName("commentsPanel");
      }
      commentsPanel.setWidth("100%");

      int renderedComments = 0;
      boolean userCanManage =
          AuthenticationHandler.getInstance().getUser() != null
              && (AuthenticationHandler.getInstance().getUser().isAdministrator()
                  || AuthenticationHandler.getInstance()
                      .getUser()
                      .equals(permissibleObject.getOwner()));
      List<PermissibleObject> sortedComments = new ArrayList<PermissibleObject>();
      if (comments != null) {
        sortedComments.addAll(comments);
      }
      if (!flatten) {
        sortedComments = sortComments(sortedComments);
      }

      for (PermissibleObject obj : sortedComments) {
        final Comment comment = (Comment) obj;
        int commentDepth = getCommentDepth(comment);

        int maxDepth =
            Integer.parseInt(
                maxCommentDepthListBox.getValue(maxCommentDepthListBox.getSelectedIndex()));
        if (commentDepth >= maxDepth) {
          continue;
        }

        boolean userIsAuthorOfComment =
            AuthenticationHandler.getInstance().getUser() != null
                && comment.getAuthor() != null
                && comment.getAuthor().equals(AuthenticationHandler.getInstance().getUser());

        if (userCanManage || userIsAuthorOfComment || comment.isApproved()) {

          FlexTable commentHeaderPanel = new FlexTable();
          commentHeaderPanel.setCellPadding(0);
          commentHeaderPanel.setCellSpacing(0);
          commentHeaderPanel.setStyleName("commentHeader");
          commentHeaderPanel.setWidth("100%");

          String authorLabelString =
              comment.getAuthor() == null ? comment.getEmail() : comment.getAuthor().getUsername();
          if (comment.getAuthor() != null
              && comment.getAuthor().getFirstname() != null
              && !"".equals(comment.getAuthor().getFirstname())) {
            authorLabelString += " (" + comment.getAuthor().getFirstname();
            if (comment.getAuthor() != null
                && comment.getAuthor().getLastname() != null
                && !"".equals(comment.getAuthor().getLastname())) {
              authorLabelString += " " + comment.getAuthor().getLastname() + ")";
            } else {
              authorLabelString += ")";
            }
          }

          Image replyCommentImage = new Image();
          replyCommentImage.setResource(BaseImageBundle.images.reply());
          replyCommentImage.setStyleName("commentActionButton");
          replyCommentImage.setTitle("Reply to this comment");
          replyCommentImage.addClickHandler(
              new ClickHandler() {

                public void onClick(ClickEvent event) {
                  replyToComment(comment);
                }
              });
          int columnIndex = 0;
          commentHeaderPanel.setWidget(0, columnIndex, replyCommentImage);
          commentHeaderPanel
              .getFlexCellFormatter()
              .setHorizontalAlignment(0, columnIndex, HasHorizontalAlignment.ALIGN_LEFT);
          columnIndex++;

          Label authorLabel = new Label(authorLabelString, false);
          commentHeaderPanel.setWidget(0, columnIndex, authorLabel);
          commentHeaderPanel
              .getFlexCellFormatter()
              .setHorizontalAlignment(0, columnIndex, HasHorizontalAlignment.ALIGN_LEFT);
          columnIndex++;
          commentHeaderPanel.setWidget(0, columnIndex, new Label());
          commentHeaderPanel.getFlexCellFormatter().setWidth(0, columnIndex, "100%");
          commentHeaderPanel
              .getFlexCellFormatter()
              .setHorizontalAlignment(0, columnIndex, HasHorizontalAlignment.ALIGN_RIGHT);
          columnIndex++;
          Label dateLabel = new Label(new Date(comment.getCommentDate()).toLocaleString(), false);
          commentHeaderPanel.setWidget(0, columnIndex, dateLabel);
          if (!userCanManage && !userIsAuthorOfComment) {
            DOM.setStyleAttribute(dateLabel.getElement(), "padding", "0 5px 0 0");
          }
          commentHeaderPanel
              .getFlexCellFormatter()
              .setHorizontalAlignment(0, columnIndex, HasHorizontalAlignment.ALIGN_RIGHT);

          columnIndex++;
          if (userCanManage || userIsAuthorOfComment) {
            if (userCanManage && !comment.isApproved()) {
              final Image approveCommentImage = new Image();
              approveCommentImage.setResource(BaseImageBundle.images.approve());
              approveCommentImage.setStyleName("commentActionButton");
              approveCommentImage.setTitle("Approve comment");
              approveCommentImage.addClickHandler(
                  new ClickHandler() {

                    public void onClick(ClickEvent event) {
                      workingOnComment = comment;
                      approveComment(comment);
                    }
                  });
              commentHeaderPanel.setWidget(0, columnIndex, approveCommentImage);
              commentHeaderPanel
                  .getFlexCellFormatter()
                  .setHorizontalAlignment(0, columnIndex, HasHorizontalAlignment.ALIGN_RIGHT);
              columnIndex++;
            } else {
              // put 16x16 spacer here for alignment
              final Image approveSpacerImage = new Image();
              approveSpacerImage.setResource(BaseImageBundle.images.empty16x16());
              approveSpacerImage.setStyleName("commentActionButton");
              commentHeaderPanel.setWidget(0, columnIndex, approveSpacerImage);
              commentHeaderPanel
                  .getFlexCellFormatter()
                  .setHorizontalAlignment(0, columnIndex, HasHorizontalAlignment.ALIGN_RIGHT);
              columnIndex++;
            }
            Image deleteCommentImage = new Image();
            deleteCommentImage.setResource(BaseImageBundle.images.delete());
            deleteCommentImage.setStyleName("commentActionButton");
            deleteCommentImage.setTitle("Remove comment");
            deleteCommentImage.addClickHandler(
                new ClickHandler() {

                  public void onClick(ClickEvent event) {
                    IDialogCallback callback =
                        new IDialogCallback() {

                          public void cancelPressed() {}

                          public void okPressed() {
                            deleteComment(comment);
                          }
                        };
                    PromptDialogBox dialogBox =
                        new PromptDialogBox("Question", "Yes", null, "No", false, true);
                    dialogBox.setContent(
                        new Label(
                            "Delete comment by "
                                + (comment.getAuthor() == null
                                    ? comment.getEmail()
                                    : comment.getAuthor().getUsername())
                                + "?"));
                    dialogBox.setCallback(callback);
                    dialogBox.center();
                  }
                });
            commentHeaderPanel.setWidget(0, columnIndex, deleteCommentImage);
            commentHeaderPanel
                .getFlexCellFormatter()
                .setHorizontalAlignment(0, columnIndex, HasHorizontalAlignment.ALIGN_RIGHT);
            columnIndex++;
          }

          if (commentDepth > 0) {
            HorizontalPanel commentHeaderPanelWrapper = new HorizontalPanel();
            commentHeaderPanelWrapper.setWidth("100%");
            Label spacerLabel = new Label();
            commentHeaderPanelWrapper.add(spacerLabel);
            if (!flatten) {
              commentHeaderPanelWrapper.setCellWidth(spacerLabel, (commentDepth * 20) + "px");
            }
            commentHeaderPanelWrapper.add(commentHeaderPanel);
            commentsPanel.add(commentHeaderPanelWrapper);
          } else {
            commentsPanel.add(commentHeaderPanel);
          }

          // Label commentLabel = new Label(comment.getId() + " " + comment.getComment(), true);
          Label commentLabel = new Label(comment.getComment(), true);
          if (comment.isApproved()) {
            commentLabel.setStyleName("comment");
          } else if (userCanManage || userIsAuthorOfComment) {
            commentLabel.setStyleName("commentAwaitingApproval");
          }

          if (commentDepth > 0) {
            HorizontalPanel commentHeaderPanelWrapper = new HorizontalPanel();
            commentHeaderPanelWrapper.setWidth("100%");
            Label spacerLabel = new Label();
            commentHeaderPanelWrapper.add(spacerLabel);
            if (!flatten) {
              commentHeaderPanelWrapper.setCellWidth(spacerLabel, (commentDepth * 20) + "px");
            }
            commentHeaderPanelWrapper.add(commentLabel);
            commentsPanel.add(commentHeaderPanelWrapper);
          } else {
            commentsPanel.add(commentLabel);
          }
          renderedComments++;
        }
      }

      final FlexTable mainPanel = new FlexTable();
      mainPanel.setWidth("100%");
      int row = 0;
      if (paginate) {
        mainPanel.setWidget(row, 0, createButtonPanel(mainPanel, forceOpen));
        mainPanel
            .getCellFormatter()
            .setHorizontalAlignment(row++, 0, HasHorizontalAlignment.ALIGN_LEFT);
      }
      mainPanel.setWidget(row, 0, commentsPanel);
      mainPanel.getCellFormatter().setWidth(row++, 0, "100%");

      commentDisclosurePanel.setContent(mainPanel);
      commentDisclosurePanel.setOpen(renderedComments == 0 || forceOpen);
      commentDisclosurePanel.setWidth("100%");
      add(createCommentPostPanel());
      add(commentDisclosurePanel);
    }
    if (layoutCallback != null) {
      layoutCallback.layoutComplete();
    }
  }
  private void showAddItemAttributeDialog(final VkMenuBarHorizontal menuBar) {
    final DialogBox origDialog = new DialogBox();
    DOM.setStyleAttribute(origDialog.getElement(), "zIndex", Integer.toString(Integer.MAX_VALUE));
    final VerticalPanel dialog = new VerticalPanel();
    origDialog.add(dialog);
    origDialog.setText("Provide html for item name and JS to execute on its click");
    dialog.setWidth("100%");
    dialog.setHorizontalAlignment(VerticalPanel.ALIGN_CENTER);
    DOM.setStyleAttribute(origDialog.getElement(), "zIndex", Integer.MAX_VALUE + "");

    HorizontalPanel nameHp = new HorizontalPanel();
    nameHp.setWidth("100%");
    dialog.add(nameHp);
    nameHp.setHorizontalAlignment(HorizontalPanel.ALIGN_RIGHT);
    nameHp.add(new Label("Name HTML:"));
    nameHp.setHorizontalAlignment(HorizontalPanel.ALIGN_LEFT);
    nameHp.setCellWidth(nameHp.getWidget(0), "35%");
    final TextArea nameTextArea = new TextArea();
    nameHp.add(nameTextArea);
    nameTextArea.setSize("300px", "100px");
    Timer t =
        new Timer() {
          @Override
          public void run() {
            VkDesignerUtil.centerDialog(dialog);
            nameTextArea.setFocus(true);
          }
        };
    t.schedule(100);
    HorizontalPanel jsHp = new HorizontalPanel();
    jsHp.setWidth("100%");
    dialog.add(jsHp);
    jsHp.setHorizontalAlignment(HorizontalPanel.ALIGN_RIGHT);
    jsHp.add(new Label("Command Js:"));
    jsHp.setHorizontalAlignment(HorizontalPanel.ALIGN_LEFT);
    jsHp.setCellWidth(jsHp.getWidget(0), "35%");
    final VkEventTextArea jsTextArea = new VkEventTextArea();
    jsTextArea.setSize("300px", "100px");
    jsHp.add(jsTextArea);
    HorizontalPanel buttonsPanel = new HorizontalPanel();
    dialog.add(buttonsPanel);
    Button saveButton = new Button("Save");
    buttonsPanel.add(saveButton);
    saveButton.addClickHandler(
        new ClickHandler() {
          @Override
          public void onClick(ClickEvent event) {
            menuBar.getCommandJs().put(menuBar.getItemCount(), jsTextArea.getText());
            addMenuItem(menuBar, nameTextArea.getText(), jsTextArea.getText());
            origDialog.hide();
          }
        });
    Button cancelButton = new Button("Cancel");
    buttonsPanel.add(cancelButton);
    cancelButton.addClickHandler(
        new ClickHandler() {
          @Override
          public void onClick(ClickEvent event) {
            origDialog.hide();
          }
        });
    origDialog.center();
    origDialog.setPopupPosition(origDialog.getPopupLeft() + 1, origDialog.getPopupTop());
  }
Beispiel #22
0
  /** **************************************************************** ObjectWidget */
  public void setValue(FromServer element) {
    boolean edit;
    Supplier supp;
    CustomCaptionPanel frame;

    super.setValue(element);
    main.clear();

    if (element != null) {
      supp = (Supplier) element.getObject("supplier");
      edit = (supp.iAmReference() && element.sharingStatus() <= ACL.ACL_READWRITE);
    } else {
      edit = false;
    }

    frame = new CustomCaptionPanel("Attributi");
    main.add(frame);
    main.setCellWidth(frame, "50%");

    supplier = new NameLabelWidget();
    frame.addPair("Fornitore", widgetWarp("supplier", supplier));

    status = Order.doOrderStatusSelector(edit);
    frame.addPair("Stato", widgetWarp("status", status));

    if (edit == true) anticipated = new PercentageBox();
    else anticipated = new PercentageViewer();

    frame.addPair("Anticipo", widgetWarp("anticipated", (Widget) anticipated));

    frame = new CustomCaptionPanel("Date");
    main.add(frame);
    main.setCellWidth(frame, "50%");

    if (edit == true) {
      BankMovementSelector bms;

      startdate = new DateSelector();
      enddate = new DateSelector();
      shippingdate = new DateSelector();

      bms = new BankMovementSelector();
      bms.setDefaultType(BankMovement.ORDER_PAYMENT);
      bms.setDefaultTargetSupplier(element.getObject("supplier"));
      bms.setDefaultNote("Pagamento ordine a " + element.getObject("supplier").getString("name"));
      payment = bms;
    } else {
      startdate = new DateViewer();
      enddate = new DateViewer();
      shippingdate = new DateViewer();
      payment = new BankMovementCellViewer();
    }

    frame.addPair("Data apertura", widgetWarp("startdate", (Widget) startdate));
    frame.addPair("Data chiusura", widgetWarp("enddate", (Widget) enddate));
    frame.addPair("Data consegna", widgetWarp("shippingdate", (Widget) shippingdate));

    if (Session.getGAS().getBool("use_bank") == true)
      frame.addPair("Pagamento", widgetWarp("payment_event", (Widget) payment));

    if (element != null) {
      supplier.setValue(element.getObject("supplier"));
      status.setVal(element.getInt("status"));
      anticipated.setValue(element.getString("anticipated"));
      startdate.setValue(element.getDate("startdate"));
      enddate.setValue(element.getDate("enddate"));
      shippingdate.setValue(element.getDate("shippingdate"));
      payment.setValue(element.getObject("payment_event"));
    }
  }
  private Widget createButtonPanel(final FlexTable mainPanel, final boolean forceOpen) {
    final IconButton reloadImageButton =
        new IconButton(
            "Refresh",
            true,
            BaseImageBundle.images.refresh_16(),
            BaseImageBundle.images.refresh_16(),
            BaseImageBundle.images.refresh_16(),
            BaseImageBundle.images.refresh_disabled_16());
    reloadImageButton.setSTYLE("commentToolBarButton");
    reloadImageButton.setTitle("Refresh comments");
    reloadImageButton.addClickHandler(
        new ClickHandler() {
          public void onClick(ClickEvent event) {
            BaseServiceCache.getService()
                .getPageInfo(
                    permissibleObject,
                    Comment.class.getName(),
                    pageSize,
                    new AsyncCallback<PageInfo>() {
                      public void onFailure(Throwable caught) {};

                      public void onSuccess(PageInfo pageInfo) {
                        numComments = pageInfo.getTotalRowCount();
                        lastPageNumber = pageInfo.getLastPageNumber();
                        pageCache.clear();
                        fetchPage();
                      };
                    });
          }
        });

    final IconButton sortImageButton =
        new IconButton(
            "Sort " + (sortDescending ? "Ascending" : "Descending"),
            true,
            BaseImageBundle.images.sort(),
            BaseImageBundle.images.sort(),
            BaseImageBundle.images.sort(),
            BaseImageBundle.images.sort());
    sortImageButton.setSTYLE("commentToolBarButton");
    sortImageButton.setTitle(
        sortDescending ? "Show oldest comments first" : "Show most recent comments first");
    sortImageButton.addClickHandler(
        new ClickHandler() {
          public void onClick(ClickEvent event) {
            sortDescending = !sortDescending;
            // this could be optimized if we have all the pages, then we have all the data
            // we could do it all on the client
            pageCache.clear();
            fetchPage();
          }
        });

    IconButton flattenImageButton = null;
    if (flatten) {
      flattenImageButton =
          new IconButton(
              "Hierarchy",
              true,
              BaseImageBundle.images.hierarchy(),
              BaseImageBundle.images.hierarchy(),
              BaseImageBundle.images.hierarchy(),
              BaseImageBundle.images.hierarchy());
      flattenImageButton.setTitle("Build a comment hierarchy");
    } else {
      flattenImageButton =
          new IconButton(
              "Flatten",
              true,
              BaseImageBundle.images.flatten(),
              BaseImageBundle.images.flatten(),
              BaseImageBundle.images.flatten(),
              BaseImageBundle.images.flatten());
      flattenImageButton.setTitle("Flatten the comment hierarchy");
    }
    flattenImageButton.setSTYLE("commentToolBarButton");
    flattenImageButton.addClickHandler(
        new ClickHandler() {
          public void onClick(ClickEvent event) {
            flatten = !flatten;
            loadCommentWidget(forceOpen);
          }
        });

    HorizontalPanel buttonPanel = new HorizontalPanel();
    buttonPanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);
    buttonPanel.add(createPageControllerPanel(mainPanel));
    Label spacer1 = new Label();
    buttonPanel.add(spacer1);
    buttonPanel.setCellWidth(spacer1, "20px");
    buttonPanel.add(reloadImageButton);
    buttonPanel.add(sortImageButton);
    buttonPanel.add(flattenImageButton);
    Label maxCommentDepthLabel = new Label("Max Depth", false);
    maxCommentDepthLabel.setTitle("Set the maximum depth of comments to show");
    Label spacer2 = new Label();
    buttonPanel.add(spacer2);
    buttonPanel.setCellWidth(spacer2, "20px");
    buttonPanel.add(maxCommentDepthLabel);
    buttonPanel.add(maxCommentDepthListBox);
    return buttonPanel;
  }
  public com.google.gwt.user.client.ui.Widget createAndBindUi(
      final com.rhiscom.bpm.console.client.ui.quadrature.CuadraturaPagosCMRViewImpl owner) {

    com.rhiscom.bpm.console.client.ui.quadrature.CuadraturaPagosCMRViewImpl_BinderImpl_GenBundle
        clientBundleFieldNameUnlikelyToCollideWithUserSpecifiedFieldOkay =
            (com.rhiscom.bpm.console.client.ui.quadrature
                    .CuadraturaPagosCMRViewImpl_BinderImpl_GenBundle)
                GWT.create(
                    com.rhiscom.bpm.console.client.ui.quadrature
                        .CuadraturaPagosCMRViewImpl_BinderImpl_GenBundle.class);
    com.rhiscom.bpm.console.client.ui.quadrature.CuadraturaPagosCMRViewImpl_BinderImpl_GenCss_style
        style = clientBundleFieldNameUnlikelyToCollideWithUserSpecifiedFieldOkay.style();
    java.lang.String domId0 = com.google.gwt.dom.client.Document.get().createUniqueId();
    com.google.gwt.user.client.ui.Label title =
        (com.google.gwt.user.client.ui.Label) GWT.create(com.google.gwt.user.client.ui.Label.class);
    com.google.gwt.user.client.ui.HTMLPanel htmlPanel =
        new com.google.gwt.user.client.ui.HTMLPanel(
            template
                .html1(
                    "" + style.titleBackground() + "",
                    "" + style.titleBackgroundPosition() + "",
                    domId0)
                .asString());
    com.google.gwt.user.client.ui.Label lblError =
        (com.google.gwt.user.client.ui.Label) GWT.create(com.google.gwt.user.client.ui.Label.class);
    com.google.gwt.user.client.ui.HorizontalPanel f_HorizontalPanel3 =
        (com.google.gwt.user.client.ui.HorizontalPanel)
            GWT.create(com.google.gwt.user.client.ui.HorizontalPanel.class);
    com.google.gwt.user.client.ui.Label f_Label6 =
        (com.google.gwt.user.client.ui.Label) GWT.create(com.google.gwt.user.client.ui.Label.class);
    com.google.gwt.user.client.ui.ListBox sucursalSeleccionada =
        (com.google.gwt.user.client.ui.ListBox)
            GWT.create(com.google.gwt.user.client.ui.ListBox.class);
    com.google.gwt.user.client.ui.VerticalPanel f_VerticalPanel5 =
        (com.google.gwt.user.client.ui.VerticalPanel)
            GWT.create(com.google.gwt.user.client.ui.VerticalPanel.class);
    com.google.gwt.user.client.ui.Label f_Label8 =
        (com.google.gwt.user.client.ui.Label) GWT.create(com.google.gwt.user.client.ui.Label.class);
    com.google.gwt.user.datepicker.client.DateBox dateOfBusinessDateBox =
        owner.dateOfBusinessDateBox;
    com.google.gwt.user.client.ui.VerticalPanel f_VerticalPanel7 =
        (com.google.gwt.user.client.ui.VerticalPanel)
            GWT.create(com.google.gwt.user.client.ui.VerticalPanel.class);
    com.google.gwt.user.client.ui.Button filterButton =
        (com.google.gwt.user.client.ui.Button)
            GWT.create(com.google.gwt.user.client.ui.Button.class);
    com.google.gwt.user.client.ui.Button excelButton =
        (com.google.gwt.user.client.ui.Button)
            GWT.create(com.google.gwt.user.client.ui.Button.class);
    com.google.gwt.user.client.ui.Label f_Label10 =
        (com.google.gwt.user.client.ui.Label) GWT.create(com.google.gwt.user.client.ui.Label.class);
    com.google.gwt.user.client.ui.Label lblVersionPOS =
        (com.google.gwt.user.client.ui.Label) GWT.create(com.google.gwt.user.client.ui.Label.class);
    com.google.gwt.user.client.ui.VerticalPanel f_VerticalPanel9 =
        (com.google.gwt.user.client.ui.VerticalPanel)
            GWT.create(com.google.gwt.user.client.ui.VerticalPanel.class);
    com.google.gwt.user.client.ui.HorizontalPanel f_HorizontalPanel4 =
        (com.google.gwt.user.client.ui.HorizontalPanel)
            GWT.create(com.google.gwt.user.client.ui.HorizontalPanel.class);
    com.google.gwt.user.client.ui.Label f_Label14 =
        (com.google.gwt.user.client.ui.Label) GWT.create(com.google.gwt.user.client.ui.Label.class);
    com.google.gwt.user.client.ui.Label f_Label15 =
        (com.google.gwt.user.client.ui.Label) GWT.create(com.google.gwt.user.client.ui.Label.class);
    com.google.gwt.user.client.ui.VerticalPanel f_VerticalPanel13 =
        (com.google.gwt.user.client.ui.VerticalPanel)
            GWT.create(com.google.gwt.user.client.ui.VerticalPanel.class);
    com.google.gwt.user.client.ui.Label f_Label18 =
        (com.google.gwt.user.client.ui.Label) GWT.create(com.google.gwt.user.client.ui.Label.class);
    com.google.gwt.user.client.ui.Label lblPagoNormal =
        (com.google.gwt.user.client.ui.Label) GWT.create(com.google.gwt.user.client.ui.Label.class);
    com.google.gwt.user.client.ui.HorizontalPanel f_HorizontalPanel17 =
        (com.google.gwt.user.client.ui.HorizontalPanel)
            GWT.create(com.google.gwt.user.client.ui.HorizontalPanel.class);
    com.google.gwt.user.client.ui.Label f_Label20 =
        (com.google.gwt.user.client.ui.Label) GWT.create(com.google.gwt.user.client.ui.Label.class);
    com.google.gwt.user.client.ui.Label lblPagoRepactado =
        (com.google.gwt.user.client.ui.Label) GWT.create(com.google.gwt.user.client.ui.Label.class);
    com.google.gwt.user.client.ui.HorizontalPanel f_HorizontalPanel19 =
        (com.google.gwt.user.client.ui.HorizontalPanel)
            GWT.create(com.google.gwt.user.client.ui.HorizontalPanel.class);
    com.google.gwt.user.client.ui.Label f_Label22 =
        (com.google.gwt.user.client.ui.Label) GWT.create(com.google.gwt.user.client.ui.Label.class);
    com.google.gwt.user.client.ui.Label lblPagoAnulado =
        (com.google.gwt.user.client.ui.Label) GWT.create(com.google.gwt.user.client.ui.Label.class);
    com.google.gwt.user.client.ui.HorizontalPanel f_HorizontalPanel21 =
        (com.google.gwt.user.client.ui.HorizontalPanel)
            GWT.create(com.google.gwt.user.client.ui.HorizontalPanel.class);
    com.google.gwt.user.client.ui.Label f_Label24 =
        (com.google.gwt.user.client.ui.Label) GWT.create(com.google.gwt.user.client.ui.Label.class);
    com.google.gwt.user.client.ui.Label lblTotalPagos =
        (com.google.gwt.user.client.ui.Label) GWT.create(com.google.gwt.user.client.ui.Label.class);
    com.google.gwt.user.client.ui.HorizontalPanel f_HorizontalPanel23 =
        (com.google.gwt.user.client.ui.HorizontalPanel)
            GWT.create(com.google.gwt.user.client.ui.HorizontalPanel.class);
    com.google.gwt.user.client.ui.VerticalPanel f_VerticalPanel16 =
        (com.google.gwt.user.client.ui.VerticalPanel)
            GWT.create(com.google.gwt.user.client.ui.VerticalPanel.class);
    com.google.gwt.user.client.ui.VerticalPanel f_VerticalPanel12 =
        (com.google.gwt.user.client.ui.VerticalPanel)
            GWT.create(com.google.gwt.user.client.ui.VerticalPanel.class);
    com.google.gwt.user.client.ui.Label f_Label27 =
        (com.google.gwt.user.client.ui.Label) GWT.create(com.google.gwt.user.client.ui.Label.class);
    com.google.gwt.user.client.ui.Label f_Label28 =
        (com.google.gwt.user.client.ui.Label) GWT.create(com.google.gwt.user.client.ui.Label.class);
    com.google.gwt.user.client.ui.VerticalPanel f_VerticalPanel26 =
        (com.google.gwt.user.client.ui.VerticalPanel)
            GWT.create(com.google.gwt.user.client.ui.VerticalPanel.class);
    com.google.gwt.user.client.ui.Label f_Label30 =
        (com.google.gwt.user.client.ui.Label) GWT.create(com.google.gwt.user.client.ui.Label.class);
    com.google.gwt.user.client.ui.Label lblTotalAbonos =
        (com.google.gwt.user.client.ui.Label) GWT.create(com.google.gwt.user.client.ui.Label.class);
    com.google.gwt.user.client.ui.HorizontalPanel f_HorizontalPanel29 =
        (com.google.gwt.user.client.ui.HorizontalPanel)
            GWT.create(com.google.gwt.user.client.ui.HorizontalPanel.class);
    com.google.gwt.user.client.ui.Label f_Label32 =
        (com.google.gwt.user.client.ui.Label) GWT.create(com.google.gwt.user.client.ui.Label.class);
    com.google.gwt.user.client.ui.Label lblTotalAbonoNormal =
        (com.google.gwt.user.client.ui.Label) GWT.create(com.google.gwt.user.client.ui.Label.class);
    com.google.gwt.user.client.ui.HorizontalPanel f_HorizontalPanel31 =
        (com.google.gwt.user.client.ui.HorizontalPanel)
            GWT.create(com.google.gwt.user.client.ui.HorizontalPanel.class);
    com.google.gwt.user.client.ui.HorizontalPanel f_HorizontalPanel33 =
        (com.google.gwt.user.client.ui.HorizontalPanel)
            GWT.create(com.google.gwt.user.client.ui.HorizontalPanel.class);
    com.google.gwt.user.client.ui.Label f_Label35 =
        (com.google.gwt.user.client.ui.Label) GWT.create(com.google.gwt.user.client.ui.Label.class);
    com.google.gwt.user.client.ui.Label lblTotalAbonosSCTFA =
        (com.google.gwt.user.client.ui.Label) GWT.create(com.google.gwt.user.client.ui.Label.class);
    com.google.gwt.user.client.ui.HorizontalPanel f_HorizontalPanel34 =
        (com.google.gwt.user.client.ui.HorizontalPanel)
            GWT.create(com.google.gwt.user.client.ui.HorizontalPanel.class);
    com.google.gwt.user.client.ui.VerticalPanel f_VerticalPanel25 =
        (com.google.gwt.user.client.ui.VerticalPanel)
            GWT.create(com.google.gwt.user.client.ui.VerticalPanel.class);
    com.google.gwt.user.client.ui.Label f_Label38 =
        (com.google.gwt.user.client.ui.Label) GWT.create(com.google.gwt.user.client.ui.Label.class);
    com.google.gwt.user.client.ui.Label f_Label39 =
        (com.google.gwt.user.client.ui.Label) GWT.create(com.google.gwt.user.client.ui.Label.class);
    com.google.gwt.user.client.ui.VerticalPanel f_VerticalPanel37 =
        (com.google.gwt.user.client.ui.VerticalPanel)
            GWT.create(com.google.gwt.user.client.ui.VerticalPanel.class);
    com.google.gwt.user.client.ui.Label f_Label41 =
        (com.google.gwt.user.client.ui.Label) GWT.create(com.google.gwt.user.client.ui.Label.class);
    com.google.gwt.user.client.ui.Label lblTrx217 =
        (com.google.gwt.user.client.ui.Label) GWT.create(com.google.gwt.user.client.ui.Label.class);
    com.google.gwt.user.client.ui.HorizontalPanel f_HorizontalPanel40 =
        (com.google.gwt.user.client.ui.HorizontalPanel)
            GWT.create(com.google.gwt.user.client.ui.HorizontalPanel.class);
    com.google.gwt.user.client.ui.Label f_Label43 =
        (com.google.gwt.user.client.ui.Label) GWT.create(com.google.gwt.user.client.ui.Label.class);
    com.google.gwt.user.client.ui.Label lblTrx402 =
        (com.google.gwt.user.client.ui.Label) GWT.create(com.google.gwt.user.client.ui.Label.class);
    com.google.gwt.user.client.ui.HorizontalPanel f_HorizontalPanel42 =
        (com.google.gwt.user.client.ui.HorizontalPanel)
            GWT.create(com.google.gwt.user.client.ui.HorizontalPanel.class);
    com.google.gwt.user.client.ui.Label f_Label45 =
        (com.google.gwt.user.client.ui.Label) GWT.create(com.google.gwt.user.client.ui.Label.class);
    com.google.gwt.user.client.ui.HorizontalPanel f_HorizontalPanel44 =
        (com.google.gwt.user.client.ui.HorizontalPanel)
            GWT.create(com.google.gwt.user.client.ui.HorizontalPanel.class);
    com.google.gwt.user.client.ui.Label f_Label47 =
        (com.google.gwt.user.client.ui.Label) GWT.create(com.google.gwt.user.client.ui.Label.class);
    com.google.gwt.user.client.ui.Label lblTotalCRCMR =
        (com.google.gwt.user.client.ui.Label) GWT.create(com.google.gwt.user.client.ui.Label.class);
    com.google.gwt.user.client.ui.HorizontalPanel f_HorizontalPanel46 =
        (com.google.gwt.user.client.ui.HorizontalPanel)
            GWT.create(com.google.gwt.user.client.ui.HorizontalPanel.class);
    com.google.gwt.user.client.ui.VerticalPanel f_VerticalPanel36 =
        (com.google.gwt.user.client.ui.VerticalPanel)
            GWT.create(com.google.gwt.user.client.ui.VerticalPanel.class);
    com.google.gwt.user.client.ui.HorizontalPanel f_HorizontalPanel11 =
        (com.google.gwt.user.client.ui.HorizontalPanel)
            GWT.create(com.google.gwt.user.client.ui.HorizontalPanel.class);
    com.google.gwt.user.client.ui.Label f_Label51 =
        (com.google.gwt.user.client.ui.Label) GWT.create(com.google.gwt.user.client.ui.Label.class);
    com.google.gwt.user.client.ui.Label f_Label52 =
        (com.google.gwt.user.client.ui.Label) GWT.create(com.google.gwt.user.client.ui.Label.class);
    com.google.gwt.user.client.ui.VerticalPanel f_VerticalPanel50 =
        (com.google.gwt.user.client.ui.VerticalPanel)
            GWT.create(com.google.gwt.user.client.ui.VerticalPanel.class);
    com.google.gwt.user.client.ui.Label f_Label54 =
        (com.google.gwt.user.client.ui.Label) GWT.create(com.google.gwt.user.client.ui.Label.class);
    com.google.gwt.user.client.ui.Label lblTotalPagosSAT =
        (com.google.gwt.user.client.ui.Label) GWT.create(com.google.gwt.user.client.ui.Label.class);
    com.google.gwt.user.client.ui.HorizontalPanel f_HorizontalPanel53 =
        (com.google.gwt.user.client.ui.HorizontalPanel)
            GWT.create(com.google.gwt.user.client.ui.HorizontalPanel.class);
    com.google.gwt.user.client.ui.Label f_Label56 =
        (com.google.gwt.user.client.ui.Label) GWT.create(com.google.gwt.user.client.ui.Label.class);
    com.google.gwt.user.client.ui.Label lblTotalAnulacionesSAT =
        (com.google.gwt.user.client.ui.Label) GWT.create(com.google.gwt.user.client.ui.Label.class);
    com.google.gwt.user.client.ui.HorizontalPanel f_HorizontalPanel55 =
        (com.google.gwt.user.client.ui.HorizontalPanel)
            GWT.create(com.google.gwt.user.client.ui.HorizontalPanel.class);
    com.google.gwt.user.client.ui.Label f_Label58 =
        (com.google.gwt.user.client.ui.Label) GWT.create(com.google.gwt.user.client.ui.Label.class);
    com.google.gwt.user.client.ui.HorizontalPanel f_HorizontalPanel57 =
        (com.google.gwt.user.client.ui.HorizontalPanel)
            GWT.create(com.google.gwt.user.client.ui.HorizontalPanel.class);
    com.google.gwt.user.client.ui.Label f_Label60 =
        (com.google.gwt.user.client.ui.Label) GWT.create(com.google.gwt.user.client.ui.Label.class);
    com.google.gwt.user.client.ui.Label lblTotalFinalSAT =
        (com.google.gwt.user.client.ui.Label) GWT.create(com.google.gwt.user.client.ui.Label.class);
    com.google.gwt.user.client.ui.HorizontalPanel f_HorizontalPanel59 =
        (com.google.gwt.user.client.ui.HorizontalPanel)
            GWT.create(com.google.gwt.user.client.ui.HorizontalPanel.class);
    com.google.gwt.user.client.ui.VerticalPanel f_VerticalPanel49 =
        (com.google.gwt.user.client.ui.VerticalPanel)
            GWT.create(com.google.gwt.user.client.ui.VerticalPanel.class);
    com.google.gwt.user.client.ui.Label f_Label63 =
        (com.google.gwt.user.client.ui.Label) GWT.create(com.google.gwt.user.client.ui.Label.class);
    com.google.gwt.user.client.ui.Label f_Label64 =
        (com.google.gwt.user.client.ui.Label) GWT.create(com.google.gwt.user.client.ui.Label.class);
    com.google.gwt.user.client.ui.VerticalPanel f_VerticalPanel62 =
        (com.google.gwt.user.client.ui.VerticalPanel)
            GWT.create(com.google.gwt.user.client.ui.VerticalPanel.class);
    com.google.gwt.user.client.ui.Label f_Label66 =
        (com.google.gwt.user.client.ui.Label) GWT.create(com.google.gwt.user.client.ui.Label.class);
    com.google.gwt.user.client.ui.Label lblTotalPagosRSAT =
        (com.google.gwt.user.client.ui.Label) GWT.create(com.google.gwt.user.client.ui.Label.class);
    com.google.gwt.user.client.ui.HorizontalPanel f_HorizontalPanel65 =
        (com.google.gwt.user.client.ui.HorizontalPanel)
            GWT.create(com.google.gwt.user.client.ui.HorizontalPanel.class);
    com.google.gwt.user.client.ui.Label f_Label68 =
        (com.google.gwt.user.client.ui.Label) GWT.create(com.google.gwt.user.client.ui.Label.class);
    com.google.gwt.user.client.ui.Label lblTotalAnulacionesRSAT =
        (com.google.gwt.user.client.ui.Label) GWT.create(com.google.gwt.user.client.ui.Label.class);
    com.google.gwt.user.client.ui.HorizontalPanel f_HorizontalPanel67 =
        (com.google.gwt.user.client.ui.HorizontalPanel)
            GWT.create(com.google.gwt.user.client.ui.HorizontalPanel.class);
    com.google.gwt.user.client.ui.Label f_Label70 =
        (com.google.gwt.user.client.ui.Label) GWT.create(com.google.gwt.user.client.ui.Label.class);
    com.google.gwt.user.client.ui.HorizontalPanel f_HorizontalPanel69 =
        (com.google.gwt.user.client.ui.HorizontalPanel)
            GWT.create(com.google.gwt.user.client.ui.HorizontalPanel.class);
    com.google.gwt.user.client.ui.Label f_Label72 =
        (com.google.gwt.user.client.ui.Label) GWT.create(com.google.gwt.user.client.ui.Label.class);
    com.google.gwt.user.client.ui.Label lblTotalFinalRSAT =
        (com.google.gwt.user.client.ui.Label) GWT.create(com.google.gwt.user.client.ui.Label.class);
    com.google.gwt.user.client.ui.HorizontalPanel f_HorizontalPanel71 =
        (com.google.gwt.user.client.ui.HorizontalPanel)
            GWT.create(com.google.gwt.user.client.ui.HorizontalPanel.class);
    com.google.gwt.user.client.ui.VerticalPanel f_VerticalPanel61 =
        (com.google.gwt.user.client.ui.VerticalPanel)
            GWT.create(com.google.gwt.user.client.ui.VerticalPanel.class);
    com.google.gwt.user.client.ui.VerticalPanel f_VerticalPanel73 =
        (com.google.gwt.user.client.ui.VerticalPanel)
            GWT.create(com.google.gwt.user.client.ui.VerticalPanel.class);
    com.google.gwt.user.client.ui.HorizontalPanel f_HorizontalPanel48 =
        (com.google.gwt.user.client.ui.HorizontalPanel)
            GWT.create(com.google.gwt.user.client.ui.HorizontalPanel.class);
    com.google.gwt.user.client.ui.VerticalPanel f_VerticalPanel2 =
        (com.google.gwt.user.client.ui.VerticalPanel)
            GWT.create(com.google.gwt.user.client.ui.VerticalPanel.class);
    com.google.gwt.user.client.ui.VerticalPanel f_VerticalPanel1 =
        (com.google.gwt.user.client.ui.VerticalPanel)
            GWT.create(com.google.gwt.user.client.ui.VerticalPanel.class);

    title.setStyleName("" + style.title() + "");
    title.setText("Cuadratura Pagos CMR");
    htmlPanel.setWidth("100%");
    f_VerticalPanel2.add(htmlPanel);
    f_HorizontalPanel3.setHorizontalAlignment(
        com.google.gwt.user.client.ui.HasHorizontalAlignment.ALIGN_CENTER);
    lblError.setStyleName("lblError");
    lblError.setHorizontalAlignment(
        com.google.gwt.user.client.ui.HasHorizontalAlignment.ALIGN_CENTER);
    lblError.setWidth("99%");
    lblError.setText("Debe ingresar fecha de negocio");
    lblError.setHeight("20px");
    f_HorizontalPanel3.add(lblError);
    f_HorizontalPanel3.setWidth("100%");
    f_VerticalPanel2.add(f_HorizontalPanel3);
    f_Label6.setWidth("100px");
    f_Label6.setText("Sucursal");
    f_Label6.setHeight("");
    f_VerticalPanel5.add(f_Label6);
    sucursalSeleccionada.setWidth("100px");
    sucursalSeleccionada.setHeight("25px");
    f_VerticalPanel5.add(sucursalSeleccionada);
    f_HorizontalPanel4.add(f_VerticalPanel5);
    f_Label8.setText("Fecha de negocio");
    f_VerticalPanel7.add(f_Label8);
    f_VerticalPanel7.add(dateOfBusinessDateBox);
    f_HorizontalPanel4.add(f_VerticalPanel7);
    filterButton.setText("Buscar");
    f_HorizontalPanel4.add(filterButton);
    excelButton.setText("Exportar");
    f_HorizontalPanel4.add(excelButton);
    f_Label10.setText("Versión");
    f_VerticalPanel9.add(f_Label10);
    lblVersionPOS.setStyleName("" + style.secondTitle() + "");
    lblVersionPOS.setWidth("100px");
    lblVersionPOS.setHeight("25px");
    f_VerticalPanel9.add(lblVersionPOS);
    f_HorizontalPanel4.add(f_VerticalPanel9);
    f_HorizontalPanel4.setStyleName("" + style.filters() + "");
    f_HorizontalPanel4.setWidth("100%");
    f_VerticalPanel2.add(f_HorizontalPanel4);
    f_Label14.setStyleName("" + style.secondTitle() + "");
    f_Label14.setText("PLACUAD");
    f_VerticalPanel13.add(f_Label14);
    f_Label15.setStyleName("" + style.secondTitle() + "");
    f_Label15.setWidth("100%");
    f_Label15.setText("CMR");
    f_VerticalPanel13.add(f_Label15);
    f_VerticalPanel13.setWidth("100%");
    f_VerticalPanel12.add(f_VerticalPanel13);
    f_Label18.setHorizontalAlignment(
        com.google.gwt.user.client.ui.HasHorizontalAlignment.ALIGN_LEFT);
    f_Label18.setWidth("215px");
    f_Label18.setText("Pago Normal");
    f_Label18.setHeight("25px");
    f_HorizontalPanel17.add(f_Label18);
    f_HorizontalPanel17.setCellVerticalAlignment(
        f_Label18, com.google.gwt.user.client.ui.HasVerticalAlignment.ALIGN_MIDDLE);
    lblPagoNormal.setWidth("100px");
    lblPagoNormal.setHeight("25px");
    f_HorizontalPanel17.add(lblPagoNormal);
    f_HorizontalPanel17.setCellHorizontalAlignment(
        lblPagoNormal, com.google.gwt.user.client.ui.HasHorizontalAlignment.ALIGN_RIGHT);
    f_HorizontalPanel17.setStyleName("" + style.borderSimple() + "");
    f_HorizontalPanel17.setWidth("100%");
    f_VerticalPanel16.add(f_HorizontalPanel17);
    f_Label20.setWidth("215px");
    f_Label20.setText("Pago Repactado");
    f_Label20.setHeight("25px");
    f_HorizontalPanel19.add(f_Label20);
    lblPagoRepactado.setWidth("100px");
    lblPagoRepactado.setHeight("25px");
    f_HorizontalPanel19.add(lblPagoRepactado);
    f_HorizontalPanel19.setCellHorizontalAlignment(
        lblPagoRepactado, com.google.gwt.user.client.ui.HasHorizontalAlignment.ALIGN_RIGHT);
    f_HorizontalPanel19.setStyleName("" + style.borderSimple() + "");
    f_HorizontalPanel19.setWidth("100%");
    f_VerticalPanel16.add(f_HorizontalPanel19);
    f_Label22.setWidth("215px");
    f_Label22.setText("Pagos Anulados");
    f_Label22.setHeight("25px");
    f_HorizontalPanel21.add(f_Label22);
    lblPagoAnulado.setWidth("100px");
    lblPagoAnulado.setHeight("25px");
    f_HorizontalPanel21.add(lblPagoAnulado);
    f_HorizontalPanel21.setCellHorizontalAlignment(
        lblPagoAnulado, com.google.gwt.user.client.ui.HasHorizontalAlignment.ALIGN_RIGHT);
    f_HorizontalPanel21.setStyleName("" + style.borderSimple() + "");
    f_HorizontalPanel21.setWidth("100%");
    f_VerticalPanel16.add(f_HorizontalPanel21);
    f_Label24.setStyleName("" + style.redTitle() + "");
    f_Label24.setWidth("215px");
    f_Label24.setText("Total Pagos");
    f_Label24.setHeight("25px");
    f_HorizontalPanel23.add(f_Label24);
    lblTotalPagos.setStyleName("" + style.redTitle() + "");
    lblTotalPagos.setWidth("100px");
    lblTotalPagos.setHeight("25px");
    f_HorizontalPanel23.add(lblTotalPagos);
    f_HorizontalPanel23.setCellHorizontalAlignment(
        lblTotalPagos, com.google.gwt.user.client.ui.HasHorizontalAlignment.ALIGN_RIGHT);
    f_HorizontalPanel23.setStyleName("" + style.borderSimple() + "");
    f_HorizontalPanel23.setWidth("100%");
    f_VerticalPanel16.add(f_HorizontalPanel23);
    f_VerticalPanel16.setWidth("100%");
    f_VerticalPanel12.add(f_VerticalPanel16);
    f_VerticalPanel12.setStyleName("" + style.borderDecorator() + "");
    f_VerticalPanel12.setWidth("350px");
    f_HorizontalPanel11.add(f_VerticalPanel12);
    f_Label27.setStyleName("" + style.secondTitle() + "");
    f_Label27.setText("SCTFA");
    f_VerticalPanel26.add(f_Label27);
    f_Label28.setStyleName("" + style.secondTitle() + "");
    f_Label28.setWidth("100%");
    f_Label28.setText("CMR");
    f_VerticalPanel26.add(f_Label28);
    f_VerticalPanel26.setWidth("100%");
    f_VerticalPanel25.add(f_VerticalPanel26);
    f_Label30.setWidth("215px");
    f_Label30.setText("Total Abonos");
    f_Label30.setHeight("25px");
    f_HorizontalPanel29.add(f_Label30);
    f_HorizontalPanel29.setCellWidth(f_Label30, "150px");
    f_HorizontalPanel29.setCellHeight(f_Label30, "25px");
    lblTotalAbonos.setWidth("100px");
    lblTotalAbonos.setHeight("25px");
    f_HorizontalPanel29.add(lblTotalAbonos);
    f_HorizontalPanel29.setCellHorizontalAlignment(
        lblTotalAbonos, com.google.gwt.user.client.ui.HasHorizontalAlignment.ALIGN_RIGHT);
    f_HorizontalPanel29.setCellWidth(lblTotalAbonos, "150px");
    f_HorizontalPanel29.setCellHeight(lblTotalAbonos, "25px");
    f_HorizontalPanel29.setStyleName("" + style.borderSimple() + "");
    f_HorizontalPanel29.setWidth("100%");
    f_VerticalPanel25.add(f_HorizontalPanel29);
    f_Label32.setWidth("215px");
    f_Label32.setText("Total Anulación Abono Normal");
    f_Label32.setHeight("25px");
    f_HorizontalPanel31.add(f_Label32);
    lblTotalAbonoNormal.setHorizontalAlignment(
        com.google.gwt.user.client.ui.HasHorizontalAlignment.ALIGN_RIGHT);
    lblTotalAbonoNormal.setWidth("100px");
    lblTotalAbonoNormal.setHeight("25px");
    f_HorizontalPanel31.add(lblTotalAbonoNormal);
    f_HorizontalPanel31.setCellHorizontalAlignment(
        lblTotalAbonoNormal, com.google.gwt.user.client.ui.HasHorizontalAlignment.ALIGN_RIGHT);
    f_HorizontalPanel31.setCellWidth(lblTotalAbonoNormal, "150px");
    f_HorizontalPanel31.setCellHeight(lblTotalAbonoNormal, "25px");
    f_HorizontalPanel31.setStyleName("" + style.borderSimple() + "");
    f_HorizontalPanel31.setWidth("100%");
    f_VerticalPanel25.add(f_HorizontalPanel31);
    f_HorizontalPanel33.setStyleName("" + style.borderSimple() + "");
    f_HorizontalPanel33.setWidth("100%");
    f_HorizontalPanel33.setHeight("25px");
    f_VerticalPanel25.add(f_HorizontalPanel33);
    f_Label35.setStyleName("" + style.redTitle() + "");
    f_Label35.setWidth("215px");
    f_Label35.setText("Total Abonos");
    f_Label35.setHeight("25px");
    f_HorizontalPanel34.add(f_Label35);
    f_HorizontalPanel34.setCellWidth(f_Label35, "198px");
    f_HorizontalPanel34.setCellHeight(f_Label35, "25px");
    lblTotalAbonosSCTFA.setStyleName("" + style.redTitle() + "");
    lblTotalAbonosSCTFA.setWidth("100px");
    lblTotalAbonosSCTFA.setHeight("25px");
    f_HorizontalPanel34.add(lblTotalAbonosSCTFA);
    f_HorizontalPanel34.setCellHorizontalAlignment(
        lblTotalAbonosSCTFA, com.google.gwt.user.client.ui.HasHorizontalAlignment.ALIGN_RIGHT);
    f_HorizontalPanel34.setStyleName("" + style.borderSimple() + "");
    f_HorizontalPanel34.setWidth("100%");
    f_VerticalPanel25.add(f_HorizontalPanel34);
    f_VerticalPanel25.setStyleName("" + style.borderDecorator() + "");
    f_VerticalPanel25.setWidth("350px");
    f_HorizontalPanel11.add(f_VerticalPanel25);
    f_VerticalPanel36.setHorizontalAlignment(
        com.google.gwt.user.client.ui.HasHorizontalAlignment.ALIGN_LEFT);
    f_Label38.setStyleName("" + style.secondTitle() + "");
    f_Label38.setText("CRCMR");
    f_VerticalPanel37.add(f_Label38);
    f_Label39.setStyleName("" + style.secondTitle() + "");
    f_Label39.setText("CMR");
    f_VerticalPanel37.add(f_Label39);
    f_VerticalPanel37.setWidth("100%");
    f_VerticalPanel36.add(f_VerticalPanel37);
    f_Label41.setWidth("215px");
    f_Label41.setText("TRX 217 y 238");
    f_Label41.setHeight("25px");
    f_HorizontalPanel40.add(f_Label41);
    lblTrx217.setWidth("100px");
    lblTrx217.setHeight("25px");
    f_HorizontalPanel40.add(lblTrx217);
    f_HorizontalPanel40.setCellHorizontalAlignment(
        lblTrx217, com.google.gwt.user.client.ui.HasHorizontalAlignment.ALIGN_RIGHT);
    f_HorizontalPanel40.setStyleName("" + style.borderSimple() + "");
    f_HorizontalPanel40.setWidth("100%");
    f_VerticalPanel36.add(f_HorizontalPanel40);
    f_Label43.setWidth("215px");
    f_Label43.setText("TRX 402 y 401");
    f_Label43.setHeight("25px");
    f_HorizontalPanel42.add(f_Label43);
    lblTrx402.setWidth("100px");
    lblTrx402.setHeight("25px");
    f_HorizontalPanel42.add(lblTrx402);
    f_HorizontalPanel42.setCellHorizontalAlignment(
        lblTrx402, com.google.gwt.user.client.ui.HasHorizontalAlignment.ALIGN_RIGHT);
    f_HorizontalPanel42.setStyleName("" + style.borderSimple() + "");
    f_HorizontalPanel42.setWidth("100%");
    f_VerticalPanel36.add(f_HorizontalPanel42);
    f_Label45.setWidth("40%");
    f_Label45.setHeight("25px");
    f_HorizontalPanel44.add(f_Label45);
    f_HorizontalPanel44.setCellHorizontalAlignment(
        f_Label45, com.google.gwt.user.client.ui.HasHorizontalAlignment.ALIGN_RIGHT);
    f_HorizontalPanel44.setStyleName("" + style.borderSimple() + "");
    f_HorizontalPanel44.setWidth("100%");
    f_VerticalPanel36.add(f_HorizontalPanel44);
    f_Label47.setStyleName("" + style.redTitle() + "");
    f_Label47.setWidth("215px");
    f_Label47.setText("Total Abonos");
    f_Label47.setHeight("25px");
    f_HorizontalPanel46.add(f_Label47);
    lblTotalCRCMR.setStyleName("" + style.redTitle() + "");
    lblTotalCRCMR.setWidth("100px");
    lblTotalCRCMR.setHeight("25px");
    f_HorizontalPanel46.add(lblTotalCRCMR);
    f_HorizontalPanel46.setCellHorizontalAlignment(
        lblTotalCRCMR, com.google.gwt.user.client.ui.HasHorizontalAlignment.ALIGN_RIGHT);
    f_HorizontalPanel46.setStyleName("" + style.borderSimple() + "");
    f_HorizontalPanel46.setWidth("100%");
    f_VerticalPanel36.add(f_HorizontalPanel46);
    f_VerticalPanel36.setStyleName("" + style.borderDecorator() + "");
    f_VerticalPanel36.setWidth("350px");
    f_HorizontalPanel11.add(f_VerticalPanel36);
    f_HorizontalPanel11.setSpacing(2);
    f_HorizontalPanel11.setWidth("100%");
    f_VerticalPanel2.add(f_HorizontalPanel11);
    f_VerticalPanel2.setCellWidth(f_HorizontalPanel11, "100%");
    f_Label51.setStyleName("" + style.secondTitle() + "");
    f_Label51.setText("");
    f_VerticalPanel50.add(f_Label51);
    f_Label52.setStyleName("" + style.secondTitle() + "");
    f_Label52.setText("SAT");
    f_VerticalPanel50.add(f_Label52);
    f_VerticalPanel50.setWidth("100%");
    f_VerticalPanel49.add(f_VerticalPanel50);
    f_Label54.setWidth("215px");
    f_Label54.setText("TRX 217 y 238");
    f_Label54.setHeight("25px");
    f_HorizontalPanel53.add(f_Label54);
    lblTotalPagosSAT.setWidth("100px");
    lblTotalPagosSAT.setHeight("25px");
    f_HorizontalPanel53.add(lblTotalPagosSAT);
    f_HorizontalPanel53.setCellHorizontalAlignment(
        lblTotalPagosSAT, com.google.gwt.user.client.ui.HasHorizontalAlignment.ALIGN_RIGHT);
    f_HorizontalPanel53.setStyleName("" + style.borderSimple() + "");
    f_HorizontalPanel53.setWidth("100%");
    f_VerticalPanel49.add(f_HorizontalPanel53);
    f_Label56.setWidth("215px");
    f_Label56.setText("TRX 402 y 401");
    f_Label56.setHeight("25px");
    f_HorizontalPanel55.add(f_Label56);
    lblTotalAnulacionesSAT.setWidth("100px");
    lblTotalAnulacionesSAT.setHeight("25px");
    f_HorizontalPanel55.add(lblTotalAnulacionesSAT);
    f_HorizontalPanel55.setCellHorizontalAlignment(
        lblTotalAnulacionesSAT, com.google.gwt.user.client.ui.HasHorizontalAlignment.ALIGN_RIGHT);
    f_HorizontalPanel55.setStyleName("" + style.borderSimple() + "");
    f_HorizontalPanel55.setWidth("100%");
    f_VerticalPanel49.add(f_HorizontalPanel55);
    f_Label58.setWidth("40%");
    f_Label58.setHeight("25px");
    f_HorizontalPanel57.add(f_Label58);
    f_HorizontalPanel57.setCellHorizontalAlignment(
        f_Label58, com.google.gwt.user.client.ui.HasHorizontalAlignment.ALIGN_RIGHT);
    f_HorizontalPanel57.setStyleName("" + style.borderSimple() + "");
    f_HorizontalPanel57.setWidth("100%");
    f_VerticalPanel49.add(f_HorizontalPanel57);
    f_Label60.setStyleName("" + style.redTitle() + "");
    f_Label60.setWidth("215px");
    f_Label60.setText("Total Abonos");
    f_Label60.setHeight("25px");
    f_HorizontalPanel59.add(f_Label60);
    lblTotalFinalSAT.setStyleName("" + style.redTitle() + "");
    lblTotalFinalSAT.setWidth("100px");
    lblTotalFinalSAT.setHeight("25px");
    f_HorizontalPanel59.add(lblTotalFinalSAT);
    f_HorizontalPanel59.setCellHorizontalAlignment(
        lblTotalFinalSAT, com.google.gwt.user.client.ui.HasHorizontalAlignment.ALIGN_RIGHT);
    f_HorizontalPanel59.setStyleName("" + style.borderSimple() + "");
    f_HorizontalPanel59.setWidth("100%");
    f_VerticalPanel49.add(f_HorizontalPanel59);
    f_VerticalPanel49.setStyleName("" + style.borderDecorator() + "");
    f_VerticalPanel49.setWidth("350px");
    f_HorizontalPanel48.add(f_VerticalPanel49);
    f_Label63.setStyleName("" + style.secondTitle() + "");
    f_Label63.setText("");
    f_VerticalPanel62.add(f_Label63);
    f_Label64.setStyleName("" + style.secondTitle() + "");
    f_Label64.setText("RSAT");
    f_VerticalPanel62.add(f_Label64);
    f_VerticalPanel62.setWidth("100%");
    f_VerticalPanel61.add(f_VerticalPanel62);
    f_Label66.setWidth("215px");
    f_Label66.setText("TRX 217 y 238");
    f_Label66.setHeight("25px");
    f_HorizontalPanel65.add(f_Label66);
    lblTotalPagosRSAT.setWidth("100px");
    lblTotalPagosRSAT.setHeight("25px");
    f_HorizontalPanel65.add(lblTotalPagosRSAT);
    f_HorizontalPanel65.setCellHorizontalAlignment(
        lblTotalPagosRSAT, com.google.gwt.user.client.ui.HasHorizontalAlignment.ALIGN_RIGHT);
    f_HorizontalPanel65.setStyleName("" + style.borderSimple() + "");
    f_HorizontalPanel65.setWidth("100%");
    f_VerticalPanel61.add(f_HorizontalPanel65);
    f_Label68.setWidth("215px");
    f_Label68.setText("TRX 402 y 401");
    f_Label68.setHeight("25px");
    f_HorizontalPanel67.add(f_Label68);
    lblTotalAnulacionesRSAT.setWidth("100px");
    lblTotalAnulacionesRSAT.setHeight("25px");
    f_HorizontalPanel67.add(lblTotalAnulacionesRSAT);
    f_HorizontalPanel67.setCellHorizontalAlignment(
        lblTotalAnulacionesRSAT, com.google.gwt.user.client.ui.HasHorizontalAlignment.ALIGN_RIGHT);
    f_HorizontalPanel67.setStyleName("" + style.borderSimple() + "");
    f_HorizontalPanel67.setWidth("100%");
    f_VerticalPanel61.add(f_HorizontalPanel67);
    f_Label70.setWidth("40%");
    f_Label70.setHeight("25px");
    f_HorizontalPanel69.add(f_Label70);
    f_HorizontalPanel69.setCellHorizontalAlignment(
        f_Label70, com.google.gwt.user.client.ui.HasHorizontalAlignment.ALIGN_RIGHT);
    f_HorizontalPanel69.setStyleName("" + style.borderSimple() + "");
    f_HorizontalPanel69.setWidth("100%");
    f_VerticalPanel61.add(f_HorizontalPanel69);
    f_Label72.setStyleName("" + style.redTitle() + "");
    f_Label72.setWidth("215px");
    f_Label72.setText("Total Abonos");
    f_Label72.setHeight("25px");
    f_HorizontalPanel71.add(f_Label72);
    lblTotalFinalRSAT.setStyleName("" + style.redTitle() + "");
    lblTotalFinalRSAT.setWidth("100px");
    lblTotalFinalRSAT.setHeight("25px");
    f_HorizontalPanel71.add(lblTotalFinalRSAT);
    f_HorizontalPanel71.setCellHorizontalAlignment(
        lblTotalFinalRSAT, com.google.gwt.user.client.ui.HasHorizontalAlignment.ALIGN_RIGHT);
    f_HorizontalPanel71.setStyleName("" + style.borderSimple() + "");
    f_HorizontalPanel71.setWidth("100%");
    f_VerticalPanel61.add(f_HorizontalPanel71);
    f_VerticalPanel61.setStyleName("" + style.borderDecorator() + "");
    f_VerticalPanel61.setWidth("350px");
    f_HorizontalPanel48.add(f_VerticalPanel61);
    f_VerticalPanel73.setHorizontalAlignment(
        com.google.gwt.user.client.ui.HasHorizontalAlignment.ALIGN_LEFT);
    f_VerticalPanel73.setWidth("350px");
    f_HorizontalPanel48.add(f_VerticalPanel73);
    f_HorizontalPanel48.setSpacing(2);
    f_HorizontalPanel48.setWidth("100%");
    f_VerticalPanel2.add(f_HorizontalPanel48);
    f_VerticalPanel2.setWidth("100%");
    f_VerticalPanel1.add(f_VerticalPanel2);
    f_VerticalPanel1.setWidth("100%");

    UiBinderUtil.TempAttachment attachRecord0 = UiBinderUtil.attachToDom(htmlPanel.getElement());
    com.google.gwt.user.client.Element domId0Element =
        com.google.gwt.dom.client.Document.get().getElementById(domId0).cast();
    attachRecord0.detach();
    htmlPanel.addAndReplaceElement(title, domId0Element);

    final com.google.gwt.event.dom.client.ClickHandler
        handlerMethodWithNameVeryUnlikelyToCollideWithUserFieldNames1 =
            new com.google.gwt.event.dom.client.ClickHandler() {
              public void onClick(com.google.gwt.event.dom.client.ClickEvent event) {
                owner.onClickCSV(event);
              }
            };
    filterButton.addClickHandler(handlerMethodWithNameVeryUnlikelyToCollideWithUserFieldNames1);

    final com.google.gwt.event.dom.client.ClickHandler
        handlerMethodWithNameVeryUnlikelyToCollideWithUserFieldNames2 =
            new com.google.gwt.event.dom.client.ClickHandler() {
              public void onClick(com.google.gwt.event.dom.client.ClickEvent event) {
                owner.onClickExcel(event);
              }
            };
    excelButton.addClickHandler(handlerMethodWithNameVeryUnlikelyToCollideWithUserFieldNames2);

    owner.filterButton = filterButton;
    owner.lblError = lblError;
    owner.lblPagoAnulado = lblPagoAnulado;
    owner.lblPagoNormal = lblPagoNormal;
    owner.lblPagoRepactado = lblPagoRepactado;
    owner.lblTotalAbonoNormal = lblTotalAbonoNormal;
    owner.lblTotalAbonos = lblTotalAbonos;
    owner.lblTotalAbonosSCTFA = lblTotalAbonosSCTFA;
    owner.lblTotalAnulacionesRSAT = lblTotalAnulacionesRSAT;
    owner.lblTotalAnulacionesSAT = lblTotalAnulacionesSAT;
    owner.lblTotalCRCMR = lblTotalCRCMR;
    owner.lblTotalFinalRSAT = lblTotalFinalRSAT;
    owner.lblTotalFinalSAT = lblTotalFinalSAT;
    owner.lblTotalPagos = lblTotalPagos;
    owner.lblTotalPagosRSAT = lblTotalPagosRSAT;
    owner.lblTotalPagosSAT = lblTotalPagosSAT;
    owner.lblTrx217 = lblTrx217;
    owner.lblTrx402 = lblTrx402;
    owner.lblVersionPOS = lblVersionPOS;
    owner.sucursalSeleccionada = sucursalSeleccionada;
    clientBundleFieldNameUnlikelyToCollideWithUserSpecifiedFieldOkay.style().ensureInjected();

    return f_VerticalPanel1;
  }
  public void createProvenanceBar(
      String plugin, HorizontalPanel provenance, final MAnnotation annotation) {
    try {
      Resources resource = Domeo.resources;

      Image commentIcon = null;
      if (((BooleanPreference)
              _domeo
                  .getPreferences()
                  .getPreferenceItem(Domeo.class.getName(), Domeo.PREF_ALLOW_COMMENTING))
          .getValue()) {
        commentIcon = new Image(resource.littleCommentIcon());
        commentIcon.setTitle("Comment on Item");
        commentIcon.setStyleName(ATileComponent.tileResources.css().button());
        commentIcon.addClickHandler(
            ActionCommentAnnotation.getClickHandler(_domeo, this, annotation));
        commentIcon.addClickHandler(
            new ClickHandler() {
              @Override
              public void onClick(ClickEvent event) {
                _curationPopup.hide();
              }
            });
      }

      Image editIcon = new Image(resource.editLittleIcon());
      editIcon.setTitle("Edit Item");
      if (_domeo.getProfileManager().getUserCurrentProfile().isPluginEnabled(plugin)) {
        editIcon.setStyleName(ATileComponent.tileResources.css().button());
        editIcon.addClickHandler(ActionEditAnnotation.getClickHandler(_domeo, this, annotation));
        editIcon.addClickHandler(
            new ClickHandler() {
              @Override
              public void onClick(ClickEvent event) {
                _curationPopup.hide();
              }
            });
      }

      Image deleteIcon = new Image(resource.deleteLittleIcon());
      deleteIcon.setTitle("Delete Item");
      deleteIcon.setStyleName(ATileComponent.tileResources.css().button());
      deleteIcon.addClickHandler(ActionDeleteAnnotation.getClickHandler(_domeo, this, annotation));
      deleteIcon.addClickHandler(
          new ClickHandler() {
            @Override
            public void onClick(ClickEvent event) {
              _curationPopup.hide();
            }
          });

      // TODO move to an abstract tile class
      if (((BooleanPreference)
              _domeo
                  .getPreferences()
                  .getPreferenceItem(Domeo.class.getName(), Domeo.PREF_DISPLAY_PROVENANCE))
          .getValue()) {
        if (annotation
            .getCreator()
            .getUri()
            .equals(_domeo.getAgentManager().getUserPerson().getUri())) {
          if (((BooleanPreference)
                  _domeo
                      .getPreferences()
                      .getPreferenceItem(Domeo.class.getName(), Domeo.PREF_DISPLAY_USER_PROVENANCE))
              .getValue()) {
            provenance.clear();

            // TODO Externalize the icon management to the plugins
            if (SelectorUtils.isOnMultipleTargets(annotation.getSelectors())) {
              Image ic = new Image(Domeo.resources.multipleLittleIcon());
              ic.setTitle("Annotation on multiple targets");
              provenance.add(ic);
              provenance.setCellWidth(ic, "18px");
            } else if (annotation.getSelector() != null
                && annotation.getSelector().getTarget() instanceof MOnlineImage) {
              Image ic = new Image(Domeo.resources.littleImageIcon());
              ic.setTitle("Annotation on image");
              provenance.add(ic);
              provenance.setCellWidth(ic, "18px");
            } else {
              Image ic = new Image(Domeo.resources.littleTextIcon());
              ic.setTitle("Annotation on text");
              provenance.add(ic);
              provenance.setCellWidth(ic, "18px");
            }

            provenance.add(new Label("By Me on " + annotation.getFormattedCreationDate()));

            if (((BooleanPreference)
                    _domeo
                        .getPreferences()
                        .getPreferenceItem(Domeo.class.getName(), Domeo.PREF_ALLOW_COMMENTING))
                .getValue()) {
              provenance.add(commentIcon);
              provenance.setCellWidth(commentIcon, "20px");
              provenance.setCellHorizontalAlignment(
                  commentIcon, HasHorizontalAlignment.ALIGN_RIGHT);
            }

            provenance.add(editIcon);
            provenance.setCellWidth(editIcon, "20px");
            provenance.setCellHorizontalAlignment(editIcon, HasHorizontalAlignment.ALIGN_RIGHT);
            provenance.add(deleteIcon);
            provenance.setCellWidth(deleteIcon, "20px");
            provenance.setCellHorizontalAlignment(deleteIcon, HasHorizontalAlignment.ALIGN_RIGHT);
          } else {
            provenance.setVisible(false);
          }
        } else {
          provenance.clear();

          // TODO Externalize the icon management to the plugins
          if (SelectorUtils.isOnMultipleTargets(annotation.getSelectors())) {
            Image ic = new Image(Domeo.resources.multipleLittleIcon());
            ic.setTitle("Annotation on multiple targets");
            provenance.add(ic);
            provenance.setCellWidth(ic, "18px");
          } else if (annotation.getSelector() != null
              && annotation.getSelector().getTarget() instanceof MOnlineImage) {
            Image ic = new Image(Domeo.resources.littleImageIcon());
            ic.setTitle("Annotation on image");
            provenance.add(ic);
            provenance.setCellWidth(ic, "18px");
          } else {
            Image ic = new Image(Domeo.resources.littleTextIcon());
            ic.setTitle("Annotation on text");
            provenance.add(ic);
            provenance.setCellWidth(ic, "18px");
          }

          provenance.add(
              new Label(
                  "By "
                      + annotation.getCreator().getName()
                      + " on "
                      + annotation.getFormattedCreationDate()));

          if (((BooleanPreference)
                  _domeo
                      .getPreferences()
                      .getPreferenceItem(Domeo.class.getName(), Domeo.PREF_ALLOW_COMMENTING))
              .getValue()) {
            provenance.add(commentIcon);
            provenance.setCellWidth(commentIcon, "20px");
            provenance.setCellHorizontalAlignment(commentIcon, HasHorizontalAlignment.ALIGN_RIGHT);
          }

          provenance.add(editIcon);
          provenance.setCellWidth(editIcon, "20px");
          provenance.setCellHorizontalAlignment(editIcon, HasHorizontalAlignment.ALIGN_RIGHT);
          provenance.add(deleteIcon);
          provenance.setCellWidth(deleteIcon, "20px");
          provenance.setCellHorizontalAlignment(deleteIcon, HasHorizontalAlignment.ALIGN_RIGHT);
        }
      } else {
        provenance.setVisible(false);
      }
    } catch (Exception e) {
      _domeo.getLogger().exception(this, "createProvenanceBar2" + e.getMessage());
    }
  }
  public OperatorCreation(IAdminView parent) {

    VerticalPanel formPnl = new VerticalPanel();

    parentView = parent;
    setText(RESOURCES.m_newOperatorCreation_text());

    closeBtn.addClickHandler(
        new ClickHandler() {

          @Override
          public void onClick(ClickEvent event) {
            hide();
            clearDialog();
          }
        });

    createBtn.addClickHandler(
        new ClickHandler() {

          @Override
          public void onClick(ClickEvent event) {

            ValidationProcessor validator = new DefaultValidationProcessor();

            NotEmptyValidator notEmptyUsername = new NotEmptyValidator(usernameTxt);
            validator.addValidators("Validation", notEmptyUsername);
            if (validator.validate("Validation") == false) {
              Messages.showError(RESOURCES.m_usrnameCannotBeEmpty_text());
              return;
            }
            validator.removeAllValidators();

            EmailValidator emailMatchUsername = new EmailValidator(usernameTxt);
            validator.addValidators("Validation", emailMatchUsername);
            if (validator.validate("Validation") == false) {
              Messages.showError(RESOURCES.m_usrnameMustBeEmail_text());
              return;
            }
            validator.removeAllValidators();

            NotEmptyValidator notEmptyPassword = new NotEmptyValidator(passwordPwd);
            validator.addValidators("Validation", notEmptyPassword);
            if (validator.validate("Validation") == false) {
              Messages.showError(RESOURCES.m_pwdCannotBeEmpty_text());
              return;
            }
            validator.removeAllValidators();

            StringLengthValidator rangePasswordCharacter =
                new StringLengthValidator(passwordPwd, 8, 16);
            validator.addValidators("Validation", rangePasswordCharacter);
            if (validator.validate("Validation") == false) {
              Messages.showError(RESOURCES.m_pwdBetween8_16_text());
              return;
            }
            validator.removeAllValidators();

            if (passwordPwd.getText().equals(confirmPasswordPwd.getText())) {
              OperatorBO newOperator = new OperatorBO();
              newOperator.setAuthority(parentView.getCurrentUser().getAuthority());
              newOperator.setCanEditNew(canEditNewCkb.getValue());
              newOperator.setPassword(passwordPwd.getText());
              newOperator.setUsername(usernameTxt.getText());
              parentView.getPresenter().addOperator(newOperator);
              hide();
              clearDialog();
            } else {
              Messages.showError(RESOURCES.m_wrongConfirmPwd_text());
            }
          }
        });

    grid.setWidget(0, 0, fieldUsernameLbl);
    grid.setWidget(0, 1, usernameTxt);
    grid.setWidget(1, 0, fieldPasswordLbl);
    grid.setWidget(1, 1, passwordPwd);
    grid.setWidget(2, 0, fieldConfirmPasswordLbl);
    grid.setWidget(2, 1, confirmPasswordPwd);
    grid.setWidget(3, 0, fieldCanEditNewLbl);
    grid.setWidget(3, 1, canEditNewCkb);

    formPnl.add(grid);

    HorizontalPanel buttonPnl = new HorizontalPanel();
    buttonPnl.add(closeBtn);
    buttonPnl.add(createBtn);
    buttonPnl.setCellWidth(closeBtn, "200px");
    buttonPnl.setCellHorizontalAlignment(closeBtn, HorizontalPanel.ALIGN_CENTER);
    buttonPnl.setHeight("30px");

    formPnl.add(buttonPnl);

    setWidget(formPnl);
    grid.setCellSpacing(10);
    show();
    center();
  }