Search in sources :

Example 16 with FakeScene

use of limelight.ui.model.FakeScene 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");
}
Also used : PropPanel(limelight.ui.model.PropPanel) FakeScene(limelight.ui.model.FakeScene) MockStage(limelight.ui.model.MockStage) FakePropProxy(limelight.model.api.FakePropProxy) Before(org.junit.Before)

Example 17 with FakeScene

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

the class TextPanelMouseProcessorTest method setUpWithText.

private void setUpWithText(String text, boolean multiline) {
    if (multiline)
        panel = new TextAreaPanel();
    else
        panel = new TextBoxPanel();
    panel.setSize(150, 75);
    root = new FakeScene();
    root.add(panel);
    stage = new MockStage();
    root.setStage(stage);
    model = panel.getModel();
    model.setTypedLayoutFactory(MockTypedLayoutFactory.instance);
    model.setText(text);
    model.setCaretLocation(TextLocation.origin);
}
Also used : FakeScene(limelight.ui.model.FakeScene) MockStage(limelight.ui.model.MockStage)

Example 18 with FakeScene

use of limelight.ui.model.FakeScene 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");
}
Also used : PropPanel(limelight.ui.model.PropPanel) MockGraphics(limelight.ui.MockGraphics) TextBoxPanel(limelight.ui.model.inputs.TextBoxPanel) MockDrawable(limelight.ui.model.MockDrawable) FakeScene(limelight.ui.model.FakeScene) MockStage(limelight.ui.model.MockStage) FakePropProxy(limelight.model.api.FakePropProxy)

Example 19 with FakeScene

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

the class InputPanelTest method setUp.

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

Example 20 with FakeScene

use of limelight.ui.model.FakeScene 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)

Aggregations

FakeScene (limelight.ui.model.FakeScene)29 FakePropProxy (limelight.model.api.FakePropProxy)17 PropPanel (limelight.ui.model.PropPanel)17 Before (org.junit.Before)15 MockStage (limelight.ui.model.MockStage)11 Test (org.junit.Test)11 CastEvent (limelight.ui.events.panel.CastEvent)7 Scene (limelight.ui.model.Scene)7 MockGraphics (limelight.ui.MockGraphics)2 RadioButtonGroup (limelight.ui.RadioButtonGroup)2 FakeFileSystem (limelight.io.FakeFileSystem)1 FakeProduction (limelight.model.FakeProduction)1 RichStyle (limelight.styles.RichStyle)1 StageActivatedEvent (limelight.ui.events.stage.StageActivatedEvent)1 MockDrawable (limelight.ui.model.MockDrawable)1 TextBoxPanel (limelight.ui.model.inputs.TextBoxPanel)1 Opts (limelight.util.Opts)1