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


Java ScrollPane.setFillParent方法代码示例

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


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

示例1: Addtogroup

import com.badlogic.gdx.scenes.scene2d.ui.ScrollPane; //导入方法依赖的package包/类
public void Addtogroup(){
    grchatfaction = new VerticalGroup();
    SimpleDateFormat sdf = new SimpleDateFormat("yyyy/MM/dd/HH:mm:ss");
    try {
        grchatfaction.addActor(addComment(sdf.parse("2016/5/17/13:34:23"),"adrian", Color.BLUE,"Welcome Chat!"));
        grchatfaction.addActor(addComment(sdf.parse("2016/5/17/13:34:23"),"adrian", Color.BLUE,"Faction!"));
        grchatfaction.addActor(labelTest1);
    } catch (ParseException e) {
        e.printStackTrace();
        Gdx.app.log("eroare","intra");
    }
    sp = new ScrollPane(grchatfaction);
    sp.layout();
    sp.setScrollingDisabled(true, false);
    sp.setFillParent(true);sp.setLayoutEnabled(true);
    ta = new Table();
    ta.setFillParent(false);
    ta.add(sp).fill().expand();
    ta.setBounds(WIDTH *0.05f,background1.getY(), WIDTH*0.9f,background1.getHeight() * 1.05f);
    ta.setVisible(false);
    groupbotttom.addActor(ta);
    sp.setScrollPercentY(200);
    sp.act(Gdx.graphics.getDeltaTime());
    sp.updateVisualScroll();
}
 
开发者ID:TudorRosca,项目名称:enklave,代码行数:26,代码来源:ScreenChat.java

示例2: addchatlocation

import com.badlogic.gdx.scenes.scene2d.ui.ScrollPane; //导入方法依赖的package包/类
public void addchatlocation(){
    grchatlocation = new VerticalGroup();
    SimpleDateFormat sdf = new SimpleDateFormat("yyyy/MM/dd/HH:mm:ss");
    try {
        grchatlocation.addActor(addComment(sdf.parse("2016/5/17/13:34:23"),"adrian", Color.RED,"Welcome Chat!"));
        grchatlocation.addActor(addComment(sdf.parse("2016/5/17/13:34:23"),"adrian", Color.GREEN,"Location!"));
        grchatlocation.addActor(labelTest);
    } catch (ParseException e) {
        e.printStackTrace();
        Gdx.app.log("eroare","intra");
    }
    scrollchatpublic = new ScrollPane(grchatlocation);
    scrollchatpublic.layout();
    scrollchatpublic.setScrollingDisabled(true, false);
    scrollchatpublic.setFillParent(true);
    scrollchatpublic.setLayoutEnabled(true);
    tablechatpublic = new Table();
    tablechatpublic.setFillParent(false);
    tablechatpublic.add(scrollchatpublic).fill().expand();
    tablechatpublic.setBounds(WIDTH *0.05f,background1.getY(), WIDTH*0.9f,background1.getHeight() * 1.05f);
    groupbotttom.addActor(tablechatpublic);
    scrollchatpublic.setScrollPercentY(100);
    scrollchatpublic.act(Gdx.graphics.getDeltaTime());
    scrollchatpublic.updateVisualScroll();
}
 
开发者ID:TudorRosca,项目名称:enklave,代码行数:26,代码来源:ScreenChat.java

示例3: LibGdxCliOutputBuffer

import com.badlogic.gdx.scenes.scene2d.ui.ScrollPane; //导入方法依赖的package包/类
/**
 * @param skin Skin to use for the lines.
 *             Must contain a {@link LabelStyle} called 'outputEntry' that will be used to style the lines.
 * @param maxBufferEntries Maximum amount of lines to store.
 */
public LibGdxCliOutputBuffer(Skin skin, int maxBufferEntries) {
    this.skin = Objects.requireNonNull(skin, "skin");
    this.maxBufferEntries = maxBufferEntries;

    // Create a buffer to hold out text labels.
    this.buffer = new Table();
    buffer.setName("outputBuffer");
    buffer.bottom().left();

    // Wrap the buffer in a scrollpane.
    scrollPane = new ScrollPane(buffer);
    scrollPane.setName("outputBufferScrollPane");
    scrollPane.setScrollingDisabled(true, false);
    scrollPane.setupOverscroll(0, 0, 0);
    scrollPane.setFillParent(true);
    updateScroll();

    // Buffer history.
    this.bufferEntries = new LinkedList<>();

    add(scrollPane);
}
 
开发者ID:ykrasik,项目名称:jaci,代码行数:28,代码来源:LibGdxCliOutputBuffer.java

示例4: GUIList

import com.badlogic.gdx.scenes.scene2d.ui.ScrollPane; //导入方法依赖的package包/类
public GUIList()
{
    this.name = "GenericGUIList";
    this.window = new Window(this.name,
            GameManager.getSkin(GameManager.selectedSkin), "window");
    this.window.setName(name);
    this.window.setPosition(0 / (float)Vars.getDouble("balancedScreenWidth"),
            0 / (float)Vars.getDouble("balancedScreenHeight"));
    this.window.setHeight(0 / (float)Vars.getDouble("balancedScreenHeight"));
    this.window.setWidth(0 / (float)Vars.getDouble("balancedScreenWidth"));
    window.defaults().padLeft(0);
    window.defaults().padRight(0);
    window.defaults().padTop(0);
    window.defaults().padBottom(0);
    window.defaults().minWidth(100 / (float)Vars.getDouble("balancedScreenWidth"));
    window.defaults().minHeight(30 / (float)Vars.getDouble("balancedScreenHeight"));

    table = new Table();
    table.defaults().padLeft(0);
    table.defaults().padRight(0);
    table.defaults().padTop(0);
    table.defaults().padBottom(0);
    table.setFillParent(true);
    table.setWidth(100);
    table.setHeight(30);
    table.left();
    table.bottom();

    scroll = new ScrollPane(table);
    scroll.setScrollBarPositions(false, true);
    scroll.setScrollingDisabled(true, true);
    scroll.setScrollbarsOnTop(true);
    scroll.setFadeScrollBars(false);
    scroll.setFillParent(true);
    scroll.setSmoothScrolling(false);
    scroll.setWidth(90);
    scroll.setHeight(30);

    window.add(scroll).fill();
}
 
开发者ID:MosaicOwl,项目名称:the-erder,代码行数:41,代码来源:GUIList.java

示例5: create

import com.badlogic.gdx.scenes.scene2d.ui.ScrollPane; //导入方法依赖的package包/类
@Override
public void create() {
	
	Pd.audio.create(new PdConfiguration());
	
	skin = new Skin(Gdx.files.classpath("skins/uiskin.json"));
	
	stage = new Stage(new ScreenViewport());
	
	table = new Table(skin);
	
	buildUI();
	
	ScrollPane scroll = new ScrollPane(table, skin);
	scroll.setFillParent(true);
	stage.addActor(scroll);
	
	Gdx.input.setInputProcessor(stage);
}
 
开发者ID:mgsx-dev,项目名称:gdx-pd,代码行数:20,代码来源:PdAudioRemoteTest.java

示例6: GUIContainer

import com.badlogic.gdx.scenes.scene2d.ui.ScrollPane; //导入方法依赖的package包/类
public GUIContainer(String n, Window w, ContainerType type,
        Vector2 vector2, Vector2 vector22, int j, int i, int k, int l)
{
    this.name = n;
    this.type = type;
    modal = w;
    this.modal.setPosition(vector2.x / (float)Vars.getDouble("balancedScreenWidth"),
            vector2.y / (float)Vars.getDouble("balancedScreenHeight"));
    this.modal.setHeight(vector22.y / (float)Vars.getDouble("balancedScreenHeight"));
    this.modal.setWidth(vector22.x / (float)Vars.getDouble("balancedScreenWidth"));
    modal.defaults().padLeft(i);
    modal.defaults().padRight(j);
    modal.defaults().padTop(k);
    modal.defaults().padBottom(l);
    modal.defaults().minWidth(100);
    modal.defaults().minHeight(30);
    modal.setMovable(true);

    table = new Table();
    table.defaults().padLeft(i);
    table.defaults().padRight(j);
    table.defaults().padTop(k);
    table.defaults().padBottom(l);
    table.setFillParent(true);
    table.setWidth(vector22.x - i - j);
    table.setHeight(vector22.y - k - l);
    table.left();
    table.bottom();

    scroll = new ScrollPane(table);
    scroll.setScrollBarPositions(false, true);
    scroll.setScrollingDisabled(true, false);
    scroll.setScrollbarsOnTop(true);
    scroll.setFadeScrollBars(false);
    scroll.setFillParent(true);
    scroll.setSmoothScrolling(false);
    scroll.setWidth(vector22.x - 10);
    scroll.setHeight(vector22.y - 10);

    modal.add(table).fill();
}
 
开发者ID:MosaicOwl,项目名称:the-erder,代码行数:42,代码来源:GUIContainer.java

示例7: GUIServerList

import com.badlogic.gdx.scenes.scene2d.ui.ScrollPane; //导入方法依赖的package包/类
public GUIServerList()
{
    this.window = new Window("servers_list",
            GameManager.getSkin(GameManager.selectedSkin), "window");
    this.window.setHeight(500 / (float)Vars.getDouble("balancedScreenHeight"));
    this.window.setWidth(500 / (float)Vars.getDouble("balancedScreenWidth"));
    window.defaults().padLeft(10);
    window.defaults().padRight(10);
    window.defaults().padTop(10);
    window.defaults().padBottom(10);
    window.defaults().prefWidth(500 / (float)Vars.getDouble("balancedScreenWidth"));
    window.defaults()
            .prefHeight(500 / (float)Vars.getDouble("balancedScreenHeight"));

    table = new Table();
    table.defaults().padLeft(10);
    table.defaults().padRight(10);
    table.defaults().padTop(10);
    table.defaults().padBottom(10);
    table.setFillParent(true);
    table.setWidth(480);
    table.setHeight(480);
    table.left();
    table.bottom();

    scroll = new ScrollPane(table);
    scroll.setScrollBarPositions(false, true);
    scroll.setScrollingDisabled(true, true);
    scroll.setScrollbarsOnTop(true);
    scroll.setFadeScrollBars(false);
    scroll.setFillParent(true);
    scroll.setSmoothScrolling(false);
    scroll.setWidth(480);
    scroll.setHeight(480);

    window.add(scroll).fill();
    window.setTitle("Pick a server");
    mainTable = new Table();
    mainTable.setFillParent(true);
    mainTable.add(window);
}
 
开发者ID:MosaicOwl,项目名称:the-erder,代码行数:42,代码来源:GUIServerList.java

示例8: GUIChatWindow

import com.badlogic.gdx.scenes.scene2d.ui.ScrollPane; //导入方法依赖的package包/类
public GUIChatWindow(String n, Window w, Vector2 vector2, Vector2 vector22,
        int i, int j, int k, int l)
{
    this.name = n;
    this.window = w;
    this.window.setName(n);
    this.window.setPosition(vector2.x / (float)Vars.getDouble("balancedScreenWidth"),
            vector2.y / (float)Vars.getDouble("balancedScreenHeight"));
    this.window.setHeight(vector22.y / (float)Vars.getDouble("balancedScreenHeight"));
    this.window.setWidth(vector22.x / (float)Vars.getDouble("balancedScreenWidth"));
    window.defaults().padLeft(i);
    window.defaults().padRight(j);
    window.defaults().padTop(k);
    window.defaults().padBottom(l);
    window.defaults().prefWidth(
            vector22.x / (float)Vars.getDouble("balancedScreenWidth"));
    window.defaults().prefHeight(
            vector22.y / (float)Vars.getDouble("balancedScreenHeight"));

    table = new Table();
    table.defaults().padLeft(i);
    table.defaults().padRight(j);
    table.defaults().padTop(k);
    table.defaults().padBottom(l);
    table.setFillParent(true);
    table.setWidth(vector22.x - i - j);
    table.setHeight(vector22.y - k - l);
    table.left();
    table.bottom();

    scroll = new ScrollPane(table);
    scroll.setScrollBarPositions(false, true);
    scroll.setScrollingDisabled(true, true);
    scroll.setScrollbarsOnTop(true);
    scroll.setFadeScrollBars(false);
    scroll.setFillParent(true);
    scroll.setSmoothScrolling(false);
    scroll.setWidth(vector22.x - 10);
    scroll.setHeight(vector22.y - 20);

    window.add(scroll).fill();
}
 
开发者ID:MosaicOwl,项目名称:the-erder,代码行数:43,代码来源:GUIChatWindow.java


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