Package limelight.ui.model.inputs

Examples of limelight.ui.model.inputs.ScrollBarPanel


  private ScrollBarPainter.ScrollBarImages images;
  private ScrollBarPainter painter = ScrollBarPainter.instance;

  private void setUpHorizontally()
  {
    scrollBar = new ScrollBarPanel(ScrollBarPanel.HORIZONTAL);
    scrollBar.setSize(100, 15);
    scrollBar.setValue(0);
    scrollBar.configure(1, 100);
    graphics = new MockGraphics();
    images = ScrollBarPainter.horizontalImages;
View Full Code Here


    images = ScrollBarPainter.horizontalImages;
  }

  private void setUpVertically()
  {
    scrollBar = new ScrollBarPanel(ScrollBarPanel.VERTICAL);
    scrollBar.setSize(15, 100);
    scrollBar.setValue(0);
    scrollBar.configure(1, 100);
    graphics = new MockGraphics();
    images = ScrollBarPainter.verticalImages;
View Full Code Here

  {
    parent.getStyle().setScrollbars("on");

    Layouts.on(root);

    ScrollBarPanel verticalScrollBar = parent.getVerticalScrollbar();
    assertEquals(100 - ScrollBarPanel.GIRTH, verticalScrollBar.getX());
    assertEquals(0, verticalScrollBar.getY());

    ScrollBarPanel horizontalScrollBar = parent.getHorizontalScrollbar();
    assertEquals(0, horizontalScrollBar.getX());
    assertEquals(100 - ScrollBarPanel.GIRTH, horizontalScrollBar.getY());
  }
View Full Code Here

    return horizontalScrollbar;
  }

  public void addVerticalScrollBar()
  {
    verticalScrollbar = new ScrollBarPanel(ScrollBarPanel.VERTICAL);
    add(verticalScrollbar);
    childConsumableBounds = null;
  }
View Full Code Here

    childConsumableBounds = null;
  }

  public void addHorizontalScrollBar()
  {
    horizontalScrollbar = new ScrollBarPanel(ScrollBarPanel.HORIZONTAL);
    add(horizontalScrollbar);
    childConsumableBounds = null;
  }
View Full Code Here

      if(!(event.getRecipient() instanceof PropPanel))
        return;

      MouseWheelEvent wheelEvent = (MouseWheelEvent) event;
      PropPanel panel = (PropPanel) event.getRecipient();
      ScrollBarPanel scrollBar = wheelEvent.isVertical() ? panel.getVerticalScrollbar() : panel.getHorizontalScrollbar();
      if(scrollBar != null)
        scrollBar.setValue(scrollBar.getValue() + wheelEvent.getUnitsToScroll());
      else if(panel.getParent() != null)
        event.dispatch(panel.getParent());
    }
View Full Code Here

    child.setSize(100, 100);
    child.setLocation(0, 0);
    panel.add(child);

    panel.addVerticalScrollBar();
    ScrollBarPanel vertical = panel.getVerticalScrollbar();
    vertical.setSize(15, 100);
    vertical.setLocation(85, 0);
    panel.addHorizontalScrollBar();
    ScrollBarPanel horizontal = panel.getHorizontalScrollbar();
    horizontal.setSize(100, 15);
    horizontal.setLocation(0, 85);

    assertSame(child, panel.getOwnerOfPoint(new Point(0, 0)));
    assertSame(child, panel.getOwnerOfPoint(new Point(50, 50)));
    assertSame(vertical, panel.getOwnerOfPoint(new Point(90, 50)));
    assertSame(horizontal, panel.getOwnerOfPoint(new Point(50, 90)));
View Full Code Here

//      return true;
//  }

  private void layoutScrollBars(PropPanel panel, Dimension consumedDimensions)
  {
    ScrollBarPanel vertical = panel.getVerticalScrollbar();
    ScrollBarPanel horizontal = panel.getHorizontalScrollbar();
    Box area = panel.getChildConsumableBounds();
    if(vertical != null)
    {
      vertical.setHeight(area.height);
      vertical.setLocation(area.right() + 1, area.y);
      vertical.configure(area.height, consumedDimensions.height);
    }
    if(horizontal != null)
    {
      horizontal.setWidth(area.width);
      horizontal.setLocation(area.x, area.bottom() + 1);
      horizontal.configure(area.width, consumedDimensions.width);
    }
  }
View Full Code Here

TOP

Related Classes of limelight.ui.model.inputs.ScrollBarPanel

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.