Search in sources :

Example 11 with Opts

use of limelight.util.Opts in project limelight by slagyr.

the class Xml method toStyle.

public static void toStyle(Element styleElement, Map<String, RichStyle> map, Map<String, RichStyle> extensions) {
    String name = styleElement.getNodeName();
    final Opts options = loadOptions(styleElement);
    Object extensionNames = options.remove("extends");
    RichStyle style = new RichStyle();
    Options.apply(style, options);
    applyExtensions(extensionNames, style, map, extensions);
    map.put(name, style);
}
Also used : Opts(limelight.util.Opts) RichStyle(limelight.styles.RichStyle)

Example 12 with Opts

use of limelight.util.Opts in project limelight by slagyr.

the class FakeScene method getBackstage.

public Opts getBackstage(Prop child) {
    Opts result = backstage.get(child);
    if (result == null) {
        result = new Opts();
        backstage.put(child, result);
    }
    return result;
}
Also used : Opts(limelight.util.Opts)

Example 13 with Opts

use of limelight.util.Opts in project limelight by slagyr.

the class JavaProductionTest method loadEmptyStylesForScene.

@Test
public void loadEmptyStylesForScene() throws Exception {
    final Scene scene = production.loadScene("aScene", new Opts());
    final Map<String, RichStyle> styles = production.loadStyles(scene, new HashMap<String, RichStyle>());
    assertEquals(0, styles.size());
}
Also used : Opts(limelight.util.Opts) RichStyle(limelight.styles.RichStyle) Scene(limelight.ui.model.Scene) Test(org.junit.Test)

Example 14 with Opts

use of limelight.util.Opts in project limelight by slagyr.

the class ProductionTest method openDefaultScenes.

@Test
public void openDefaultScenes() throws Exception {
    production.getEventHandler().add(ProductionOpenedEvent.class, action);
    MockStage stage = new MockStage();
    production.getTheater().add(stage);
    stage.setDefaultSceneName("defaultScene");
    Scene scene = new FakeScene();
    production.stubbedScene = scene;
    production.open(new Opts());
    assertEquals(true, action.invoked);
    assertEquals(true, stage.isOpen());
    assertEquals(scene, stage.getScene());
}
Also used : Opts(limelight.util.Opts) MockStage(limelight.ui.model.MockStage) FakeScene(limelight.ui.model.FakeScene) Scene(limelight.ui.model.Scene) FakeScene(limelight.ui.model.FakeScene) Test(org.junit.Test)

Aggregations

Opts (limelight.util.Opts)14 Test (org.junit.Test)4 RichStyle (limelight.styles.RichStyle)2 Scene (limelight.ui.model.Scene)2 Production (limelight.model.Production)1 Stage (limelight.model.Stage)1 PanelEvent (limelight.ui.events.panel.PanelEvent)1 FakeScene (limelight.ui.model.FakeScene)1 MockStage (limelight.ui.model.MockStage)1 PropPanel (limelight.ui.model.PropPanel)1 ScenePanel (limelight.ui.model.ScenePanel)1