Examples of AbstractImagePrototype


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

    // Get the HTML for the image.
    SafeHtml image;
    if (isPlaceholder) {
      image = SafeHtmlUtils.fromSafeConstant("<div></div>");
    } else {
      AbstractImagePrototype proto = AbstractImagePrototype.create(res);
      image = SafeHtmlUtils.fromTrustedString(proto.getHTML());
    }

    // Create the wrapper based on the vertical alignment.
    SafeStylesBuilder cssStyles =
        new SafeStylesBuilder().appendTrustedString(direction + ":0px;");
View Full Code Here

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

   * @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

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

      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

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

    }
    return joint;
  }

  protected 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

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

  }

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

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

    int level = ts.getDepth(model);

    String id = getId(tree, model, property, rowIndex, colIndex);
    String text = getText(tree, model, property, rowIndex, colIndex);
    AbstractImagePrototype icon = calculateIconStyle(tree, model, property, rowIndex, colIndex);
    Joint j = calcualteJoint(tree, model, property, rowIndex, colIndex);

    return tree.getTreeView().getWidgetTemplate(model, id, text, icon, false, j, level - 1);
  }
View Full Code Here

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

    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

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

    int level = ts.getDepth(model);

    String id = getId(tree, model, property, rowIndex, colIndex);
    String text = getText(tree, model, property, rowIndex, colIndex);
    AbstractImagePrototype icon = calculateIconStyle(tree, model, property, rowIndex, colIndex);
    Joint j = calcualteJoint(tree, model, property, rowIndex, colIndex);

    return tree.getTreeView().getTemplate(model, id, text, icon, false, j, level - 1);
  }
View Full Code Here

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

   * @param rangeItems the range items
   */
  public void setRangeItems(List<RangeItem> rangeItems) {
    this.rangeItems = rangeItems;
    removeAll();
    AbstractImagePrototype icon = null;
    for (RangeItem item : rangeItems) {
      NumberField field = new NumberField() {
        @Override
        protected void onKeyUp(FieldEvent fe) {
          super.onKeyUp(fe);
View Full Code Here

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

    private static final String              SMALL_DOWN_ARROW      = makeImage( TableImageResources.INSTANCE.smallDownArrow() );
    private static final String              UP_ARROW              = makeImage( TableImageResources.INSTANCE.upArrow() );
    private static final String              SMALL_UP_ARROW        = makeImage( TableImageResources.INSTANCE.smallUpArrow() );

    private static String makeImage(ImageResource resource) {
        AbstractImagePrototype prototype = AbstractImagePrototype.create( resource );
        return prototype.getHTML();
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.