use of limelight.util.Box in project limelight by slagyr.
the class ParentPanelTest method shouldAbsoluteBoundsChangesWhenSizeChanges.
@Test
public void shouldAbsoluteBoundsChangesWhenSizeChanges() throws Exception {
Box bounds = panel.getAbsoluteBounds();
assertSame(bounds, panel.getAbsoluteBounds());
panel.setSize(123, 456);
assertNotSame(bounds, panel.getBounds());
assertEquals(123, panel.getAbsoluteBounds().width);
assertEquals(456, panel.getAbsoluteBounds().height);
}
use of limelight.util.Box in project limelight by slagyr.
the class RepeatFillStrategyValueTest method setUp.
public void setUp() throws Exception {
attribute = new RepeatFillStrategyValue();
graphics = new MockGraphics();
clip = new Box(0, 0, 60, 60);
graphics.clip = clip;
}
use of limelight.util.Box in project limelight by slagyr.
the class RepeatXFillStrategyValueTest method setUp.
public void setUp() throws Exception {
attribute = new RepeatXFillStrategyValue();
graphics = new MockGraphics();
clip = new Box(0, 0, 60, 60);
graphics.clip = clip;
}
use of limelight.util.Box in project limelight by slagyr.
the class ScaleYFillStrategyValueTest method setUp.
public void setUp() throws Exception {
attribute = new ScaleYFillStrategyValue();
graphics = new MockGraphics();
clip = new Box(0, 0, 60, 60);
graphics.clip = clip;
}
use of limelight.util.Box in project limelight by slagyr.
the class SimpleVerticalAlignmentValueTest method testStartingY.
public void testStartingY() throws Exception {
Box area = new Box(0, 0, 100, 100);
assertEquals(0, top.getY(100, area));
assertEquals(0, top.getY(1, area));
assertEquals(0, center.getY(100, area));
assertEquals(25, center.getY(50, area));
assertEquals(37, center.getY(25, area));
assertEquals(49, center.getY(1, area));
assertEquals(0, bottom.getY(100, area));
assertEquals(50, bottom.getY(50, area));
assertEquals(99, bottom.getY(1, area));
}
Aggregations