use of limelight.util.Box in project limelight by slagyr.
the class PropPanelLayout method layoutScrollBars.
// private boolean hasNonScrollBarChildren(PropPanel panel)
// {
// List<Panel> children = panel.getChildren();
// if(children.size() == 0)
// return false;
// else if(children.size() == 1)
// return !(children.contains(panel.getVerticalScrollbar()) || children.contains(panel.getHorizontalScrollbar()));
// else if(children.size() == 2)
// return !(children.contains(panel.getVerticalScrollbar()) && children.contains(panel.getHorizontalScrollbar()));
// else
// return true;
// }
private void layoutScrollBars(PropPanel panel, Dimension consumedDimensions) {
ScrollBarPanel vertical = panel.getVerticalScrollbar();
ScrollBarPanel horizontal = panel.getHorizontalScrollbar();
Box area = panel.getChildConsumableBounds();
if (vertical != null) {
vertical.setHeight(area.height);
vertical.setLocation(area.right() + 1, area.y);
vertical.configure(area.height, consumedDimensions.height);
}
if (horizontal != null) {
horizontal.setWidth(area.width);
horizontal.setLocation(area.x, area.bottom() + 1);
horizontal.configure(area.width, consumedDimensions.width);
}
}
use of limelight.util.Box in project limelight by slagyr.
the class PaintJob method paintChildren.
public void paintChildren(ParentPanelBase panel, Graphics2D graphics) {
if (panel.hasChildren()) {
Box innards = panel instanceof PropPanel ? ((PropPanel) panel).getPaddedBounds() : panel.getChildConsumableBounds();
graphics.clipRect(innards.x, innards.y, innards.width, innards.height);
for (Panel child : panel.getChildren()) if (!child.isFloater())
paintChild(graphics, child);
for (Panel child : panel.getChildren()) if (child.isFloater())
paintChild(graphics, child);
}
}
use of limelight.util.Box in project limelight by slagyr.
the class PanelBase method getAbsoluteBounds.
public Box getAbsoluteBounds() {
if (absoluteBounds == null) {
Point absoluteLocation = getAbsoluteLocation();
absoluteBounds = new Box(absoluteLocation.x, absoluteLocation.y, getWidth(), getHeight());
}
return absoluteBounds;
}
use of limelight.util.Box in project limelight by slagyr.
the class RepeatYFillStrategyValueTest method setUp.
public void setUp() throws Exception {
attribute = new RepeatYFillStrategyValue();
graphics = new MockGraphics();
clip = new Box(0, 0, 60, 60);
graphics.clip = clip;
}
use of limelight.util.Box in project limelight by slagyr.
the class ScaleFillStrategyValueTest method setUp.
public void setUp() throws Exception {
attribute = new ScaleFillStrategyValue();
graphics = new MockGraphics();
clip = new Box(0, 0, 60, 60);
graphics.clip = clip;
}
Aggregations