Package limelight.util

Examples of limelight.util.Box


  private Border border;
  private Box insideMargin;

  public void setUp() {
    style = new FlatStyle();
    insideMargin = new Box(0, 0, 100, 200);
  }
View Full Code Here


  }

  public void testGetLinesFromBorderWithOnePixelWidthAllAroundAndSomeMargin() throws Exception
  {
    style.setBorderWidth("1");
    insideMargin = new Box(20, 30, 100, 200);
    border = new Border(style, insideMargin);

    int right = insideMargin.width - 1 + 20;
    int bottom = insideMargin.height - 1 + 30;
    verifyLine(border.getTopLine(), 20, 30, right, 30);
View Full Code Here

    center = new AlignedYCoordinateValue(VerticalAlignment.CENTER);
  }

  public void testGetY() throws Exception
  {
    assertEquals(25, center.getY(50, new Box(0, 0, 100, 100)));
  }
View Full Code Here

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

  @Test
  public void itIsInitializedWithAnImage() throws Exception
  {
    NinePatch.Info info = NinePatch.Info.inspect(image);

    assertEquals(new Box(1, 1, 3, 11), info.topLeftBounds);
    assertEquals(new Box(4, 1, 5, 11), info.topMiddleBounds);
    assertEquals(new Box(9, 1, 7, 11), info.topRightBounds);
    assertEquals(new Box(1, 12, 3, 13), info.middleLeftBounds);
    assertEquals(new Box(4, 12, 5, 13), info.middleMiddleBounds);
    assertEquals(new Box(9, 12, 7, 13), info.middleRightBounds);
    assertEquals(new Box(1, 25, 3, 17), info.bottomLeftBounds);
    assertEquals(new Box(4, 25, 5, 17), info.bottomMiddleBounds);
    assertEquals(new Box(9, 25, 7, 17), info.bottomRightBounds);
  }
View Full Code Here

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

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

    fifty = new StaticXCoordinateValue(50);
  }

  public void testGetX() throws Exception
  {
    assertEquals(10, ten.getX(0, new Box(0, 0, 100, 100)));
    assertEquals(15, ten.getX(0, new Box(5, 0, 100, 100)));
    assertEquals(10, ten.getX(-1, new Box(0, 0, 100, 100)));

    assertEquals(50, fifty.getX(0, new Box(0, 0, 100, 100)));
  }
View Full Code Here

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

  public void setUp() throws Exception
  {
    attribute = new RepeatYFillStrategyValue();
    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.