use of org.jfree.ui.Size2D in project SIMVA-SoS by SESoS.
the class GridArrangementTest method testNF.
/**
* Test arrangement with a fixed height and no width constraint.
*/
@Test
public void testNF() {
BlockContainer c = createTestContainer1();
RectangleConstraint constraint = RectangleConstraint.NONE.toFixedHeight(100.0);
Size2D s = c.arrange(null, constraint);
assertEquals(90.0, s.width, EPSILON);
assertEquals(100.0, s.height, EPSILON);
}
use of org.jfree.ui.Size2D in project SIMVA-SoS by SESoS.
the class GridArrangementTest method testNullBlock_FN.
/**
* The arrangement should be able to handle null blocks in the layout.
*/
@Test
public void testNullBlock_FN() {
BlockContainer c = new BlockContainer(new GridArrangement(1, 1));
c.add(null);
Size2D s = c.arrange(null, RectangleConstraint.NONE.toFixedWidth(10));
assertEquals(10.0, s.getWidth(), EPSILON);
assertEquals(0.0, s.getHeight(), EPSILON);
}
use of org.jfree.ui.Size2D in project SIMVA-SoS by SESoS.
the class GridArrangementTest method testNN.
/**
* Test arrangement with no constraints.
*/
@Test
public void testNN() {
BlockContainer c = createTestContainer1();
Size2D s = c.arrange(null, RectangleConstraint.NONE);
assertEquals(90.0, s.width, EPSILON);
assertEquals(33.0, s.height, EPSILON);
}
use of org.jfree.ui.Size2D in project SIMVA-SoS by SESoS.
the class GridArrangementTest method testRR.
/**
* Test arrangement with a range for the width and height.
*/
@Test
public void testRR() {
BlockContainer c = createTestContainer1();
RectangleConstraint constraint = new RectangleConstraint(new Range(40.0, 60.0), new Range(50.0, 70.0));
Size2D s = c.arrange(null, constraint);
assertEquals(60.0, s.width, EPSILON);
assertEquals(50.0, s.height, EPSILON);
}
use of org.jfree.ui.Size2D in project SIMVA-SoS by SESoS.
the class GridArrangementTest method testNR.
/**
* Test arrangement with a range for the height and no width constraint.
*/
@Test
public void testNR() {
BlockContainer c = createTestContainer1();
RectangleConstraint constraint = RectangleConstraint.NONE.toRangeHeight(new Range(40.0, 60.0));
Size2D s = c.arrange(null, constraint);
assertEquals(90.0, s.width, EPSILON);
assertEquals(40.0, s.height, EPSILON);
}
Aggregations