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

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


    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

    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

    }
    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

  }

  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

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

    private static String makeImage(ImageResource resource) {
        AbstractImagePrototype prototype = AbstractImagePrototype.create(resource);
        return prototype.getHTML();
    }
View Full Code Here

        template = GWT.create(Template.class);
      }

      // Cache the html string for the error icon.
      ImageResource errorIcon = Styles.resources().errorIcon();
      AbstractImagePrototype errorImg = AbstractImagePrototype.create(errorIcon);
      errorIconHtml = SafeHtmlUtils.fromTrustedString(errorImg.getHTML());

      // Cache the html string for the pending icon.
      ImageResource pendingIcon = Styles.resources().pendingCommit();
      AbstractImagePrototype pendingImg = AbstractImagePrototype.create(pendingIcon);
      pendingIconHtml = SafeHtmlUtils.fromTrustedString(pendingImg.getHTML());
    }
View Full Code Here

  private static final int IMAGE_WIDTH = 16;
  private static final SafeHtml DOWN_ARROW = makeImage(RESOURCES.downArrow());
  private static final SafeHtml UP_ARROW = makeImage(RESOURCES.upArrow());

  private static SafeHtml makeImage(ImageResource resource) {
    AbstractImagePrototype proto = AbstractImagePrototype.create(resource);
    String html = proto.getHTML().replace("style='",
        "style='position:absolute;right:0px;top:0px;");
    return SafeHtmlUtils.fromTrustedString(html);
  }
View Full Code Here

            }
            else
            {
                res = Icons.INSTANCE.status_bad();
            }
            AbstractImagePrototype proto = AbstractImagePrototype.create(res);
            SafeHtml imageHtml = SafeHtmlUtils.fromTrustedString(proto.getHTML());
            String name = value.getName().length()>30 ? value.getName().substring(0,25)+" ..." : value.getName();
            sb.append(DEPLOYMENT_TEMPLATES.deployment(name, imageHtml));
        }
View Full Code Here

            } else if (value.isEnabled()) {
                res = Icons.INSTANCE.status_good();
            } else {
                res = Icons.INSTANCE.status_bad();
            }
            AbstractImagePrototype proto = AbstractImagePrototype.create(res);
            SafeHtml imageHtml = SafeHtmlUtils.fromTrustedString(proto.getHTML());
            String name = value.getName().length() > 30 ? value.getName().substring(0, 25) + " ..." : value.getName();
            sb.append(DEPLOYMENT_TEMPLATES.deployment(name, imageHtml));
        }
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.