use of com.kotcrab.vis.ui.widget.VisTable in project vis-ui by kotcrab.
the class BasicColorPicker method createUI.
protected void createUI() {
mainTable = new VisTable(true);
colorPreviewsTable = createColorsPreviewTable();
hexTable = createHexTable();
rebuildMainTable();
add(mainTable).top();
}
use of com.kotcrab.vis.ui.widget.VisTable in project vis-ui by kotcrab.
the class SimpleListAdapter method createView.
@Override
protected VisTable createView(ItemT item) {
VisTable table = new VisTable();
table.left();
table.add(new VisLabel(item.toString()));
return table;
}
use of com.kotcrab.vis.ui.widget.VisTable in project HyperLap2D by rednblackgames.
the class BoxItemResourceSelectionUIMediator method setSelectionBetween.
private void setSelectionBetween(BoxItemResource boxResourceStart, BoxItemResource boxResourceEnd, boolean selected) {
VisTable boxesTable = getBoxResourceTable(boxResourceStart);
if (boxesTable == null)
return;
int startIndex = getCellIndex(boxResourceStart, 0, boxesTable);
int endIndex = getCellIndex(boxResourceEnd, boxesTable.getCells().size - 1, boxesTable);
// we want to start with start :)
if (endIndex < startIndex) {
int tmp = startIndex;
startIndex = endIndex;
endIndex = tmp;
}
for (int i = startIndex; i <= endIndex; i++) {
Cell<BoxItemResource> cell = boxesTable.getCells().get(i);
BoxItemResource boxResource = cell.getActor();
setSelected(boxResource, selected);
}
}
use of com.kotcrab.vis.ui.widget.VisTable in project HyperLap2D by rednblackgames.
the class UIMainTable method initRightBoxesPanel.
private void initRightBoxesPanel() {
VisTable rightPanel = new VisTable();
// PropertyBox
UIMultiPropertyBoxMediator multiPropertyBoxMediator = facade.retrieveMediator(UIMultiPropertyBoxMediator.NAME);
UIMultiPropertyBox multiPropertyBox = multiPropertyBoxMediator.getViewComponent();
rightPanel.add(multiPropertyBox).top();
rightPanel.row();
// ResourcesBox
UIResourcesBoxMediator resourceBoxMediator = facade.retrieveMediator(UIResourcesBoxMediator.NAME);
UIResourcesBox resourceBox = resourceBoxMediator.getViewComponent();
rightPanel.add(resourceBox).top();
rightPanel.row();
// LayerBox
UILayerBoxMediator layerBoxMediator = facade.retrieveMediator(UILayerBoxMediator.NAME);
UILayerBox layerBox = layerBoxMediator.getViewComponent();
rightPanel.add(layerBox).top();
middleTable.add(rightPanel).top().right().expand().padTop(15);
}
use of com.kotcrab.vis.ui.widget.VisTable in project HyperLap2D by rednblackgames.
the class UIMainTable method initLeftBoxesPanel.
private void initLeftBoxesPanel() {
// Align
VisTable leftBoxesPanel = new VisTable();
UIAlignBoxMediator uiAlignBoxMediator = facade.retrieveMediator(UIAlignBoxMediator.NAME);
UIAlignBox uiAlignBox = uiAlignBoxMediator.getViewComponent();
leftBoxesPanel.add(uiAlignBox).expandX().fillX();
leftBoxesPanel.row();
// TreeView
UIItemsTreeBoxMediator uiItemsTreeBoxMediator = facade.retrieveMediator(UIItemsTreeBoxMediator.NAME);
UIItemsTreeBox itemsBox = uiItemsTreeBoxMediator.getViewComponent();
leftBoxesPanel.add(itemsBox).width(180).fillX().maxHeight(620).top();
middleTable.add(leftBoxesPanel).top().left().expand().padTop(15).padLeft(16);
}
Aggregations