use of limelight.ui.model.PropPanel in project limelight by slagyr.
the class DropDownPopup method createList.
private void createList() {
popupList = new PropPanel(new SimplePropProxy(), Util.toMap("name", "limelight_builtin_drop_down_popup_list"));
popupList.getStyle().addExtension(stylesStore.get("limelight_builtin_drop_down_popup_list"));
popupList.getStyle().setX(dropDown.getParent().getAbsoluteLocation().x - dropDown.getRoot().getX());
popupList.getStyle().setY(dropDown.getParent().getAbsoluteLocation().y - dropDown.getRoot().getY());
popupList.getStyle().setWidth(dropDown.getParent().getWidth());
popupList.getEventHandler().add(MouseClickedEvent.class, new EventAction() {
public void invoke(Event event) {
// eat the event so the curtains won't get it
}
});
}
use of limelight.ui.model.PropPanel in project limelight by slagyr.
the class TextInputPanelTest method setUp.
@Before
public void setUp() {
assumeTrue(TestUtil.notHeadless());
root = new FakeScene();
panel = new MockTextInputPanel();
parent = new PropPanel(new FakePropProxy());
parent.add(panel);
root.add(parent);
stage = new MockStage();
root.setStage(stage);
model = panel.getModel();
model.setText("Some Text");
}
use of limelight.ui.model.PropPanel in project limelight by slagyr.
the class TextPanelBorderPainterTest method setUp.
@Before
public void setUp() throws Exception {
FakeScene root = new FakeScene();
parent = new PropPanel(new FakePropProxy());
root.add(parent);
stage = new MockStage();
root.setStage(stage);
panel = new TextBoxPanel();
parent.add(panel);
graphics = new MockGraphics();
TextPanelBorderPainter.normalBorder = normalDrawable = new MockDrawable();
TextPanelBorderPainter.focusedBorder = focusDrawable = new MockDrawable();
painter = TextPanelBorderPainter.instance;
parent.getStyle().setBorderColor("transparent");
}
use of limelight.ui.model.PropPanel in project limelight by slagyr.
the class TextBoxPanelTest method setsPainterOnParent.
@Test
public void setsPainterOnParent() throws Exception {
PropPanel newParent = new PropPanel(new FakePropProxy());
panel.setParent(newParent);
assertEquals(TextInputPanel.TextInputPropPainter.instance, newParent.getPainter());
}
use of limelight.ui.model.PropPanel in project limelight by slagyr.
the class DropDownPanelTest method pressingButtonOpensList.
@Test
public void pressingButtonOpensList() throws Exception {
CastingDirector.installed();
root.illuminate();
panel.setChoicesVargs(1, 2, 3);
new ButtonPushedEvent().dispatch(panel);
assertEquals(2, root.getChildren().size());
PropPanel curtains = (PropPanel) root.getChildren().get(1);
assertEquals("limelight_builtin_curtains", curtains.getName());
PropPanel list = (PropPanel) curtains.getChildren().get(0);
assertEquals("limelight_builtin_drop_down_popup_list", list.getName());
assertEquals(3, list.getChildren().size());
final PropPanel item1 = (PropPanel) list.getChildren().get(0);
assertEquals("limelight_builtin_drop_down_popup_list_item", item1.getName());
assertEquals("1", item1.getText());
final PropPanel item2 = (PropPanel) list.getChildren().get(1);
assertEquals("limelight_builtin_drop_down_popup_list_item", item2.getName());
assertEquals("2", item2.getText());
final PropPanel item3 = (PropPanel) list.getChildren().get(2);
assertEquals("limelight_builtin_drop_down_popup_list_item", item3.getName());
assertEquals("3", item3.getText());
}
Aggregations