當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。