示例#1
0
  @Test
  public void textChanged() throws Exception {
    assertEquals(false, panel.textChanged());

    panel.setText("Something", parent);
    assertEquals(true, panel.needsLayout());

    panel.resetLayout();
    panel.setText("Something", parent);
    assertEquals(false, panel.needsLayout());

    panel.setText("Something Else", parent);
    assertEquals(true, panel.needsLayout());

    panel.resetLayout();
    assertEquals(false, panel.needsLayout());
  }
示例#2
0
  @Test
  public void parentSizeChangesAlwaysRequiresLayout() throws Exception {
    panel.resetLayout();
    assertEquals(false, panel.needsLayout());

    panel.consumableAreaChanged();

    assertEquals(true, panel.needsLayout());
  }
示例#3
0
  @Test
  public void layoutFlushedChangedText() throws Exception {
    panel.resetLayout();
    assertEquals(false, panel.needsLayout());

    panel.setText("Something", parent);
    assertEquals(true, panel.needsLayout());

    panel.doLayout();
    assertEquals(false, panel.needsLayout());
  }