use of limelight.ui.MockPanel in project limelight by slagyr.
the class ParentPanelTest method shouldClearingCacheIsRecursive.
@Test
public void shouldClearingCacheIsRecursive() throws Exception {
panel.setLocation(20, 21);
Box parentBounds = panel.getAbsoluteBounds();
MockPanel child = new MockPanel();
panel.add(child);
child.setLocation(10, 11);
Box childBounds = child.getAbsoluteBounds();
panel.setLocation(30, 31);
assertNotSame(parentBounds, panel.getAbsoluteBounds());
assertNotSame(childBounds, child.getAbsoluteBounds());
}
use of limelight.ui.MockPanel in project limelight by slagyr.
the class IlluminatedEventTest method setUp.
@Before
public void setUp() throws Exception {
panel = new MockPanel();
event = new IlluminatedEvent(panel);
}
use of limelight.ui.MockPanel in project limelight by slagyr.
the class MouseEnteredEventTest method setUp.
@Before
public void setUp() throws Exception {
panel = new MockPanel();
event = new MouseEnteredEvent(0, new Point(0, 0), 0);
}
use of limelight.ui.MockPanel in project limelight by slagyr.
the class StageMouseListenerTest method setUp.
@Before
public void setUp() throws Exception {
component = new java.awt.Panel();
FakeScene root = new FakeScene();
listener = new StageMouseListener(root);
parent = new MockParentPanel();
child = new MockPanel();
root.add(parent);
parent.add(child);
Scene scene = new FakeScene();
scene.add(parent);
scene.setStage(new MockStage());
parent.setSize(1000, 1000);
child.setLocation(250, 250);
child.setSize(500, 500);
parentAction = new MockEventAction();
childAction = new MockEventAction();
}
use of limelight.ui.MockPanel in project limelight by slagyr.
the class StageKeyListenerTest method focusIsLostWhenChangingFocus.
@Test
public void focusIsLostWhenChangingFocus() throws Exception {
panel.getEventHandler().add(FocusLostEvent.class, action);
MockPanel panel2 = new MockPanel();
panel2.getEventHandler().add(FocusGainedEvent.class, action2);
listener.focusOn(panel);
listener.focusOn(panel2);
assertEquals(panel2, listener.getFocusedPanel());
assertEquals(true, action.invoked);
assertEquals(true, action2.invoked);
}
Aggregations