use of limelight.util.Opts in project limelight by slagyr.
the class JavaProductionTest method loadsSceneWithProps.
@Test
public void loadsSceneWithProps() throws Exception {
fs.createTextFile("/testProduction/aScene/props.xml", "<props><child><grandchild/></child><child2/></props>");
final Opts options = Opts.with("backgroundColor", "red", "shouldAllowClose", false);
ScenePanel scene = (ScenePanel) production.loadScene("aScene", options.merge("name", "aScene", "path", "aScene"));
scene.illuminate();
assertEquals(2, scene.getChildren().size());
final PropPanel child1 = (PropPanel) scene.getChildren().get(0);
assertEquals("child", child1.getName());
final PropPanel child2 = (PropPanel) scene.getChildren().get(1);
assertEquals("child2", child2.getName());
assertEquals(1, child1.getChildren().size());
final PropPanel grandChild = (PropPanel) child1.getChildren().get(0);
assertEquals("grandchild", grandChild.getName());
assertEquals(0, child2.getChildren().size());
}
use of limelight.util.Opts in project limelight by slagyr.
the class Boot method boot.
public static void boot(Map<String, Object> customizations) {
Log.info("Boot - Limelight " + About.version.toString());
Opts options = defaultOptions.merge(customizations);
if (booted)
return;
booted = true;
try {
Context context = Context.instance();
configureOS(context);
configureLogger(options);
configureContext(options, context);
configureSystemProperties(context);
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
Log.config("Boot - Limelight booted ----------");
} catch (Exception e) {
throw new LimelightException(e);
}
}
use of limelight.util.Opts in project limelight by slagyr.
the class Devtool method refresh.
public void refresh(Event e) {
PanelEvent event = (PanelEvent) e;
final Production production = event.getRecipient().getRoot().getProduction();
final List<Stage> stages = production.getTheater().getStages();
for (Stage stage : stages) {
production.openScene(stage.getScene().getResourceLoader().getRoot(), stage, new Opts());
}
// (let [scene (.getRoot (.getRecipient e))
// stage (.getStage scene)
// production (.getProduction scene)
// stages (.getStages (.getTheater production))]
// (println stages)
// (doall (map
// (fn [stage]
// (println "stage: " stage)
// (.openScene production (.getName (.getScene stage)) stage (limelight.util.Opts. {})))
// stages))
}
use of limelight.util.Opts in project limelight by slagyr.
the class Utilities method openRigger.
public void openRigger() {
establishStage("rigger", riggerStageOptions);
production.openScene("rigger", "rigger", new Opts());
}
use of limelight.util.Opts in project limelight by slagyr.
the class ScenePanelTest method backstage.
@Test
public void backstage() throws Exception {
assertEquals(0, root.backstage_PRIVATE().size());
root.add(child);
Opts backstage = root.getBackstage(child);
assertEquals(1, root.backstage_PRIVATE().size());
assertEquals(0, backstage.size());
assertSame(backstage, root.getBackstage(child));
}
Aggregations