Package limelight.ui.model

Examples of limelight.ui.model.ScenePanel


  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 loadsSceneWithOptions() throws Exception
  {
    final Map<String,Object> options = Util.toMap("backgroundColor", "red", "shouldAllowClose", false);
    ScenePanel result = (ScenePanel)production.loadScene("aScene", options);

    result.illuminate();
    assertEquals(false, result.shouldAllowClose());
    assertEquals("#ff0000ff", result.getStyle().getBackgroundColor());
  }
View Full Code Here

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

  @Before
  public void setUp() throws Exception
  {
    FakeProduction production = new FakeProduction("/path/to/testProduction");
    ScenePanel scene = new ScenePanel(new FakePropProxy(), new FakePlayerRecruiter(), Util.toMap("name", "theScene", "path", "theScene"));
    scene.setProduction(production);
    panel = new PropPanel(new FakePropProxy());
    scene.add(panel);
    playerRecruiter = new FakePlayerRecruiter();
    castingDirector = new CastingDirector();
    builtinPlayerRecruiter = new FakePlayerRecruiter();
    castingDirector.setBuiltinPlayerRecruiter(builtinPlayerRecruiter);
    FakeFileSystem.installed();
View Full Code Here

{

  public JavaScene(JavaProduction production, PlayerRecruiter recruiter, Map<String, Object> options)
  {
    super(options);
    peer = new ScenePanel(this, recruiter, options);
    getPeer().setProduction(production);
  }
View Full Code Here

TOP

Related Classes of limelight.ui.model.ScenePanel

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.