• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java SplitPane类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中com.badlogic.gdx.scenes.scene2d.ui.SplitPane的典型用法代码示例。如果您正苦于以下问题:Java SplitPane类的具体用法?Java SplitPane怎么用?Java SplitPane使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



SplitPane类属于com.badlogic.gdx.scenes.scene2d.ui包,在下文中一共展示了SplitPane类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: setup

import com.badlogic.gdx.scenes.scene2d.ui.SplitPane; //导入依赖的package包/类
public static void setup(){
	registerSerializer(Actor.class, new ActorSerializer());
	registerSerializer(Scene.class, new SceneSerializer());
	registerSerializer(ImageJson.class, new ImageJson());
	registerSerializer(Label.class, new LabelSerializer());
	registerSerializer(Button.class, new ButtonSerializer());
	registerSerializer(TextButton.class, new TextButtonSerializer());
	registerSerializer(Table.class, new TableSerializer());
	registerSerializer(CheckBox.class, new CheckBoxSerializer());
	registerSerializer(SelectBox.class, new SelectBoxSerializer());
	registerSerializer(List.class, new ListSerializer());
	registerSerializer(Slider.class, new SliderSerializer());
	registerSerializer(TextField.class, new TextFieldSerializer());
	registerSerializer(Touchpad.class, new TouchpadSerializer());
	registerSerializer(Sprite.class, new SpriteSerializer());
	
	registerSerializer(Dialog.class, new DialogSerializer());
	registerSerializer(SplitPane.class, new SplitPaneSerializer());
	registerSerializer(ScrollPane.class, new ScrollPaneSerializer());
	registerSerializer(Stack.class, new StackSerializer());
	registerSerializer(Tree.class, new TreeSerializer());
	registerSerializer(Table.class, new TableSerializer());
	registerSerializer(ButtonGroup.class, new ButtonGroupSerializer());
	registerSerializer(HorizontalGroup.class, new HorizontalGroupSerializer());
	registerSerializer(VerticalGroup.class, new VerticalGroupSerializer());
}
 
开发者ID:pyros2097,项目名称:GdxStudio,代码行数:27,代码来源:Serializer.java


示例2: createActor

import com.badlogic.gdx.scenes.scene2d.ui.SplitPane; //导入依赖的package包/类
@Override
public Actor createActor (Skin skin) {
	// Create the semaphore
	NonBlockingSemaphoreRepository.clear();
	NonBlockingSemaphoreRepository.addSemaphore("dogSemaphore", 1);

	Reader reader = null;
	try {
		// Parse Buddy's tree
		reader = Gdx.files.internal("data/dogSemaphore.tree").reader();
		BehaviorTreeParser<Dog> parser = new BehaviorTreeParser<Dog>(BehaviorTreeParser.DEBUG_HIGH);
		BehaviorTree<Dog> buddyTree = parser.parse(reader, new Dog("Buddy"));

		// Clone Buddy's tree for Snoopy
		BehaviorTree<Dog> snoopyTree = (BehaviorTree<Dog>)buddyTree.cloneTask();
		snoopyTree.setObject(new Dog("Snoopy"));

		// Create split pane
		BehaviorTreeViewer<?> buddyTreeViewer = createTreeViewer(buddyTree.getObject().name, buddyTree, false, skin);
		BehaviorTreeViewer<?> snoopyTreeViewer = createTreeViewer(snoopyTree.getObject().name, snoopyTree, false, skin);
		return new SplitPane(new ScrollPane(buddyTreeViewer, skin), new ScrollPane(snoopyTreeViewer, skin), true, skin,
			"default-horizontal");
	} finally {
		StreamUtils.closeQuietly(reader);
	}
}
 
开发者ID:libgdx,项目名称:gdx-ai,代码行数:27,代码来源:SemaphoreGuardTest.java


示例3: addNormalWidgets

import com.badlogic.gdx.scenes.scene2d.ui.SplitPane; //导入依赖的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


示例4: MainScreen

import com.badlogic.gdx.scenes.scene2d.ui.SplitPane; //导入依赖的package包/类
public MainScreen() {
	Gdx.gl.glClearColor(.3f, .3f, .3f, 1);

	skin = new Skin(Gdx.files.internal("data/uiskin.json"));

	stage = new Stage(new ScreenViewport());
	stage.setDebugAll(DEBUG_STAGE);

	// Create split pane
	List<String> testList = createTestList();
	ScrollPane leftScrollPane = new ScrollPane(testList, skin);
	splitPane = new SplitPane(leftScrollPane, null, false, skin, "default-horizontal");
	splitPane.setSplitAmount(Math.min((testList.getPrefWidth() + 10) / stage.getWidth(), splitPane.getSplit()));

	// Create layout
	Table t = new Table(skin);
	t.setFillParent(true);
	t.add(splitPane).colspan(3).grow();
	t.row();
	t.add(pauseButton = new PauseButton(skin)).width(90).left();
	t.add(new FpsLabel("FPS: ", skin)).left();
	t.add(testDescriptionLabel = new Label("", skin)).left();
	stage.addActor(t);

	// Set selected test
	changeTest(0);
}
 
开发者ID:libgdx,项目名称:gdx-ai,代码行数:28,代码来源:BehaviorTreeTests.java


示例5: resetProperties

import com.badlogic.gdx.scenes.scene2d.ui.SplitPane; //导入依赖的package包/类
public void resetProperties() {
    properties.clear();
    
    if (clazz.equals(Button.class)) {
        newStyleProperties(ButtonStyle.class);
    } else if (clazz.equals(CheckBox.class)) {
        newStyleProperties(CheckBoxStyle.class);
        properties.get("checkboxOn").optional = false;
        properties.get("checkboxOff").optional = false;
        properties.get("font").optional = false;
    } else if (clazz.equals(ImageButton.class)) {
        newStyleProperties(ImageButtonStyle.class);
    } else if (clazz.equals(ImageTextButton.class)) {
        newStyleProperties(ImageTextButtonStyle.class);
        properties.get("font").optional = false;
    } else if (clazz.equals(Label.class)) {
        newStyleProperties(LabelStyle.class);
        properties.get("font").optional = false;
    } else if (clazz.equals(List.class)) {
        newStyleProperties(ListStyle.class);
        properties.get("font").optional = false;
        properties.get("fontColorSelected").optional = false;
        properties.get("fontColorUnselected").optional = false;
        properties.get("selection").optional = false;
    } else if (clazz.equals(ProgressBar.class)) {
        newStyleProperties(ProgressBarStyle.class);
        
        //Though specified as optional in the doc, there are bugs without "background" being mandatory
        properties.get("background").optional = false;
    } else if (clazz.equals(ScrollPane.class)) {
        newStyleProperties(ScrollPaneStyle.class);
    } else if (clazz.equals(SelectBox.class)) {
        newStyleProperties(SelectBoxStyle.class);
        properties.get("font").optional = false;
        properties.get("fontColor").optional = false;
        properties.get("scrollStyle").optional = false;
        properties.get("scrollStyle").value = "default";
        properties.get("listStyle").optional = false;
        properties.get("listStyle").value = "default";
    } else if (clazz.equals(Slider.class)) {
        newStyleProperties(SliderStyle.class);
        
        //Though specified as optional in the doc, there are bugs without "background" being mandatory
        properties.get("background").optional = false;
    } else if (clazz.equals(SplitPane.class)) {
        newStyleProperties(SplitPaneStyle.class);
        properties.get("handle").optional = false;
    } else if (clazz.equals(TextButton.class)) {
        newStyleProperties(TextButtonStyle.class);
        properties.get("font").optional = false;
    } else if (clazz.equals(TextField.class)) {
        newStyleProperties(TextFieldStyle.class);
        properties.get("font").optional = false;
        properties.get("fontColor").optional = false;
    } else if (clazz.equals(TextTooltip.class)) {
        newStyleProperties(TextTooltipStyle.class);
        properties.get("label").optional = false;
        properties.get("label").value = "default";
    } else if (clazz.equals(Touchpad.class)) {
        newStyleProperties(TouchpadStyle.class);
    } else if (clazz.equals(Tree.class)) {
        newStyleProperties(TreeStyle.class);
        properties.get("plus").optional = false;
        properties.get("minus").optional = false;
    } else if (clazz.equals(Window.class)) {
        newStyleProperties(WindowStyle.class);
        properties.get("titleFont").optional = false;
    }
}
 
开发者ID:raeleus,项目名称:skin-composer,代码行数:70,代码来源:StyleData.java


示例6: getHandledType

import com.badlogic.gdx.scenes.scene2d.ui.SplitPane; //导入依赖的package包/类
@Override
public Class<SplitPane> getHandledType() {
    return SplitPane.class;
}
 
开发者ID:czyzby,项目名称:gdx-lml,代码行数:5,代码来源:SplitAmountLmlAttribute.java


示例7: process

import com.badlogic.gdx.scenes.scene2d.ui.SplitPane; //导入依赖的package包/类
@Override
public void process(final LmlParser parser, final LmlTag tag, final SplitPane actor,
        final String rawAttributeData) {
    actor.setSplitAmount(parser.parseFloat(rawAttributeData, actor));
}
 
开发者ID:czyzby,项目名称:gdx-lml,代码行数:6,代码来源:SplitAmountLmlAttribute.java


示例8: process

import com.badlogic.gdx.scenes.scene2d.ui.SplitPane; //导入依赖的package包/类
@Override
public void process(final LmlParser parser, final LmlTag tag, final SplitPane actor,
        final String rawAttributeData) {
    actor.setMaxSplitAmount(parser.parseFloat(rawAttributeData, actor));
}
 
开发者ID:czyzby,项目名称:gdx-lml,代码行数:6,代码来源:MaxSplitLmlAttribute.java


示例9: process

import com.badlogic.gdx.scenes.scene2d.ui.SplitPane; //导入依赖的package包/类
@Override
public void process(final LmlParser parser, final LmlTag tag, final SplitPane actor,
        final String rawAttributeData) {
    actor.setMinSplitAmount(parser.parseFloat(rawAttributeData, actor));
}
 
开发者ID:czyzby,项目名称:gdx-lml,代码行数:6,代码来源:MinSplitLmlAttribute.java


示例10: getNewInstanceOfActor

import com.badlogic.gdx.scenes.scene2d.ui.SplitPane; //导入依赖的package包/类
@Override
protected Actor getNewInstanceOfActor(final LmlActorBuilder builder) {
    final AlignedLmlActorBuilder alignedBuilder = (AlignedLmlActorBuilder) builder;
    return new SplitPane(null, null, alignedBuilder.isVertical(), getSkin(builder), alignedBuilder.getStyleName());
}
 
开发者ID:czyzby,项目名称:gdx-lml,代码行数:6,代码来源:SplitPaneLmlTag.java


示例11: getSplitPane

import com.badlogic.gdx.scenes.scene2d.ui.SplitPane; //导入依赖的package包/类
/** @return casted widget. */
protected SplitPane getSplitPane() {
    return (SplitPane) getActor();
}
 
开发者ID:czyzby,项目名称:gdx-lml,代码行数:5,代码来源:SplitPaneLmlTag.java


示例12: read

import com.badlogic.gdx.scenes.scene2d.ui.SplitPane; //导入依赖的package包/类
@Override
public Group read(Json json, JsonValue jv, Class arg2) {
	SplitPane label = new SplitPane(null, null, false, Asset.skin);
	readGroup(jv, label);
	return label;
}
 
开发者ID:pyros2097,项目名称:GdxStudio,代码行数:7,代码来源:Serializer.java


示例13: CategoryStatsScreen

import com.badlogic.gdx.scenes.scene2d.ui.SplitPane; //导入依赖的package包/类
public CategoryStatsScreen(MissingWords missingWords) {
	super(missingWords);
	
	font = new BitmapFont(Gdx.files.internal("fonts/title.fnt"), Gdx.files.internal("fonts/title.png"), false);	
	fontList = new BitmapFont(Gdx.files.internal("fonts/listFont.fnt"), Gdx.files.internal("fonts/listFont.png"), false);
	
	/* Creamos el fondo de pantalla */
	background = new Background(MissingWords.myManager.get("background.png", Texture.class));
	stage.addActor(background);
	
	/* Creamos el bot�n de vuelta atr�s */
	backButton = new BackButton();
	backButton.addListener(new BackButtonListener(missingWords));
	
	/* Creamos la tabla que ocupar� todo el stage (pantalla) */
	stageTable = new Table();
	stageTable.setFillParent(true);
	
	/* Creamos la etiqueta de la categor�a */
	title = new Label(null, new LabelStyle(font, font.getColor()));
	
	/* Creamos el progreso de la categor�a */
	progress = new Label(null, new LabelStyle(font, font.getColor()));
	
	/* Creamos la lista de palabras de la categor�a */
	list = new List<String>(new ListStyle(
			fontList, 
			fontList.getColor(), 
			fontList.getColor(), 
			new TextureRegionDrawable(
				new TextureRegion(MissingWords.myManager.get("selection.png", Texture.class)))));
	
	/* Creamos el scroll para la lista de palabras */
	ScrollPane scroll = new ScrollPane(list, new ScrollPaneStyle(new TextureRegionDrawable(
			new TextureRegion(MissingWords.myManager.get("background.png", Texture.class))), 
				null, 
				null, 
				new TextureRegionDrawable(
					new TextureRegion(MissingWords.myManager.get("verticalScroll.png", Texture.class))), 
				new TextureRegionDrawable(
					new TextureRegion(MissingWords.myManager.get("squareBlue.png", Texture.class)))));
	
	/* Creamos la tabla izquierda del SplitPane */
	left = new Table();
	left.add(title).expand();
	left.row();
	left.add(progress).expand();
	left.row();
	left.add(backButton).align(Align.left).pad(10);
	
	/* Creamos la tabla derecha del SplitPane */
	right = new Table();
	right.add(scroll).fill().expand();
	
	/* Creamos el SplitPane */
	SplitPane split = new SplitPane(left, right, false, new SplitPaneStyle(
			new TextureRegionDrawable(
					new TextureRegion(MissingWords.myManager.get("split.png", Texture.class)))));
	
	stageTable.add(split).fill().expand(); // A�adimos el SplitPane a la stageTable
	
	stage.addActor(stageTable); // A�adimos la stageTable al stage
}
 
开发者ID:adrianoubk,项目名称:Missing_Words,代码行数:64,代码来源:CategoryStatsScreen.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java DualListModel类代码示例发布时间:2022-05-21
下一篇:
Java ApplicationInstanceInfo类代码示例发布时间:2022-05-21
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap