Package org.zkoss.zul

Examples of org.zkoss.zul.Div


public class LiveGroupRenderer implements RowRenderer {

  public void render(Row row, java.lang.Object data) {
    if(data instanceof String[]) {
      String[] ary = (String[]) data;
      Div div = new Div();
      Image icon = new Image();
      icon.setStyle("padding: 0px 10px");
      icon.setSrc("/img/Centigrade-Widget-Icons/EnvelopeOpen-16x16.png");
      div.appendChild(icon);
      new Label(ary[0]).setParent(div);
      row.appendChild(div);
      new Label(ary[1]).setParent(row);
      new Label(ary[2]).setParent(row);
      new Label(ary[3]).setParent(row);
View Full Code Here


    mainWindow.setTitle("mainWindow");
    mainWindow.setHeight("50%");
    mainWindow.setWidth("50%");
    mainWindow.addEventListener(Events.ON_CLOSE, new OnCloseListener());
   
    divEditor = new Div();
    divEditor.setParent(mainWindow);
   
    setupEditor();
   
    mainWindow.doHighlighted();
View Full Code Here

public class LiveGroupRenderer implements RowRenderer {

  public void render(Row row, java.lang.Object data) {
    if(data instanceof String[]) {
      String[] ary = (String[]) data;
      Div div = new Div();
      Image icon = new Image();
      icon.setStyle("padding: 0px 10px");
      icon.setSrc("/img/Centigrade-Widget-Icons/EnvelopeOpen-16x16.png");
      div.appendChild(icon);
      new Label(ary[0]).setParent(div);
      row.appendChild(div);
      new Label(ary[1]).setParent(row);
      new Label(ary[2]).setParent(row);
      new Label(ary[3]).setParent(row);
View Full Code Here

public class LiveGroupRenderer implements RowRenderer {

  public void render(Row row, java.lang.Object data) {
    if(data instanceof String[]) {
      String[] ary = (String[]) data;
      Div div = new Div();
      Image icon = new Image();
      icon.setStyle("padding: 0px 10px");
      icon.setSrc("/img/Centigrade-Widget-Icons/EnvelopeOpen-16x16.png");
      div.appendChild(icon);
      new Label(ary[0]).setParent(div);
      row.appendChild(div);
      new Label(ary[1]).setParent(row);
      new Label(ary[2]).setParent(row);
      new Label(ary[3]).setParent(row);
View Full Code Here

   * Creates the main grid for showing the table record counts and <br>
   * the applications statistic data.<br>
   */
  private void createMainGrid() {

    Div div = new Div();
    div.setParent(this.bl_center);

    final Hr hr = new Hr();
    hr.setParent(div);

    /*
     * Borderlayout around the grid for make it scrollable to see all table
     * records if the browser window are to small.
     */
    final Borderlayout bl = new Borderlayout();
    bl.setParent(div);
    final Center ct = new Center();
    ct.setAutoscroll(true);
    ct.setStyle("background-color: #EBEBEB");
    ct.setBorder("none");
    ct.setFlex(true);
    ct.setParent(bl);
    final Div divCt = new Div();
    divCt.setParent(ct);

    this.tableLayout = new Tablelayout();
    this.tableLayout.setColumns(3);
    this.tableLayout.setParent(divCt);

    this.tableChildrenRecords = new Tablechildren();
    this.tableChildrenRecords.setRowspan(1);
    this.tableChildrenRecords.setWidth("600px");
    this.tableChildrenRecords.setStyle("padding-left: 5px;");
    this.tableChildrenRecords.setParent(this.tableLayout);

    this.tableChildrenStatistic = new Tablechildren();
    this.tableChildrenStatistic.setRowspan(1);
    this.tableChildrenStatistic.setWidth("450px");
    this.tableChildrenStatistic.setStyle("padding-left: 5px;");
    this.tableChildrenStatistic.setParent(this.tableLayout);

    this.tableChildrenButtons = new Tablechildren();
    this.tableChildrenButtons.setRowspan(1);
    this.tableChildrenButtons.setWidth("240px");
    this.tableChildrenButtons.setStyle("padding-left: 5px;");
    this.tableChildrenButtons.setParent(this.tableLayout);

    final Panel pb = new Panel();
    pb.setWidth("240px");
    pb.setBorder("none");
    pb.setStyle("align:left; color:red");
    pb.setParent(this.tableChildrenButtons);

    this.panelChildren_Buttons = new Panelchildren();
    this.panelChildren_Buttons.setParent(pb);

    final Separator sep = new Separator();
    sep.setParent(divCt);
    final Separator sep2 = new Separator();
    sep2.setParent(divCt);

    final Div divFooter = new Div();
    divFooter.setAlign("center");
    divFooter.setParent(this.bl_south);

    final Hr hr2 = new Hr();
    hr2.setParent(divFooter);

    final Label footerLabel = new Label();
View Full Code Here

    row.setParent(rows);

    this.Vbox_Buttons = new Vbox();
    this.Vbox_Buttons.setParent(panelchildren);

    this.div_Buttons = new Div();
    this.div_Buttons.setWidth("100%");
    this.div_Buttons.setHeight("100%");
    this.div_Buttons.setStyle("padding: 10px;");
    this.div_Buttons.setParent(this.Vbox_Buttons);

    /* 100. Button */
    final Div divBtn1 = new Div();
    divBtn1.setStyle("align: center");
    divBtn1.setParent(this.div_Buttons);

    this.btn100 = new Button();
    this.btn100.setId("btn100");
    this.btn100.setLabel("insert 100");
    this.btn100.setImage("/images/icons/import_16x16.gif");
    this.btn100.setTooltiptext("Insert 100 randomly created customer records");
    this.btn100.setParent(divBtn1);

    this.btn100.addEventListener("onClick", new OnClick100Eventlistener());

    /* Separator */
    createNewSeparator(this.div_Buttons, "horizontal", false, "5", "");
    createNewSeparator(this.div_Buttons, "horizontal", false, "5", "");

    /* 1.000 Button */
    final Div divBtn2 = new Div();
    divBtn2.setStyle("align: center;");
    divBtn2.setParent(this.div_Buttons);

    this.btn1000 = new Button();
    this.btn1000.setId("btn1000");
    this.btn1000.setLabel("insert 1.000");
    this.btn1000.setImage("/images/icons/import_16x16.gif");
View Full Code Here

    caption.setParent(panel);
    caption.setImage("/images/icons/console_view.gif");
    caption.setLabel("Users online");
    caption.setStyle("color: #000000;font-weight:bold; text-align:left ");

    final Div div = new Div();
    div.setStyle("padding: 4px;");
    div.setWidth("100%");
    div.setHeight("100%");
    div.setParent(panelchildren);

    // Chart Dial
    final Random random = new Random();
    final int val = random.nextInt(100);
View Full Code Here

    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);
    row.appendChild(divValue);
    row.setParent(rowParent);
View Full Code Here

    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);
    row.appendChild(divValue);
    row.setParent(rowParent);
View Full Code Here

    // Column for the Message buttons
    this.statusBarMessageIndicator = new Column();
    this.statusBarMessageIndicator.setWidth("50px");
    this.statusBarMessageIndicator.setStyle("background-color: #D6DCDE; padding: 0px");
    this.statusBarMessageIndicator.setParent(columns);
    Div div = new Div();
    div.setStyle("padding: 1px;");
    div.setParent(statusBarMessageIndicator);

    // open message button
    this.btnOpenMsg = new Toolbarbutton();
    this.btnOpenMsg.setId("btnOpenMsg");
    this.btnOpenMsg.setWidth("20px");
View Full Code Here

TOP

Related Classes of org.zkoss.zul.Div

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.