use of limelight.ui.Panel in project limelight by slagyr.
the class StyleAttributeTest method setUp.
@Before
public void setUp() throws Exception {
panel = new MockChangeablePanel();
attribute = new StyleAttribute("NAME", new IntegerAttributeCompiler(), new SimpleIntegerValue(50));
Context.instance().bufferedImageCache = new SimpleCache<Panel, BufferedImage>();
}
use of limelight.ui.Panel in project limelight by slagyr.
the class ParentPanelTest method removeRequiresUpdate.
@Test
public void removeRequiresUpdate() throws Exception {
Panel child = new MockPanel();
panel.add(child);
resetFamilyLayouts();
panel.remove(child);
assertEquals(true, panel.needsLayout());
}
use of limelight.ui.Panel in project limelight by slagyr.
the class ParentPanelTest method shouldGetOwnerOfPoint.
@Test
public void shouldGetOwnerOfPoint() throws Exception {
Panel panel1 = new MockPanel();
Panel panel2 = new MockPanel();
panel1.setLocation(0, 0);
panel1.setSize(100, 100);
panel2.setLocation(100, 100);
panel2.setSize(100, 100);
panel.add(panel1);
panel.add(panel2);
assertSame(panel1, panel.getOwnerOfPoint(new Point(0, 0)));
assertSame(panel2, panel.getOwnerOfPoint(new Point(100, 100)));
assertSame(panel1, panel.getOwnerOfPoint(new Point(50, 50)));
assertSame(panel2, panel.getOwnerOfPoint(new Point(150, 150)));
assertSame(panel, panel.getOwnerOfPoint(new Point(150, 50)));
assertSame(panel, panel.getOwnerOfPoint(new Point(50, 150)));
}
use of limelight.ui.Panel in project limelight by slagyr.
the class PropPanelLayout method buildRows.
protected LinkedList<Row> buildRows(PropPanel panel) {
LinkedList<Row> rows = new LinkedList<Row>();
Row currentRow = newRow(panel, rows);
for (Panel child : panel.getChildren()) {
if (!(child instanceof ScrollBarPanel) && !child.isFloater()) {
if (!currentRow.isEmpty() && !currentRow.fits(child)) {
currentRow = newRow(panel, rows);
}
currentRow.add(child);
}
}
return rows;
}
use of limelight.ui.Panel in project limelight by slagyr.
the class StageKeyListener method focusOn.
public void focusOn(Panel panel) {
if (panel == null || panel == focusedPanel)
return;
Panel previouslyFocusPanel = focusedPanel;
focusedPanel = panel;
if (previouslyFocusPanel != null)
new FocusLostEvent().dispatch(previouslyFocusPanel);
new FocusGainedEvent().dispatch(panel);
}
Aggregations