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

Examples of com.google.gwt.user.client.ui.CustomButton.Face


    faces.put("up", b.getUpFace());
    faces.put("upHovering", b.getUpHoveringFace());
    faces.put("downHovering", b.getDownHoveringFace());
    // Set all faces as text.
    for (Map.Entry<String, Face> entry : faces.entrySet()) {
      Face f = entry.getValue();
      b.setCurrentFace(f);
      assertEquals("random", b.getStylePrimaryName());
      assertTrue(b.getStyleName().indexOf("random-" + f.getName()) != -1);
    }

    b.addStyleName("fobar");
    // Set all faces as text.
    for (Map.Entry<String, Face> entry : faces.entrySet()) {
      Face f = entry.getValue();
      b.setCurrentFace(f);
      String computedStyleName = b.getElement().getPropertyString("className");
      assertTrue(computedStyleName.indexOf("random") == 0);
      assertTrue(computedStyleName.indexOf("random-" + f.getName()) >= 0);
      assertTrue(computedStyleName.indexOf("fobar") >= 0);
    }
  }
View Full Code Here


    faces.put("upHovering", b.getUpHoveringFace());
    faces.put("downHovering", b.getDownHoveringFace());

    // Set all faces as text.
    for (Map.Entry<String, Face> entry : faces.entrySet()) {
      Face f = entry.getValue();
      String faceName = entry.getKey();
      f.setText(faceName);
    }
   
    for (Map.Entry<String, Face> entry : faces.entrySet()) {
      Face f = entry.getValue();
      String faceName = entry.getKey();
      assertEquals(f.getText(), faceName);
    }
   
    // Set all faces as HTML
    for (Map.Entry<String, Face> entry : faces.entrySet()) {
      Face f = entry.getValue();
      String faceName = entry.getKey();
      f.setHTML("<b>" + faceName + "</b>");
    }

    for (Map.Entry<String, Face> entry : faces.entrySet()) {
      Face f = entry.getValue();
      String faceName = entry.getKey();
      assertEquals(f.getText(), faceName);
      assertEquals(StringCase.toLower(f.getHTML()), "<b>" + StringCase.toLower(faceName)
          + "</b>");
    }
  }
View Full Code Here

TOP

Related Classes of com.google.gwt.user.client.ui.CustomButton.Face

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.