Example #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());
  }
Example #2
0
  @Test
  public void parentSizeChangesAlwaysRequiresLayout() throws Exception {
    panel.resetLayout();
    assertEquals(false, panel.needsLayout());

    panel.consumableAreaChanged();

    assertEquals(true, panel.needsLayout());
  }
Example #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());
  }