Package limelight.ui

Examples of limelight.ui.Panel


  }

  @Test
  public void shouldAddingPanelsRequiresUpdate() throws Exception
  {
    Panel child = new MockPanel();

    panel.add(child);

    assertEquals(true, panel.needsLayout());
  }
View Full Code Here


  }

  @Test
  public void removeRequiresUpdate() throws Exception
  {
    Panel child = new MockPanel();
    panel.add(child);
    resetFamilyLayouts();

    panel.remove(child);
View Full Code Here

  }

  @Test
  public void shouldRemoveDoesntRequireLayoutIfNoChildWasRemoved() throws Exception
  {
    Panel child = new MockPanel();
    panel.add(child);
    resetFamilyLayouts();

    panel.remove(new MockPanel());
View Full Code Here

  }

  @Test
  public void shouldRemoveAllRequiresUpdate() throws Exception
  {
    Panel child = new MockPanel();
    panel.add(child);
    resetFamilyLayouts();

    panel.removeAll();
View Full Code Here

  }

  @Test
  public void shouldAddingChildrenAtIndex() throws Exception
  {
    Panel childA = new MockPanel();
    Panel childB = new MockPanel();
    Panel childC = new MockPanel();

    panel.add(0, childA);
    panel.add(0, childB);
    panel.add(1, childC);

    assertSame(childA, panel.getChildren().get(2));
    assertSame(childB, panel.getChildren().get(0));
    assertSame(childC, panel.getChildren().get(1));
    assertSame(panel, childA.getParent());
    assertSame(panel, childB.getParent());
    assertSame(panel, childC.getParent());
  }
View Full Code Here

  }

  @Test
  public void shouldAddingPanelsAtIndexRequiresLayout() throws Exception
  {
    Panel childA = new MockPanel();
    Panel childB = new MockPanel();

    panel.add(childA);
    panel.add(0, childB);

    assertEquals(true, panel.needsLayout());
View Full Code Here

  }

  @Test
  public void shouldGetChildrenReturnsACopiedList() throws Exception
  {
    Panel child = new MockPanel();
    panel.add(child);

    java.util.List<Panel> children = panel.getChildren();
    panel.remove(child);
View Full Code Here

  }

  @Test
  public void shouldGetChildrenProvidesReadonlyList() throws Exception
  {
    Panel child = new MockPanel();
    panel.add(child);

    java.util.List<Panel> children = panel.getChildren();

    try
View Full Code Here

  public void dispatch(Panel panel)
  {
    if(source == null)
      setSource(panel);

    Panel previousRecipient = recipient;
    setRecipient(panel);
    final PanelEventHandler eventHandler = recipient.getEventHandler();
    eventHandler.dispatch(this);
    setRecipient(previousRecipient);
  }
View Full Code Here

  public void mouseReleased(MouseEvent e)
  {
    if(getRoot() == null)
      return;

    Panel releasedPanel = panelFor(e.getPoint());
    new MouseReleasedEvent(e.getModifiers(), e.getPoint(), e.getClickCount()).dispatch(releasedPanel);
    if(releasedPanel == pressedPanel)
    {
      new MouseClickedEvent(e.getModifiers(), e.getPoint(), e.getClickCount()).dispatch(releasedPanel);
    }
View Full Code Here

TOP

Related Classes of limelight.ui.Panel

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.