예제 #1
0
 private void printEstimatesTableHeader(Session session, StringBuffer buff) {
   int rounds = session.rounds();
   String[] columnLabels = new String[rounds + 1];
   HtmlRow.labelFirstColumn("Judge", columnLabels);
   HtmlRow.labelColumns(1, rounds, columnLabels, session.getRoundLabel());
   HtmlTable.start(buff, columnLabels);
 }
예제 #2
0
 public String getEstimatesHtml() {
   Session session = SessionSingleton.getSession();
   if (session == null) {
     return "";
   }
   Iterator iterator = session.playerNameSortedIterator();
   StringBuffer buff = new StringBuffer();
   printEstimatesTableHeader(session, buff);
   while (iterator.hasNext()) {
     String playerName = (String) iterator.next();
     Judge judge = getJudgeOrNull(playerName);
     if (null == judge) {
       continue;
     }
     HtmlRow.startTag(buff);
     buff.append(HtmlSimpleElement.printTableCell(playerName));
     judge.getGuessesRow(buff, session);
     HtmlRow.endTag(buff);
   }
   HtmlTable.endTagWithP(buff);
   return buff.toString();
 }