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


    }
    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

    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

    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 = String.valueOf(model.get(property));
    String id = tree.findNode(model).id;
    return tree.getTreeView().getTemplate(model, id, text, iconStyle, false, j, level - 1);
View Full Code Here

   private final MenuBarImages menuBarImages = GWT.create(MenuBarImages.class);

   @Test
   public void checkToString() {
      // Arrange
      AbstractImagePrototype proto = menuBarImages.menuBarSubMenuIcon();

      // Act & Assert
      assertNotNull(proto.toString());
   }
View Full Code Here

   }

   @Test
   public void createElement() {
      // Arrange
      AbstractImagePrototype proto = menuBarImages.menuBarSubMenuIcon();

      // Act
      ImagePrototypeElement element = proto.createElement();

      // Assert
      assertEquals("IMG", element.getTagName());
      assertEquals(
               "<img onload=\"this.__gwtLastUnhandledEvent=\"load\";\" src=\"http://127.0.0.1:8888/gwt_test_utils_module/clear.cache.gif\" style=\"width: 0px; height: 0px; background:url(http://127.0.0.1: 8888/gwt_test_utils_module/menuBarSubMenuIcon.gif) no-repeat 0px 0px; \" border=\"0\"></img>",
View Full Code Here

   }

   @Test
   public void createImage() {
      // Arrange
      AbstractImagePrototype proto = menuBarImages.menuBarSubMenuIcon();

      // Act
      Image image = proto.createImage();

      // Assert
      assertEquals("http://127.0.0.1:8888/gwt_test_utils_module/menuBarSubMenuIcon.gif",
               image.getUrl());
   }
View Full Code Here

   }

   @Test
   public void getHTML() {
      // Arrange
      AbstractImagePrototype proto = menuBarImages.menuBarSubMenuIcon();

      // Act
      String html = proto.getHTML();

      // Assert
      assertEquals(
               "<img onload='this.__gwtLastUnhandledEvent=\"load\";' src='http://127.0.0.1:8888/gwt_test_utils_module/clear.cache.gif' style='width:0.0px;height:0.0px;background:url(http://127.0.0.1:8888/gwt_test_utils_module/menuBarSubMenuIcon.gif) no-repeat 0px 0px;' border='0'>",
               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

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.