use of com.kotcrab.vis.ui.widget.VisTable in project vis-ui by kotcrab.
the class TestVertical method addVisWidgets.
private void addVisWidgets() {
VisProgressBar progressbar = new VisProgressBar(0, 100, 1, true);
VisSlider slider = new VisSlider(0, 100, 1, true);
VisSlider sliderDisabled = new VisSlider(0, 100, 1, true);
progressbar.setValue(50);
slider.setValue(50);
sliderDisabled.setValue(50);
sliderDisabled.setDisabled(true);
VisTable progressbarTable = new VisTable(true);
progressbarTable.add(progressbar);
progressbarTable.add(slider);
progressbarTable.add(sliderDisabled);
add(progressbarTable);
}
use of com.kotcrab.vis.ui.widget.VisTable in project vis-ui by kotcrab.
the class Toast method createMainTable.
protected void createMainTable() {
mainTable = new VisTable();
mainTable.setBackground(style.background);
VisImageButton closeButton = new VisImageButton(style.closeButtonStyle);
closeButton.addListener(new ChangeListener() {
@Override
public void changed(ChangeEvent event, Actor actor) {
close();
}
});
mainTable.add(contentTable).pad(3).fill().expand();
mainTable.add(closeButton).top();
}
use of com.kotcrab.vis.ui.widget.VisTable in project vis-ui by kotcrab.
the class TestSplitPane method addVisWidgets.
private void addVisWidgets() {
VisLabel label = new VisLabel("Lorem \nipsum \ndolor \nsit \namet");
VisLabel label2 = new VisLabel("Consectetur \nadipiscing \nelit");
VisTable table = new VisTable(true);
VisTable table2 = new VisTable(true);
table.add(label);
table2.add(label2);
VisSplitPane splitPane = new VisSplitPane(table, table2, vertical);
add(splitPane).fill().expand();
}
use of com.kotcrab.vis.ui.widget.VisTable 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.VisTable in project vis-ui by kotcrab.
the class BasicColorPicker method createColorsPreviewTable.
private VisTable createColorsPreviewTable() {
VisTable table = new VisTable(false);
table.add(currentColorImg = new AlphaImage(commons, 5 * sizes.scaleFactor)).height(25 * sizes.scaleFactor).width(80 * sizes.scaleFactor).expandX().fillX();
table.add(new Image(style.iconArrowRight)).pad(0, 2, 0, 2);
table.add(newColorImg = new AlphaImage(commons, 5 * sizes.scaleFactor)).height(25 * sizes.scaleFactor).width(80 * sizes.scaleFactor).expandX().fillX();
currentColorImg.setColor(color);
newColorImg.setColor(color);
currentColorImg.addListener(new ClickListener() {
@Override
public void clicked(InputEvent event, float x, float y) {
restoreLastColor();
}
});
return table;
}
Aggregations