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);
}
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;
}
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());
}
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());
}
Aggregations