use of org.uberfire.ext.wires.core.grids.client.model.impl.BaseBounds in project drools-wb by kiegroup.
the class BoundaryTransformMediatorTest method testLeftEdge.
@Test
public void testLeftEdge() {
final Bounds visibleBounds = new BaseBounds(-500, -500, 1000, 1000);
final Transform test = new Transform().translate(1200.0, 0.0);
final Transform result = restriction.adjust(test, visibleBounds);
assertNotNull(result);
assertEquals(1000.0, result.getTranslateX(), 0.0);
assertEquals(0.0, result.getTranslateY(), 0.0);
// View.getBounds() is called once in BoundaryTransformMediator's constructor and once in it's adjust method.
verify(view, times(2)).getBounds();
}
use of org.uberfire.ext.wires.core.grids.client.model.impl.BaseBounds in project drools-wb by kiegroup.
the class BoundaryTransformMediatorTest method testBottomEdge.
@Test
public void testBottomEdge() {
final Bounds visibleBounds = new BaseBounds(-500, -500, 1000, 1000);
final Transform test = new Transform().translate(0.0, -200.0);
final Transform result = restriction.adjust(test, visibleBounds);
assertNotNull(result);
assertEquals(0.0, result.getTranslateX(), 0.0);
assertEquals(0.0, result.getTranslateY(), 0.0);
// View.getBounds() is called once in BoundaryTransformMediator's constructor and once in it's adjust method.
verify(view, times(2)).getBounds();
}
use of org.uberfire.ext.wires.core.grids.client.model.impl.BaseBounds in project drools-wb by kiegroup.
the class GuidedDecisionTableViewImplTest method makeRenderingInformation.
private BaseGridRendererHelper.RenderingInformation makeRenderingInformation(final List<GridColumn<?>> bodyColumns, final List<GridColumn<?>> floatingColumns) {
view.setAllColumns(allColumns);
view.setBodyColumns(bodyColumns);
view.setFloatingColumns(floatingColumns);
return new BaseGridRendererHelper.RenderingInformation(new BaseBounds(0, 0, 1000, 2000), allColumns, makeRenderingBlockInformation(bodyColumns), makeRenderingBlockInformation(floatingColumns), 0, 1, Collections.singletonList(0.0), false, false, HEADER_ROW_HEIGHT, 1, 0.0);
}
use of org.uberfire.ext.wires.core.grids.client.model.impl.BaseBounds in project drools-wb by kiegroup.
the class BoundaryTransformMediatorTest method testTopEdge.
@Test
public void testTopEdge() {
final Bounds visibleBounds = new BaseBounds(-500, -500, 1000, 1000);
final Transform test = new Transform().translate(0.0, 1200.0);
final Transform result = restriction.adjust(test, visibleBounds);
assertNotNull(result);
assertEquals(0.0, result.getTranslateX(), 0.0);
assertEquals(1000.0, result.getTranslateY(), 0.0);
// View.getBounds() is called once in BoundaryTransformMediator's constructor and once in it's adjust method.
verify(view, times(2)).getBounds();
}
use of org.uberfire.ext.wires.core.grids.client.model.impl.BaseBounds in project drools-wb by kiegroup.
the class BoundaryTransformMediatorTest method testRightEdge.
@Test
public void testRightEdge() {
final Bounds visibleBounds = new BaseBounds(-500, -500, 1000, 1000);
final Transform test = new Transform().translate(-200.0, 0.0);
final Transform result = restriction.adjust(test, visibleBounds);
assertNotNull(result);
assertEquals(0.0, result.getTranslateX(), 0.0);
assertEquals(0.0, result.getTranslateY(), 0.0);
// View.getBounds() is called once in BoundaryTransformMediator's constructor and once in it's adjust method.
verify(view, times(2)).getBounds();
}
Aggregations