Search in sources :

Example 6 with Opts

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

the class Xml method toProp.

public static JavaProp toProp(Element propElement) {
    String name = propElement.getNodeName();
    final Opts options = loadOptions(propElement);
    options.put("name", name);
    final JavaProp prop = new JavaProp(options);
    for (Element childElement : loadChildElements(propElement)) prop.add(toProp(childElement));
    return prop;
}
Also used : Opts(limelight.util.Opts)

Example 7 with Opts

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

the class Production method open.

public void open(Map<String, Object> customizations) {
    Opts options = defaultOptions.merge(customizations);
    prepareToOpen();
    illuminateProduction();
    if (!canProceedWithCompatibility()) {
        close();
        return;
    }
    loadProduction();
    if (Opts.isOn(options.remove("open-default-scenes")))
        openDefaultScenes(options);
    new ProductionOpenedEvent().dispatch(this);
    open = true;
}
Also used : Opts(limelight.util.Opts)

Example 8 with Opts

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

the class ScenePanel 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 9 with Opts

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

the class Xml method loadOptions.

public static Opts loadOptions(Element stageElement) {
    Opts options = new Opts();
    final NamedNodeMap attributes = stageElement.getAttributes();
    for (int j = 0; j < attributes.getLength(); j++) {
        final Node node = attributes.item(j);
        final String key = node.getNodeName();
        final String value = node.getNodeValue();
        options.put(key, value);
    }
    return options;
}
Also used : Opts(limelight.util.Opts)

Example 10 with Opts

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

the class Xml method toStage.

public static void toStage(JavaTheater theater, Element stageElement) {
    final String name = stageElement.getNodeName();
    Opts options = loadOptions(stageElement);
    theater.add(theater.buildStage(name, options));
}
Also used : Opts(limelight.util.Opts)

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