use of com.kotcrab.vis.ui.widget.VisLabel in project vis-ui by kotcrab.
the class TestTree method addVisWidgets.
private void addVisWidgets() {
VisTree tree = new VisTree();
TestNode item1 = new TestNode(new VisLabel("item 1"));
TestNode item2 = new TestNode(new VisLabel("item 2"));
TestNode item3 = new TestNode(new VisLabel("item 3"));
item1.add(new TestNode(new VisLabel("item 1.1")));
item1.add(new TestNode(new VisLabel("item 1.2")));
item1.add(new TestNode(new VisLabel("item 1.3")));
item2.add(new TestNode(new VisLabel("item 2.1")));
item2.add(new TestNode(new VisLabel("item 2.2")));
item2.add(new TestNode(new VisLabel("item 2.3")));
item3.add(new TestNode(new VisLabel("item 3.1")));
item3.add(new TestNode(new VisLabel("item 3.2")));
item3.add(new TestNode(new VisLabel("item 3.3")));
item1.setExpanded(true);
tree.add(item1);
tree.add(item2);
tree.add(item3);
add(tree).expand().fill();
}
use of com.kotcrab.vis.ui.widget.VisLabel in project vis-ui by kotcrab.
the class TestBusyBar method addVisWidgets.
private void addVisWidgets() {
BusyBar busyBar = new BusyBar();
add(busyBar).top().space(0).growX().row();
add(new VisLabel("Working...", Align.center)).grow().center();
}
use of com.kotcrab.vis.ui.widget.VisLabel in project vis-ui by kotcrab.
the class BasicColorPicker method createHexTable.
private VisTable createHexTable() {
VisTable table = new VisTable(true);
table.add(new VisLabel(HEX.get()));
table.add(hexField = new VisValidatableTextField("00000000")).width(HEX_FIELD_WIDTH * sizes.scaleFactor);
table.row();
hexField.setMaxLength(HEX_COLOR_LENGTH);
hexField.setProgrammaticChangeEvents(false);
hexField.setTextFieldFilter(new TextFieldFilter() {
@Override
public boolean acceptChar(VisTextField textField, char c) {
return Character.isDigit(c) || (c >= 'a' && c <= 'f') || (c >= 'A' && c <= 'F');
}
});
hexField.addListener(new ChangeListener() {
@Override
public void changed(ChangeEvent event, Actor actor) {
if (hexField.getText().length() == (allowAlphaEdit ? HEX_COLOR_LENGTH_WITH_ALPHA : HEX_COLOR_LENGTH)) {
setColor(Color.valueOf(hexField.getText()), false);
}
}
});
return table;
}
use of com.kotcrab.vis.ui.widget.VisLabel 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.VisLabel in project HyperLap2D by rednblackgames.
the class UIPolygonComponentProperties method initView.
public void initView() {
mainTable.clear();
verticesCountLbl = new VisLabel("", Align.left);
copyBtn = new VisTextButton("Copy");
pasteBtn = new VisTextButton("Paste");
openEndedCheckbox = StandardWidgetsFactory.createCheckBox("Open Ended");
mainTable.add(new VisLabel("Vertices: ", Align.left)).left().padRight(3);
mainTable.add(verticesCountLbl).left().width(67);
mainTable.add(copyBtn).right().padRight(4);
mainTable.add(pasteBtn).right().padRight(4);
mainTable.row();
mainTable.add(openEndedCheckbox).left().colspan(4).padTop(5).row();
initListeners();
}
Aggregations