コード例 #1
0
 @Override
 public String generateName(String idTag) {
   return HtmlGenerator.generateClickable(
       StringUtil.fillWithString(String.valueOf(id), "0", 2, false) + "- " + name.toUpperCase(),
       styleClass,
       idTag);
 }
コード例 #2
0
 @Override
 public String generateActivationValues() {
   String result = "";
   for (TotalTo total : labelsTotals) {
     result +=
         HtmlGenerator.generateCell(
             String.valueOf(total.getActivatedAndPlanned()),
             (total.getActivatedAndPlanned() == total.getPlanned()
                 ? CSS_LABEL_SUCCESS + " " + CSS_POPUP
                 : CSS_LABEL_FAILED + " " + CSS_POPUP),
             "data-chart='"
                 + total.getActivatedAndPlanned()
                 + ";"
                 + total.getActivatedAndNotPlanned()
                 + ";"
                 + total.getPlanned()
                 + ";"
                 + String.valueOf(
                     (Math.round(total.getPlanned() / total.getClients()) * 100 / children.size()))
                 + ";"
                 + String.valueOf(
                     (total.getPlanned() == 0)
                         ? 0
                         : Math.round(total.getActivatedAndPlanned() * 100 / (total.getPlanned())))
                 + "'");
   }
   return result;
 }
コード例 #3
0
 @Override
 public String generateClientNumber(String idTag) {
   return HtmlGenerator.generateCell(
       "<div style='text-align: center;'><a href='#' data-click='"
           + idTag
           + "' class='expand'><img id='"
           + idTag
           + "-IMG"
           + "' data-status='expand' src='img/expand.png' style='width:12px;height:12px'/></a></div>",
       "title");
 }