use of limelight.ui.MockPanel in project limelight by slagyr.
the class ParentPanelTest method shouldAddingPanelsAtIndexRequiresLayout.
@Test
public void shouldAddingPanelsAtIndexRequiresLayout() throws Exception {
Panel childA = new MockPanel();
Panel childB = new MockPanel();
panel.add(childA);
panel.add(0, childB);
assertEquals(true, panel.needsLayout());
}
use of limelight.ui.MockPanel in project limelight by slagyr.
the class ParentPanelTest method shouldRemovePanel.
@Test
public void shouldRemovePanel() throws Exception {
MockPanel panel1 = new MockPanel();
MockPanel panel2 = new MockPanel();
panel.add(panel1);
panel.add(panel2);
panel.remove(panel1);
assertEquals(1, panel.getChildren().size());
assertSame(panel2, panel.getChildren().get(0));
}
use of limelight.ui.MockPanel in project limelight by slagyr.
the class ParentPanelTest method shouldRemoveAllRequiresUpdate.
@Test
public void shouldRemoveAllRequiresUpdate() throws Exception {
Panel child = new MockPanel();
panel.add(child);
resetFamilyLayouts();
panel.removeAll();
assertEquals(true, panel.needsLayout());
}
use of limelight.ui.MockPanel in project limelight by slagyr.
the class ParentPanelTest method shouldAddingPanelsRequiresUpdate.
@Test
public void shouldAddingPanelsRequiresUpdate() throws Exception {
Panel child = new MockPanel();
panel.add(child);
assertEquals(true, panel.needsLayout());
}
use of limelight.ui.MockPanel in project limelight by slagyr.
the class PanelBaseTest method overridingLayouts.
@Test
public void overridingLayouts() throws Exception {
Panel panel = new MockPanel();
final FakeLayout weakLayout = new FakeLayout(false);
final FakeLayout strongLayout = new FakeLayout(true);
panel.markAsNeedingLayout(weakLayout);
panel.markAsNeedingLayout(strongLayout);
assertSame(strongLayout, panel.resetNeededLayout());
}
Aggregations