Package limelight.ui

Examples of limelight.ui.Panel


  public static PropogateToParentAction instance = new PropogateToParentAction();

  public void invoke(Event event)
  {
    PanelEvent panelEvent = (PanelEvent)event;
    final Panel parent = panelEvent.getRecipient().getParent();
    if(parent != null)
      panelEvent.dispatch(parent);
  }
View Full Code Here


  {
    private static MakeDirtyAction instance = new MakeDirtyAction();

    public void invoke(Event event)
    {
      final Panel panel = ((PanelEvent)event).getRecipient();
      panel.markAsDirty();
      if(panel.getParent() != null)
        panel.getParent().markAsDirty();
    }
View Full Code Here

      if(event.isConsumed())
        return;

      if(isPushEvent(event))
      {
        final Panel panel = event.getRecipient();
        new ButtonPushedEvent().dispatch(panel);
      }
    }
View Full Code Here

    this.model = model;
  }

  public void processMousePressed(MousePressedEvent e)
  {
    final Panel panel = e.getRecipient();
    inWordSelectionMode = false;

    TextLocation location = model.getLocationAt(e.getLocation());
    model.startSelection(location);
    model.setCaretLocation(location, XOffsetStrategy.FITTING, YOffsetStrategy.FITTING);
    model.setCaretOn(true);

    handleMultipleClicks(e);

    panel.markAsDirty();
    panel.getStage().getKeyListener().focusOn(panel);

    lastClickTime = System.currentTimeMillis();
  }
View Full Code Here

  }

  @Test
  public void overridingLayouts() throws Exception
  {
    Panel panel = new MockPanel();
    final FakeLayout weakLayout = new FakeLayout(false);
    final FakeLayout strongLayout = new FakeLayout(true);

    panel.markAsNeedingLayout(weakLayout);
    panel.markAsNeedingLayout(strongLayout);

    assertSame(strongLayout, panel.resetNeededLayout());
  }
View Full Code Here

  @Test
  public void itemsIsSelectedOnMouseEnter() throws Exception
  {
    panel.setChoicesVargs(1, 2, 3);
    new ButtonPushedEvent().dispatch(panel);
    final Panel item3 = panel.getPopup().getPopupList().getChildren().get(2);

    new MouseEnteredEvent(0, null, 0).dispatch(item3);

    assertEquals("3", panel.getPopup().getSelectedItem().getText());
  }
View Full Code Here

    return next != null;
  }

  public Panel next()
  {
    Panel value = next;
    next = null;
    if(value != null)
    {
      Iterator<Panel> iterator = findNextValidIterator();
      if(iterator != null)
View Full Code Here

  }

  @Test
  public void shouldCanAddPanels() throws Exception
  {
    Panel panel1 = new MockPanel();
    Panel panel2 = new MockPanel();

    panel.add(panel1);
    panel.add(panel2);

    assertEquals(panel1, panel.getChildren().get(0));
View Full Code Here

  }

  @Test
  public void shouldGetOwnerOfPoint() throws Exception
  {
    Panel panel1 = new MockPanel();
    Panel panel2 = new MockPanel();

    panel1.setLocation(0, 0);
    panel1.setSize(100, 100);
    panel2.setLocation(100, 100);
    panel2.setSize(100, 100);

    panel.add(panel1);
    panel.add(panel2);

    assertSame(panel1, panel.getOwnerOfPoint(new Point(0, 0)));
View Full Code Here

  @Test
  public void shouldGetOwnerOfPointWithNestedPanels() throws Exception
  {
    MockParentPanel panel1 = new MockParentPanel();
    Panel panel2 = new MockPanel();

    panel1.setLocation(50, 50);
    panel1.setSize(100, 100);
    panel2.setLocation(0, 0);
    panel2.setSize(10, 10);

    panel.add(panel1);
    panel1.add(panel2);

    assertSame(panel2, panel.getOwnerOfPoint(new Point(55, 55)));
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.