public SelectUserOrRoleDialog(
      ArrayList<String> existing, final IUserRoleSelectedCallback callback) {
    super(
        Messages.getString("selectUserOrRole"),
        Messages.getString("ok"),
        Messages.getString("cancel"),
        false,
        true,
        contentTable); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
    usersListBox.addClickHandler(
        new ClickHandler() {
          public void onClick(ClickEvent event) {
            rolesListBox.setSelectedIndex(-1);
            okButton.setEnabled(true);
          }
        });
    rolesListBox.addClickHandler(
        new ClickHandler() {
          public void onClick(ClickEvent event) {
            usersListBox.setSelectedIndex(-1);
            okButton.setEnabled(true);
          }
        });

    setCallback(
        new IDialogCallback() {

          public void cancelPressed() {}

          public void okPressed() {
            if (getSelectedUser() != null) {
              callback.userSelected(getSelectedUser());
            } else {
              callback.roleSelected(getSelectedRole());
            }
          }
        });

    // Unique ids are important for test automation
    contentTable.getElement().setId("userOrRoleDialogContentTable");
    usersListBox.getElement().setId("userOrRoleDialogUsersList");
    rolesListBox.getElement().setId("userOrRoleDialogRolesList");
    okButton.getElement().setId("userOrRoleDialogOkButton");
    okButton.setEnabled(false);
    cancelButton.getElement().setId("userOrRoleDialogCancelButton");

    usersListBox.setVisibleItemCount(5);
    rolesListBox.setVisibleItemCount(5);
    rolesListBox.setWidth("100%"); // $NON-NLS-1$
    usersListBox.setWidth("100%"); // $NON-NLS-1$
    contentTable.clear();
    contentTable.setWidth("100%"); // $NON-NLS-1$
    contentTable.setWidget(0, 0, new Label(Messages.getString("users"))); // $NON-NLS-1$
    contentTable.setWidget(1, 0, usersListBox);
    contentTable.setWidget(2, 0, new Label(Messages.getString("roles"))); // $NON-NLS-1$
    contentTable.setWidget(3, 0, rolesListBox);
    fetchAllUsers(existing);
    fetchAllRoles(existing);
    setWidth("200px"); // $NON-NLS-1$
  }
Exemple #2
0
  private Widget getHeaderWidget() {
    FlexTable widget = new FlexTable();

    widget.setHTML(0, 0, DashboardMessages.MSG.office());
    officesLB = new ListBox();
    officesLB.setWidth("250px");
    widget.setWidget(0, 1, officesLB);

    widget.setHTML(0, 2, DashboardMessages.MSG.broker());
    brokersLB = new ListBox();
    brokersLB.setWidth("250px");
    widget.setWidget(0, 3, brokersLB);

    widget.setHTML(0, 4, DashboardMessages.MSG.userStatus());
    estateStatusLB = new ListBox();
    for (EstateStatusSearchType status : EstateStatusSearchType.values()) {
      estateStatusLB.addItem(status.getTitle(), "" + status.getId());
    }
    widget.setWidget(0, 5, estateStatusLB);

    findButton = new Button();
    findButton.setText(BaseMessages.MSG.find());
    widget.setWidget(0, 6, findButton);
    return widget;
  }
Exemple #3
0
    public void initLayout() {
      lang = new ListBox();
      lang =
          Convert.makeSelectedLanguageListBox(
              (ArrayList<String[]>) MainApp.getLanguage(), tObj.getLang());
      lang.setWidth("100%");
      lang.setEnabled(false);

      term = new TextBox();
      term.setText(tObj.getLabel());
      term.setWidth("100%");

      main = new CheckBox(constants.conceptPreferredTerm());
      if (tObj.isMainLabel()) {
        main.setValue(tObj.isMainLabel());
        // main.setEnabled(false);
      }

      Grid table = new Grid(2, 2);
      table.setWidget(0, 0, new HTML(constants.conceptTerm()));
      table.setWidget(1, 0, new HTML(constants.conceptLanguage()));
      table.setWidget(0, 1, term);
      table.setWidget(1, 1, lang);
      table.setWidth("100%");
      table.getColumnFormatter().setWidth(1, "80%");

      VerticalPanel vp = new VerticalPanel();
      vp.add(GridStyle.setTableConceptDetailStyleleft(table, "gslRow1", "gslCol1", "gslPanel1"));
      vp.add(main);
      vp.setSpacing(0);
      vp.setWidth("100%");
      vp.setCellHorizontalAlignment(main, HasHorizontalAlignment.ALIGN_RIGHT);

      addWidget(vp);
    }
Exemple #4
0
  @Override
  public void onModuleLoad() {
    addList();

    mainPanel.setLeftWidget(listbox);
    setListitems();
    listbox.setWidth("100%");
    listbox.setHeight("100%");

    listbox.addClickHandler(
        new ClickHandler() {

          @Override
          public void onClick(ClickEvent event) {
            String testcaseName = listbox.getItemText(listbox.getSelectedIndex());
            TestcaseWrapper widget = map.get(testcaseName);
            widget.show();
            panel.clear();
            panel.add(widget);
          }
        });

    mainPanel.setSplitPosition("300px");
    mainPanel.setRightWidget(panel);

    RootPanel.get().add(mainPanel);
  }
  private void showSetCellAlignmentDialog(final ListBox listBox, final IAlignment iAlignment) {
    final DialogBox origDialog = new DialogBox();
    DOM.setStyleAttribute(origDialog.getElement(), "zIndex", Integer.toString(Integer.MAX_VALUE));
    final VerticalPanel dialog = new VerticalPanel();
    origDialog.add(dialog);
    origDialog.setText("Cell Alignment Dialog");
    dialog.setHorizontalAlignment(VerticalPanel.ALIGN_CENTER);

    dialog.add(new Label("Please choose the Widget :"));
    final ListBox widgetIndexLb = new ListBox();
    for (Iterator<Widget> iterator = iterator(); iterator.hasNext(); ) {
      Widget next = iterator.next();
      widgetIndexLb.addItem(
          ((IVkWidget) next).getWidgetName() + " - at index - " + getWidgetIndex(next));
    }

    widgetIndexLb.setWidth("300px");
    dialog.add(widgetIndexLb);
    widgetIndexLb.addChangeHandler(
        new ChangeHandler() {
          @Override
          public void onChange(ChangeEvent event) {
            iAlignment.doAlignment(
                widgetIndexLb.getSelectedIndex(), listBox.getValue(listBox.getSelectedIndex()));
          }
        });
    dialog.add(new Label("Please choose Alignment"));
    dialog.add(listBox);
    listBox.addChangeHandler(
        new ChangeHandler() {
          @Override
          public void onChange(ChangeEvent event) {
            iAlignment.doAlignment(
                widgetIndexLb.getSelectedIndex(), listBox.getValue(listBox.getSelectedIndex()));
          }
        });
    HorizontalPanel buttonsPanel = new HorizontalPanel();
    dialog.add(buttonsPanel);
    Button saveButton = new Button("OK");
    buttonsPanel.add(saveButton);
    saveButton.addClickHandler(
        new ClickHandler() {
          @Override
          public void onClick(ClickEvent event) {
            // iAlignment.doAlignment(widgetIndexLb.getSelectedIndex(),
            // listBox.getValue(listBox.getSelectedIndex()));
            origDialog.hide();
          }
        });
    Button cancelButton = new Button("Cancel");
    buttonsPanel.add(cancelButton);
    cancelButton.addClickHandler(
        new ClickHandler() {
          @Override
          public void onClick(ClickEvent event) {
            origDialog.hide();
          }
        });
    origDialog.center();
  }
  public void addGoalType() {

    for (int i = 0; i < vgoalTypes.length; i++) {
      vdropBox.addItem(vgoalTypes[i]);
    }
    vdropBox.ensureDebugId("vcwListBox-dropBox");
    vmultiBox.ensureDebugId("vcwListBox-multiBox");
    vmultiBox.setWidth("11em");
    vmultiBox.setVisibleItemCount(3);
    // RootPanel.get("goalTypeDropBox").add(dropBox);
    vendorTable.setWidget(2, 0, new HTML("What is your Number 1 Weakness?"));
    vendorTable.setWidget(2, 1, businessName);
    vendorTable.setWidget(3, 0, new HTML("How is your Number 1 Weakness impacting you?"));
    vendorTable.setWidget(3, 1, product);
    vendorTable.setWidget(4, 0, new HTML("How do you plan to overcome this weakness"));
    vendorTable.setWidget(4, 1, income);
    vendorTable.setWidget(4, 0, new HTML("What is your Number 2 Strength?"));
    vendorTable.setWidget(4, 1, expense);
    vendorTable.setWidget(4, 0, new HTML("How is your Number 2 Weakness impacting you?"));
    vendorTable.setWidget(4, 1, savings);
    vendorTable.setWidget(5, 1, registerButton);
    // vendorTable.setWidget(2, 1, vdropBox);
    // RootPanel.get("flexTable").add(vendorTable);
    //   topBarViewListener.onGoalWordsSelect(vdropBox);
    // Add a handler to handle drop box events
    vdropBox.addChangeHandler(
        new ChangeHandler() {
          public void onChange(ChangeEvent event) {
            showCategory(vmultiBox, vdropBox.getSelectedIndex());
            vmultiBox.ensureDebugId("vcwListBox-multiBox");
          }
        });
  }
  public FolderSelectionWidget(
      final Map<String, String> batchClassesNameMap, final HandlerManager eventBus) {
    super();
    initWidget(BINDER.createAndBindUi(this));
    mainPanel.addStyleName(FolderManagementConstants.OPTIONS_BOX);
    batchClassSelectionListBox.setWidth(_150PX);
    batchClassSelectionListBox.addStyleName(FolderManagementConstants.CUSTOM_LIST_BOX);
    if (null != batchClassesNameMap && !batchClassesNameMap.isEmpty()) {
      Set<Entry<String, String>> entrySet = batchClassesNameMap.entrySet();
      for (Entry<String, String> entry : entrySet) {
        batchClassSelectionListBox.addItem(entry.getKey());
      }
      fireEventForFolderSelection(batchClassesNameMap, eventBus);
      batchClassSelectionListBox.addChangeHandler(
          new ChangeHandler() {

            @Override
            public void onChange(ChangeEvent event) {
              fireEventForFolderSelection(batchClassesNameMap, eventBus);
            }
          });
    } else {
      eventBus.fireEvent(new BatchClassChangeEvent());
    }
  }
 private ListBox createRolesListBox() {
   rolesListBox = new ListBox();
   rolesListBox.setVisibleItemCount(20);
   rolesListBox.setHeight("100%");
   rolesListBox.setWidth("200px");
   rolesListBox.addChangeHandler(this);
   return rolesListBox;
 }
  /** Initialize this example. */
  @ShowcaseSource
  @Override
  public Widget onInitialize() {
    // Use a Grid to layout the content
    Grid layout = new Grid(4, 2);
    layout.setCellSpacing(5);

    // Add a field to select the pattern
    patternList = new ListBox();
    patternList.setWidth("17em");
    String[] patterns = constants.cwNumberFormatPatterns();
    for (String pattern : patterns) {
      patternList.addItem(pattern);
    }
    patternList.addChangeHandler(
        new ChangeHandler() {
          public void onChange(ChangeEvent event) {
            updatePattern();
          }
        });
    layout.setHTML(0, 0, constants.cwNumberFormatPatternLabel());
    layout.setWidget(0, 1, patternList);

    // Add a field to display the pattern
    patternBox = new TextBox();
    patternBox.setWidth("17em");
    patternBox.addKeyUpHandler(
        new KeyUpHandler() {
          public void onKeyUp(KeyUpEvent event) {
            updatePattern();
          }
        });
    layout.setWidget(1, 1, patternBox);

    // Add a field to set the value
    valueBox = new TextBox();
    valueBox.setWidth("17em");
    valueBox.setText("31415926535.897932");
    valueBox.addKeyUpHandler(
        new KeyUpHandler() {
          public void onKeyUp(KeyUpEvent event) {
            updateFormattedValue();
          }
        });
    layout.setHTML(2, 0, constants.cwNumberFormatValueLabel());
    layout.setWidget(2, 1, valueBox);

    // Add a field to display the formatted value
    formattedBox = new Label();
    formattedBox.setWidth("17em");
    layout.setHTML(3, 0, constants.cwNumberFormatFormattedLabel());
    layout.setWidget(3, 1, formattedBox);

    // Return the layout Widget
    updatePattern();
    return layout;
  }
 public void setHorizontalAlignment(String horizontalAlignment) {
   if (VkStateHelper.getInstance().isDesignerMode()) {
     final ListBox listBox = new ListBox(false);
     listBox.addItem("Left", "left");
     listBox.addItem("Center", "center");
     listBox.addItem("Right", "right");
     listBox.setWidth("100px");
     showSetCellAlignmentDialog(
         listBox,
         new IAlignment() {
           @Override
           public void doAlignment(int widgetIndex, String align) {
             DOM.setElementAttribute(
                 (Element) getWidget(widgetIndex).getElement().getParentElement(), "align", align);
           }
         });
   }
 }
Exemple #11
0
 private ListBox getScheme() {
   scheme = new ListBox();
   scheme.addItem("--Select--", "--None--");
   for (String[] item : initData.getScheme()) {
     scheme.addItem(item[1], item[1]);
   }
   scheme.setWidth("100%");
   scheme.addChangeHandler(
       new ChangeHandler() {
         public void onChange(ChangeEvent event) {
           if (!scheme.getValue((scheme.getSelectedIndex())).equals("")
               && !scheme.getValue(scheme.getSelectedIndex()).equals("--None--")) {
             exp.setSchemeURI(scheme.getValue(scheme.getSelectedIndex()));
           } else {
             exp.setSchemeURI(null);
           }
         }
       });
   return scheme;
 }
Exemple #12
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;
  }
Exemple #13
0
  public AddPR() {

    VerticalPanel verticalPanel = new VerticalPanel();
    initWidget(verticalPanel);

    FlexTable flexTable = new FlexTable();
    verticalPanel.add(flexTable);
    flexTable.setSize("323px", "184px");

    Label lblSelectTheMethod = new Label("Select the method to add physical resources");
    lblSelectTheMethod.setStyleName("gui-Label");
    flexTable.setWidget(0, 0, lblSelectTheMethod);
    lblSelectTheMethod.setHeight("39px");

    final ListBox prList = new ListBox();
    flexTable.setWidget(1, 0, prList);
    prList.setWidth("249px");
    prList.addItem("Add PR by IP");
    prList.addItem("Add PR by IP response");
    prList.addItem("Add PR by URL");
    prList.addItem("Add PR by URL response");
    prList.addItem("Add Multiple PRs");
    prList.setVisibleItemCount(5);
    flexTable.getCellFormatter().setHorizontalAlignment(2, 0, HasHorizontalAlignment.ALIGN_RIGHT);

    Button btnAddPr = new Button("Add PR");
    btnAddPr.addClickHandler(
        new ClickHandler() {
          public void onClick(ClickEvent event) {
            // if (prList.getSelectedIndex() == -1) {Window.alert("Select the method!");};
            // if (prList.getSelectedIndex() == 0) {Window.alert("Under construction!");};
          }
        });
    flexTable.setWidget(2, 0, btnAddPr);
    flexTable.getCellFormatter().setHorizontalAlignment(1, 0, HasHorizontalAlignment.ALIGN_RIGHT);
    flexTable.getCellFormatter().setHorizontalAlignment(0, 0, HasHorizontalAlignment.ALIGN_CENTER);
  }
 @Override
 public void setVerticalAlignment(String verticalAlignment) {
   if (VkStateHelper.getInstance().isDesignerMode()) {
     final ListBox listBox = new ListBox(false);
     listBox.addItem("Top", "top");
     listBox.addItem("Middle", "middle");
     listBox.addItem("Bottom", "bottom");
     listBox.setWidth("100px");
     if (getVerticalAlignmentString().equals("top")) listBox.setSelectedIndex(0);
     else if (getVerticalAlignmentString().equals("middle")) listBox.setSelectedIndex(1);
     else if (getVerticalAlignmentString().equals("bottom")) listBox.setSelectedIndex(2);
     showSetCellAlignmentDialog(
         listBox,
         new IAlignment() {
           @Override
           public void doAlignment(int widgetIndex, String align) {
             DOM.setStyleAttribute(
                 (Element) getWidget(widgetIndex).getElement().getParentElement(),
                 "verticalAlign",
                 align);
           }
         });
   }
 }
  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 CreateMemberView(LocalizationConstants constants) {

    this.constants = constants;
    importantDisclosurePanel = new DisclosurePanel(constants.importantInformations());
    importantDisclosurePanel.setContent(createMemberPanel);
    importantDisclosurePanel.setOpen(true);
    importantDisclosurePanel.setStyleName("disclosurePanel");
    bankAccountDisclosurePanel = new DisclosurePanel(constants.accountInformations());
    bankAccountDisclosurePanel.setContent(bankAccountPanel);
    bankAccountDisclosurePanel.setOpen(true);
    bankAccountDisclosurePanel.setStyleName("disclosurePanel");
    additionalDisclosurePanel = new DisclosurePanel(constants.additionalInformations());
    additionalDisclosurePanel.setContent(createMemberPanel2);
    additionalDisclosurePanel.setStyleName("AdditionalisclosurePanel");

    header = new Label("Mitglied anlegen");
    header.setStyleName("formHeader2");

    wrapper.add(header);
    wrapper.add(importantDisclosurePanel);
    wrapper.add(bankAccountDisclosurePanel);
    wrapper.add(additionalDisclosurePanel);
    wrapper.addStyleName("memberCreateWrapper");
    initWidget(wrapper);

    sendButton.setText(constants.send());

    pictureUploadPanel = new HorizontalPanel();
    pictureUploadLabel = new Label(constants.picture() + ": ");
    defaultUploader = new MultiUploader(FileInputType.LABEL);
    pictureUploadPanel.add(pictureUploadLabel);
    pictureUploadPanel.add(defaultUploader);
    image = new PreloadedImage();
    image.setWidth("75px");

    wrapper.add(sendButton);

    HorizontalPanel forenameInputPanel = new HorizontalPanel();
    forenameLabel = new Label(constants.forename() + ":* ");
    forenameTextBox = new TextBox();
    forenameInputPanel.add(forenameLabel);
    forenameInputPanel.add(forenameTextBox);

    validator = new DefaultValidationProcessor();

    HorizontalPanel surnameInputPanel = new HorizontalPanel();
    surnameLabel = new Label(constants.surname() + ":* ");
    surnameTextBox = new TextBox();
    surnameInputPanel.add(surnameLabel);
    surnameInputPanel.add(surnameTextBox);

    barcodeInputPanel = new HorizontalPanel();
    barcodeLabel = new Label(constants.barcode() + ":* ");
    barcodeTextBox = new TextBox();
    barcodeInputPanel.add(barcodeLabel);
    barcodeInputPanel.add(barcodeTextBox);

    HorizontalPanel streetInputPanel = new HorizontalPanel();
    streetLabel = new Label(constants.street() + ":* ");
    streetTextBox = new TextBox();
    streetInputPanel.add(streetLabel);
    streetInputPanel.add(streetTextBox);

    HorizontalPanel zipcodeInputPanel = new HorizontalPanel();
    zipcodeLabel = new Label(constants.zipcode() + ":* ");
    zipcodeTextBox = new TextBox();
    zipcodeInputPanel.add(zipcodeLabel);
    zipcodeInputPanel.add(zipcodeTextBox);

    HorizontalPanel cityInputPanel = new HorizontalPanel();
    cityLabel = new Label(constants.city() + ":* ");
    cityTextBox = new TextBox();
    cityInputPanel.add(cityLabel);
    cityInputPanel.add(cityTextBox);

    HorizontalPanel phoneInputPanel = new HorizontalPanel();
    phoneLabel = new Label(constants.phone() + ":* ");
    phoneTextBox = new TextBox();
    phoneInputPanel.add(phoneLabel);
    phoneInputPanel.add(phoneTextBox);

    HorizontalPanel mobilephoneInputPanel = new HorizontalPanel();
    mobilephoneLabel = new Label(constants.mobilephone() + ": ");
    mobilephoneTextBox = new TextBox();
    mobilephoneInputPanel.add(mobilephoneLabel);
    mobilephoneInputPanel.add(mobilephoneTextBox);

    HorizontalPanel accountOwnerForenameInputPanel = new HorizontalPanel();
    VerticalPanel likeAbovePanel = new VerticalPanel();
    likeAbovePanel.setStyleName("likeAbovePanel");
    accountOwnerForenameLabel = new Label(constants.forename() + ":* ");
    accountOwnerForenameTextBox = new TextBox();
    likeAbove = new CheckBox(constants.likeAbove());
    accountOwnerForenameInputPanel.add(accountOwnerForenameLabel);
    accountOwnerForenameInputPanel.add(likeAbovePanel);
    likeAbovePanel.add(accountOwnerForenameTextBox);
    likeAbovePanel.add(likeAbove);

    HorizontalPanel accountOwnerSurnameInputPanel = new HorizontalPanel();
    VerticalPanel likeAbovePanel2 = new VerticalPanel();
    likeAbovePanel2.setStyleName("likeAbovePanel");
    accountOwnerSurnameLabel = new Label(constants.surname() + ":* ");
    accountOwnerSurnameTextBox = new TextBox();
    likeAbove2 = new CheckBox(constants.likeAbove());
    accountOwnerSurnameInputPanel.add(accountOwnerSurnameLabel);
    accountOwnerSurnameInputPanel.add(likeAbovePanel2);
    likeAbovePanel2.add(accountOwnerSurnameTextBox);
    likeAbovePanel2.add(likeAbove2);

    HorizontalPanel accountNumberInputPanel = new HorizontalPanel();
    accountNumberLabel = new Label(constants.accountNumber() + ":* ");
    accountNumberTextBox = new TextBox();
    accountNumberInputPanel.add(accountNumberLabel);
    accountNumberInputPanel.add(accountNumberTextBox);

    HorizontalPanel bankNumberInputPanel = new HorizontalPanel();
    bankNumberLabel = new Label(constants.bankNumber() + ":* ");
    bankNumberTextBox = new TextBox();
    bankNumberInputPanel.add(bankNumberLabel);
    bankNumberInputPanel.add(bankNumberTextBox);

    HorizontalPanel bankNameInputPanel = new HorizontalPanel();
    bankNameLabel = new Label(constants.bankName() + ":* ");
    bankNameTextBox = new TextBox();
    bankNameInputPanel.add(bankNameLabel);
    bankNameInputPanel.add(bankNameTextBox);

    HorizontalPanel faxInputPanel = new HorizontalPanel();
    faxLabel = new Label(constants.fax() + ": ");
    faxTextBox = new TextBox();
    faxInputPanel.add(faxLabel);
    faxInputPanel.add(faxTextBox);

    HorizontalPanel emailInputPanel = new HorizontalPanel();
    emailLabel = new Label(constants.email() + ": ");
    emailTextBox = new TextBox();
    emailInputPanel.add(emailLabel);
    emailInputPanel.add(emailTextBox);

    HorizontalPanel homepageInputPanel = new HorizontalPanel();
    homepageLabel = new Label(constants.homepage() + ": ");
    homepageTextBox = new TextBox();
    homepageInputPanel.add(homepageLabel);
    homepageInputPanel.add(homepageTextBox);

    HorizontalPanel birthInputPanel = new HorizontalPanel();
    birthLabel = new Label(constants.birth() + ":* ");
    birthTextBox1 = new ListBox();
    birthTextBox2 = new ListBox();
    birthTextBox3 = new ListBox();

    birthTextBox1.addStyleName("birthDayTextBox");
    birthTextBox2.addStyleName("birthMonthTextBox");
    birthTextBox3.addStyleName("birthYearTextBox");

    birthTextBox1.addItem(constants.day());
    for (Integer i = 1; i < 32; i++) {
      if (i < 10) {
        birthTextBox1.addItem("0" + i.toString() + ".");
      } else {
        birthTextBox1.addItem(i.toString() + ".");
      }
    }

    birthTextBox2.addItem(constants.month());
    birthTextBox2.addItem(constants.january());
    birthTextBox2.addItem(constants.february());
    birthTextBox2.addItem(constants.march());
    birthTextBox2.addItem(constants.april());
    birthTextBox2.addItem(constants.may());
    birthTextBox2.addItem(constants.june());
    birthTextBox2.addItem(constants.july());
    birthTextBox2.addItem(constants.august());
    birthTextBox2.addItem(constants.september());
    birthTextBox2.addItem(constants.october());
    birthTextBox2.addItem(constants.november());
    birthTextBox2.addItem(constants.december());

    birthTextBox3.addItem(constants.year());
    for (Integer i = 2008; i > 1960; i--) {
      birthTextBox3.addItem(i.toString());
    }

    birthInputPanel.add(birthLabel);
    birthInputPanel.add(birthTextBox1);
    birthInputPanel.add(birthTextBox2);
    birthInputPanel.add(birthTextBox3);

    HorizontalPanel diseasesInputPanel = new HorizontalPanel();
    diseasesLabel = new Label(constants.diseases() + ": ");
    diseasesTextBox = new TextArea();
    diseasesInputPanel.add(diseasesLabel);
    diseasesInputPanel.add(diseasesTextBox);

    // TODO
    HorizontalPanel beltsizeInputPanel = new HorizontalPanel();
    beltsizeLabel = new Label(constants.beltsize() + ":* ");
    beltsizeListBox = new ListBox();
    beltsizeListBox.addItem("<auswählen>");
    beltsizeListBox.addItem("200");
    beltsizeListBox.addItem("220");
    beltsizeListBox.addItem("240");
    beltsizeListBox.addItem("260");
    beltsizeListBox.addItem("280");
    beltsizeListBox.addItem("300");

    beltsizeListBox.setWidth("255px");

    beltsizeInputPanel.add(beltsizeLabel);
    beltsizeInputPanel.add(beltsizeListBox);

    HorizontalPanel noteInputPanel = new HorizontalPanel();
    noteLabel = new Label(constants.note() + ": ");
    noteTextBox = new TextArea();
    noteInputPanel.add(noteLabel);
    noteInputPanel.add(noteTextBox);

    for (int i = 0; i < 15; i++) {
      courseList.add(new CourseSelectorWidget());
    }

    createMemberPanel.add(forenameInputPanel);
    createMemberPanel.add(surnameInputPanel);
    createMemberPanel.add(barcodeInputPanel);
    createMemberPanel.add(streetInputPanel);
    createMemberPanel.add(zipcodeInputPanel);
    createMemberPanel.add(cityInputPanel);
    createMemberPanel.add(birthInputPanel);
    createMemberPanel.add(phoneInputPanel);
    createMemberPanel.add(mobilephoneInputPanel);

    bankAccountPanel.add(accountOwnerForenameInputPanel);
    bankAccountPanel.add(accountOwnerSurnameInputPanel);
    bankAccountPanel.add(accountNumberInputPanel);
    bankAccountPanel.add(bankNameInputPanel);
    bankAccountPanel.add(bankNumberInputPanel);

    createMemberPanel2.add(faxInputPanel);
    createMemberPanel2.add(emailInputPanel);
    createMemberPanel2.add(homepageInputPanel);
    createMemberPanel2.add(homepageInputPanel);
    createMemberPanel.add(beltsizeInputPanel);
    createMemberPanel2.add(diseasesInputPanel);
    createMemberPanel2.add(noteInputPanel);

    courseSelectorWrapper = new VerticalPanel();
    createMemberPanel.add(courseSelectorWrapper);
    courseSelectorWrapper.add(courseList.get(0).getCourseSelector());
    courseList.get(0).setCourseLabel(1);
    courseList.get(0).noDeleteButton();
    newCourseSelectorLabel = new Label("Weiteren Kurs hinzufügen");
    newCourseSelectorLabel.setStyleName("addNewCourseSelctorLabel");
    courseSelectorWrapper.add(newCourseSelectorLabel);

    createMemberPanel.add(pictureUploadPanel);
  }
Exemple #17
0
  public EventEditor(final Admin admin, JSEventTemplate et) {
    this.admin = admin;
    this.et = et;

    vpanel.setWidth("100%");
    vpanel.setHeight("100%");

    final Label errmsg = new Label();
    errmsg.addStyleName(errmsg.getStylePrimaryName() + "-error");
    errmsg.addStyleName(errmsg.getStylePrimaryName() + "-bottom");

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

    CellFormatter cf = grid.getCellFormatter();
    // right align field labels
    cf.setHorizontalAlignment(0, 0, HasHorizontalAlignment.ALIGN_RIGHT);
    cf.setHorizontalAlignment(1, 0, HasHorizontalAlignment.ALIGN_RIGHT);
    cf.setHorizontalAlignment(2, 0, HasHorizontalAlignment.ALIGN_RIGHT);
    cf.setHorizontalAlignment(3, 0, HasHorizontalAlignment.ALIGN_RIGHT);
    cf.setHorizontalAlignment(4, 0, HasHorizontalAlignment.ALIGN_RIGHT);
    cf.setHorizontalAlignment(5, 0, HasHorizontalAlignment.ALIGN_RIGHT);
    cf.setHorizontalAlignment(7, 0, HasHorizontalAlignment.ALIGN_RIGHT);

    grid.setText(0, 0, "Event Name:");
    grid.setText(1, 0, "Raid Size:");
    grid.setText(2, 0, "Minimum Level:");
    grid.setText(3, 0, "Instance:");
    grid.setText(4, 0, "Bosses:");
    grid.setText(5, 0, "Roles:");
    grid.setText(7, 0, "Badges:");

    size.setVisibleLength(2);
    minlevel.setVisibleLength(2);

    size.addChangeHandler(
        new ChangeHandler() {
          public void onChange(ChangeEvent event) {
            try {
              int sizen = Integer.parseInt(size.getText());
              if (sizen < 0) {
                size.setText("0");
              }
            } catch (NumberFormatException e) {
              size.setText("25");
            }

            updateRoleTotals();
          }
        });

    minlevel.addChangeHandler(
        new ChangeHandler() {
          public void onChange(ChangeEvent event) {
            try {
              int minleveln = Integer.parseInt(minlevel.getText());
              if (minleveln < 0) {
                size.setText("0");
              }
            } catch (NumberFormatException e) {
              size.setText(MAX_LEVEL);
            }
          }
        });

    instances.setWidth("100%");
    instances.setVisibleItemCount(1);

    roles.setWidth("100%");
    roles.setVisibleItemCount(1);

    badges.setWidth("100%");
    badges.setVisibleItemCount(1);

    grid.setWidget(0, 1, name);
    grid.setWidget(1, 1, size);
    grid.setWidget(2, 1, minlevel);

    grid.setWidget(3, 1, instances);

    GoteFarm.goteService.getInstances(
        admin.current_guild.key,
        new AsyncCallback<List<JSInstance>>() {
          public void onSuccess(List<JSInstance> results) {
            int sel = 0;

            for (JSInstance i : results) {
              instances.addItem(i.name, i.key);
              if (EventEditor.this.et != null && i.key.equals(EventEditor.this.et.instance_key)) {
                sel = instances.getItemCount() - 1;
              }
            }

            instances.setSelectedIndex(sel);

            updateBosses();
          }

          public void onFailure(Throwable caught) {}
        });

    instances.addChangeHandler(this);
    roles.addChangeHandler(this);
    badges.addChangeHandler(this);

    grid.setWidget(3, 2, newinst);

    newinst.setText(NEW_INSTANCE);

    newinst.addKeyPressHandler(
        new KeyPressHandler() {
          public void onKeyPress(KeyPressEvent event) {
            if (event.getCharCode() == KeyCodes.KEY_ENTER) {
              final String inst = newinst.getText();

              boolean found = false;

              for (int i = 0; i < instances.getItemCount(); ++i) {
                if (instances.getItemText(i).equals(inst)) {
                  instances.setSelectedIndex(i);
                  focusBoss();
                  found = true;
                  break;
                }
              }

              if (!found) {
                GoteFarm.goteService.addInstance(
                    admin.current_guild.key,
                    inst,
                    new AsyncCallback<JSInstance>() {
                      public void onSuccess(JSInstance result) {
                        instances.addItem(result.name, result.key);
                        instances.setSelectedIndex(instances.getItemCount() - 1);
                        bosses.clear();

                        focusBoss();
                      }

                      public void onFailure(Throwable caught) {
                        errmsg.setText(caught.getMessage());
                      }
                    });
              }
            }
          }
        });

    grid.setWidget(4, 1, bosses);
    grid.setWidget(4, 2, newboss);

    bosses.setWidth("100%");
    bosses.setVisibleItemCount(10);

    newboss.setText(NEW_BOSS);

    newboss.addKeyPressHandler(
        new KeyPressHandler() {
          public void onKeyPress(KeyPressEvent event) {
            if (event.getCharCode() == KeyCodes.KEY_ENTER) {
              int selinst = instances.getSelectedIndex();
              if (selinst == -1) {
                errmsg.setText("You need to select and instance to " + "add a boss.");
                return;
              }

              final String boss = newboss.getText();

              boolean found = false;

              for (int i = 0; i < bosses.getItemCount(); ++i) {
                if (bosses.getItemText(i).equals(boss)) {
                  bosses.setItemSelected(i, true);
                  focusBoss();
                  found = true;
                  break;
                }
              }

              if (!found) {
                GoteFarm.goteService.addBoss(
                    instances.getValue(selinst),
                    boss,
                    new AsyncCallback<JSBoss>() {

                      public void onSuccess(JSBoss result) {
                        bosses.addItem(result.name, result.key);
                        bosses.setItemSelected(bosses.getItemCount() - 1, true);

                        focusBoss();
                      }

                      public void onFailure(Throwable caught) {
                        errmsg.setText(caught.getMessage());
                      }
                    });
              }
            }
          }
        });

    grid.setWidget(5, 1, roles);

    roles.addItem(SELECT_A_ROLE);

    GoteFarm.goteService.getRoles(
        admin.current_guild.key,
        new AsyncCallback<List<JSRole>>() {
          public void onSuccess(List<JSRole> results) {
            for (JSRole i : results) {
              roles.addItem(i.name, i.key);
            }
          }

          public void onFailure(Throwable caught) {}
        });

    grid.setWidget(5, 2, newrole);

    newrole.setText(NEW_ROLE);

    newrole.addKeyPressHandler(
        new KeyPressHandler() {
          private void focusRole() {
            newrole.setFocus(true);
            newrole.setText(NEW_ROLE);
            newrole.setSelectionRange(0, NEW_ROLE.length());
          }

          public void onKeyPress(KeyPressEvent event) {
            if (event.getCharCode() == KeyCodes.KEY_ENTER) {
              final String role = newrole.getText();

              boolean found = false;

              for (int i = 0; i < roles.getItemCount(); ++i) {
                if (roles.getItemText(i).equals(role)) {
                  roles.setSelectedIndex(i);
                  addRole(role);
                  focusRole();
                  found = true;
                  break;
                }
              }

              if (!found) {
                GoteFarm.goteService.addRole(
                    admin.current_guild.key,
                    role,
                    true,
                    new AsyncCallback<JSRole>() {
                      public void onSuccess(JSRole result) {
                        roles.addItem(role, result.key);
                        roles.setSelectedIndex(roles.getItemCount() - 1);

                        addRole(role);
                        focusRole();
                      }

                      public void onFailure(Throwable caught) {
                        errmsg.setText(caught.getMessage());
                      }
                    });
              }
            }
          }
        });

    roleft.setWidth("100%");
    roleft.setCellSpacing(0);
    roleft.setCellPadding(5);
    roleft.setText(0, 0, "Role");
    roleft.setText(0, 1, "Min");
    roleft.setText(0, 2, "Max");
    roleft.setText(1, 0, "Totals");

    FlexTable.FlexCellFormatter rcf = roleft.getFlexCellFormatter();
    rcf.addStyleName(0, 0, "header");
    rcf.addStyleName(0, 1, "header");
    rcf.addStyleName(0, 2, "header");
    rcf.addStyleName(0, 3, "header");
    rcf.addStyleName(1, 0, "footer");
    rcf.addStyleName(1, 1, "footer");
    rcf.addStyleName(1, 2, "footer");
    rcf.addStyleName(1, 3, "footer");

    FlexTable.FlexCellFormatter gcf = grid.getFlexCellFormatter();

    grid.setWidget(6, 0, roleft);
    gcf.setColSpan(6, 0, 3);

    grid.setWidget(7, 1, badges);

    badges.addItem(SELECT_A_BADGE);

    GoteFarm.goteService.getBadges(
        admin.current_guild.key,
        new AsyncCallback<List<JSBadge>>() {
          public void onSuccess(List<JSBadge> results) {
            for (JSBadge badge : results) {
              badges.addItem(badge.name, badge.key);
            }
          }

          public void onFailure(Throwable caught) {}
        });

    grid.setWidget(7, 2, newbadge);

    newbadge.setText(NEW_BADGE);

    newbadge.addKeyPressHandler(
        new KeyPressHandler() {
          private void focusBadge() {
            newbadge.setFocus(true);
            newbadge.setText(NEW_BADGE);
            newbadge.setSelectionRange(0, NEW_BADGE.length());
          }

          public void onKeyPress(KeyPressEvent event) {
            if (event.getCharCode() == KeyCodes.KEY_ENTER) {
              final String badge = newbadge.getText();

              boolean found = false;

              for (int i = 0; i < badges.getItemCount(); ++i) {
                if (badges.getItemText(i).equals(badge)) {
                  addBadge(badge);
                  focusBadge();
                  found = true;
                  break;
                }
              }

              if (!found) {
                GoteFarm.goteService.addBadge(
                    admin.current_guild.key,
                    badge,
                    0,
                    new AsyncCallback<JSBadge>() {
                      public void onSuccess(JSBadge result) {
                        badges.addItem(badge, result.key);
                        badges.setSelectedIndex(badges.getItemCount() - 1);

                        addBadge(badge);
                        focusBadge();
                      }

                      public void onFailure(Throwable caught) {
                        errmsg.setText(caught.getMessage());
                      }
                    });
              }
            }
          }
        });

    badgeft.setWidth("100%");
    badgeft.setCellSpacing(0);
    badgeft.setCellPadding(5);
    badgeft.setText(0, 0, "Badge");
    badgeft.setText(0, 1, "Require For Sign Up");
    badgeft.setText(0, 2, "Apply To Role");
    badgeft.setText(0, 3, "Num Role Slots");
    badgeft.setText(0, 4, "Early Signup (Hours)");

    FlexTable.FlexCellFormatter bcf = badgeft.getFlexCellFormatter();
    bcf.addStyleName(0, 0, "header");
    bcf.addStyleName(0, 1, "header");
    bcf.addStyleName(0, 2, "header");
    bcf.addStyleName(0, 3, "header");
    bcf.addStyleName(0, 4, "header");
    bcf.addStyleName(0, 5, "header");

    grid.setWidget(8, 0, badgeft);
    gcf.setColSpan(8, 0, 3);

    vpanel.add(grid);

    HorizontalPanel hpanel = new HorizontalPanel();
    hpanel.setWidth("100%");

    final CheckBox modify = new CheckBox("Modify published events (can change signups)");
    modify.setValue(true);
    modify.addStyleName(modify.getStylePrimaryName() + "-bottom");
    modify.addStyleName(modify.getStylePrimaryName() + "-left");

    Button save =
        new Button(
            "Save",
            new ClickHandler() {
              public void onClick(ClickEvent event) {
                // clear error message
                errmsg.setText("");

                final JSEventTemplate t = new JSEventTemplate();

                if (EventEditor.this.et != null) {
                  t.key = EventEditor.this.et.key;
                } else {
                  t.key = null;
                }

                t.name = name.getText();
                t.size = getRaidSize();
                t.minimumLevel = Integer.parseInt(minlevel.getText());
                int index = instances.getSelectedIndex();
                if (index < 0) {
                  errmsg.setText("Please select an instance for this event.");
                  return;
                }
                t.instance_key = instances.getValue(index);

                t.boss_keys = new ArrayList<String>();
                for (int i = 0; i < bosses.getItemCount(); ++i) {
                  if (bosses.isItemSelected(i)) {
                    t.boss_keys.add(bosses.getValue(i));
                  }
                }

                t.roles = new ArrayList<JSEventRole>();
                for (int i = 0; i < roleft.getRowCount() - 2; ++i) {
                  JSEventRole er = new JSEventRole();
                  er.name = roleft.getText(i + 1, 0);
                  er.role_key = getRoleKey(er.name);
                  TextBox minmax;
                  minmax = (TextBox) roleft.getWidget(i + 1, 1);
                  er.min = Integer.parseInt(minmax.getText());
                  minmax = (TextBox) roleft.getWidget(i + 1, 2);
                  er.max = Integer.parseInt(minmax.getText());
                  t.roles.add(er);
                }

                t.badges = new ArrayList<JSEventBadge>();
                for (int i = 0; i < badgeft.getRowCount() - 1; ++i) {
                  JSEventBadge eb = new JSEventBadge();
                  eb.name = badgeft.getText(i + 1, 0);
                  eb.badge_key = getBadgeKey(eb.name);
                  CheckBox cb = (CheckBox) badgeft.getWidget(i + 1, 1);
                  eb.requireForSignup = cb.getValue();
                  ListBox lb = (ListBox) badgeft.getWidget(i + 1, 2);
                  String role = lb.getItemText(lb.getSelectedIndex());
                  if (!role.equals(ALL_ROLES)) {
                    eb.applyToRole = role;
                  }
                  TextBox tb;
                  tb = (TextBox) badgeft.getWidget(i + 1, 3);
                  eb.numSlots = Integer.parseInt(tb.getText());
                  tb = (TextBox) badgeft.getWidget(i + 1, 4);
                  eb.earlySignup = Integer.parseInt(tb.getText());
                  t.badges.add(eb);
                }

                t.modifyEvents = modify.getValue();

                GoteFarm.goteService.saveEventTemplate(
                    admin.current_guild.key,
                    t,
                    new AsyncCallback<JSEventTemplate>() {
                      public void onSuccess(JSEventTemplate result) {
                        EventEditor.this.admin.eventAdded();
                        EventEditor.this.admin.setCenterWidget(null);
                        if (t.key != null && t.modifyEvents) {
                          admin.fireAdminChange(AdminChange.getEventsChanged());
                        }
                      }

                      public void onFailure(Throwable caught) {
                        errmsg.setText(caught.getMessage());
                      }
                    });
              }
            });

    save.addStyleName(save.getStylePrimaryName() + "-bottom");
    save.addStyleName(save.getStylePrimaryName() + "-left");

    Button cancel =
        new Button(
            "Cancel",
            new ClickHandler() {
              public void onClick(ClickEvent event) {
                EventEditor.this.admin.setCenterWidget(null);
              }
            });

    cancel.addStyleName(cancel.getStylePrimaryName() + "-bottom");
    cancel.addStyleName(cancel.getStylePrimaryName() + "-right");

    hpanel.add(save);
    // Editing an existing event?
    if (EventEditor.this.et != null) {
      hpanel.add(modify);
    }
    hpanel.add(errmsg);
    hpanel.add(cancel);

    vpanel.add(hpanel);

    if (et != null) {
      for (JSEventRole ev : et.roles) {
        addRole(ev.name, ev.min, ev.max);
      }

      for (JSEventBadge eb : et.badges) {
        addBadge(eb.name, eb.requireForSignup, eb.applyToRole, eb.numSlots, eb.earlySignup);
      }
    }

    if (et == null) {
      name.setText(NEW_EVENT);

      DeferredCommand.addCommand(
          new Command() {
            public void execute() {
              name.setFocus(true);
              name.setSelectionRange(0, NEW_EVENT.length());
            }
          });

      size.setText("25");
      minlevel.setText(MAX_LEVEL);
    } else {
      name.setText(et.name);
      size.setText("" + et.size);
      minlevel.setText("" + et.minimumLevel);
    }

    updateRoleTotals();

    initWidget(vpanel);

    setStyleName("Admin-EventEditor");
  }
  public PCAPanel(DatasetInformation datasetInfo) {
    this.setWidth("400px");
    this.setHeight("150px");
    this.setTitle("Principal component analysis");
    this.setShowMinimizeButton(false);
    this.setIsModal(false);
    this.centerInPage();
    this.addCloseClickHandler(
        new CloseClickHandler() {
          @Override
          public void onCloseClick(CloseClickEvent event) {
            hide();
            destroy();
          }
        });

    VLayout vp = new VLayout();
    vp.setWidth100();
    vp.setHeight100();
    this.addItem(vp);

    HLayout hp1 = new HLayout();
    hp1.setWidth100();
    hp1.setHeight("20px");
    Label l1 = new Label("X AXES ");
    l1.setHeight("20px");
    l1.setWidth("100px");
    pcaI = new ListBox();
    pcaI.setWidth("200px");
    pcaI.setHeight("20px");
    pcaI.setTitle("X AXES");

    hp1.addMember(l1);
    hp1.addMember(pcaI);
    hp1.setMargin(5);

    vp.addMember(hp1);
    hp1.setAlign(Alignment.LEFT);

    HLayout hp2 = new HLayout();
    hp2.setWidth100();
    hp2.setHeight("20px");
    Label l2 = new Label("Y AXES ");
    l2.setHeight("20px");
    l2.setWidth("100px");

    pcaII = new ListBox();
    pcaII.setWidth("200px");
    pcaII.setHeight("20px");
    pcaII.setTitle("Y AXES");

    hp2.addMember(l2);
    hp2.addMember(pcaII);
    hp2.setMargin(5);

    vp.addMember(hp2);
    hp2.setAlign(Alignment.LEFT);

    if (datasetInfo != null) {
      for (String str : datasetInfo.getColsNames()) {
        pcaI.addItem(str);
        pcaII.addItem(str);
      }
      pcaI.setSelectedIndex(0);
      pcaII.setSelectedIndex(1);
    }
    okBtn = new IButton("Start Process");
    okBtn.setWidth("200px");
    okBtn.setAlign(Alignment.CENTER);
    okBtn.setShowRollOver(true);
    okBtn.setShowDown(true);
    okBtn.setTitleStyle("stretchTitle");

    HLayout btnLayout = new HLayout();
    btnLayout.setWidth100();
    btnLayout.setHeight("20px");
    btnLayout.addMember(okBtn);
    btnLayout.setAlign(Alignment.CENTER);

    vp.addMember(btnLayout);
    vp.setTop(20);
    vp.setMembersMargin(15);

    this.show();
  }
  @Override
  public void applyAttribute(String attributeName, Widget invokingWidget) {
    final VkMenuBarHorizontal menuBar = (VkMenuBarHorizontal) invokingWidget;
    if (attributeName.equals(ADD_SEPERATOR)) addSeparator(menuBar);
    else if (attributeName.equals(ADD_ITEM)) showAddItemAttributeDialog(menuBar);
    else if (attributeName.equals(REMOVE_ITEM)) {
      final ListBox listBox = new ListBox();
      listBox.setWidth("200px");
      int itemCount = menuBar.getItemCount();
      if (itemCount == 0) {
        Window.alert("No Items found to remove");
        return;
      }
      for (int i = 0; i < itemCount; i++)
        listBox.addItem(menuBar.getMenuItem(i).getText(), Integer.toString(i));
      VkDesignerUtil.showAddListDialog(
          "Choose the item to edit",
          listBox,
          new IDialogCallback() {
            @Override
            public void save(String number) {
              menuBar.removeItem(menuBar.getMenuItem(listBox.getSelectedIndex()));
            }
          });
    } else if (attributeName.equals(EDIT_ITEM)) {
      final ListBox listBox = new ListBox();
      listBox.setWidth("200px");
      int itemCount = menuBar.getItemCount();
      if (itemCount == 0) {
        Window.alert("No Items found to edit");
        return;
      }
      for (int i = 0; i < itemCount; i++)
        listBox.addItem(menuBar.getMenuItem(i).getText(), Integer.toString(i));
      VkDesignerUtil.showAddListDialog(
          "Choose the item to edit",
          listBox,
          new IDialogCallback() {
            @Override
            public void save(String number) {
              int index = listBox.getSelectedIndex();
              showEditItemAttributeDialog(menuBar, index);
            }
          });
    } else if (attributeName.equals(ADD_MENU)) {
      final TextBox nameTb = new TextBox();
      nameTb.setWidth("300px");
      VkDesignerUtil.showAddTextAttributeDialog(
          "Please provide name of sub-menu",
          nameTb,
          new IDialogCallback() {

            @Override
            public void save(String js) {
              final VkMenuBarVertical widget =
                  (VkMenuBarVertical)
                      VkStateHelper.getInstance().getEngine().getWidget(VkMenuBarVertical.NAME);
              menuBar.add(widget);
              menuBar.getMenuItem(menuBar.getItemCount() - 1).setText(nameTb.getText());
            }
          });
    } else VkStateHelper.getInstance().getEngine().applyAttribute(attributeName, invokingWidget);
  }
  public LayoutContainer getRightSide() {
    RowLayout layout = new RowLayout();
    // layout.setMargin(0);
    // layout.setSpacing(0);

    ButtonBar south = new ButtonBar();
    south.setAlignment(HorizontalAlignment.RIGHT);
    final Button complete =
        new Button(
            "Complete Split",
            new SelectionListener<ButtonEvent>() {
              @Override
              public void componentSelected(ButtonEvent ce) {
                onClose();
              }
            });
    south.add(complete);
    complete.setEnabled(false);

    LayoutContainer container = new LayoutContainer();
    container.setLayout(layout);
    container.setLayoutOnChange(true);

    final DataList moveList = new DataList();
    final ListBox listBox = new ListBox();
    listBox.addChangeHandler(
        new ChangeHandler() {
          public void onChange(ChangeEvent event) {
            moveList.removeAll();
            ArrayList<String> list =
                parentToChildList.get(listBox.getValue(listBox.getSelectedIndex()));
            if (list == null) return;
            Iterator<String> iterator = list.listIterator();
            while (iterator.hasNext()) {
              // FIXME: look at this, i just fix this and dont know if it's right. CS
              String nodeID = iterator.next();
              Taxon cur = TaxonomyCache.impl.getTaxon(nodeID);
              DataListItem li = new DataListItem(cur.getFullName());
              li.setData("nodeID", nodeID);
              li.setData("node", cur);
              moveList.add(li);
            }
            layout();
          }
        });

    Menu m = new Menu();
    MenuItem item = new MenuItem();
    item.setText("Remove");
    item.addSelectionListener(
        new SelectionListener<MenuEvent>() {
          @Override
          public void componentSelected(MenuEvent ce) {
            DataListItem item = (DataListItem) ce.getSource();
            ArrayList<String> list =
                parentToChildList.get(listBox.getValue(listBox.getSelectedIndex()));
            if (list != null) list.remove(item.getData("nodeID"));

            moveList.remove(item);
            children.add(item);
            layout();
          }
        });
    m.add(item);
    moveList.setContextMenu(m);

    VerticalPanel table = new VerticalPanel();
    table.add(new HTML("Current Taxonomic Group: "));
    table.add(listBox);
    listBox.setWidth("100%");
    listBox.setEnabled(false);

    final ButtonBar bar = new ButtonBar();
    bar.setAlignment(HorizontalAlignment.RIGHT);
    final Button addChild =
        new Button(
            "Add Child",
            new SelectionListener<ButtonEvent>() {
              @Override
              public void componentSelected(ButtonEvent ce) {
                List<DataListItem> sel = children.getSelectedItems();
                if (sel == null) return;
                ArrayList<String> list =
                    parentToChildList.get(listBox.getValue(listBox.getSelectedIndex()));
                for (DataListItem selected : sel) {
                  children.remove(selected);
                  String nodeID = selected.getData("nodeID");
                  if (!list.contains(nodeID)) {
                    list.add(nodeID);
                    DataListItem item = new DataListItem(selected.getText());
                    item.setData("nodeID", nodeID);
                    item.setData("node", selected.getData("node"));
                    moveList.add(item);
                  }
                }
                layout();
              }
            });
    addChild.setEnabled(false);
    bar.add(addChild);
    bar.add(
        new Button(
            "Create New Taxon",
            new SelectionListener<ButtonEvent>() {
              @Override
              public void componentSelected(ButtonEvent ce) {
                TaxonomyCache.impl.fetchTaxon(
                    currentNode.getParentId(),
                    false,
                    new GenericCallback<Taxon>() {
                      public void onFailure(Throwable caught) {
                        WindowUtils.errorAlert(
                            "Error",
                            "Could not " + "find parent level to attach new taxonomic concept to.");
                      }

                      public void onSuccess(Taxon result) {
                        complete.setEnabled(true);

                        final CreateNewTaxonPanel panel = new CreateNewTaxonPanel(result);
                        panel.addListener(
                            Events.StateChange,
                            new Listener<BaseEvent>() {
                              public void handleEvent(BaseEvent be) {
                                Taxon newNode = (Taxon) be.getSource();
                                parentToChildList.put(
                                    newNode.getId() + "", new ArrayList<String>());
                                listBox.addItem(newNode.getFullName(), newNode.getId() + "");
                                listBox.setSelectedIndex(listBox.getItemCount() - 1);
                                listBox.setEnabled(true);
                                moveList.removeAll();
                                addChild.setEnabled(true);
                              }
                            });
                        panel.show();
                      }
                    });
              }
            }));

    container.add(table, new RowData(1d, 25));
    container.add(bar, new RowData(1d, 25));
    container.add(new HTML("Children to add to new taxon:"), new RowData(1d, 25));
    container.add(moveList, new RowData(1d, 1d));
    container.add(south, new RowData(1d, 25));

    return container;
  }
  private Widget buildLoginPanel(boolean openInNewWindowDefault) {
    userTextBox.setWidth("100%"); // $NON-NLS-1$
    passwordTextBox.setWidth("100%"); // $NON-NLS-1$
    usersListBox.setWidth("100%"); // $NON-NLS-1$

    userTextBox.setStyleName("login-panel-label");
    passwordTextBox.setStyleName("login-panel-label");
    newWindowChk.setStyleName("login-panel-label");

    VerticalPanel credentialsPanel = new VerticalPanel();

    credentialsPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_LEFT);
    credentialsPanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_TOP);
    SimplePanel spacer;
    if (showUsersList) {
      // populate default users list box
      addDefaultUsers();
      Label sampleUsersLabel = new Label(Messages.getString("sampleUser") + ":");
      sampleUsersLabel.setStyleName("login-panel-label");
      credentialsPanel.add(sampleUsersLabel); // $NON-NLS-1$ //$NON-NLS-2$
      credentialsPanel.add(usersListBox);
      spacer = new SimplePanel();
      spacer.setHeight("8px"); // $NON-NLS-1$
      credentialsPanel.add(spacer);
    }

    Label usernameLabel = new Label(Messages.getString("username") + ":");
    usernameLabel.setStyleName("login-panel-label");

    credentialsPanel.add(usernameLabel); // $NON-NLS-1$ //$NON-NLS-2$
    credentialsPanel.add(userTextBox);

    spacer = new SimplePanel();
    spacer.setHeight("8px"); // $NON-NLS-1$
    credentialsPanel.add(spacer);

    credentialsPanel.setCellHeight(spacer, "8px"); // $NON-NLS-1$
    HTML passwordLabel = new HTML(Messages.getString("password") + ":");
    passwordLabel.setStyleName("login-panel-label");
    credentialsPanel.add(passwordLabel); // $NON-NLS-1$ //$NON-NLS-2$
    credentialsPanel.add(passwordTextBox);

    boolean reallyShowNewWindowOption = showNewWindowOption;

    String showNewWindowOverride =
        Window.Location.getParameter("showNewWindowOption"); // $NON-NLS-1$
    if (showNewWindowOverride != null && !"".equals(showNewWindowOverride)) { // $NON-NLS-1$
      // if the override is set, we MUST obey it above all else
      reallyShowNewWindowOption = "true".equals(showNewWindowOverride); // $NON-NLS-1$
    } else if (getReturnLocation() != null && !"".equals(getReturnLocation())) { // $NON-NLS-1$
      StringTokenizer st = new StringTokenizer(getReturnLocation(), "?&"); // $NON-NLS-1$
      // first token will be ignored, it is 'up to the ?'
      for (int i = 1; i < st.countTokens(); i++) {
        StringTokenizer paramTokenizer = new StringTokenizer(st.tokenAt(i), "="); // $NON-NLS-1$
        if (paramTokenizer.countTokens() == 2) {
          // we've got a name=value token
          if (paramTokenizer.tokenAt(0).equalsIgnoreCase("showNewWindowOption")) { // $NON-NLS-1$
            reallyShowNewWindowOption = "true".equals(paramTokenizer.tokenAt(1)); // $NON-NLS-1$
            break;
          }
        }
      }
    }

    // New Window checkbox
    if (reallyShowNewWindowOption) {
      spacer = new SimplePanel();
      spacer.setHeight("8px"); // $NON-NLS-1$
      credentialsPanel.add(spacer);
      credentialsPanel.setCellHeight(spacer, "8px"); // $NON-NLS-1$

      newWindowChk.setText(Messages.getString("launchInNewWindow")); // $NON-NLS-1$

      String cookieCheckedVal = Cookies.getCookie("loginNewWindowChecked"); // $NON-NLS-1$
      if (cookieCheckedVal != null) {
        newWindowChk.setValue(Boolean.parseBoolean(cookieCheckedVal));
      } else {
        // default is false, per BISERVER-2384
        newWindowChk.setValue(openInNewWindowDefault);
      }

      credentialsPanel.add(newWindowChk);
    }

    userTextBox.setTabIndex(1);
    passwordTextBox.setTabIndex(2);
    if (reallyShowNewWindowOption) {
      newWindowChk.setTabIndex(3);
    }
    passwordTextBox.setText(""); // $NON-NLS-1$

    setFocusWidget(userTextBox);

    Image lockImage = new Image(GWT.getModuleBaseURL() + "images/icon_login_lock.png");
    HorizontalPanel loginPanel = new HorizontalPanel();
    loginPanel.setSpacing(5);
    loginPanel.setStyleName("login-panel");
    loginPanel.add(lockImage);
    loginPanel.add(credentialsPanel);

    return loginPanel;
  }
  /** @param jobs */
  public void initUI(JsArray<JsJob> jobs) {
    if (jobs != null) {
      for (int i = 0; i < jobs.length(); i++) {
        resourceOracle.add(jobs.get(i).getShortResourceName());
      }
    }

    resourceSuggestBox.setWidth("240px");
    userListBox.setWidth("200px");
    userListBox.getElement().getStyle().setTextTransform(Style.TextTransform.CAPITALIZE);
    scheduleStateListBox.setWidth("200px");
    scheduleTypeListBox.setWidth("200px");

    // next execution filter
    CaptionPanel executionFilterCaptionPanel =
        new CaptionPanel(Messages.getString("executionTime"));
    FlexTable executionFilterPanel = new FlexTable();
    executionFilterPanel.setWidget(0, 0, beforeCheckBox);
    executionFilterPanel.setWidget(0, 1, beforeDateBox);
    executionFilterPanel.setWidget(1, 0, afterCheckBox);
    executionFilterPanel.setWidget(1, 1, afterDateBox);
    executionFilterCaptionPanel.add(executionFilterPanel);

    afterCheckBox.addValueChangeHandler(
        new ValueChangeHandler<Boolean>() {
          public void onValueChange(ValueChangeEvent<Boolean> event) {
            afterDateBox.setEnabled(event.getValue());
          }
        });

    beforeCheckBox.addValueChangeHandler(
        new ValueChangeHandler<Boolean>() {
          public void onValueChange(ValueChangeEvent<Boolean> event) {
            beforeDateBox.setEnabled(event.getValue());
          }
        });
    beforeDateBox.setEnabled(beforeCheckBox.getValue());
    afterDateBox.setEnabled(afterCheckBox.getValue());

    final String showAll = Messages.getString("showAll");
    // user filter
    int selectedIndex = getSelectedIndex(userListBox);
    userListBox.clear();
    userListBox.addItem(showAll);
    HashSet<String> uniqueUsers = new HashSet<String>();
    if (jobs != null) {
      for (int i = 0; i < jobs.length(); i++) {
        uniqueUsers.add(jobs.get(i).getUserName());
      }
    }
    for (String user : uniqueUsers) {
      userListBox.addItem(user);
    }
    userListBox.setSelectedIndex(selectedIndex);

    // state filter
    scheduleStateListBox.setVisibleItemCount(1);
    selectedIndex = getSelectedIndex(scheduleStateListBox);
    scheduleStateListBox.clear();
    // NORMAL, PAUSED, COMPLETE, ERROR, BLOCKED, UNKNOWN
    scheduleStateListBox.addItem(showAll, ScheduleStateEnum.SHOWALL.getValue());
    scheduleStateListBox.addItem(Messages.getString("normal"), ScheduleStateEnum.NORMAL.getValue());
    scheduleStateListBox.addItem(Messages.getString("paused"), ScheduleStateEnum.PAUSED.getValue());
    scheduleStateListBox.addItem(
        Messages.getString("complete"), ScheduleStateEnum.COMPLETE.getValue());
    scheduleStateListBox.addItem(Messages.getString("error"), ScheduleStateEnum.ERROR.getValue());
    scheduleStateListBox.addItem(
        Messages.getString("blocked"), ScheduleStateEnum.BLOCKED.getValue());
    scheduleStateListBox.addItem(
        Messages.getString("unknown"), ScheduleStateEnum.UNKNOWN.getValue());
    scheduleStateListBox.setSelectedIndex(selectedIndex);

    // state filter
    scheduleTypeListBox.setVisibleItemCount(1);
    selectedIndex = getSelectedIndex(scheduleTypeListBox);
    scheduleTypeListBox.clear();
    // DAILY, WEEKLY, MONTHLY, YEARLY
    scheduleTypeListBox.addItem(showAll, ScheduleStateEnum.SHOWALL.getValue());
    scheduleTypeListBox.addItem(
        Messages.getString("schedule.daily"), ScheduleTypeEnum.DAILY.getValue());
    scheduleTypeListBox.addItem(
        Messages.getString("schedule.weekly"), ScheduleTypeEnum.WEEKLY.getValue());
    scheduleTypeListBox.addItem(
        Messages.getString("schedule.monthly"), ScheduleTypeEnum.MONTHLY.getValue());
    scheduleTypeListBox.addItem(
        Messages.getString("schedule.yearly"), ScheduleTypeEnum.YEARLY.getValue());
    scheduleTypeListBox.setSelectedIndex(selectedIndex);

    FlexTable filterPanel = new FlexTable();
    filterPanel.setWidget(0, 0, new Label(Messages.getString("scheduledResource")));
    filterPanel.setWidget(1, 0, resourceSuggestBox);

    filterPanel.setWidget(2, 0, new Label(Messages.getString("_user")));
    filterPanel.setWidget(3, 0, userListBox);

    filterPanel.setWidget(4, 0, new Label(Messages.getString("scheduleState")));
    filterPanel.setWidget(5, 0, scheduleStateListBox);

    filterPanel.setWidget(6, 0, new Label(Messages.getString("scheduleType")));
    filterPanel.setWidget(7, 0, scheduleTypeListBox);

    filterPanel.setWidget(8, 0, executionFilterCaptionPanel);

    setContent(filterPanel);
  }
Exemple #23
0
  public DialogCarma(KarmaHome home, KarmaUser user) {
    super(false, true);
    this.homeParent = home;
    this.user = user;

    setHTML(CONSTANTS.this_html());

    VerticalPanel verticalPanel = new VerticalPanel();
    verticalPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER);
    setWidget(verticalPanel);
    verticalPanel.setWidth("100%");

    HorizontalPanel horizontalPanel = new HorizontalPanel();
    horizontalPanel.setSpacing(5);
    verticalPanel.add(horizontalPanel);
    horizontalPanel.setWidth("100%");

    VerticalPanel verticalPanel_2 = new VerticalPanel();
    horizontalPanel.add(verticalPanel_2);
    verticalPanel_2.setSize("260", "110");

    Grid grid_1 = new Grid(3, 2);
    verticalPanel_2.add(grid_1);
    grid_1.setSize("", "100");

    Label label_10 = new Label(CONSTANTS.label_10_text());
    grid_1.setWidget(0, 0, label_10);
    grid_1.getCellFormatter().setWidth(0, 0, "100");

    listTypes = new ListBox();
    grid_1.setWidget(0, 1, listTypes);
    grid_1.getCellFormatter().setWidth(0, 1, "150");
    listTypes.setWidth("100%");
    ClientUtils.fillTypes(listTypes);

    Label label_11 = new Label(CONSTANTS.label_11_text());
    grid_1.setWidget(1, 0, label_11);

    tbPlate = new TextBox();
    tbPlate.setVisibleLength(10);
    grid_1.setWidget(1, 1, tbPlate);
    tbPlate.setWidth("100%");

    cbxForeign = new CheckBox(CONSTANTS.cbxForeign_text());
    grid_1.setWidget(2, 0, cbxForeign);
    cbxForeign.addClickHandler(
        new ClickHandler() {
          public void onClick(ClickEvent event) {
            showCountries();
          }
        });

    listCountry = new ListBox();
    grid_1.setWidget(2, 1, listCountry);
    listCountry.setWidth("100%");
    listCountry.setVisible(false);
    ClientUtils.fillCountries(listCountry);

    VerticalPanel verticalPanel_6 = new VerticalPanel();
    horizontalPanel.add(verticalPanel_6);
    verticalPanel_6.setSize("260", "110");

    Grid grid_2 = new Grid(3, 2);
    verticalPanel_6.add(grid_2);
    grid_2.setSize("", "100");

    Label label_15 = new Label(CONSTANTS.label_15_text());
    grid_2.setWidget(0, 0, label_15);
    grid_2.getCellFormatter().setWidth(0, 0, "50");

    date = new DateBox();
    date.setFormat(new DefaultFormat(DateTimeFormat.getFormat("yyyy-MM-dd HH:mm")));
    grid_2.setWidget(0, 1, date);
    grid_2.getCellFormatter().setWidth(0, 1, "200");
    date.setWidth("100%");
    date.addValueChangeHandler(
        new ValueChangeHandler<Date>() {
          @Override
          public void onValueChange(ValueChangeEvent<Date> event) {
            Date d = event.getValue();
            if (d.after(new Date())
                || d.before(new Date(System.currentTimeMillis() - 31536000000L))) {
              date.setValue(new Date());
              MsgMan.getInstance().showError(CONSTANTS.error_date1(), date);
            }
          }
        });

    Label label_16 = new Label(CONSTANTS.label_16_text());
    grid_2.setWidget(1, 0, label_16);

    taNotes = new TextArea();
    taNotes.addKeyPressHandler(
        new KeyPressHandler() {
          public void onKeyPress(KeyPressEvent event) {
            updateCounter();
          }
        });
    taNotes.setSize("100%", "50");
    grid_2.setWidget(1, 1, taNotes);

    lblCounter = new Label("New label");
    lblCounter.addStyleName("counter");
    grid_2.setWidget(2, 1, lblCounter);
    grid_2.getCellFormatter().setHorizontalAlignment(2, 1, HasHorizontalAlignment.ALIGN_RIGHT);

    HorizontalPanel horizontalPanel_3 = new HorizontalPanel();
    horizontalPanel_3.setSpacing(5);
    horizontalPanel_3.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_RIGHT);
    verticalPanel.add(horizontalPanel_3);
    verticalPanel.setCellHorizontalAlignment(
        horizontalPanel_3, HasHorizontalAlignment.ALIGN_CENTER);

    btnPuntuar = new Button("New button");
    horizontalPanel_3.add(btnPuntuar);
    btnPuntuar.setText(CONSTANTS.btnPuntuar_text());
    btnPuntuar.setWidth("100");

    Button btnCancel = new Button("New button");
    horizontalPanel_3.add(btnCancel);
    btnCancel.setText(CONSTANTS.btnCancel_text());
    btnCancel.setWidth("100");
    btnPuntuar.addClickHandler(
        new ClickHandler() {
          public void onClick(ClickEvent event) {
            makeKarma();
          }
        });
    btnCancel.addClickHandler(
        new ClickHandler() {
          public void onClick(ClickEvent event) {
            DialogCarma.this.hide();
          }
        });

    updateCounter();
  }