Example #1
0
  /** This will show a popup of error messages in compilation. */
  public static void showBuilderErrors(BuilderResult[] results) {
    FormStylePopup pop = new FormStylePopup("images/package_builder.png", "Validation results");
    if (results == null || results.length == 0) {
      pop.addRow(new HTML("<img src='images/tick_green.gif'/><i>Item validated.</i>"));
    } else {
      FlexTable errTable = new FlexTable();
      errTable.setStyleName("build-Results");
      for (int i = 0; i < results.length; i++) {
        int row = i;
        final BuilderResult res = results[i];
        errTable.setWidget(row, 0, new Image("images/error.gif"));
        if (res.assetFormat.equals("package")) {
          errTable.setText(row, 1, "[package configuration problem] " + res.message);
        } else {
          errTable.setText(row, 1, "[" + res.assetName + "] " + res.message);
        }
      }
      ScrollPanel scroll = new ScrollPanel(errTable);
      // scroll.setAlwaysShowScrollBars(true);
      // scroll.setSize("100%","25em");
      scroll.setWidth("100%");
      // scroll.setScrollPosition( 100 );
      // errTable.setWidth( "60%" );
      pop.addRow(scroll);
      //            pop.setWidth( "70%" );
      //            pop.setHeight( "50%" );

    }
    pop.show();
    LoadingPopup.close();
  }
 @Override
 public void setCityData(int i, String name, String pop, String lat, String lon) {
   cg.setText(i, 0, name);
   cg.setText(i, 1, pop);
   cg.setText(i, 2, lat);
   cg.setText(i, 3, lon);
 }
Example #3
0
  private void update() {
    // Update the older/newer buttons & label.
    int count = MailItems.getMailItemCount();
    int max = startIndex + VISIBLE_EMAIL_COUNT;
    if (max > count) {
      max = count;
    }

    // Update the nav bar.
    navBar.update(startIndex, count, max);

    // Show the selected emails.
    int i = 0;
    for (; i < VISIBLE_EMAIL_COUNT; ++i) {
      // Don't read past the end.
      if (startIndex + i >= MailItems.getMailItemCount()) {
        break;
      }

      MailItem item = MailItems.getMailItem(startIndex + i);

      // Add a new row to the table, then set each of its columns to the
      // email's sender and subject values.
      table.setText(i, 0, item.sender);
      table.setText(i, 1, item.email);
      table.setText(i, 2, item.subject);
    }

    // Clear any remaining slots.
    for (; i < VISIBLE_EMAIL_COUNT; ++i) {
      table.removeRow(table.getRowCount() - 1);
    }
  }
  public CitiesBrowserView() {
    super();
    HTMLPanel dlp = binder.createAndBindUi(this);
    initWidget(dlp);

    cg.setText(0, 0, "Name");
    cg.setText(0, 1, "Population");
    cg.setText(0, 2, "Latitude");
    cg.setText(0, 3, "Longitude");
  }
  public TrustActionEditView(
      I18NAccount messages, Constants constants, HelpPanel helpPanel, Elements elements) {
    this.messages = messages;
    this.constants = constants;
    this.helpPanel = helpPanel;
    this.elements = elements;

    DockPanel dp = new DockPanel();

    table = new FlexTable();
    table.setStyleName("tableborder");
    table.setText(0, 0, elements.trust());
    table.setText(0, 1, elements.description());
    table.setText(0, 2, elements.trust_default_desc());
    table.setText(0, 3, elements.trust_actionclub());
    table.setText(0, 4, elements.trust_actiontrust());
    table.setText(0, 5, elements.trust_debetpost());
    table.setText(0, 6, elements.trust_creditpost());
    table.setText(0, 7, "");
    table.getRowFormatter().setStyleName(0, "header");

    newButton = new NamedButton("new_trust", elements.new_trust());
    newButton.addClickHandler(this);

    dp.add(newButton, DockPanel.NORTH);
    dp.add(table, DockPanel.NORTH);

    idHolder = new IdHolder<String, Image>();
    initWidget(dp);
  }
Example #6
0
 private void generateQuickReferencePopup() {
   FlexTable fieldTable = new FlexTable();
   fieldTable.setText(0, 0, "Name");
   fieldTable.setText(0, 1, "Field");
   fieldTable.getRowFormatter().setStyleName(0, "data-row-header");
   int row = 1;
   for (FieldInfo fieldInfo : TkoUtils.getFieldList("all_fields")) {
     fieldTable.setText(row, 0, fieldInfo.name);
     fieldTable.setText(row, 1, fieldInfo.field);
     row++;
   }
   quickReferencePopup = new PopupPanel(false);
   quickReferencePopup.add(fieldTable);
 }
Example #7
0
  /**
   * Used to display users
   *
   * @param users
   */
  public void displayUsers(List<IUser> users) {

    RootPanel.get("root").add(flexTable);

    flexTable.setText(0, 0, "Name");

    flexTable.setText(0, 1, "Language");
    flexTable.setText(0, 2, "Shopping Cart Size");
    flexTable.setText(0, 3, "Wish List Size");
    flexTable.setStyleName("centered-table", true);

    for (int i = 0; i < users.size(); i++) {

      IUser user = users.get(i);

      flexTable.setText(i + 1, 0, user.getName());
      if (user.getLanguage().trim().equals("EN")) {
        flexTable.setWidget(i + 1, 1, new Image("uk.png"));
      } else if (user.getLanguage().trim().equals("FR")) {
        flexTable.setWidget(i + 1, 1, new Image("fr.png"));
      } else {
        flexTable.setText(i + 1, 1, user.getLanguage());
      }

      flexTable.setText(i + 1, 2, String.valueOf(user.getShoppingCart().size()));

      flexTable.setText(i + 1, 3, String.valueOf(user.getWishList().size()));
    }
  }
Example #8
0
 /** Add a row to the flex table. */
 private void addRows() {
   int rowIndex = flexTable.getRowCount();
   for (int i = 0; i < addRecord.size(); i++) {
     Widget widget = addWidget(addRecord.get(rowIndex - 1));
     flexTable.setText(rowIndex, 0, addRecord.get(i).getFieldName());
     flexTable.setWidget(rowIndex, 1, widget);
     flexTable.setText(rowIndex, 2, getMandatory(addRecord.get(rowIndex - 1)));
     flexTable.setText(rowIndex, KEY_COLUMN, addRecord.get(i).getFieldKey());
     applyDataRowStyles();
     flexTable.setCellSpacing(0);
     flexTable.addStyleName("FlexTable");
     flexTable.setWidth("90%");
     rowIndex++;
   }
 }
Example #9
0
  /**
   * Initializes the table so that it contains enough rows for a full page of emails. Also creates
   * the images that will be used as 'read' flags.
   */
  private void initTable() {
    // Initialize the header.
    header.getColumnFormatter().setWidth(0, "128px");
    header.getColumnFormatter().setWidth(1, "192px");
    header.getColumnFormatter().setWidth(3, "256px");

    header.setText(0, 0, "Sender");
    header.setText(0, 1, "Email");
    header.setText(0, 2, "Subject");
    header.setWidget(0, 3, navBar);
    header.getCellFormatter().setHorizontalAlignment(0, 3, HasHorizontalAlignment.ALIGN_RIGHT);

    // Initialize the table.
    table.getColumnFormatter().setWidth(0, "128px");
    table.getColumnFormatter().setWidth(1, "192px");
  }
Example #10
0
  private void displayStock(final String finalSymbol) {
    // Add the task to the table.
    int row = tasksFlexTable.getRowCount();
    tasks.add(finalSymbol);
    tasksFlexTable.setText(row, 0, finalSymbol);
    tasksFlexTable.setWidget(row, 2, new Label());
    tasksFlexTable.getCellFormatter().addStyleName(row, 1, "watchListNumericColumn");
    tasksFlexTable.getCellFormatter().addStyleName(row, 2, "watchListNumericColumn");
    tasksFlexTable.getCellFormatter().addStyleName(row, 3, "watchListRemoveColumn");

    // Add a button to remove this task from the table.
    Button removeTaskButton = new Button("x");
    removeTaskButton.addStyleDependentName("remove");
    removeTaskButton.addClickHandler(
        new ClickHandler() {
          public void onClick(ClickEvent event) {
            removeStock(finalSymbol);
          }
        });
    tasksFlexTable.setWidget(row, 3, removeTaskButton);

    // Get the stock price.
    refreshWatchList();

    newTaskTextBox.setFocus(true);
  }
Example #11
0
  public void updateRoleTotals() {
    int mint = 0;
    int maxt = 0;

    final int rows = roleft.getRowCount() - 2;

    for (int row = 0; row < rows; ++row) {
      TextBox minw = (TextBox) roleft.getWidget(row + 1, 1);
      TextBox maxw = (TextBox) roleft.getWidget(row + 1, 2);

      mint += Integer.parseInt(minw.getText());
      maxt += Integer.parseInt(maxw.getText());
    }

    roleft.setText(rows + 1, 1, "" + mint);
    roleft.setText(rows + 1, 2, "" + maxt);

    int size = getRaidSize();

    FlexTable.FlexCellFormatter fcf = roleft.getFlexCellFormatter();

    if (mint < size) {
      fcf.addStyleName(rows + 1, 1, "error");
    } else {
      fcf.removeStyleName(rows + 1, 1, "error");
    }

    if (maxt < size) {
      fcf.addStyleName(rows + 1, 2, "error");
    } else {
      fcf.removeStyleName(rows + 1, 2, "error");
    }

    updateBadgeRoles();
  }
Example #12
0
  private void updateTable(TaskPriority priority) {
    // Make sure the stock is still in the stock table.
    if (!tasks.contains(priority.getSymbol())) {
      return;
    }

    int row = tasks.indexOf(priority.getSymbol()) + 1;

    // Format the data in the Price and Change fields.
    String priorityText = NumberFormat.getFormat("#,##0.00").format(priority.getPriority());
    NumberFormat changeFormat = NumberFormat.getFormat("+#,##0.00;-#,##0.00");
    String changeText = changeFormat.format(priority.getChange());
    String changePercentText = changeFormat.format(priority.getChangePercent());

    // Populate the Price and Change fields with new data.
    tasksFlexTable.setText(row, 1, priorityText);
    Label changeWidget = (Label) tasksFlexTable.getWidget(row, 2);
    changeWidget.setText(changeText + " (" + changePercentText + "%)");

    // Change the color of text in the Change field based on its value.
    String changeStyleName = "noChange";
    if (priority.getChangePercent() < -0.1f) {
      changeStyleName = "negativeChange";
    } else if (priority.getChangePercent() > 0.1f) {
      changeStyleName = "positiveChange";
    }

    changeWidget.setStyleName(changeStyleName);
  }
  public void setData(List<String> data) {
    contactsTable.removeAllRows();

    for (int i = 0; i < data.size(); ++i) {
      contactsTable.setWidget(i, 0, new CheckBox());
      contactsTable.setText(i, 1, data.get(i));
    }
  }
Example #14
0
  public void setModel(ProductInfo[] pi) {
    searchModel = pi;
    while (items.getRowCount() > 0) items.removeRow(0);
    if (searchModel == null || searchModel.length == 0) {
      emptyCartLbl.setVisible(true);
      return;
    }

    RowFormatter fmtr = items.getRowFormatter();
    for (int i = 0; i < searchModel.length; i++) {
      int row = items.insertRow(i);
      for (int j = 0; j < 2; j++) items.insertCell(row, j);
      items.setText(row, 0, searchModel[i].name);
      items.setText(row, 1, searchModel[i].description);
      fmtr.addStyleName(row, "ps-GridRow ps-GridRow-sel");
    }
    emptyCartLbl.setVisible(false);
  }
Example #15
0
  @Override
  public void setData(JsArray<Weapon> data) {
    contactsTable.removeAllRows();

    for (int i = 0; i < data.length(); ++i) {
      contactsTable.setWidget(i, 0, new CheckBox());
      contactsTable.setText(i, 1, data.get(i).getName());
    }
  }
Example #16
0
 private int addStockToWatchList(String symbol) {
   int row = stocksFlexTable.getRowCount();
   stocks.add(symbol);
   stocksFlexTable.setText(row, 0, symbol);
   stocksFlexTable.setWidget(row, 2, new Label());
   stocksFlexTable.getCellFormatter().addStyleName(row, 1, "watchListNumericColumn");
   stocksFlexTable.getCellFormatter().addStyleName(row, 2, "watchListNumericColumn");
   stocksFlexTable.getCellFormatter().addStyleName(row, 3, "watchListRemoveColumn");
   return row;
 }
Example #17
0
  public static VerticalPanel init() {

    // layout.setCellSpacing(8);
    // layout.setWidth("100%");
    panel.setWidth("35%");
    layoutFormat = layout.getFlexCellFormatter();
    layout.setText(0, 0, "Username: "******"Password: "******"");
    layout.setWidget(2, 1, signIn);
    layout.setWidget(2, 2, lSignInStatus);

    layoutFormat = layoutSignup.getFlexCellFormatter();
    layoutSignup.setText(0, 0, "Confirm password: "******"E-mail: ");
    layoutSignup.setWidget(1, 1, inputEmail);
    layoutFormat.setColSpan(1, 1, 2);
    // layoutSignup.setText(2, 0, ""); //passwords do not match
    lSignUpStatus.setText("");
    layoutSignup.setWidget(2, 1, signUp);
    layoutSignup.setWidget(2, 2, lSignUpStatus);

    signUpDisclosure.setAnimationEnabled(true);
    // signUpDisclosure.ensureDebugId("cwDisclosurePanel");
    signUpDisclosure.setContent(layoutSignup);

    // Wrap the contents in a DecoratorPanel
    signUpPanel.setWidget(layout);

    panel.add(layout);
    panel.add(signUpDisclosure);

    initHandlers();

    return panel;
  }
 private void clearCurrentSelection(FlexTable table, int row, int col) {
   if (row == curRow && col == curCol) return;
   if (curCol == 3 || curCol == 4) {
     Widget w = table.getWidget(curRow, curCol);
     if (w instanceof TextBox) {
       TextBox t = (TextBox) w;
       updateField(table, curRow, curCol, t);
       table.setText(curRow, curCol, t.getText());
     }
   } else if (curCol == 2) {
     Widget w = table.getWidget(curRow, curCol);
     if (w instanceof ListBox) {
       ListBox l = (ListBox) w;
       updateField(table, curRow, curCol, l);
       table.setText(curRow, curCol, l.getItemText(l.getSelectedIndex()));
     }
   }
   curRow = -1;
   curCol = -1;
 }
  @Test
  public void text() {
    // Given
    FlexTable t = new FlexTable();

    // When
    t.setText(1, 1, "text");

    // Then
    assertThat(t.getText(1, 1)).isEqualTo("text");
  }
  public Widget getCenterPanel() {
    Viewport viewport = new Viewport();
    viewport.setLayout(new BorderLayout());
    ContentPanel north = new ContentPanel();
    ContentPanel west = new ContentPanel();
    ContentPanel center = new ContentPanel();
    center.setHeading("BorderLayout");
    ContentPanel east = new ContentPanel();
    ContentPanel south = new ContentPanel();
    east.setHeading("PolicyDetails");
    west.add(createClientDetails());
    west.setHeading("ClientDetails");
    north.setHeading("AccountDetails");
    BorderLayoutData northData = new BorderLayoutData(LayoutRegion.NORTH, 150);
    // northData.setMargins(new Margins(5));
    northData.setCollapsible(false);
    northData.setSplit(false);
    BorderLayoutData westData = new BorderLayoutData(LayoutRegion.WEST, 680);
    westData.setCollapsible(false);
    westData.setSplit(false);
    // westData.setMargins(new Margins(0, 5, 0, 5));
    FlexTable ft = new FlexTable();
    ft.setText(0, 0, "MSISDN:");
    ft.setText(0, 1, "State:");
    ft.setText(0, 2, "PolicyID:");
    ft.setWidth("1365px");
    ft.setHeight("10px");
    // ft.setSize("500", "75");
    ft.setBorderWidth(1);
    north.add(getSearchPanel());
    north.add(ft);
    BorderLayoutData eastData = new BorderLayoutData(LayoutRegion.EAST, 680);
    // eastData.setMargins(new Margins(0, 5, 0, 5));
    FlexTable polictTable = new FlexTable();

    polictTable.setText(0, 0, "PolicyID:");
    polictTable.setText(1, 0, "Name:");
    polictTable.setText(2, 0, "Policy:");
    polictTable.setText(3, 0, "Description:");
    polictTable.setWidth("679px");
    polictTable.setHeight("360px");
    // ft.setSize("500", "75");
    polictTable.setBorderWidth(1);
    east.add(polictTable);
    eastData.setCollapsible(false);
    eastData.setSplit(false);
    BorderLayoutData southData = new BorderLayoutData(LayoutRegion.SOUTH, 10);
    // southData.setMargins(new Margins(5));
    southData.setCollapsible(false);
    viewport.add(north, northData);
    viewport.add(west, westData);
    viewport.add(east, eastData);
    viewport.add(south, southData);
    // con.setCenterWidget(center, centerData);
    return viewport;
  }
  @Test
  public void setText_setWidget() {
    // Tables have no explicit size -- they resize automatically on demand.
    FlexTable t = new FlexTable();

    // Put some text at the table's extremes. This forces the table to be
    // 3 by 3.
    t.setText(0, 0, "upper-left corner");
    t.setText(2, 2, "bottom-right corner");

    // Let's put a button in the middle...
    Button b = new Button("Wide Button");
    t.setWidget(1, 0, b);

    // ...and set it's column span so that it takes up the whole row.
    t.getFlexCellFormatter().setColSpan(1, 0, 3);

    // Then
    assertThat(t.getRowCount()).isEqualTo(3);
    assertThat(t.getText(2, 2)).isEqualTo("bottom-right corner");
    assertThat(t.getWidget(1, 0)).isSameAs(b);
  }
Example #22
0
  private void displayAction(TaskValue taskValue, int row) {
    String description =
        "<div class='actionTitle'>"
            + escapeHtml(taskValue.getTitle())
            + "<span class='actionDetails'> - "
            + escapeHtml(taskValue.getDetails())
            + "</span></div>";
    table.setHTML(row, 0, description);

    table.setText(row, 1, mFormatter.getShortDueDate(taskValue));
    table
        .getCellFormatter()
        .setStyleName(
            row, 1, isInPast(taskValue.getDueDate()) ? "actionDueInPass" : "actionDueInFuture");
  }
Example #23
0
  /** {@inheritDoc} */
  protected void setRow(FlexTable table, int row, int elementIndex) {
    Alarm alarm = m_alarms[elementIndex];
    if (alarm.getIsDashboardRole()) {
      table.setText(row, 0, alarm.getNodeLabel());
    } else {
      table.setHTML(
          row,
          0,
          "<a href=\"element/node.jsp?node="
              + alarm.getNodeId()
              + "\">"
              + alarm.getNodeLabel()
              + "</a>");
    }

    HTML label = new HTML();
    label.setTitle(stripHtmlTags(alarm.getDescrption()));
    label.setHTML(SafeHtmlUtils.fromTrustedString(alarm.getLogMsg()));
    table.setWidget(row, 1, label);
    table.setText(row, 2, "" + alarm.getCount());
    table.setText(row, 3, alarm.getFirstEventTime().toString());
    table.setText(row, 4, alarm.getLastEventTime().toString());
    table.getRowFormatter().setStyleName(row, alarm.getSeverity());
  }
Example #24
0
  public void onModuleLoad() {
    // Create table for stock data.
    stocksFlexTable.setText(0, 0, "Symbol");
    stocksFlexTable.setText(0, 1, "Price");
    stocksFlexTable.setText(0, 2, "Change");
    stocksFlexTable.setText(0, 3, "Remove");

    // Assemble Add Stock panel.
    addPanel.add(newSymbolTextBox);
    addPanel.add(addStockButton);

    // Assemble Main panel.
    mainPanel.add(stocksFlexTable);
    mainPanel.add(addPanel);
    mainPanel.add(lastUpdateLabel);

    // Associate the Main panel with the HTML host page.
    RootPanel.get("stockList").add(mainPanel);

    // Move cursor focus to the input box.
    newSymbolTextBox.setFocus(true);

    initHandlers();
  }
  public TournamentPoolPanel() {
    super("Pooler");

    poolCounts = new int[3];
    lblPoolCountTotal = new Label();
    lblPoolCount2 = new Label();
    lblPoolCount3 = new Label();
    lblPoolCount4 = new Label();

    poolGrid = new FlexTable();

    poolGrid.setText(0, 0, "Poolstorlek");
    lbPoolSize = new ListBox();
    lbPoolSize.addItem("2", "2");
    lbPoolSize.addItem("3", "3");
    lbPoolSize.setSelectedIndex(1);
    lbPoolSize.addChangeListener(
        new ChangeListener() {

          public void onChange(Widget sender) {
            updateControls();
          }
        });
    poolGrid.setWidget(0, 1, lbPoolSize);
    poolGrid.getFlexCellFormatter().setColSpan(0, 1, 3);

    poolGrid.setText(1, 0, "Vid udda deltagare");
    FlowPanel prefersLargerPanel = new FlowPanel();
    rbPreferLarger = new RadioButton("rePreferringLarger", "Föredrar större pooler");
    rbPreferLarger.setChecked(true);
    rbPreferSmaller = new RadioButton("rePreferringLarger", "Föredrar mindre pooler");
    prefersLargerPanel.add(rbPreferLarger);
    prefersLargerPanel.add(rbPreferSmaller);
    poolGrid.setWidget(1, 1, prefersLargerPanel);
    poolGrid.getFlexCellFormatter().setColSpan(1, 1, 3);

    poolGrid.setText(2, 0, "Antal pooler");
    poolGrid.getFlexCellFormatter().setColSpan(2, 0, 4);

    poolGrid.setText(3, 0, "Totalt");
    poolGrid.setText(3, 1, "2-man");
    poolGrid.setText(3, 2, "3-man");
    poolGrid.setText(3, 3, "4-man");
    poolGrid.setWidget(4, 0, lblPoolCountTotal);
    poolGrid.setWidget(4, 1, lblPoolCount2);
    poolGrid.setWidget(4, 2, lblPoolCount3);
    poolGrid.setWidget(4, 3, lblPoolCount4);

    for (int i = 0; i < 3; ++i) {
      poolGrid.getColumnFormatter().setWidth(i, "25%");
    }

    add(poolGrid);
  }
  public StartGameScreen(SoundPlayer soundPlayer) {

    HTML joinGameLabel = new HTML("<h3>Games you can play in:</h3>");
    joinGameLabel.addStyleName("heavy");
    content.add(joinGameLabel);

    VerticalPanel indented = new VerticalPanel();
    indented.addStyleName("indented");
    content.add(indented);
    joinableGamesTable.setText(0, 0, "Loading...");
    indented.add(joinableGamesTable);
    content.add(new HTML("<br />"));

    Hyperlink createGameLink =
        new Hyperlink("Create a Game", ScreenControllers.getHistoryToken(Screen.CREATE_GAME));
    soundPlayer.addMenuClick(createGameLink);
    createGameLink.addStyleName("heavy");
    content.add(createGameLink);
  }
  public UploadAutorizar() {

    uploadTable = new FlexTable();

    notaInterinstitucional = createUploaderNotaInterinstitucional();

    uploadTable.setText(0, 0, "Nota Interinstitucional");
    uploadTable.setWidget(0, 1, notaInterinstitucional);

    VerticalPanel v = new VerticalPanel();
    DecoratorPanel dp = new DecoratorPanel();
    dp.add(uploadTable);
    v.add(new Label("Adjuntos"));
    v.add(dp);

    initWidget(v);

    addEliminarHander();
  }
Example #28
0
  /** Render the whole calendar but do not render the events. */
  public void drawEmptyCells() {
    final FlexTable grid = (FlexTable) getWidget();

    final int rows = displayMode.getRows() + displayHeaders;
    final int columns = displayMode.getColumns() + (displayWeekNumber ? 1 : 0);

    Date date = displayMode.getStartDate(startDate, firstDayOfWeek);

    // Column headers
    if (displayHeaders != NO_HEADERS) {
      if (displayHeaders == ALL_HEADERS) {
        // Header of the calendar
        final Label calendarHeader = new Label(getHeading());
        calendarHeader.addStyleName("calendar-header");
        grid.setWidget(0, 0, calendarHeader);
        grid.getFlexCellFormatter().setColSpan(0, 0, columns + (displayWeekNumber ? 1 : 0));
      }

      final Date currentHeader = new Date(date.getTime());
      for (int x = displayWeekNumber ? 1 : 0; x < columns; x++) {
        final Label columnHeader = new Label(headerFormatter.format(currentHeader));
        columnHeader.addStyleName("calendar-column-header");
        grid.setWidget(displayHeaders == ALL_HEADERS ? 1 : 0, x, columnHeader);

        currentHeader.setDate(currentHeader.getDate() + 1);
      }
    }

    int currentMonth = startDate.getMonth();
    for (int y = displayHeaders; y < rows; y++) {
      if (displayWeekNumber) {
        grid.getCellFormatter().addStyleName(y, 0, "calendar-row-header");
        grid.setText(y, 0, Integer.toString(getWeekNumber(date, firstDayOfWeek)));
      }

      for (int x = displayWeekNumber ? 1 : 0; x < columns; x++) {
        drawCell(y, x, date, currentMonth);
        date.setDate(date.getDate() + 1);
      }
    }
  }
        public void onFinish(IUploader uploader) {
          if (uploader.getStatus() == Status.SUCCESS) {
            if (uploader.getServerMessage().getMessage() == "ErrorFirma") {
              UIValidarFormulario vf = new UIValidarFormulario("Firma no valida:");
              vf.addError("Verifique la firma digital del documento adjunto");
              vf.esValido();
              return;
            }

            String[] archivos = uploader.getServerMessage().getMessage().split("\\|");
            for (int i = 0; i < archivos.length; i += 2) {
              Adjunto a = new Adjunto();
              a.setRutaArchivo(archivos[0]);
              a.setNombreArchivo(archivos[1]);
              a.setTipo(Adjunto.Tipo.NotaInterinstitucional);
              adjuntos[0] = a;
            }

            uploadTable.setText(0, 1, archivos[2]);
            uploadTable.setWidget(0, 2, eliminarNotaInterinstitucional);
          }
        }
  private void addRow(JSONObject object, int row) {
    String desc = Util.str(object.get("description"));
    String id = Util.str(object.get("id"));
    String trust = Util.str(object.get("fond"));
    String defaultdesc = Util.str(object.get("defaultdesc"));
    String actionclub = Util.str(object.get("actionclub"));
    String actiontrust = Util.str(object.get("actionfond"));
    String debetpost = Util.strSkipNull(object.get("debetpost"));
    String creditpost = Util.strSkipNull(object.get("creditpost"));

    table.setText(row, 0, trustActionCache.trustGivesDesc(trust));
    table.setText(row, 1, desc);
    table.setText(row, 2, defaultdesc);
    table.setText(row, 3, Util.debkred(elements, actionclub));
    table.setText(row, 4, Util.debkred(elements, actiontrust));

    if (!("".equals(debetpost))) {
      table.setText(row, 5, posttypeCache.getDescriptionWithType(debetpost));
    }
    if (!("".equals(creditpost))) {
      table.setText(row, 6, posttypeCache.getDescriptionWithType(creditpost));
    }
    table.getCellFormatter().setStyleName(row, 0, "desc");
    table.getCellFormatter().setStyleName(row, 1, "desc");
    table.getCellFormatter().setStyleName(row, 2, "desc");
    table.getCellFormatter().setStyleName(row, 5, "desc");
    table.getCellFormatter().setStyleName(row, 6, "desc");

    Image editImage = ImageFactory.editImage("projectEditView_editImage");
    editImage.addClickHandler(me);
    idHolder.add(id, editImage);

    table.setWidget(row, 7, editImage);

    String style = (((row + 1) % 6) < 3) ? "line2" : "line1";
    table.getRowFormatter().setStyleName(row, style);
  }