Package org.zkoss.zul

Examples of org.zkoss.zul.Html


  @Override
  public void doAfterCompose(Component window) throws Exception {
    super.doAfterCompose(window);

    String s = "Hello world! Please  <a href='http://www.google.com'>click here</a> to get redirected to google.com!";
    Html html = new Html(s);
    div.appendChild(html);
  }
View Full Code Here


   */
  private void addNewRow(Rows rowParent, String tableName, Object value) {

    Row row = new Row();

    Html html_TableName = new Html(tableName);
    html_TableName.setStyle("padding-left: 5px;");
    Div divKey = new Div();
    divKey.setAlign("left");
    divKey.appendChild(html_TableName);

    Html html_RecordCount = null;

    if (value instanceof BigDecimal) {
      BigDecimal myDec = (BigDecimal) value;
      myDec = myDec.setScale(2, BigDecimal.ROUND_HALF_UP);

      // Format the value to money
      NumberFormat formatter = new DecimalFormat("#,##0.00");
      String money = formatter.format(myDec);

      html_RecordCount = new Html(money);
    } else if (value instanceof Integer) {
      // Format the value
      NumberFormat formatter = new DecimalFormat("###,###.###");
      String formattedInteger = formatter.format(value);
      html_RecordCount = new Html(String.valueOf(value));
    } else
      html_RecordCount = new Html(String.valueOf(value));

    html_RecordCount.setStyle("padding-right: 5px;");
    Div divValue = new Div();
    divValue.setAlign("right");
    divValue.appendChild(html_RecordCount);

    row.appendChild(divKey);
View Full Code Here

   */
  private void addNewRow(Rows rowParent, String tableName, Object value, String color) {

    Row row = new Row();

    Html html_TableName = new Html(tableName);
    html_TableName.setStyle("padding-left: 5px; color: " + color + ";");
    Div divKey = new Div();
    divKey.setAlign("left");
    divKey.appendChild(html_TableName);

    Html html_RecordCount = null;

    if (value instanceof BigDecimal) {
      BigDecimal myDec = (BigDecimal) value;
      myDec = myDec.setScale(2, BigDecimal.ROUND_HALF_UP);

      // Format the value to money
      NumberFormat formatter = new DecimalFormat("#,##0.00");

      String money = formatter.format(myDec);

      html_RecordCount = new Html(money);
    } else if (value instanceof Integer) {
      // Format the value
      NumberFormat formatter = new DecimalFormat("###,###.###");
      String formattedInteger = formatter.format(value);
      html_RecordCount = new Html(String.valueOf(value));
    } else
      html_RecordCount = new Html(String.valueOf(value));

    html_RecordCount.setStyle("padding-right: 5px; color: " + color + ";");
    Div divValue = new Div();
    divValue.setAlign("right");
    divValue.appendChild(html_RecordCount);

    row.appendChild(divKey);
View Full Code Here

   */
  private void addNewRow(Rows rowParent, String tableName, Object value) {

    Row row = new Row();

    Html html_TableName = new Html(tableName);
    html_TableName.setStyle("padding-left: 5px;");
    Div divKey = new Div();
    divKey.setAlign("left");
    divKey.appendChild(html_TableName);

    Html html_RecordCount = null;

    if (value instanceof BigDecimal) {
      BigDecimal myDec = (BigDecimal) value;
      myDec = myDec.setScale(2, BigDecimal.ROUND_HALF_UP);

      // Format the value to money
      NumberFormat formatter = new DecimalFormat("#,##0.00");
      String money = formatter.format(myDec);

      html_RecordCount = new Html(money);
    } else if (value instanceof Integer) {
      html_RecordCount = new Html(String.valueOf(value));
    } else
      html_RecordCount = new Html(String.valueOf(value));

    html_RecordCount.setStyle("padding-right: 5px;");
    Div divValue = new Div();
    divValue.setAlign("right");
    divValue.appendChild(html_RecordCount);

    row.appendChild(divKey);
View Full Code Here

    // color = "black";
    // }

    Row row = new Row();

    Html html_TableName = new Html(tableName);

    html_TableName.setStyle("padding-left: 5px;");

    Div divKey = new Div();
    divKey.setAlign("left");
    divKey.appendChild(html_TableName);

    Html html_RecordCount = null;

    if (value instanceof BigDecimal) {
      BigDecimal myDec = (BigDecimal) value;
      myDec = myDec.setScale(2, BigDecimal.ROUND_HALF_UP);

      // Format the value to money
      NumberFormat formatter = new DecimalFormat("#,##0.00");
      String money = formatter.format(myDec);

      html_RecordCount = new Html(money);
    } else if (value instanceof Integer) {
      html_RecordCount = new Html(String.valueOf(value));
    } else
      html_RecordCount = new Html(String.valueOf(value));

    if (!color.equalsIgnoreCase("black")) {
      html_RecordCount.setStyle("padding-right: 5px;  color: " + color + ";");
    } else
      html_RecordCount.setStyle("padding-right: 5px;");

    Div divValue = new Div();
    divValue.setAlign("right");
    divValue.appendChild(html_RecordCount);
View Full Code Here

TOP

Related Classes of org.zkoss.zul.Html

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.