use of limelight.ui.model.inputs.ScrollBarPanel in project limelight by slagyr.
the class PropPanelLayout method buildRows.
protected LinkedList<Row> buildRows(PropPanel panel) {
LinkedList<Row> rows = new LinkedList<Row>();
Row currentRow = newRow(panel, rows);
for (Panel child : panel.getChildren()) {
if (!(child instanceof ScrollBarPanel) && !child.isFloater()) {
if (!currentRow.isEmpty() && !currentRow.fits(child)) {
currentRow = newRow(panel, rows);
}
currentRow.add(child);
}
}
return rows;
}
use of limelight.ui.model.inputs.ScrollBarPanel in project limelight by slagyr.
the class ParentPanelBase method add.
public void add(int index, limelight.ui.Panel child) {
if (sterilized && !(child instanceof ScrollBarPanel))
throw new SterilePanelException(this.toString());
final Lock lock = getTreeLock();
try {
lock.lock();
synchronized (children) {
if (index == -1)
children.add(child);
else
children.add(index, child);
readonlyChildren = null;
}
child.setParent(this);
doPropagateSizeChangeUp(this);
markAsNeedingLayout();
} finally {
lock.unlock();
}
}
use of limelight.ui.model.inputs.ScrollBarPanel in project limelight by slagyr.
the class ScrollBarPainterTest method setUpHorizontally.
private void setUpHorizontally() {
scrollBar = new ScrollBarPanel(ScrollBarPanel.HORIZONTAL);
scrollBar.setSize(100, 15);
scrollBar.setValue(0);
scrollBar.configure(1, 100);
graphics = new MockGraphics();
images = ScrollBarPainter.horizontalImages;
}
use of limelight.ui.model.inputs.ScrollBarPanel in project limelight by slagyr.
the class LayoutTest method scrollBarLayout.
@Test
public void scrollBarLayout() throws Exception {
parent.getStyle().setScrollbars("on");
Layouts.on(root);
ScrollBarPanel verticalScrollBar = parent.getVerticalScrollbar();
assertEquals(100 - ScrollBarPanel.GIRTH, verticalScrollBar.getX());
assertEquals(0, verticalScrollBar.getY());
ScrollBarPanel horizontalScrollBar = parent.getHorizontalScrollbar();
assertEquals(0, horizontalScrollBar.getX());
assertEquals(100 - ScrollBarPanel.GIRTH, horizontalScrollBar.getY());
}
Aggregations