Search in sources :

Example 11 with MockGraphics

use of limelight.ui.MockGraphics in project limelight by slagyr.

the class TextAreaPanelTest method setUp.

@Before
public void setUp() {
    assumeTrue(TestUtil.notHeadless());
    panel = new TextAreaPanel();
    parent = new PropPanel(new FakePropProxy());
    parent.add(panel);
    root = new FakeScene();
    root.add(parent);
    root.setStage(new MockStage());
    graphics = new MockGraphics();
    model = panel.getModel();
    model.setText("Some Text");
}
Also used : PropPanel(limelight.ui.model.PropPanel) MockGraphics(limelight.ui.MockGraphics) FakeScene(limelight.ui.model.FakeScene) MockStage(limelight.ui.model.MockStage) FakePropProxy(limelight.model.api.FakePropProxy) Before(org.junit.Before)

Example 12 with MockGraphics

use of limelight.ui.MockGraphics in project limelight by slagyr.

the class TextBoxPanelTest method setUp.

@Before
public void setUp() {
    assumeTrue(TestUtil.notHeadless());
    panel = new TextBoxPanel();
    parent = new PropPanel(new FakePropProxy());
    parent.add(panel);
    graphics = new MockGraphics();
    model = panel.getModel();
    model.setText("Some Text");
}
Also used : PropPanel(limelight.ui.model.PropPanel) MockGraphics(limelight.ui.MockGraphics) FakePropProxy(limelight.model.api.FakePropProxy) Before(org.junit.Before)

Example 13 with MockGraphics

use of limelight.ui.MockGraphics in project limelight by slagyr.

the class ScrollBarPainterTest method setUpHorizontally.

private void setUpHorizontally() {
    scrollBar = new ScrollBarPanel(ScrollBarPanel.HORIZONTAL);
    scrollBar.setSize(100, 15);
    scrollBar.setValue(0);
    scrollBar.configure(1, 100);
    graphics = new MockGraphics();
    images = ScrollBarPainter.horizontalImages;
}
Also used : MockGraphics(limelight.ui.MockGraphics) ScrollBarPanel(limelight.ui.model.inputs.ScrollBarPanel)

Example 14 with MockGraphics

use of limelight.ui.MockGraphics 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 15 with MockGraphics

use of limelight.ui.MockGraphics in project limelight by slagyr.

the class TextPanelCaretPainterTest method setUp.

@Before
public void setUp() {
    assumeTrue(TestUtil.notHeadless());
    container = new limelight.ui.model.text.MockTextContainer();
    container.bounds = new Box(0, 0, 150, 20);
    model = new MockTextModel(container);
    model.setText("Some Text");
    model.setCaretLocation(TextLocation.at(0, 4));
    graphics = new MockGraphics();
    container.cursorOn = true;
    painter = TextPanelCaretPainter.instance;
}
Also used : MockGraphics(limelight.ui.MockGraphics) Box(limelight.util.Box) MockTextModel(limelight.ui.model.inputs.MockTextModel) Before(org.junit.Before)

Aggregations

MockGraphics (limelight.ui.MockGraphics)24 Box (limelight.util.Box)11 Test (org.junit.Test)6 Before (org.junit.Before)5 FakePropProxy (limelight.model.api.FakePropProxy)3 MockProp (limelight.ui.model.MockProp)3 PropPanel (limelight.ui.model.PropPanel)3 FakeScene (limelight.ui.model.FakeScene)2 MockStage (limelight.ui.model.MockStage)2 ScrollBarPanel (limelight.ui.model.inputs.ScrollBarPanel)2 Pen (limelight.ui.Pen)1 MockDrawable (limelight.ui.model.MockDrawable)1 MockTextModel (limelight.ui.model.inputs.MockTextModel)1 TextBoxPanel (limelight.ui.model.inputs.TextBoxPanel)1