Search in sources :

Example 26 with PropPanel

use of limelight.ui.model.PropPanel in project limelight by slagyr.

the class DropDownPanelTest method selectedOptionsIsHighlightedAtFirst.

@Test
public void selectedOptionsIsHighlightedAtFirst() throws Exception {
    panel.setChoicesVargs(1, 2, 3);
    panel.setSelectedChoice(3);
    new ButtonPushedEvent().dispatch(panel);
    final PropPanel selected = panel.getPopup().getSelectedItem();
    assertEquals("3", selected.getText());
    assertEquals(root.getStyles().get("limelight_builtin_drop_down_popup_list_item_selected"), selected.getStyle().getScreen());
}
Also used : PropPanel(limelight.ui.model.PropPanel) Test(org.junit.Test)

Example 27 with PropPanel

use of limelight.ui.model.PropPanel in project limelight by slagyr.

the class InputPanelUtilTest method setUp.

public void setUp() throws Exception {
    input = new TestableInputPanel();
    parent = new PropPanel(new FakePropProxy());
    parent.add(input);
    KeyboardFocusManager.installed();
}
Also used : PropPanel(limelight.ui.model.PropPanel) FakePropProxy(limelight.model.api.FakePropProxy)

Example 28 with PropPanel

use of limelight.ui.model.PropPanel in project limelight by slagyr.

the class RadioButtonPanelTest method setUp.

@Before
public void setUp() throws Exception {
    panel = new RadioButtonPanel();
    parent = new PropPanel(new FakePropProxy());
    parent.add(panel);
    root = new FakeScene();
    root.add(parent);
}
Also used : PropPanel(limelight.ui.model.PropPanel) FakeScene(limelight.ui.model.FakeScene) FakePropProxy(limelight.model.api.FakePropProxy) Before(org.junit.Before)

Example 29 with PropPanel

use of limelight.ui.model.PropPanel in project limelight by slagyr.

the class Mouse method pointFor.

private static Point pointFor(PropProxy prop, int x, int y) {
    final PropPanel propPanel = (PropPanel) prop.getPeer();
    Point absoluteLocation = propPanel.getAbsoluteLocation();
    int localX = absoluteLocation.x + x;
    int localY = absoluteLocation.y + y;
    return new Point(localX, localY);
}
Also used : PropPanel(limelight.ui.model.PropPanel)

Example 30 with PropPanel

use of limelight.ui.model.PropPanel in project limelight by slagyr.

the class CheckBoxTest method setUp.

@Before
public void setUp() throws Exception {
    checkBox = new CheckBox();
    propPanel = new PropPanel(new FakePropProxy());
    new FakeScene().add(propPanel);
    checkBox.install(new CastEvent(propPanel));
}
Also used : PropPanel(limelight.ui.model.PropPanel) CastEvent(limelight.ui.events.panel.CastEvent) FakeScene(limelight.ui.model.FakeScene) FakePropProxy(limelight.model.api.FakePropProxy) Before(org.junit.Before)

Aggregations

PropPanel (limelight.ui.model.PropPanel)34 FakePropProxy (limelight.model.api.FakePropProxy)22 FakeScene (limelight.ui.model.FakeScene)17 Before (org.junit.Before)16 Test (org.junit.Test)9 CastEvent (limelight.ui.events.panel.CastEvent)7 MouseClickedEvent (limelight.ui.events.panel.MouseClickedEvent)4 Event (limelight.events.Event)3 EventAction (limelight.events.EventAction)3 MockGraphics (limelight.ui.MockGraphics)3 SimplePropProxy (limelight.ui.SimplePropProxy)3 MouseEnteredEvent (limelight.ui.events.panel.MouseEnteredEvent)3 PanelEvent (limelight.ui.events.panel.PanelEvent)3 MockStage (limelight.ui.model.MockStage)3 RadioButtonGroup (limelight.ui.RadioButtonGroup)2 Scene (limelight.ui.model.Scene)2 ScenePanel (limelight.ui.model.ScenePanel)2 FakeFileSystem (limelight.io.FakeFileSystem)1 FakeProduction (limelight.model.FakeProduction)1 PropProxy (limelight.model.api.PropProxy)1