예제 #1
0
  public void testWidthOrHeightChanges() throws Exception {
    panel.styleChanged(Style.WIDTH, new StaticDimensionAttribute(20));
    assertEquals(true, panel.sizeChangePending());
    panel.resetPendingSizeChange();
    assertEquals(false, panel.sizeChangePending());

    panel.styleChanged(Style.HEIGHT, new StaticDimensionAttribute(20));
    assertEquals(true, panel.sizeChangePending());
    panel.resetPendingSizeChange();
    assertEquals(false, panel.sizeChangePending());
  }
예제 #2
0
  public void testChangingFontStyle() throws Exception {
    panel.setText("foo");
    panel.resetLayout();
    panel.resetPendingSizeChange();

    panel.styleChanged(Style.FONT_STYLE, Style.FONT_STYLE.compile("italic"));

    assertEquals(true, panel.needsLayout());
    assertEquals(true, panel.sizeChangePending());
  }