use of limelight.ui.events.stage.StageClosedEvent in project limelight by slagyr.
the class TheaterTest method closedStagesAreRemoved.
@Test
public void closedStagesAreRemoved() throws Exception {
theater.add(defaultStage);
new StageClosedEvent().dispatch(defaultStage);
assertEquals(null, theater.get("default"));
assertEquals(null, theater.getActiveStage());
}
use of limelight.ui.events.stage.StageClosedEvent in project limelight by slagyr.
the class Stage method close.
public void close() {
if (closing)
return;
closing = true;
new StageClosingEvent().dispatch(this);
hide();
setScene(null);
doClose();
new StageClosedEvent().dispatch(this);
}
use of limelight.ui.events.stage.StageClosedEvent in project limelight by slagyr.
the class TheaterTest method tryToCloseTheProductionWhenEmptied.
@Test
public void tryToCloseTheProductionWhenEmptied() throws Exception {
theater.add(defaultStage);
new StageClosedEvent().dispatch(defaultStage);
assertEquals(true, production.closeAttempted);
}
use of limelight.ui.events.stage.StageClosedEvent 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);
}
Aggregations