use of limelight.ui.Panel in project limelight by slagyr.
the class ParentPanelTest method shouldGetChildrenReturnsACopiedList.
@Test
public void shouldGetChildrenReturnsACopiedList() throws Exception {
Panel child = new MockPanel();
panel.add(child);
java.util.List<Panel> children = panel.getChildren();
panel.remove(child);
java.util.List<Panel> children2 = panel.getChildren();
assertNotSame(children, children2);
assertEquals(1, children.size());
assertEquals(0, children2.size());
}
use of limelight.ui.Panel in project limelight by slagyr.
the class ParentPanelTest method shouldAddingChildrenAtIndex.
@Test
public void shouldAddingChildrenAtIndex() throws Exception {
Panel childA = new MockPanel();
Panel childB = new MockPanel();
Panel childC = new MockPanel();
panel.add(0, childA);
panel.add(0, childB);
panel.add(1, childC);
assertSame(childA, panel.getChildren().get(2));
assertSame(childB, panel.getChildren().get(0));
assertSame(childC, panel.getChildren().get(1));
assertSame(panel, childA.getParent());
assertSame(panel, childB.getParent());
assertSame(panel, childC.getParent());
}
use of limelight.ui.Panel 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.Panel 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.Panel 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());
}
Aggregations