use of org.jfree.ui.Size2D in project SIMVA-SoS by SESoS.
the class GridArrangementTest method testNullBlock_FR.
/**
* The arrangement should be able to handle null blocks in the layout.
*/
@Test
public void testNullBlock_FR() {
BlockContainer c = new BlockContainer(new GridArrangement(1, 1));
c.add(null);
Size2D s = c.arrange(null, new RectangleConstraint(30.0, new Range(5.0, 10.0)));
assertEquals(30.0, s.getWidth(), EPSILON);
assertEquals(5.0, s.getHeight(), EPSILON);
}
use of org.jfree.ui.Size2D in project SIMVA-SoS by SESoS.
the class GridArrangementTest method testNullBlock_NN.
/**
* The arrangement should be able to handle null blocks in the layout.
*/
@Test
public void testNullBlock_NN() {
BlockContainer c = new BlockContainer(new GridArrangement(1, 1));
c.add(null);
Size2D s = c.arrange(null, RectangleConstraint.NONE);
assertEquals(0.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 testGridNotFull_FF.
/**
* The arrangement should be able to handle less blocks than grid spaces.
*/
@Test
public void testGridNotFull_FF() {
Block b1 = new EmptyBlock(5, 5);
BlockContainer c = new BlockContainer(new GridArrangement(2, 3));
c.add(b1);
Size2D s = c.arrange(null, new RectangleConstraint(200, 100));
assertEquals(200.0, s.getWidth(), EPSILON);
assertEquals(100.0, s.getHeight(), EPSILON);
}
use of org.jfree.ui.Size2D in project SIMVA-SoS by SESoS.
the class GridArrangementTest method testGridNotFull_FN.
/**
* The arrangement should be able to handle less blocks than grid spaces.
*/
@Test
public void testGridNotFull_FN() {
Block b1 = new EmptyBlock(5, 5);
BlockContainer c = new BlockContainer(new GridArrangement(2, 3));
c.add(b1);
Size2D s = c.arrange(null, RectangleConstraint.NONE.toFixedWidth(30.0));
assertEquals(30.0, s.getWidth(), EPSILON);
assertEquals(10.0, s.getHeight(), EPSILON);
}
use of org.jfree.ui.Size2D in project SIMVA-SoS by SESoS.
the class GridArrangementTest method testGridNotFull_FR.
/**
* The arrangement should be able to handle less blocks than grid spaces.
*/
@Test
public void testGridNotFull_FR() {
Block b1 = new EmptyBlock(5, 5);
BlockContainer c = new BlockContainer(new GridArrangement(2, 3));
c.add(b1);
Size2D s = c.arrange(null, new RectangleConstraint(30.0, new Range(5.0, 10.0)));
assertEquals(30.0, s.getWidth(), EPSILON);
assertEquals(10.0, s.getHeight(), EPSILON);
}
Aggregations