protected void sinkHeaderClass(Sink sink, String header, String CssClass) { if (header != null && header.length() > 0) { sink.rawText("<th class=\"" + CssClass + "\">" + header + "</th>"); } else { sink.rawText("<th class=\"" + CssClass + "\"> </th>"); } }
protected void sinkCellClass(Sink sink, String text, String CssClass) { if (text != null && text.length() > 0) { sink.rawText("<td class=\"" + CssClass + "\">" + text + "</td>"); } else { sink.rawText("<td class=\"" + CssClass + "\"> </td>"); } }
// protected void sinkPercentGraphic( Sink sink, double value ) // { // sink.rawText( "<div style=\"border: 1px solid #808080; padding: 0px; background-color: // #FF5555; width: 100px; border-collapse: collapse;\">" ); // sink.rawText( "<div style=\"padding: 0px; background-color: #77FF77; height: 1.3em; // border-collapse: collapse; width: " // + (int) Math.floor( value * 100 ) + "px;\">" ); // sink.rawText( "<span style=\"display:block; position:absolute; text-align:center; // width:100px; border-collapse:collapse;\">" // + getPercentValue( value ) + "</span>" ); // sink.rawText( "</div>" ); // sink.rawText( "</div>" ); // } protected void sinkPercentGraphic(Sink sink, double value) { sink.rawText("<div class=\"percentOuter\">"); sink.rawText( "<div class=\"percentInner\" style=\"width: " + (int) Math.floor(value * 100) + "px;\">"); sink.rawText("<span class=\"percentLabel\">" + getPercentValue(value) + "</span>"); sink.rawText("</div>"); sink.rawText("</div>"); }
protected void sinkCellWithLink(Sink sink, String text, String link) { // sink.tableCell(); sink.rawText("<td NOWRAP>"); sink.link(link); sink.text(text); sink.link_(); sink.tableCell_(); }
protected void sinkDefaultInvertCellPercentGraphic( Sink sink, double value, String CssClass, boolean header, String label) { if (value == -1.0) { value = 0d; } if (header) { sink.rawText("<th class=\"" + CssClass + "\">"); } else { sink.rawText("<td class=\"" + CssClass + "\">"); } sinkInvertPercentGraphic(sink, value); if (label != null && label.length() > 0) { sink.rawText(label); } if (header) { sink.rawText("</th>"); } else { sink.rawText("</td>"); } }
protected void sinkCellTabWithLink(Sink sink, String text, int nbTabulation, String link) { // sink.tableCell(); sink.rawText("<td NOWRAP>"); int loop = AbstractDashBoardGenerator.SPACE_NUMBER * nbTabulation; for (int i = 0; i < loop; i++) { sink.nonBreakingSpace(); } sink.link(link); sink.text(text); sink.link_(); sink.tableCell_(); }
protected void addDashboardCss(Sink sink) { sink.rawText( "<link rel=\"stylesheet\" href=\"./css/print.css\" type=\"text/css\" media=\"print\" />"); sink.rawText( "<link rel=\"stylesheet\" href=\"./css/dashboard.css\" type=\"text/css\" media=\"all\" />"); sink.rawText( "<link rel=\"stylesheet\" href=\"./css/dashboard2.css\" type=\"text/css\" media=\"all\" />"); sink.rawText("<!--[if IE]>"); sink.rawText( "<link rel=\"stylesheet\" href=\"./css/dashboard2IE.css\" type=\"text/css\" media=\"all\" />"); sink.rawText("<![endif]-->"); }
protected void sinkSuperHeaderClass(Sink sink, String header, int colspan, String CssClass) { sink.rawText("<th class=\"" + CssClass + "\" colspan=\"" + colspan + "\">" + header + "</th>"); }
protected void sinkSuperHeader(Sink sink, String header, int colspan) { sink.rawText("<th colspan=\"" + colspan + "\">" + header + "</th>"); }
protected void tableHeaderCellClass(Sink sink, String CssClass) { sink.rawText("<th class=\"" + CssClass + "\">"); }