Search in sources :

Example 1 with StageClosedEvent

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());
}
Also used : StageClosedEvent(limelight.ui.events.stage.StageClosedEvent) Test(org.junit.Test)

Example 2 with StageClosedEvent

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);
}
Also used : StageClosedEvent(limelight.ui.events.stage.StageClosedEvent) StageClosingEvent(limelight.ui.events.stage.StageClosingEvent)

Example 3 with StageClosedEvent

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);
}
Also used : StageClosedEvent(limelight.ui.events.stage.StageClosedEvent) Test(org.junit.Test)

Example 4 with StageClosedEvent

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);
}
Also used : StageClosedEvent(limelight.ui.events.stage.StageClosedEvent) MockStage(limelight.ui.model.MockStage) Test(org.junit.Test)

Aggregations

StageClosedEvent (limelight.ui.events.stage.StageClosedEvent)4 Test (org.junit.Test)3 StageClosingEvent (limelight.ui.events.stage.StageClosingEvent)1 MockStage (limelight.ui.model.MockStage)1