use of limelight.ui.model.MockStage 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);
}
use of limelight.ui.model.MockStage 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.MockStage in project limelight by slagyr.
the class TheaterTest method canClose.
@Test
public void canClose() throws Exception {
MockStage stage2 = new MockStage("two");
MockStage stage3 = new MockStage("three");
theater.add(defaultStage);
theater.add(stage2);
theater.add(stage3);
theater.close();
assertEquals(0, theater.getStages().size());
assertEquals(null, theater.getActiveStage());
assertEquals(false, theater.isOpen());
}
use of limelight.ui.model.MockStage in project limelight by slagyr.
the class TheaterTest method doesntTryToCloseTheProductionWhenEmptiedButHasVitalStages.
@Test
public void doesntTryToCloseTheProductionWhenEmptiedButHasVitalStages() throws Exception {
MockStage stage2 = new MockStage("two");
theater.add(defaultStage);
theater.add(stage2);
stage2.setVital(true);
new StageClosedEvent().dispatch(defaultStage);
assertEquals(false, production.closeAttempted);
}
use of limelight.ui.model.MockStage in project limelight by slagyr.
the class TheaterTest method doesNotAllowDuplicateNames.
@Test
public void doesNotAllowDuplicateNames() throws Exception {
MockStage stage2 = new MockStage("default");
theater.add(defaultStage);
try {
theater.add(stage2);
fail("should throw error");
} catch (LimelightException e) {
assertEquals("Duplicate stage name: 'default'", e.getMessage());
}
}
Aggregations