Package org.zkoss.zul

Examples of org.zkoss.zul.Image


  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);
View Full Code Here


  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);
View Full Code Here

  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);
View Full Code Here

    lc = new Listcell();
    final Hbox hbox = new Hbox();
    hbox.setParent(lc);

    /* Flag-image */
    final Image img = new Image();
    final String path = "/images/countrycode_flags/";
    final String flag = StringUtils.lowerCase(dummyBean.getCountry()) + ".gif";
    img.setSrc(path + flag);
    hbox.appendChild(img);

    final Separator sep = new Separator();
    hbox.appendChild(sep);

View Full Code Here

      // Fill with the related data for CountryCode
      final CountryCode cc = ip2.getCountryCode();
      if (cc != null) {
        /* Flag-image */
        final Image img = new Image();
        final String path = "/images/countrycode_flags/";
        final String flag = StringUtils.lowerCase(cc.getCcdCode2()) + ".gif";
        img.setSrc(path + flag);
        hbox.appendChild(img);

        final Separator sep = new Separator();
        hbox.appendChild(sep);

        /* Country */
        final Label label = new Label();
        label.setValue(cc.getCcdCode2());
        hbox.appendChild(label);

        // show other stuff from the Ip2Country
        /* Provider-City */
        final Label label2 = new Label();
        if (StringUtils.isNotBlank(ip2.getI2cCity())) {
          label2.setValue("(" + ip2.getI2cCity() + ")");
        } else {
          label2.setValue("");
        }

        hbox.appendChild(label2);
      }

      lc.setParent(item);

    } else {
      lc = new Listcell();
      final Hbox hbox = new Hbox();
      hbox.setParent(lc);

      /* Flag-image */
      final Image img = new Image();
      final String path = "/images/countrycode_flags/";
      final String flag = "xx.gif";
      img.setSrc(path + flag);
      hbox.appendChild(img);
      final Label label = new Label();
      label.setValue("Unknown");
      hbox.appendChild(label);

View Full Code Here

      BufferedImage bi = chart.createBufferedImage(chartWidth, chartHeight, BufferedImage.TRANSLUCENT, null);
      byte[] bytes = EncoderUtil.encode(bi, ImageFormat.PNG, true);

      AImage chartImage = new AImage("Pie Chart", bytes);

      Image img = new Image();
      img.setContent(chartImage);
      img.setParent(div_chartArea);

    } else {

      div_chartArea.getChildren().clear();
View Full Code Here

      BufferedImage bi = chart.createBufferedImage(chartWidth, chartHeight, BufferedImage.TRANSLUCENT, null);
      byte[] bytes = EncoderUtil.encode(bi, ImageFormat.PNG, true);

      AImage chartImage = new AImage("Pie Chart", bytes);

      Image img = new Image();
      img.setContent(chartImage);
      img.setParent(this.div_chartArea);

    } else {

      div_chartArea.getChildren().clear();
View Full Code Here

      BufferedImage bi = chart.createBufferedImage(chartWidth, chartHeight, BufferedImage.TRANSLUCENT, null);
      byte[] bytes = EncoderUtil.encode(bi, ImageFormat.PNG, true);

      AImage chartImage = new AImage("Ring Chart", bytes);

      Image img = new Image();
      img.setContent(chartImage);
      img.setParent(this.div_chartArea);

    } else {

      div_chartArea.getChildren().clear();
View Full Code Here

      BufferedImage bi = chart.createBufferedImage(chartWidth, chartHeight, BufferedImage.TRANSLUCENT, null);
      byte[] bytes = EncoderUtil.encode(bi, ImageFormat.PNG, true);

      AImage chartImage = new AImage("Bar Chart", bytes);

      Image img = new Image();
      img.setContent(chartImage);
      img.setParent(div_chartArea);

    } else {

      div_chartArea.getChildren().clear();
View Full Code Here

      BufferedImage bi = chart.createBufferedImage(chartWidth, chartHeight, BufferedImage.TRANSLUCENT, null);
      byte[] bytes = EncoderUtil.encode(bi, ImageFormat.PNG, true);

      AImage chartImage = new AImage("Bar Chart 3D", bytes);

      Image img = new Image();
      img.setContent(chartImage);
      img.setParent(div_chartArea);

    } else {

      div_chartArea.getChildren().clear();
View Full Code Here

TOP

Related Classes of org.zkoss.zul.Image

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.