本文整理汇总了Java中org.uberfire.ext.wires.core.grids.client.model.impl.BaseBounds类的典型用法代码示例。如果您正苦于以下问题:Java BaseBounds类的具体用法?Java BaseBounds怎么用?Java BaseBounds使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
BaseBounds类属于org.uberfire.ext.wires.core.grids.client.model.impl包,在下文中一共展示了BaseBounds类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: testLeftEdge
import org.uberfire.ext.wires.core.grids.client.model.impl.BaseBounds; //导入依赖的package包/类
@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);
}
示例2: testRightEdge
import org.uberfire.ext.wires.core.grids.client.model.impl.BaseBounds; //导入依赖的package包/类
@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);
}
示例3: testTopEdge
import org.uberfire.ext.wires.core.grids.client.model.impl.BaseBounds; //导入依赖的package包/类
@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);
}
示例4: testBottomEdge
import org.uberfire.ext.wires.core.grids.client.model.impl.BaseBounds; //导入依赖的package包/类
@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);
}
示例5: testGridNarrowerThanVisibleBounds
import org.uberfire.ext.wires.core.grids.client.model.impl.BaseBounds; //导入依赖的package包/类
@Test
public void testGridNarrowerThanVisibleBounds() {
when(grid.getX()).thenReturn(10.0);
when(grid.getY()).thenReturn(0.0);
when(grid.getWidth()).thenReturn(100.0);
when(grid.getHeight()).thenReturn(100.0);
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(-10.0,
result.getTranslateX(),
0.0);
assertEquals(0.0,
result.getTranslateY(),
0.0);
}
示例6: testGridShorterThanVisibleBounds
import org.uberfire.ext.wires.core.grids.client.model.impl.BaseBounds; //导入依赖的package包/类
@Test
public void testGridShorterThanVisibleBounds() {
when(grid.getX()).thenReturn(0.0);
when(grid.getY()).thenReturn(10.0);
when(grid.getWidth()).thenReturn(100.0);
when(grid.getHeight()).thenReturn(100.0);
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(0.0,
result.getTranslateX(),
0.0);
assertEquals(-10.0,
result.getTranslateY(),
0.0);
}
示例7: testGridWiderThanVisibleBoundsLeftEdge
import org.uberfire.ext.wires.core.grids.client.model.impl.BaseBounds; //导入依赖的package包/类
@Test
public void testGridWiderThanVisibleBoundsLeftEdge() {
when(grid.getX()).thenReturn(10.0);
when(grid.getY()).thenReturn(0.0);
when(grid.getWidth()).thenReturn(1100.0);
when(grid.getHeight()).thenReturn(100.0);
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(-10.0,
result.getTranslateX(),
0.0);
assertEquals(0.0,
result.getTranslateY(),
0.0);
}
示例8: testGridWiderThanVisibleBoundsRightEdge
import org.uberfire.ext.wires.core.grids.client.model.impl.BaseBounds; //导入依赖的package包/类
@Test
public void testGridWiderThanVisibleBoundsRightEdge() {
when(grid.getX()).thenReturn(10.0);
when(grid.getY()).thenReturn(0.0);
when(grid.getWidth()).thenReturn(1100.0);
when(grid.getHeight()).thenReturn(100.0);
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(-110.0,
result.getTranslateX(),
0.0);
assertEquals(0.0,
result.getTranslateY(),
0.0);
}
示例9: testGridTallerThanVisibleBoundsTopEdge
import org.uberfire.ext.wires.core.grids.client.model.impl.BaseBounds; //导入依赖的package包/类
@Test
public void testGridTallerThanVisibleBoundsTopEdge() {
when(grid.getX()).thenReturn(0.0);
when(grid.getY()).thenReturn(10.0);
when(grid.getWidth()).thenReturn(100.0);
when(grid.getHeight()).thenReturn(1100.0);
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(-10.0,
result.getTranslateY(),
0.0);
}
示例10: testGridTallerThanVisibleBoundsBottomEdge
import org.uberfire.ext.wires.core.grids.client.model.impl.BaseBounds; //导入依赖的package包/类
@Test
public void testGridTallerThanVisibleBoundsBottomEdge() {
when(grid.getX()).thenReturn(0.0);
when(grid.getY()).thenReturn(10.0);
when(grid.getWidth()).thenReturn(100.0);
when(grid.getHeight()).thenReturn(1100.0);
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(-110.0,
result.getTranslateY(),
0.0);
}
示例11: getSelectorBounds
import org.uberfire.ext.wires.core.grids.client.model.impl.BaseBounds; //导入依赖的package包/类
private Bounds getSelectorBounds(final double width,
final double height,
final BaseGridRendererHelper.RenderingInformation renderingInformation) {
final BaseGridRendererHelper.RenderingBlockInformation bodyBlockInformation = renderingInformation.getBodyBlockInformation();
final BaseGridRendererHelper.RenderingBlockInformation floatingBlockInformation = renderingInformation.getFloatingBlockInformation();
double boundsX = 0.0;
double boundsY = 0.0;
double boundsWidth = width;
double boundsHeight = height;
if (!floatingBlockInformation.getColumns().isEmpty()) {
boundsX = floatingBlockInformation.getX();
boundsWidth = boundsWidth - floatingBlockInformation.getX();
}
if (renderingInformation.isFloatingHeader()) {
boundsY = bodyBlockInformation.getHeaderY();
boundsHeight = boundsHeight - bodyBlockInformation.getHeaderY();
}
return new BaseBounds(boundsX,
boundsY,
boundsWidth,
boundsHeight);
}
示例12: testLeftEdge
import org.uberfire.ext.wires.core.grids.client.model.impl.BaseBounds; //导入依赖的package包/类
@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();
}
示例13: testRightEdge
import org.uberfire.ext.wires.core.grids.client.model.impl.BaseBounds; //导入依赖的package包/类
@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();
}
示例14: testTopEdge
import org.uberfire.ext.wires.core.grids.client.model.impl.BaseBounds; //导入依赖的package包/类
@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();
}
示例15: testBottomEdge
import org.uberfire.ext.wires.core.grids.client.model.impl.BaseBounds; //导入依赖的package包/类
@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();
}