use of limelight.util.Box in project limelight by slagyr.
the class SingleLineTextModelTest method canGetTheSelectedRegion.
@Test
public void canGetTheSelectedRegion() {
model.setText("blah");
model.startSelection(TextLocation.origin);
assertEquals(new Box(0, 0, 40, 11), model.getSelectionRegions().get(0));
}
use of limelight.util.Box in project limelight by slagyr.
the class TextInputPanelTest method consumableBoundsAreCachedAndRefreshed.
@Test
public void consumableBoundsAreCachedAndRefreshed() throws Exception {
final Box original = panel.getConsumableBounds();
assertSame(panel.getConsumableBounds(), original);
panel.clearCache();
assertNotSame(panel.getConsumableBounds(), original);
}
use of limelight.util.Box in project limelight by slagyr.
the class ScrollBarPainterTest method shouldBuildIncreaseBoxForHorizontal.
@Test
public void shouldBuildIncreaseBoxForHorizontal() throws Exception {
setUpHorizontally();
scrollBar.setSize(100, 15);
Box increasing = painter.getIncreasingBox(scrollBar);
assertEquals(new Box(84, 0, 16, 15), increasing);
}
use of limelight.util.Box in project limelight by slagyr.
the class ScrollBarPainterTest method buildsTrackBoxHorizontally.
@Test
public void buildsTrackBoxHorizontally() throws Exception {
setUpHorizontally();
scrollBar.setSize(100, 15);
Box track = painter.getTrackBox(scrollBar);
assertEquals(new Box(5, 0, 62, 15), track);
}
use of limelight.util.Box in project limelight by slagyr.
the class ScrollBarPainterTest method shouldBuildIncreaseBoxForVertical.
@Test
public void shouldBuildIncreaseBoxForVertical() throws Exception {
setUpVertically();
scrollBar.setSize(15, 100);
Box increasing = painter.getIncreasingBox(scrollBar);
assertEquals(new Box(0, 84, 15, 16), increasing);
}
Aggregations