Examples of MockGraphics


Examples of limelight.ui.MockGraphics

  {
    assumeTrue(TestUtil.notHeadless());
    panel = new TextBoxPanel();
    parent = new PropPanel(new FakePropProxy());
    parent.add(panel);
    graphics = new MockGraphics();
    model = panel.getModel();
    model.setText("Some Text");
  }
View Full Code Here

Examples of limelight.ui.MockGraphics

  }

  @Override
  public Graphics2D getGraphics()
  {
    return new MockGraphics();
  }
View Full Code Here

Examples of limelight.ui.MockGraphics

    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

Examples of limelight.ui.MockGraphics

  private Box clip;

  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

Examples of limelight.ui.MockGraphics

  private Box clip;

  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

Examples of limelight.ui.MockGraphics

    MockPainter mockBackgroundPainter = new MockPainter();
    BackgroundPainter.instance = mockBackgroundPainter;
    MockPainter mockBorderPainter = new MockPainter();
    BorderPainter.instance = mockBorderPainter;
    MockProp panel = new MockProp();
    MockGraphics graphics = new MockGraphics();

    DefaultPainter.instance.paint(graphics, panel);

    assertEquals(true, mockBackgroundPainter.painted);
    assertEquals(true, mockBorderPainter.painted);
View Full Code Here

Examples of limelight.ui.MockGraphics

  public void setUp() throws Exception
  {
    panel = new MockProp();
    style = panel.getStyle();
    painter = BackgroundPainter.instance;
    graphics = new MockGraphics();
  }
View Full Code Here

Examples of limelight.ui.MockGraphics

  private Box clip;

  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

Examples of limelight.ui.MockGraphics

  private MockGraphics graphics;
  private Pen pen;

  public void setUp() throws Exception
  {
    graphics = new MockGraphics();
    pen = new Pen(graphics);
  }
View Full Code Here

Examples of limelight.ui.MockGraphics

  @Test
  public void itDrawsAnImageOfTheSameSize() throws Exception
  {
    NinePatch patch = NinePatch.load(image);
    MockGraphics graphics = new MockGraphics();
    patch.draw(graphics, 0, 0, 15, 41);
    assertEquals(9, graphics.drawnImages.size());

    checkDrawnImage(graphics.drawnImages.get(0), new Rectangle(1, 1, 3, 11), new Rectangle(0, 0, 3, 11));   // top left
    checkDrawnImage(graphics.drawnImages.get(1), new Rectangle(4, 1, 5, 11), new Rectangle(3, 0, 5, 11));   // top middle
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.