Package limelight.util

Examples of limelight.util.Box


  }

  @Test
  public void rectanglesAreCached() throws Exception
  {
    Box rectangle = panel.getBounds();
    Box insideMargins = panel.getMarginedBounds();
    Box insideBorders = panel.getBorderedBounds();
    Box insidePadding = panel.getPaddedBounds();

    assertSame(rectangle, panel.getBounds());
    assertSame(insideMargins, panel.getMarginedBounds());
    assertSame(insideBorders, panel.getBorderedBounds());
    assertSame(insidePadding, panel.getPaddedBounds());
View Full Code Here


  public void setUp() throws Exception
  {
    panel = new MockProp();
    style = panel.getStyle();
    border = new Box(5, 5, 100, 100);
    panel.boxInsideMargins = border;
    painter = BorderPainter.instance;
    graphics = new MockGraphics();
  }
View Full Code Here

    checkLine(graphics.drawnShapes.get(3), 1, Color.blue, 5, 104, 5, 5);
  }

  public void testGetLinesFromBorderWithEven() throws Exception
  {
    border = new Box(0, 0, 100, 200);
    panel.boxInsideMargins = border;
    style.setBorderWidth("4");
    style.setBorderColor("blue");

    painter.paint(graphics, panel);
View Full Code Here

    checkLine(graphics.drawnShapes.get(3), 4, Color.blue, 2, 198, 2, 2);
  }

    public void testGetLinesFromBorderWithOdd() throws Exception
  {
    border = new Box(0, 0, 100, 200);
    panel.boxInsideMargins = border;
    style.setBorderWidth("5");
    style.setBorderColor("blue");

    painter.paint(graphics, panel);
View Full Code Here

  public void setUp() throws Exception
  {
    attribute = new StaticFillStrategyValue();
    graphics = new MockGraphics();
    clip = new Box(0, 0, 60, 60);
    graphics.clip = clip;
  }
View Full Code Here

  public Graphics create(int x, int y, int width, int height)
  {
    MockGraphics createdGraphics = new MockGraphics();
    subGraphics.add(createdGraphics);
    createdGraphics.clip = new Box(x, y, width, height);
    return createdGraphics;
  }
View Full Code Here

    return clip;
  }

  public void clipRect(int x, int y, int width, int height)
  {
    clippedRectangle = new Box(x, y, width, height);
    clip = clippedRectangle;
  }
View Full Code Here

    clip = clippedRectangle;
  }

  public void setClip(int i, int i1, int i2, int i3)
  {
    clip = new Box(i, i1, i2, i3);
  }
View Full Code Here

    half = new PercentageXCoordinateValue(50.0);
  }

  public void testGetX() throws Exception
  {
    assertEquals(10, dime.getX(0, new Box(0, 0, 100, 100)));
    assertEquals(15, dime.getX(0, new Box(5, 0, 100, 100)));
    assertEquals(50, dime.getX(0, new Box(0, 0, 500, 100)));

    assertEquals(50, half.getX(0, new Box(0, 0, 100, 100)));
    assertEquals(55, half.getX(0, new Box(5, 0, 100, 100)));
    assertEquals(250, half.getX(0, new Box(0, 0, 500, 100)));
  }
View Full Code Here

  public void setUp() throws Exception
  {
    attribute = new ScaleYFillStrategyValue();
    graphics = new MockGraphics();
    clip = new Box(0, 0, 60, 60);
    graphics.clip = clip;
  }
View Full Code Here

TOP

Related Classes of limelight.util.Box

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.