本文整理汇总了Java中com.kotcrab.vis.ui.widget.VisSelectBox类的典型用法代码示例。如果您正苦于以下问题:Java VisSelectBox类的具体用法?Java VisSelectBox怎么用?Java VisSelectBox使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
VisSelectBox类属于com.kotcrab.vis.ui.widget包,在下文中一共展示了VisSelectBox类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: buildTable
import com.kotcrab.vis.ui.widget.VisSelectBox; //导入依赖的package包/类
@Override
public void buildTable () {
prepareTable();
exporterSelector = new VisSelectBox<>();
exporterSelector.setItems(exporters);
VisTextButton exporterSettingsButton = new VisTextButton("Settings");
settingsTable.defaults().left();
settingsTable.add(TableBuilder.build(new VisLabel("Exporter"), exporterSelector, exporterSettingsButton));
exporterSettingsButton.addListener(new VisChangeListener((event, actor) -> {
UUID uuid = getUUIDForName(exporterSelector.getSelected());
ExporterPlugin exporter = exportersManager.getExportersMap().get(uuid);
if (exporter.isSettingsUsed() == false)
Dialogs.showOKDialog(stage, "Message", "This exporter does not have any additional settings");
else
exporter.showSettings();
}));
}
示例2: changeController
import com.kotcrab.vis.ui.widget.VisSelectBox; //导入依赖的package包/类
@LmlAction("changeController")
public void changeController(final VisSelectBox<String> select) {
if (select.getSelectedIndex() < 0) {
return;
}
final Controller controller = controllers.get(select.getSelectedIndex());
((GamePadControl) control).setController(controller);
control.attachInputListener(null);
}
示例3: addDirectionListener
import com.kotcrab.vis.ui.widget.VisSelectBox; //导入依赖的package包/类
/** Adds a direction to the list of all available
* @param selectBox the dropdown
* @param textField the suggestion textField
* @return */
private Listener addDirectionListener(final VisSelectBox<TeleportDirection> selectBox, final SuggestionWidget textField) {
return new Listener() {
@Override
public void invoke() {
node.teleport.adjacentMaps.put(selectBox.getSelected().toString(), textField.getTextField().getText());
update();
}
};
}
示例4: init
import com.kotcrab.vis.ui.widget.VisSelectBox; //导入依赖的package包/类
@Override
protected void init () {
super.init();
animSelectBox = new VisSelectBox<>();
animSelectBox.getSelection().setProgrammaticChangeEvents(false);
animSelectBox.addListener(properties.getSharedSelectBoxChangeListener());
VisTable table = new VisTable(true);
table.add(new VisLabel("Animation"));
table.add(animSelectBox);
add(table);
}
示例5: init
import com.kotcrab.vis.ui.widget.VisSelectBox; //导入依赖的package包/类
@Override
protected void init () {
super.init();
warningImage = new Image(Icons.WARNING.drawable());
onlyCommonAnimationTooltip = new Tooltip.Builder("Only showing animations that are common for all selected objects!").build();
noCommonAnimationTooltip = new Tooltip.Builder("There isn't any common animation for selected objects").build();
preview = new IndeterminateCheckbox("Preview in editor");
preview.addListener(properties.getSharedCheckBoxChangeListener());
scaleField = new NumberInputField(properties.getSharedFocusListener(), properties.getSharedChangeListener());
scaleField.addValidator(new GreaterThanValidator(0));
VisTable scaleTable = new VisTable(true);
scaleTable.add("Scale:");
scaleTable.add(scaleField).width(EntityProperties.FIELD_WIDTH);
animSelectBox = new VisSelectBox<>();
animSelectBox.setItems("<none>");
animSelectBox.getSelection().setProgrammaticChangeEvents(false);
animSelectBox.addListener(properties.getSharedSelectBoxChangeListener());
animSelectBox.addListener(new VisChangeListener((event, actor) -> createCommonAnimationsList()));
VisTable animTable = new VisTable(true);
animTable.add(new VisLabel("Animation"));
animTable.add(animSelectBox);
animTable.add(warningImage);
add(preview).row();
add(scaleTable).row();
add(animTable).row();
}
示例6: getNewInstanceOfActor
import com.kotcrab.vis.ui.widget.VisSelectBox; //导入依赖的package包/类
@Override
protected Actor getNewInstanceOfActor(final LmlActorBuilder builder) {
return new VisSelectBox<String>(builder.getStyleName());
}