Ejemplo n.º 1
0
    private HorizontalPanel getConceptBrowseButton() {
      destConcept = new LabelAOS("--None--", null);

      browse = new Image("images/browseButton3-grey.gif");
      browse.addClickHandler(
          new ClickHandler() {

            public void onClick(ClickEvent event) {
              destConcept.setText("--None--");
              final ConceptBrowser cb = ((MainApp) RootPanel.get().getWidget(0)).conceptBrowser;
              cb.showBrowser();
              cb.addSubmitClickHandler(
                  new ClickHandler() {
                    public void onClick(ClickEvent event) {
                      destConcept.setValue(cb.getSelectedItem(), cb.getTreeObject().getUri());
                    }
                  });
            }
          });
      browse.setStyleName(Style.Link);

      HorizontalPanel hp = new HorizontalPanel();
      hp.add(new HTML(constants.conceptDestination()));
      hp.add(destConcept);
      hp.add(browse);
      hp.setWidth("100%");
      hp.setCellHorizontalAlignment(destConcept, HasHorizontalAlignment.ALIGN_LEFT);
      hp.setCellHorizontalAlignment(browse, HasHorizontalAlignment.ALIGN_RIGHT);

      return hp;
    }
Ejemplo n.º 2
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);
  }
Ejemplo n.º 3
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;
  }
Ejemplo n.º 4
0
  public MainPanel() {
    super(Unit.PX);

    Image logoUfcg = new Image(Adicionais.RESOURCES.logoUfcg());
    Image logoAdicionais = new Image(Adicionais.RESOURCES.logoAdicionais());
    HorizontalPanel header = new HorizontalPanel();
    header.add(logoUfcg);
    header.setCellVerticalAlignment(logoUfcg, HasVerticalAlignment.ALIGN_MIDDLE);
    header.add(logoAdicionais);
    header.setCellHorizontalAlignment(logoAdicionais, HasHorizontalAlignment.ALIGN_RIGHT);
    header.setWidth("100%");
    header.setStyleName(Adicionais.RESOURCES.css().header());
    this.addNorth(header, 88);

    VerticalPanel footer = new VerticalPanel();
    Label developersLabel =
        new Label("Desenvolvido por Cleber Gonçalves de Sousa e Vitor Morato Almeida");
    developersLabel.setStyleName(Adicionais.RESOURCES.css().developers());
    footer.add(developersLabel);

    this.addSouth(footer, 23);
    footer.setWidth("100%");
    footer.setStyleName(Adicionais.RESOURCES.css().footer());

    this.contentArea = new SimplePanel();
    this.contentArea.setStyleName(Adicionais.RESOURCES.css().content());
    this.add(this.contentArea);
  }
Ejemplo n.º 5
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;
  }
  public ConfigurationDialog(OkCancelDialogCallback callback) {
    setText("Configuration");
    setModal(true);
    this.okCancelDialogCallback = callback;

    setHTML("New dialog");

    VerticalPanel verticalPanel = new VerticalPanel();
    setWidget(verticalPanel);
    verticalPanel.setSize("100%", "100%");

    HorizontalPanel horizontalPanel = new HorizontalPanel();
    verticalPanel.add(horizontalPanel);
    verticalPanel.setCellHeight(horizontalPanel, "100%");
    verticalPanel.setCellWidth(horizontalPanel, "100%");
    horizontalPanel.setSize("324px", "29px");

    Label lblBrokerUrl = new Label("Broker url: ");
    horizontalPanel.add(lblBrokerUrl);

    final TextBox txtBrokerUrl = new TextBox();
    horizontalPanel.add(txtBrokerUrl);

    HorizontalPanel horizontalPanel_1 = new HorizontalPanel();
    verticalPanel.add(horizontalPanel_1);
    verticalPanel.setCellWidth(horizontalPanel_1, "100%");
    verticalPanel.setCellHorizontalAlignment(
        horizontalPanel_1, HasHorizontalAlignment.ALIGN_CENTER);

    Button btnAcept = new Button("Acept");
    btnAcept.addClickHandler(
        new ClickHandler() {
          public void onClick(ClickEvent event) {
            okCancelDialogCallback.okButtonClick(txtBrokerUrl.getText());
            hide();
          }
        });
    horizontalPanel_1.add(btnAcept);
    horizontalPanel_1.setCellVerticalAlignment(btnAcept, HasVerticalAlignment.ALIGN_MIDDLE);

    Button btnCancel = new Button("Cancel");
    btnCancel.addClickHandler(
        new ClickHandler() {
          public void onClick(ClickEvent event) {
            okCancelDialogCallback.cancelButtonClick();
            hide();
          }
        });
    horizontalPanel_1.add(btnCancel);
    horizontalPanel_1.setCellVerticalAlignment(btnCancel, HasVerticalAlignment.ALIGN_MIDDLE);
    horizontalPanel_1.setCellHorizontalAlignment(btnCancel, HasHorizontalAlignment.ALIGN_RIGHT);
  }
Ejemplo n.º 7
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;
  }
Ejemplo n.º 8
0
 private void setNavigationBar() {
   navBarTable.getCellFormatter().setWidth(0, 1, "30%");
   navBarTable.getCellFormatter().setWidth(0, 2, "10%");
   navBarTable.getCellFormatter().setWidth(0, 3, "10%");
   navBarTable.getCellFormatter().setWidth(0, 4, "22%");
   navBarTable.getCellFormatter().setWidth(0, 5, "23%");
   Label displayText = new Label(navBar.getCountString());
   Label searchPageText =
       new Label(LocaleDictionary.get().getConstantValue(LocaleCommonConstants.TITLE_GO_TO_PAGE));
   Label totalPageCountText = new Label("  /" + navBar.getTotalPageCount());
   HorizontalPanel searchPagePanel = new HorizontalPanel();
   displayText.setStyleName(selectionStyle.boldText());
   searchPageText.setStyleName(selectionStyle.boldText());
   totalPageCountText.setStyleName(selectionStyle.boldText());
   searchPagePanel.add(searchPageText);
   searchPagePanel.add(navBar.getSearchPageTextBox());
   searchPagePanel.add(totalPageCountText);
   searchPagePanel.setCellHorizontalAlignment(searchPageText, HasHorizontalAlignment.ALIGN_RIGHT);
   searchPagePanel.setCellHorizontalAlignment(
       navBar.getSearchPageTextBox(), HasHorizontalAlignment.ALIGN_RIGHT);
   searchPagePanel.setCellHorizontalAlignment(
       totalPageCountText, HasHorizontalAlignment.ALIGN_RIGHT);
   if (this.navBar.getOrderingListner() != null) {
     navBarTable.setWidget(0, 2, navBar.getOrderingPanel());
     navBarTable
         .getCellFormatter()
         .setHorizontalAlignment(0, 2, HasHorizontalAlignment.ALIGN_RIGHT);
   }
   if (this.navBar.getListner() != null) {
     navBarTable.setWidget(0, 3, navBar.getPaginationPanel());
     navBarTable
         .getCellFormatter()
         .setHorizontalAlignment(0, 3, HasHorizontalAlignment.ALIGN_RIGHT);
     navBarTable.setWidget(0, 4, searchPagePanel);
   }
   navBarTable.setWidget(0, 5, displayText);
   navBarTable.getCellFormatter().setHorizontalAlignment(0, 4, HasHorizontalAlignment.ALIGN_RIGHT);
   navBarTable.getCellFormatter().setHorizontalAlignment(0, 5, HasHorizontalAlignment.ALIGN_RIGHT);
 }
Ejemplo n.º 9
0
  private Widget getButtonPanel() {
    HorizontalPanel bar = new HorizontalPanel();
    bar.setHeight("50px");
    bar.setSpacing(10);
    bar.setWidth("350px");

    Button addButton = new Button("Add");
    Button cancelButton = new Button("Cancel");

    bar.add(addButton);
    bar.add(cancelButton);

    bar.setCellHorizontalAlignment(addButton, HasHorizontalAlignment.ALIGN_RIGHT);
    bar.setCellHorizontalAlignment(cancelButton, HasHorizontalAlignment.ALIGN_LEFT);

    addButton.addClickHandler(
        new ClickHandler() {
          @Override
          public void onClick(ClickEvent event) {
            itemAdded = true;
            dialogBox.hide(true);
          }
        });

    cancelButton.addClickHandler(
        new ClickHandler() {

          @Override
          public void onClick(ClickEvent event) {
            itemAdded = false;
            enumValue.setText("");
            dialogBox.hide(true);
          }
        });

    return bar.asWidget();
  }
Ejemplo n.º 10
0
  /**
   * 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");
  }
Ejemplo n.º 11
0
  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());
    }
  }
Ejemplo n.º 12
0
    public TermDetail(ConceptObject conceptObject, TermObject termObject) {
      String text = termObject.getLabel();
      if (text.length() > 100) text = text.substring(0, 70) + "...";
      this.setHTML(
          constants.conceptInformationFor()
              + " <i>"
              + text
              + " ("
              + termObject.getLang()
              + ")</i>&nbsp;["
              + (termObject.isMainLabel()
                  ? constants.conceptPreferredTerm()
                  : constants.conceptNonPreferredTerm())
              + "]");
      TermDetailTabPanel termDetail =
          new TermDetailTabPanel(permissionTable, initData, TermDetail.this);
      termDetail.setURI(termObject, conceptObject);

      VerticalPanel vp = new VerticalPanel();
      vp.setSize("100%", "100%");
      vp.add(termDetail);

      panel.add(vp);
      panel.setCellHeight(vp, "100%");
      panel.setCellWidth(vp, "100%");

      HorizontalPanel buttonPanel = new HorizontalPanel();
      buttonPanel.setSpacing(5);
      buttonPanel.add(cancel);

      HorizontalPanel hp = new HorizontalPanel();
      hp.setSpacing(0);
      hp.setWidth("100%");
      hp.setStyleName("bottombar");
      hp.add(buttonPanel);
      hp.setCellHorizontalAlignment(buttonPanel, HasHorizontalAlignment.ALIGN_RIGHT);

      panel.add(hp);
      cancel.addClickHandler(this);
      panel.setCellHorizontalAlignment(cancel, HasHorizontalAlignment.ALIGN_RIGHT);
      panel.setSize("100%", "100%");
      setWidget(panel);
    }
Ejemplo n.º 13
0
  /** Initializes and assembles all commands into buttons in the toolbar. */
  public Toolbar() {
    buttonMap = new HashMap<String, TextButton>();
    dropDownButtonMap = new HashMap<String, DropDownButton>();

    leftButtons = new HorizontalPanel();
    leftButtons.setSpacing(4);

    rightButtons = new HorizontalPanel();
    rightButtons.setSpacing(4);
    rightButtons.setHorizontalAlignment(HorizontalPanel.ALIGN_RIGHT);

    HorizontalPanel toolbar = new HorizontalPanel();
    toolbar.add(leftButtons); // this nesting keeps buttons left aligned
    toolbar.add(rightButtons);
    toolbar.setCellHorizontalAlignment(rightButtons, HorizontalPanel.ALIGN_RIGHT);
    toolbar.setWidth("100%");
    toolbar.setStylePrimaryName("ya-Toolbar");

    initWidget(toolbar);
  }
Ejemplo n.º 14
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);
  }
Ejemplo n.º 15
0
  public AddDesigner() {

    mainPanel = new HorizontalPanel();
    addDesignerPanel = new VerticalPanel();
    addDesignerPanel.setSpacing(10);
    addDesignerPanel.setWidth("700px");

    formPanel = new FormPanel();
    System.err.println(GWT.getModuleBaseURL());
    formPanel.setAction(GWT.getModuleBaseURL() + "addStuffServlet");
    formPanel.setEncoding(FormPanel.ENCODING_MULTIPART);
    formPanel.setMethod(FormPanel.METHOD_GET);
    formPanel.setWidget(mainPanel);
    formPanel.addFormHandler(
        new FormHandler() {

          public void onSubmit(final FormSubmitEvent event) {
            if (designerBox.getText().length() == 0) {
              Window.alert("Campo Desenhista está vazio");
              event.setCancelled(true);
              return;
            }
          }

          public void onSubmitComplete(FormSubmitCompleteEvent arg0) {
            Window.alert("Novo Desenhista cadastrado com sucesso");
            designerBox.setText("");
            titleTree.clear();

            if (titleService == null) {
              titleService = GWT.create(TitleService.class);
            }

            AsyncCallback<ArrayList<Designer>> callback =
                new AsyncCallback<ArrayList<Designer>>() {

                  public void onFailure(Throwable caught) {

                    Window.alert("DEU PAU!!!");
                  }

                  public void onSuccess(ArrayList<Designer> result) {

                    for (int i = 0; i < result.size(); i++) {
                      Designer title = result.get(i);
                      titleTree.addItem(title.getDesigner());
                    }
                  }
                };

            titleService.getDesignerList(callback);
          }
        });

    /* Escritor */
    designerPanel = new HorizontalPanel();
    designerPanel.setSpacing(5);
    designerLabel = new Label("Desenhista: ");
    designerPanel.add(designerLabel);
    designerPanel.setCellHorizontalAlignment(designerLabel, HorizontalPanel.ALIGN_LEFT);
    designerPanel.setCellVerticalAlignment(designerLabel, VerticalPanel.ALIGN_MIDDLE);
    designerBox = new TextBox();
    designerBox.setName("designer");
    designerPanel.add(designerBox);
    designerPanel.setCellHorizontalAlignment(designerBox, HorizontalPanel.ALIGN_LEFT);
    designerPanel.setCellVerticalAlignment(designerBox, VerticalPanel.ALIGN_MIDDLE);

    /* OK */
    okPanel = new HorizontalPanel();
    okPanel.setSpacing(10);
    okButton = new Button();
    okButton.setText("Cadastra");
    okButton.addClickListener(
        new ClickListener() {
          public void onClick(Widget sender) {
            formPanel.submit();
          }
        });

    okPanel.add(okButton);
    okPanel.setCellHorizontalAlignment(okButton, HorizontalPanel.ALIGN_CENTER);
    okPanel.setCellVerticalAlignment(okButton, VerticalPanel.ALIGN_MIDDLE);

    if (titleService == null) {
      titleService = GWT.create(TitleService.class);
    }

    titleTree = new Tree();
    titleTree.setAnimationEnabled(true);

    AsyncCallback<ArrayList<Designer>> callback =
        new AsyncCallback<ArrayList<Designer>>() {

          public void onFailure(Throwable caught) {

            Window.alert("DEU PAU!!!");
          }

          public void onSuccess(ArrayList<Designer> result) {

            for (int i = 0; i < result.size(); i++) {
              Designer title = result.get(i);
              titleTree.addItem(title.getDesigner());
            }
          }
        };

    titleService.getDesignerList(callback);

    addDesignerPanel.add(designerPanel);
    addDesignerPanel.add(okPanel);
    mainPanel.add(addDesignerPanel);
    mainPanel.add(titleTree);

    initWidget(formPanel);
  }
Ejemplo n.º 16
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);
  }
Ejemplo n.º 17
0
  private void drawLoginInputs() {

    // default
    tbConsumerSecret.setVisible(true);
    tbConsumerSecretPass.setVisible(false);

    // reset ui
    pUi.clear();

    cbRemberMe.setText("Remember Me");

    hAccountCreate = new Hyperlink("Create Account", "account_Create");

    tbConsumerKey.setTitle(inputLabel_ConsumerKey);
    tbConsumerSecret.setTitle(inputLabel_consumerSecret);
    tbConsumerSecretPass.setTitle(inputLabel_consumerSecret);

    // hide loading by default
    hideLoading();

    // main login inputs
    HorizontalPanel ploginItems = new HorizontalPanel();
    ploginItems.setWidth("100%");
    ploginItems.add(tbConsumerKey);
    ploginItems.add(tbConsumerSecret);
    ploginItems.add(tbConsumerSecretPass);
    ploginItems.add(bLogin);

    // login options
    HorizontalPanel pOptions = new HorizontalPanel();
    // pOptions.setSpacing(4);
    pOptions.add(cbRemberMe);
    pOptions.add(hForgotPassword);
    pOptions.add(hAccountCreate);

    VerticalPanel vp = new VerticalPanel();
    vp.setWidth("100%");
    vp.add(ploginItems);
    vp.add(pOptions);

    // TODO - move this to a floating overlay
    vp.add(pError);

    pUi.add(vp);

    drawInputLabel_key();
    drawInputLabel_secret();

    tbConsumerKey.addStyleName("login-Ui-InputConsumerKey");
    tbConsumerSecret.addStyleName("login-Ui-InputConsumerSecret");
    tbConsumerSecretPass.addStyleName("login-Ui-InputConsumerSecret");
    pOptions.setCellHorizontalAlignment(hForgotPassword, HorizontalPanel.ALIGN_RIGHT);
    pOptions.setCellHorizontalAlignment(hAccountCreate, HorizontalPanel.ALIGN_RIGHT);
    pOptions.setCellVerticalAlignment(hForgotPassword, VerticalPanel.ALIGN_BOTTOM);
    pOptions.setCellVerticalAlignment(hAccountCreate, VerticalPanel.ALIGN_BOTTOM);
    pOptions.addStyleName("login-Ui-InputOptions");
    pOptions.setWidth("100%");

    // vp.addStyleName("test1");
    // pOptions.addStyleName("test2");
  }
  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 DialogListaPontoEncontro(
      final InfoCaronaServerAsync controller, final String idSessao, final String idCarona) {
    novosPontos = "";
    listaNovosPontosEncontros = new ArrayList<InfoPontoEncontro>();
    this.idCarona = idCarona;
    this.controller = controller;

    setText("Pontos de Encontro - ID: " + idCarona);
    setAnimationEnabled(true);
    setGlassEnabled(true);
    center();

    VerticalPanel panelListaPontoEncontro = new VerticalPanel();
    tabelaPontoEncontro = new CellTable<InfoPontoEncontro>();
    tabelaPontoEncontro.setWidth("400px");
    dataProvider = new ListDataProvider<InfoPontoEncontro>();

    SimplePager.Resources pagerResources = GWT.create(SimplePager.Resources.class);
    SimplePager pager = new SimplePager(TextLocation.CENTER, pagerResources, false, 0, true);
    pager.setDisplay(tabelaPontoEncontro);
    pager.setPageSize(5);

    TextColumn<InfoPontoEncontro> colunaIdPontoEncontro =
        new TextColumn<InfoPontoEncontro>() {
          @Override
          public String getValue(InfoPontoEncontro pontoEncontro) {
            return pontoEncontro.getIdPontoEncontro();
          }
        };

    TextColumn<InfoPontoEncontro> colunaPontosEncontro =
        new TextColumn<InfoPontoEncontro>() {
          @Override
          public String getValue(InfoPontoEncontro pontoEncontro) {
            return pontoEncontro.getPontoEncontro();
          }
        };

    tabelaPontoEncontro.addColumn(colunaPontosEncontro, "Pontos de Encontro");
    listaPontoEncontros = new ArrayList<InfoPontoEncontro>();
    populaTabela();

    HorizontalPanel hPanel01 = new HorizontalPanel();
    final TextBox boxNovoPontoEncontro = new TextBox();
    boxNovoPontoEncontro.setWidth("200px");
    boxNovoPontoEncontro.setStyleName("boxModificada");

    Button buttonAdicionarOutroPontoEncontro = new Button();
    buttonAdicionarOutroPontoEncontro.setStyleName("botaoModificado");
    buttonAdicionarOutroPontoEncontro.setTitle("Adicionar Sugestão");
    buttonAdicionarOutroPontoEncontro.addClickHandler(
        new ClickHandler() {
          @Override
          public void onClick(ClickEvent event) {
            if (boxNovoPontoEncontro.getText().trim().equals("")) {
              DialogMensagemUsuario dialogErro =
                  new DialogMensagemUsuario("Falhou", "Ponto de Encontro Inválido");
              dialogErro.show();
            } else {
              novosPontos += boxNovoPontoEncontro.getText().trim() + ";";
              InfoPontoEncontro novoPontoEncontro =
                  new InfoPontoEncontro("00", boxNovoPontoEncontro.getText().trim());
              boxNovoPontoEncontro.setText("");

              listaNovosPontosEncontros.add(novoPontoEncontro);
              listaPontoEncontros = new ArrayList<InfoPontoEncontro>();

              for (InfoPontoEncontro novoPonto : listaNovosPontosEncontros) {
                listaPontoEncontros.add(novoPonto);
              }

              populaTabela();
            }
          }
        });

    Image imageFiltro = new Image("imagens/adicionar.png");
    imageFiltro.setSize("15px", "15px");
    buttonAdicionarOutroPontoEncontro.getElement().appendChild(imageFiltro.getElement());

    Button buttonSalvarNovosPontos = new Button("Salvar");
    buttonSalvarNovosPontos.setStyleName("botaoModificado");
    buttonSalvarNovosPontos.addClickHandler(
        new ClickHandler() {

          @Override
          public void onClick(ClickEvent event) {
            controller.cadastrarNovosPontosEncontro(
                idSessao,
                idCarona,
                novosPontos,
                new AsyncCallback<String>() {

                  @Override
                  public void onFailure(Throwable caught) {
                    DialogMensagemUsuario dialogSucess =
                        new DialogMensagemUsuario("Erro", caught.getMessage());
                    dialogSucess.show();
                  }

                  @Override
                  public void onSuccess(String result) {
                    DialogMensagemUsuario dialogSucess =
                        new DialogMensagemUsuario(
                            "ID: " + result, "Pontos de Encontro Cadastrados com Sucesso!");
                    dialogSucess.show();
                    hide();
                  }
                });
          }
        });

    Button buttonFechar = new Button("Fechar");
    buttonFechar.setStyleName("botaoModificado");

    buttonFechar.addClickHandler(
        new ClickHandler() {
          @Override
          public void onClick(ClickEvent event) {
            hide();
          }
        });

    colunaPontosEncontro.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_LEFT);

    hPanel01.setCellVerticalAlignment(boxNovoPontoEncontro, HasVerticalAlignment.ALIGN_BOTTOM);
    hPanel01.setCellVerticalAlignment(buttonSalvarNovosPontos, HasVerticalAlignment.ALIGN_TOP);
    hPanel01.setCellVerticalAlignment(
        buttonAdicionarOutroPontoEncontro, HasVerticalAlignment.ALIGN_TOP);
    hPanel01.setCellVerticalAlignment(buttonFechar, HasVerticalAlignment.ALIGN_TOP);
    hPanel01.setCellHorizontalAlignment(boxNovoPontoEncontro, HasHorizontalAlignment.ALIGN_CENTER);
    hPanel01.setCellHorizontalAlignment(
        buttonSalvarNovosPontos, HasHorizontalAlignment.ALIGN_CENTER);
    hPanel01.setCellHorizontalAlignment(
        buttonAdicionarOutroPontoEncontro, HasHorizontalAlignment.ALIGN_CENTER);
    hPanel01.setCellHorizontalAlignment(buttonFechar, HasHorizontalAlignment.ALIGN_CENTER);
    hPanel01.setWidth("100%");
    hPanel01.setSpacing(6);

    hPanel01.add(boxNovoPontoEncontro);
    hPanel01.add(buttonAdicionarOutroPontoEncontro);
    hPanel01.add(buttonSalvarNovosPontos);
    hPanel01.add(buttonFechar);

    panelListaPontoEncontro.add(tabelaPontoEncontro);
    panelListaPontoEncontro.add(pager);
    panelListaPontoEncontro.add(hPanel01);

    panelListaPontoEncontro.setCellVerticalAlignment(
        tabelaPontoEncontro, HasVerticalAlignment.ALIGN_MIDDLE);
    panelListaPontoEncontro.setCellVerticalAlignment(pager, HasVerticalAlignment.ALIGN_MIDDLE);

    panelListaPontoEncontro.setCellHorizontalAlignment(
        tabelaPontoEncontro, HasHorizontalAlignment.ALIGN_CENTER);
    panelListaPontoEncontro.setCellHorizontalAlignment(pager, HasHorizontalAlignment.ALIGN_CENTER);
    panelListaPontoEncontro.setSpacing(8);

    setWidget(panelListaPontoEncontro);
  }
Ejemplo n.º 20
0
  public FilterBasicPopUp() {
    super(true);
    setAnimationEnabled(true);
    AllBoolean = false;
    filtro = new ArrayList<TypeClient>();
    VerticalPanel verticalPanel = new VerticalPanel();
    setWidget(verticalPanel);
    verticalPanel.setSize("100%", "100%");

    SimplePanel simplePanel = new SimplePanel();
    verticalPanel.add(simplePanel);
    simplePanel.setSize("100%", "100%");

    if (textBox == null) textBox = new TextBox();
    textBox.setVisibleLength(100);
    simplePanel.setWidget(textBox);
    textBox.setSize("98%", "100%");
    Lang = ActualState.getLanguage();

    horizontalPanel = new HorizontalPanel();
    verticalPanel.add(horizontalPanel);

    Button btnNewButton = new Button(Lang.getFilterButton());
    horizontalPanel.add(btnNewButton);
    horizontalPanel.setCellHorizontalAlignment(btnNewButton, HasHorizontalAlignment.ALIGN_CENTER);

    All = new Button(Lang.getSelect_All());
    All.addClickHandler(
        new ClickHandler() {
          public void onClick(ClickEvent event) {
            AllBoolean = !AllBoolean;
            if (AllBoolean) {
              textBox.setEnabled(false);
              textBox.setReadOnly(true);
              textBox.setText(Lang.getAllSelected());

            } else {
              textBox.setEnabled(true);
              textBox.setReadOnly(false);
              textBox.setText("");
            }
          }
        });
    horizontalPanel.add(All);
    All.setSize("100%", "100%");
    All.setStyleName("gwt-ButtonCenter");
    All.addMouseOutHandler(
        new MouseOutHandler() {
          public void onMouseOut(MouseOutEvent event) {
            ((Button) event.getSource()).setStyleName("gwt-ButtonCenter");
          }
        });
    All.addMouseOverHandler(
        new MouseOverHandler() {
          public void onMouseOver(MouseOverEvent event) {
            ((Button) event.getSource()).setStyleName("gwt-ButtonCenterOver");
          }
        });
    All.addMouseDownHandler(
        new MouseDownHandler() {
          public void onMouseDown(MouseDownEvent event) {
            ((Button) event.getSource()).setStyleName("gwt-ButtonCenterPush");
          }
        });

    Advance = new Button(Lang.getAdvance());
    Advance.addClickHandler(
        new ClickHandler() {
          public void onClick(ClickEvent event) {
            Controlador.change2FilterAdvance();
          }
        });
    Advance.setSize("100%", "100%");
    Advance.setStyleName("gwt-ButtonCenter");
    Advance.addMouseOutHandler(
        new MouseOutHandler() {
          public void onMouseOut(MouseOutEvent event) {
            ((Button) event.getSource()).setStyleName("gwt-ButtonCenter");
          }
        });
    Advance.addMouseOverHandler(
        new MouseOverHandler() {
          public void onMouseOver(MouseOverEvent event) {
            ((Button) event.getSource()).setStyleName("gwt-ButtonCenterOver");
          }
        });
    Advance.addMouseDownHandler(
        new MouseDownHandler() {
          public void onMouseDown(MouseDownEvent event) {
            ((Button) event.getSource()).setStyleName("gwt-ButtonCenterPush");
          }
        });
    horizontalPanel.add(Advance);

    btnNewButton.setSize("100%", "100%");
    btnNewButton.setStyleName("gwt-ButtonCenter");
    btnNewButton.addMouseOutHandler(
        new MouseOutHandler() {
          public void onMouseOut(MouseOutEvent event) {
            ((Button) event.getSource()).setStyleName("gwt-ButtonCenter");
          }
        });
    btnNewButton.addMouseOverHandler(
        new MouseOverHandler() {
          public void onMouseOver(MouseOverEvent event) {
            ((Button) event.getSource()).setStyleName("gwt-ButtonCenterOver");
          }
        });
    btnNewButton.addMouseDownHandler(
        new MouseDownHandler() {
          public void onMouseDown(MouseDownEvent event) {
            ((Button) event.getSource()).setStyleName("gwt-ButtonCenterPush");
          }
        });
    btnNewButton.addClickHandler(
        new ClickHandler() {

          public void onClick(ClickEvent event) {
            filtro = new ArrayList<TypeClient>();
            if (!AllBoolean) {
              String Token = textBox.getText();
              String[] Words = Token.split(",");
              if (Words.length > 0) {
                Types = MakeWords(Words);
                filtro = FindTypes(Types, ActualState.getReadingActivityCloseCatalog());
                ArrayList<UserClient> Usuarios =
                    FindUsers(Types, ActualState.getReadingactivity().getGroup());
                MainEntryPoint.setFiltro(filtro, Usuarios, Types, new ArrayList<Long>());
                Me.hide();
              }
            } else {
              MainEntryPoint.CleanFilter();
              Me.hide();
            }
          }

          private ArrayList<UserClient> FindUsers(ArrayList<String> types, GroupClient group) {
            ArrayList<UserClient> salida = new ArrayList<UserClient>();
            for (UserClient studentUnit : group.getParticipatingUsers()) {
              testUserIn(studentUnit, types, salida);
            }
            testUserIn(group.getProfessor(), types, salida);
            return salida;
          }

          private void testUserIn(
              UserClient studentUnit, ArrayList<String> types, ArrayList<UserClient> salida) {
            for (String typocandidato : types) {
              if (studentUnit.getFirstName().toUpperCase().contains(typocandidato.toUpperCase()))
                AddSalida(studentUnit, salida);
              if (studentUnit.getLastName().toUpperCase().contains(typocandidato.toUpperCase()))
                AddSalida(studentUnit, salida);
              if (studentUnit
                  .getId()
                  .toString()
                  .toUpperCase()
                  .contains(typocandidato.toUpperCase())) AddSalida(studentUnit, salida);
              if (studentUnit.getEmail().toUpperCase().contains(typocandidato.toUpperCase()))
                AddSalida(studentUnit, salida);
            }
          }

          private void AddSalida(UserClient studentUnit, ArrayList<UserClient> salida) {
            if (!salida.contains(studentUnit)) salida.add(studentUnit);
          }

          private ArrayList<TypeClient> FindTypes(
              ArrayList<String> types, CatalogoClient catalogo) {
            ArrayList<TypeClient> Salida = new ArrayList<TypeClient>();
            for (EntryClient entryUni : catalogo.getEntries()) {
              EvaluaEntry(entryUni, types, Salida);
            }
            return Salida;
          }

          private void EvaluaEntry(
              EntryClient entryUni, ArrayList<String> types, ArrayList<TypeClient> salida) {
            if (entryUni instanceof TypeClient) EvaluaType((TypeClient) entryUni, types, salida);
            else if (entryUni instanceof TypeCategoryClient)
              EvaluaTypeCategory((TypeCategoryClient) entryUni, types, salida);
          }

          private void EvaluaTypeCategory(
              TypeCategoryClient entryUni, ArrayList<String> types, ArrayList<TypeClient> salida) {
            if (existeEn(entryUni, types)) AddHijos(entryUni, salida);
          }

          private void AddHijos(TypeCategoryClient entryUni, ArrayList<TypeClient> salida) {
            for (EntryClient candidato : entryUni.getChildren()) {
              if (candidato instanceof TypeClient) AddASalida((TypeClient) candidato, salida);
              else if (candidato instanceof TypeCategoryClient)
                AddHijos((TypeCategoryClient) candidato, salida);
            }
          }

          private void EvaluaType(
              TypeClient entryUni, ArrayList<String> types, ArrayList<TypeClient> salida) {
            if (existeEn(entryUni, types)) AddASalida(entryUni, salida);
          }

          private void AddASalida(TypeClient entryUni, ArrayList<TypeClient> salida) {
            if (!salida.contains(entryUni)) salida.add(entryUni);
          }

          private boolean existeEn(EntryClient entryUni, ArrayList<String> types) {
            for (String candidato : types) {
              if (candidato.toUpperCase().contains(entryUni.getName().toUpperCase())) return true;
            }
            return false;
          }

          private ArrayList<String> MakeWords(String[] words) {
            ArrayList<String> Salida = new ArrayList<String>();
            for (String SS : words) {
              if (!SS.isEmpty()) Salida.add(SS);
            }
            return Salida;
          }
        });
  }
Ejemplo n.º 21
0
  private void initLayout() {

    table = new FlexTable();
    table.setWidth("100%");

    HTML conceptLab = new HTML(constants.exportConcept());
    HTML exportLab = new HTML(constants.exportFormat());
    HTML schemeLab = new HTML(constants.exportScheme());
    HTML dateLab = new HTML(constants.exportDate());
    HTML termCodeLab = new HTML(constants.exportTermCode());

    conceptLab.setWordWrap(false);
    exportLab.setWordWrap(false);
    schemeLab.setWordWrap(false);
    dateLab.setWordWrap(false);
    termCodeLab.setWordWrap(false);

    table.setWidget(0, 0, schemeLab);
    table.setWidget(0, 1, getScheme());
    table.setWidget(1, 0, conceptLab);
    table.setWidget(1, 1, getConcept());
    table.setWidget(2, 0, exportLab);
    table.setWidget(2, 1, getExportFormat());
    // table.setWidget(3, 0, termCodeLab);
    // table.setWidget(3, 1, getTermCode());
    // table.setWidget(4, 0, dateLab);
    // table.setWidget(4, 1, getDatePanel());

    table.getColumnFormatter().setWidth(0, "15%");
    table.getColumnFormatter().setWidth(1, "75%");

    final VerticalPanel exportOption = new VerticalPanel();
    exportOption.setSize("100%", "100%");
    exportOption.add(GridStyle.setTableRowStyle(table, "#F4F4F4", "#E8E8E8", 3));

    final Button export = new Button(constants.exportButton());
    final CheckBox chkZip = new CheckBox(constants.exportUseZip());

    HorizontalPanel bottombar = new HorizontalPanel();
    bottombar.setSpacing(5);
    bottombar.add(chkZip);
    bottombar.add(export);
    bottombar.setSize("100%", "100%");
    bottombar.setStyleName("bottombar");
    bottombar.setCellHorizontalAlignment(chkZip, HasHorizontalAlignment.ALIGN_LEFT);
    bottombar.setCellHorizontalAlignment(export, HasHorizontalAlignment.ALIGN_RIGHT);
    bottombar.setCellVerticalAlignment(export, HasVerticalAlignment.ALIGN_MIDDLE);

    // ButtonbarWidget bottomBarPanel = new ButtonbarWidget(null, bottombar);

    /*ld.setSize("100%", "100%");
    spacer.setSize("100%", "100%");
    spacer.setCellHorizontalAlignment(ld, HasHorizontalAlignment.ALIGN_CENTER);
    spacer.setCellVerticalAlignment(ld, HasVerticalAlignment.ALIGN_MIDDLE);

     Window.addResizeHandler(new ResizeHandler()
        {
        	public void onResize(ResizeEvent event) {
        		spacer.setSize("100%", "100%");
    		}
    	});*/

    VerticalPanel optionPanel = new VerticalPanel();
    optionPanel.setSize("100%", "100%");
    optionPanel.setStyleName("borderbar");
    optionPanel.add(exportOption);
    // optionPanel.add(spacer);
    optionPanel.add(bottombar);
    // optionPanel.setCellHeight(spacer, "100%");
    optionPanel.setCellVerticalAlignment(exportOption, HasVerticalAlignment.ALIGN_TOP);
    optionPanel.setCellVerticalAlignment(bottombar, HasVerticalAlignment.ALIGN_BOTTOM);

    HorizontalPanel langPanel = new HorizontalPanel();
    /*Image img = new Image("images/map-grey.gif");
    final Label lang = new Label(constants.exportSelectLang());
    lang.setSize("150", "100%");
    lang.setStyleName("displayexportLang");
    lang.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_LEFT);
    lang.addClickHandler(new ClickHandler() {
    	public void onClick(ClickEvent event) {
    		if(selectLanguage == null || !selectLanguage.isLoaded)
    			selectLanguage = new SelectLanguage();
    		selectLanguage.show();
    	}
    });

    langPanel.setSize("10%", "100%");
    langPanel.add(img);
    langPanel.add(new HTML("&nbsp;"));
    langPanel.add(lang);
    langPanel.add(new HTML("&nbsp;"));
    langPanel.add(new HTML("&nbsp;"));
    langPanel.setCellWidth(lang, "100%");
    langPanel.setCellHeight(lang, "100%");
    langPanel.setCellVerticalAlignment(img, HasVerticalAlignment.ALIGN_MIDDLE);
    langPanel.setCellVerticalAlignment(lang, HasVerticalAlignment.ALIGN_MIDDLE);
    langPanel.setCellHorizontalAlignment(lang, HasHorizontalAlignment.ALIGN_RIGHT);
    langPanel.setSpacing(1);*/

    VerticalPanel tempmainPanel = new VerticalPanel();
    tempmainPanel.setSpacing(10);
    tempmainPanel.add(optionPanel);

    BodyPanel mainPanel = new BodyPanel(constants.exportTitle(), tempmainPanel, langPanel);

    mainBodypanel.setSize("100%", "100%");
    mainBodypanel.add(mainPanel);
    mainBodypanel.setCellHorizontalAlignment(mainPanel, HasHorizontalAlignment.ALIGN_CENTER);
    mainBodypanel.setCellVerticalAlignment(mainPanel, HasVerticalAlignment.ALIGN_TOP);
    mainBodypanel.setCellWidth(mainPanel, "100%");
    mainBodypanel.setCellHeight(mainPanel, "100%");

    panel.clear();
    panel.setSize("100%", "100%");
    panel.add(mainBodypanel);
    panel.add(loadingDialog);
    panel.setCellHorizontalAlignment(mainPanel, HasHorizontalAlignment.ALIGN_CENTER);
    panel.setCellVerticalAlignment(mainPanel, HasVerticalAlignment.ALIGN_TOP);
    showLoading(false);

    // =================

    export.addClickHandler(
        new ClickHandler() {
          public void onClick(ClickEvent event) {
            if (!format.getValue((format.getSelectedIndex())).equals("")
                && !format.getValue(format.getSelectedIndex()).equals("--None--")) {
              exp.setFormat(format.getValue(format.getSelectedIndex()));
            } else {
              exp.setFormat(null);
            }
            String expformat = exp.getFormat();
            if (expformat == null || expformat.equals("")) {
              Window.alert(constants.exportSelectFormat());
            } else if (exp.getStartDate() != null || exp.getEndDate() != null) {
              if (exp.getStartDate() == null || exp.getEndDate() == null) {
                Window.alert(constants.exportSelectDateRange());
              }
            } else {
              showLoading(true);
              exp.setExpLanguage(userSelectedLanguage);
              exp.setTermCode(termCodeBox.getValue().equals("") ? null : termCodeBox.getValue());

              AsyncCallback<String> callback =
                  new AsyncCallback<String>() {
                    public void onSuccess(String key) {
                      String formattype = format.getValue(format.getSelectedIndex());

                      String filename =
                          "export_"
                              + formattype.toLowerCase()
                              + "_"
                              + DateTimeFormat.getFormat("ddMMyyyyhhmmss").format(new Date());

                      if (formattype.equals(ExportFormat.SKOS)
                          || formattype.equals(ExportFormat.SKOSXL)) filename += ".rdf";
                      else if (formattype.equals(ExportFormat.TBX)) filename += ".tbx";
                      else if (formattype.equals(ExportFormat.OWL_SIMPLE_FORMAT))
                        filename += ".owl";
                      else if (formattype.equals(ExportFormat.OWL_COMPLETE_FORMAT))
                        filename += ".owl";
                      else if (formattype.equals(ExportFormat.RDBMS_SQL_FORMAT)) filename += ".sql";

                      Window.open(
                          GWT.getHostPageBaseURL()
                              + "downloadExportData?filename="
                              + filename
                              + "&key="
                              + key
                              + "&size="
                              + ConfigConstants.ZIPSIZE
                              + "&forcezip="
                              + chkZip.getValue(),
                          "_download",
                          "");
                      showLoading(false);
                    }

                    public void onFailure(Throwable caught) {
                      showLoading(false);
                      ExceptionManager.showException(caught, constants.exportDataFail());
                    }
                  };
              Service.exportService.export(exp, MainApp.userId, 74, MainApp.userOntology, callback);
            }
          }
        });
  }
  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();
  }
Ejemplo n.º 23
0
  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());
    }
  }