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


Java VisTable.add方法代码示例

本文整理汇总了Java中com.kotcrab.vis.ui.widget.VisTable.add方法的典型用法代码示例。如果您正苦于以下问题:Java VisTable.add方法的具体用法?Java VisTable.add怎么用?Java VisTable.add使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.kotcrab.vis.ui.widget.VisTable的用法示例。


在下文中一共展示了VisTable.add方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createUI

import com.kotcrab.vis.ui.widget.VisTable; //导入方法依赖的package包/类
@Override
protected void createUI () {
	super.createUI();

	VisTable extendedTable = new VisTable(true); //displayed next to mainTable

	extendedTable.add(hBar).row();
	extendedTable.add(sBar).row();
	extendedTable.add(vBar).row();

	extendedTable.add();
	extendedTable.row();

	extendedTable.add(rBar).row();
	extendedTable.add(gBar).row();
	extendedTable.add(bBar).row();

	extendedTable.add();
	extendedTable.row();

	extendedTable.add(aBar).row();

	add(extendedTable).expand().left().top().pad(0, 9, 4, 4);
}
 
开发者ID:kotcrab,项目名称:vis-editor,代码行数:25,代码来源:ExtendedColorPicker.java

示例2: addNormalWidgets

import com.kotcrab.vis.ui.widget.VisTable; //导入方法依赖的package包/类
private void addNormalWidgets () {
	ProgressBar progressbar = new ProgressBar(0, 100, 1, true, VisUI.getSkin());
	Slider slider = new Slider(0, 100, 1, true, VisUI.getSkin());
	Slider sliderDisabled = new Slider(0, 100, 1, true, VisUI.getSkin());

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

示例3: addVisWidgets

import com.kotcrab.vis.ui.widget.VisTable; //导入方法依赖的package包/类
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);
}
 
开发者ID:kotcrab,项目名称:vis-editor,代码行数:18,代码来源:TestVertical.java

示例4: GroupPropertiesTable

import com.kotcrab.vis.ui.widget.VisTable; //导入方法依赖的package包/类
public GroupPropertiesTable (EntityProperties properties) {
	super(true);
	this.properties = properties;

	VisTable intIdTable = new VisTable(true);

	intIdTable.add(new VisLabel("Group Integer ID: "));
	intIdTable.add(idLabel = new VisLabel()).expandX().fillX();

	VisTable stringIdTable = new VisTable(true);

	stringIdTable.add(new VisLabel("Group ID"));
	stringIdTable.add(idField = new VisValidatableTextField()).expandX().fillX();
	properties.setupStdPropertiesTextField(idField);

	defaults().padRight(0).width(EntityProperties.ROW_WIDTH);
	add(intIdTable).row();
	add(stringIdTable);
}
 
开发者ID:kotcrab,项目名称:vis-editor,代码行数:20,代码来源:GroupPropertiesTable.java

示例5: createRotationTintTable

import com.kotcrab.vis.ui.widget.VisTable; //导入方法依赖的package包/类
private void createRotationTintTable () {
	tint = new TintImage();
	tint.addListener(new ClickListener() {
		@Override
		public void clicked (InputEvent event, float x, float y) {
			properties.beginSnapshot();
			picker.setColor(tint.getColor());
			picker.setListener(pickerListener);
			getStage().addActor(picker.fadeIn());
		}
	});

	tintTable = new VisTable(true);
	tintTable.add(new VisLabel("Tint"));
	tintTable.add(tint).size(20);

	rotationTable = new VisTable(true);
	rotationTable.add(new VisLabel("Rotation")).width(LABEL_WIDTH);
	rotationTable.add(new VisLabel(" ")).width(AXIS_LABEL_WIDTH);
	rotationTable.add(rotationField = properties.createNewNumberField()).width(FIELD_WIDTH).spaceRight(0);
	rotationTable.add(rotationLock);
}
 
开发者ID:kotcrab,项目名称:vis-editor,代码行数:23,代码来源:BasicEntityPropertiesTable.java

示例6: init

import com.kotcrab.vis.ui.widget.VisTable; //导入方法依赖的package包/类
@Override
public void init () {
	VisTextButton importButton = new VisTextButton("Import", "blue");
	importButton.addListener(new VisChangeListener((event, actor) -> stage.addActor(new SpriterImportDialog(animFolder, relativePath).fadeIn())));

	importTable = new VisTable();
	importTable.pad(3);
	importTable.add(new VisLabel("Spriter animation requires importing before use")).padRight(4);
	importTable.add(importButton);
	importTable.add().expandX().fillX();

	VisTextButton updateButton = new VisTextButton("Update", "blue");
	updateButton.addListener(new VisChangeListener((event, actor) ->
			Async.startTask(stage, "Updating Animation", new UpdateAnimationAsyncTask())));

	updateTable = new VisTable();
	updateTable.pad(3);
	updateTable.add(new VisLabel("Apply animation update?")).padRight(4);
	updateTable.add(updateButton);
	updateTable.add().expandX().fillX();
}
 
开发者ID:kotcrab,项目名称:vis-editor,代码行数:22,代码来源:SpriterUIContextGenerator.java

示例7: ToolbarModule

import com.kotcrab.vis.ui.widget.VisTable; //导入方法依赖的package包/类
public ToolbarModule () {
	toolsGroup = new ButtonGroup<>();

	table = new VisTable(false);
	table.defaults().pad(4, 0, 4, 3);
	table.setBackground(VisUI.getSkin().getDrawable("button"));

	table.add(new ToolbarButtonBuilder().icon(Icons.SAVE)
			.text("Save (" + OsUtils.getShortcutFor(Keys.CONTROL_LEFT, Keys.S) + ")").eventToolbar(ToolbarEventType.FILE_SAVE)
			.policy(ControllerPolicy.SAVABLE).build());

	table.addSeparator(true);
	table.add(new ToolbarButtonBuilder().icon(Icons.TOOL_MOVE).text("Select and move entities (F1)").eventTool(SelectionTool.TOOL_ID).build());
	table.add(new ToolbarButtonBuilder().icon(Icons.TOOL_ROTATE).text("Rotate entities (F2)").eventTool(RotateTool.TOOL_ID).build());
	table.add(new ToolbarButtonBuilder().icon(Icons.TOOL_SCALE).text("Scale entities (F3)").eventTool(ScaleTool.TOOL_ID).build());
	table.add(new ToolbarButtonBuilder().icon(Icons.POLYGON).text("Edit polygons (F4)").eventTool(PolygonTool.TOOL_ID).build());

	table.addSeparator(true);
	table.add(new ToolbarButtonBuilder().icon(Icons.SETTINGS_VIEW).text("Enable grid snapping (%)").eventToolbar(ToolbarEventType.GRID_SNAP_SETTING_CHANGED).toggle().build());

	table.add().expand().fill();

	savableScope.forEach(button -> button.setDisabled(true));
	sceneScope.forEach(button -> button.setDisabled(true));
}
 
开发者ID:kotcrab,项目名称:vis-editor,代码行数:26,代码来源:ToolbarModule.java

示例8: createUI

import com.kotcrab.vis.ui.widget.VisTable; //导入方法依赖的package包/类
@Override
public void createUI (ATEnumProperty annotation, Field field, Class<?> fieldType) throws ReflectiveOperationException {
	String fieldName = annotation.fieldName().equals("") ? field.getName() : annotation.fieldName();

	Constructor<? extends EnumNameProvider> constructor = annotation.uiNameProvider().getConstructor();
	EnumNameProvider nameProvider = constructor.newInstance();

	AutoTableEnumSelectBox selectBox = new AutoTableEnumSelectBox(fieldType, nameProvider);
	selectBox.getSelection().setProgrammaticChangeEvents(false);
	selectBox.addListener(properties.getSharedSelectBoxChangeListener());
	enumSelectBoxes.put(field, new EnumSelectBoxSet(selectBox, nameProvider));

	if (field.isAnnotationPresent(ATUseGetterSetter.class)) {
		propertyAccessors.put(field, new GetterSetterFieldAccessor(field));
	} else {
		propertyAccessors.put(field, new DirectFieldAccessor(field));
	}

	VisTable table = new VisTable(true);
	table.add(fieldName);
	table.add(selectBox).expandX().fillX().left();
	uiTable.add(table).left().expandX().fillX().row();
}
 
开发者ID:kotcrab,项目名称:vis-editor,代码行数:24,代码来源:EnumSelectBoxFragmentProvider.java

示例9: layout

import com.kotcrab.vis.ui.widget.VisTable; //导入方法依赖的package包/类
public synchronized void layout() {
//        this.setDebug(true, false);
        if (!needsLayout) {
            super.layout();
            return;
        }

        this.clear();

        VisTable iconTable = new VisTable();
        iconTable.add(type.getCacheWidget(style.typeStyle, null, null));

        iconTable.pack();
        iconTable.layout();

        this.add(iconTable).left().top().padRight(CB.scaledSizes.MARGINx4);

        Table contentTable = new Table();
        contentTable.add(nameLabel).left().expandX().fillX();
        contentTable.row();
        contentTable.add(descriptionLabel).left().expandX().fillX();
        contentTable.row();
        contentTable.add(coordLabel).left().expandX().fillX();

        this.add(contentTable).top().expandX().fillX();

        VisTable arrowTable = new VisTable();


        arrowImage.setOrigin(this.style.arrow.getMinWidth() / 2, this.style.arrow.getMinHeight() / 2);


        arrowTable.add(arrowImage);
        arrowTable.row();
        arrowTable.add(distanceLabel).padTop(CB.scaledSizes.MARGIN);
        this.add(arrowTable).right();
        super.layout();
        needsLayout = false;
    }
 
开发者ID:Longri,项目名称:cachebox3.0,代码行数:40,代码来源:WayPointListItem.java

示例10: createView

import com.kotcrab.vis.ui.widget.VisTable; //导入方法依赖的package包/类
@Override
protected VisTable createView (ItemT item) {
	VisTable table = new VisTable();
	table.left();
	table.add(new VisLabel(item.toString()));
	return table;
}
 
开发者ID:kotcrab,项目名称:vis-editor,代码行数:8,代码来源:SimpleListAdapter.java

示例11: rebuildPropertiesTable

import com.kotcrab.vis.ui.widget.VisTable; //导入方法依赖的package包/类
public void rebuildPropertiesTable () {
	ImmutableArray<EntityProxy> entities = properties.getSelectedEntities();

	VisTable rotationTintTable = new VisTable(true);
	if (EntityUtils.isRotationSupportedForEntities(entities)) {
		rotationTintTable.add(rotationTable);
	}
	rotationTintTable.add().expand().fill();
	if (EntityUtils.isTintSupportedForEntities(entities)) {
		rotationTintTable.add(tintTable);
	}

	reset();
	TableUtils.setSpacingDefaults(this);
	defaults().padRight(0).fillX();
	add(idTable).row();
	add(positionTable).row();

	if (EntityUtils.isScaleSupportedForEntities(entities)) {
		add(scaleTable).row();
	}

	if (EntityUtils.isOriginSupportedForEntities(entities)) {
		add(originTable).row();
	}

	if (EntityUtils.isRotationSupportedForEntities(entities) || EntityUtils.isTintSupportedForEntities(entities)) {
		add(rotationTintTable).maxWidth(new VisValue(context -> positionTable.getPrefWidth())).row();
	}

	if (EntityUtils.isFlipSupportedForEntities(entities)) {
		add(flipTable).right().fill(false).spaceBottom(2).row();
	}
}
 
开发者ID:kotcrab,项目名称:vis-editor,代码行数:35,代码来源:BasicEntityPropertiesTable.java

示例12: TestTab

import com.kotcrab.vis.ui.widget.VisTable; //导入方法依赖的package包/类
public TestTab (String title) {
	super(false, true);
	this.title = title;

	content = new VisTable();
	content.add(new VisLabel(title));
}
 
开发者ID:kotcrab,项目名称:vis-editor,代码行数:8,代码来源:TestTabbedPane.java

示例13: addVisWidgets

import com.kotcrab.vis.ui.widget.VisTable; //导入方法依赖的package包/类
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();
}
 
开发者ID:kotcrab,项目名称:vis-editor,代码行数:13,代码来源:TestSplitPane.java

示例14: addNormalWidgets

import com.kotcrab.vis.ui.widget.VisTable; //导入方法依赖的package包/类
private void addNormalWidgets () {
	Skin skin = VisUI.getSkin();
	Label label = new Label("Lorem \nipsum \ndolor \nsit \namet", skin);
	Label label2 = new Label("Consectetur \nadipiscing \nelit", skin);

	VisTable table = new VisTable(true);
	VisTable table2 = new VisTable(true);

	table.add(label);
	table2.add(label2);

	SplitPane splitPane = new SplitPane(table, table2, false, skin);
	add(splitPane).fill().expand();
}
 
开发者ID:kotcrab,项目名称:vis-editor,代码行数:15,代码来源:TestSplitPane.java

示例15: createFlipTable

import com.kotcrab.vis.ui.widget.VisTable; //导入方法依赖的package包/类
private void createFlipTable () {
	flipTable = new VisTable(true);

	flipTable.add(new VisLabel("Flip"));
	flipTable.add(xFlipCheck = new IndeterminateCheckbox("X"));
	flipTable.add(yFlipCheck = new IndeterminateCheckbox("Y"));

	xFlipCheck.addListener(properties.getSharedCheckBoxChangeListener());
	yFlipCheck.addListener(properties.getSharedCheckBoxChangeListener());
}
 
开发者ID:kotcrab,项目名称:vis-editor,代码行数:11,代码来源:BasicEntityPropertiesTable.java


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