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