Search in sources :

Example 1 with MockParentPanel

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

the class TextInputPanelLayoutTest method clearsTextLayout.

@Test
public void clearsTextLayout() throws Exception {
    assumeTrue(TestUtil.notHeadless());
    MockTextInputPanel panel = new MockTextInputPanel();
    MockParentPanel parent = new MockParentPanel();
    parent.add(panel);
    Layouts.on(panel, TextInputPanelLayout.instance);
    assertEquals(true, panel.mockModel.clearLayoutsCalled);
}
Also used : MockParentPanel(limelight.ui.model.MockParentPanel) Test(org.junit.Test)

Example 2 with MockParentPanel

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

the class SingleLineTextModelTest method setUp.

@Before
public void setUp() {
    assumeTrue(TestUtil.notHeadless());
    panel = new TextBoxPanel();
    MockParentPanel parent = new MockParentPanel();
    parent.add(panel);
    parent.setSize(100, 20);
    Layouts.on(panel, panel.getDefaultLayout());
    model = panel.getModel();
    model.setTypedLayoutFactory(MockTypedLayoutFactory.instance);
}
Also used : MockParentPanel(limelight.ui.model.MockParentPanel) TextBoxPanel(limelight.ui.model.inputs.TextBoxPanel) Before(org.junit.Before)

Aggregations

MockParentPanel (limelight.ui.model.MockParentPanel)2 TextBoxPanel (limelight.ui.model.inputs.TextBoxPanel)1 Before (org.junit.Before)1 Test (org.junit.Test)1