Package com.google.gwt.user.client.ui

Examples of com.google.gwt.user.client.ui.AbstractImagePrototype


        window.setHeight(360);
        window.setGlassEnabled(true);


        ImageResource icon = MessageCenterView.getSeverityIcon(msg.getSeverity());
        AbstractImagePrototype prototype = AbstractImagePrototype.create(icon);

        SafeHtmlBuilder html = new SafeHtmlBuilder();

        html.appendHtmlConstant(prototype.getHTML());
        html.appendHtmlConstant(" ");
        html.appendEscaped(msg.getFired().toString());
        html.appendHtmlConstant("<h3>");
        html.appendEscaped(msg.getConciseMessage());
        html.appendHtmlConstant("</h3>");
View Full Code Here


  }

  protected void refresh(M model) {
    TreeNode node = findNode(model);
    if (rendered && node != null) {
      AbstractImagePrototype style = calculateIconStyle(model);
      treeGridView.onIconStyleChange(findNode(model), style);
      Joint j = calcualteJoint(model);
      treeGridView.onJointChange(node, j);
    }
  }
View Full Code Here

    }
    return joint;
  }

  AbstractImagePrototype calculateIconStyle(M model) {
    AbstractImagePrototype style = null;
    if (iconProvider != null) {
      AbstractImagePrototype iconStyle = iconProvider.getIcon((M) model);
      if (iconStyle != null) {
        return iconStyle;
      }
    }
    TreeNode node = findNode(model);
View Full Code Here

    config.css = "x-treegrid-column";
   
    TreeGrid tree = (TreeGrid)grid;
    TreeStore ts = tree.getTreeStore();
    Joint j = tree.calcualteJoint(model);
    AbstractImagePrototype iconStyle = tree.calculateIconStyle(model);
    int level = ts.getDepth(model);
   
   
   
    String text = model.get(property);
View Full Code Here

    TreeNode node = findNode(model);
    return node.isLeaf() ? Joint.NONE : node.expanded ? Joint.EXPANDED : Joint.COLLAPSED;
  }

  protected AbstractImagePrototype calculateIconStyle(M model) {
    AbstractImagePrototype style = null;
    if (iconProvider != null) {
      AbstractImagePrototype iconStyle = iconProvider.getIcon(model);
      if (iconStyle != null) {
        return iconStyle;
      }
    }
    TreeNode node = findNode(model);
View Full Code Here

      ImageResource icon = cell.getIcon();
      if (icon != lastIcon) {
        if (icon == null) {
          iconSafeHtml = SafeHtmlUtils.EMPTY_SAFE_HTML;
        } else {
          AbstractImagePrototype proto = AbstractImagePrototype.create(icon);
          SafeHtml iconOnly = SafeHtmlUtils.fromTrustedString(proto.getHTML());
          int halfHeight = (int) Math.round(icon.getHeight() / 2.0);
          iconSafeHtml = template.iconWrapper(iconDirection, halfHeight, iconOnly);
        }
      }
View Full Code Here

   * @param res the {@link ImageResource} to render as HTML
   * @return the rendered HTML
   */
  private SafeHtml getImageHtml(ImageResource res) {
    // Right-justify image if LTR, left-justify if RTL
    AbstractImagePrototype proto = AbstractImagePrototype.create(res);
    SafeHtml image = SafeHtmlUtils.fromTrustedString(proto.getHTML());

    SafeStylesBuilder cssBuilder = new SafeStylesBuilder();
    if (LocaleInfo.getCurrentLocale().isRTL()) {
      cssBuilder.appendTrustedString("left:0px;");
    } else {
View Full Code Here

      cssBuilder.appendTrustedString("left: 0px;");
    }
    cssBuilder.appendTrustedString("width: " + res.getWidth() + "px;");
    cssBuilder.appendTrustedString("height: " + res.getHeight() + "px;");

    AbstractImagePrototype proto = AbstractImagePrototype.create(res);
    SafeHtml image = SafeHtmlUtils.fromTrustedString(proto.getHTML());
    return template
        .imageWrapper(classesBuilder.toString(), cssBuilder.toSafeStyles(), image);
  }
View Full Code Here

TOP

Related Classes of com.google.gwt.user.client.ui.AbstractImagePrototype

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.