Package limelight.ui.model

Examples of limelight.ui.model.Scene


  private void establishButtonGroup(String name)
  {
    if(radioButtonGroup != null)
      radioButtonGroup.remove(this);
    final Scene scene = getRoot();
    if(scene != null)
    {
      final RadioButtonGroup group = scene.getButtonGroups().get(name);
      group.add(this);
    }
  }
View Full Code Here


  }

  @Test
  public void settingTheGroupName() throws Exception
  {
    Scene scene = new FakeScene();
    PropPanel parent1 = new PropPanel(new FakePropProxy("parent1"));
    RadioButtonPanel radio1 = new RadioButtonPanel();
    parent1.add(radio1);
    PropPanel parent2 = new PropPanel(new FakePropProxy("parent2"));
    RadioButtonPanel radio2 = new RadioButtonPanel();
    parent2.add(radio2);
    scene.add(parent1);
    scene.add(parent2);

    final RadioButtonGroup group = scene.getButtonGroups().get("test_group");
    assertEquals(0, group.getButtons().size());
    radio1.setGroup("test_group");
    assertEquals(1, group.getButtons().size());
    radio2.setGroup("test_group");
    assertEquals(2, group.getButtons().size());
View Full Code Here

  }

  @Test
  public void changingGroupName() throws Exception
  {
    Scene scene = new FakeScene();
    PropPanel parent1 = new PropPanel(new FakePropProxy("parent1"));
    RadioButtonPanel radio1 = new RadioButtonPanel();
    parent1.add(radio1);
    scene.add(parent1);

    final RadioButtonGroup group1 = scene.getButtonGroups().get("group1");
    final RadioButtonGroup group2 = scene.getButtonGroups().get("group2");

    radio1.setGroup("group1");
    radio1.setGroup("group2");

    assertEquals(0, group1.getButtons().size());
View Full Code Here

  public void openSceneLoadsStylesExtendingProductionStyles() throws Exception
  {
    production.loadProduction();
    production.getTheater().add(new MockStage("mock"));
    production.getStyles().put("newStyle", new RichStyle());
    Scene scene = new FakeScene();
    production.stubbedScene = scene;

    production.openScene("scenePath", "mock", Util.toMap());

    assertEquals(HashMap.class, scene.getStyles().getClass());
    assertEquals(true, scene.getStyles().containsKey("limelight_builtin_curtains"));
    assertEquals(true, scene.getStyles().containsKey("newStyle"));
  }
View Full Code Here

  {
    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);
View Full Code Here

  }

  @Test
  public void loadsScene() throws Exception
  {
    final Scene result = production.loadScene("aScene", Opts.with("name", "aScene"));

    assertEquals(ScenePanel.class, result.getClass());
    ScenePanel scene = (ScenePanel)result;
    assertEquals(JavaScene.class, scene.getProxy().getClass());
    scene.illuminate();
    assertEquals("aScene", scene.getName());
  }
View Full Code Here

  }

  @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());
  }
View Full Code Here

  @Test
  public void loadRealStylesForScene() throws Exception
  {
    fs.createTextFile("/testProduction/aScene/styles.xml", "<styles><high x='0' y='99' float='on'/><far x='99' y='0' float='off'/></styles>");
    final Scene scene = production.loadScene("aScene", Opts.with("name", "aScene", "path", "aScene"));

    final Map<String, RichStyle> styles = production.loadStyles(scene, new HashMap<String, RichStyle>());

    assertEquals(2, styles.size());
    final RichStyle high = styles.get("high");
View Full Code Here

  @Test
  public void openSceneWithNoActiveStage() throws Exception
  {
    production.loadProduction();
    final MockStage stage = (MockStage)production.getTheater().getDefaultStage();
    Scene scene = new FakeScene();
    production.stubbedScene = scene;

    production.openScene("scenePath", Util.toMap());

    assertEquals("scenePath", production.loadedScenePath);
View Full Code Here

    production.loadProduction();
    MockStage stage = new MockStage("active");
    production.getTheater().add(stage);
    new StageActivatedEvent().dispatch(stage);

    Scene scene = new FakeScene();
    production.stubbedScene = scene;

    production.openScene("scenePath", Util.toMap());

    assertEquals("scenePath", production.loadedScenePath);
View Full Code Here

TOP

Related Classes of limelight.ui.model.Scene

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.