当前位置: 首页>>代码示例>>Java>>正文


Java VisSelectBox类代码示例

本文整理汇总了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();
	}));
}
 
开发者ID:kotcrab,项目名称:vis-editor,代码行数:23,代码来源:ExportSettingsModule.java

示例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);
}
 
开发者ID:BialJam,项目名称:M-M,代码行数:10,代码来源:ControlsEditController.java

示例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();
		}
	};
}
 
开发者ID:adketuri,项目名称:umbracraft,代码行数:15,代码来源:TeleportSelectorWidget.java

示例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);
}
 
开发者ID:kotcrab,项目名称:vis-editor,代码行数:15,代码来源:VisSpriterComponentTable.java

示例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();
}
 
开发者ID:kotcrab,项目名称:vis-editor,代码行数:34,代码来源:VisSpineComponentTable.java

示例6: getNewInstanceOfActor

import com.kotcrab.vis.ui.widget.VisSelectBox; //导入依赖的package包/类
@Override
protected Actor getNewInstanceOfActor(final LmlActorBuilder builder) {
    return new VisSelectBox<String>(builder.getStyleName());
}
 
开发者ID:czyzby,项目名称:gdx-lml,代码行数:5,代码来源:VisSelectBoxLmlTag.java


注:本文中的com.kotcrab.vis.ui.widget.VisSelectBox类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。