當前位置: 首頁>>代碼示例>>Java>>正文


Java ScrollPane.setScrollBarPositions方法代碼示例

本文整理匯總了Java中com.badlogic.gdx.scenes.scene2d.ui.ScrollPane.setScrollBarPositions方法的典型用法代碼示例。如果您正苦於以下問題:Java ScrollPane.setScrollBarPositions方法的具體用法?Java ScrollPane.setScrollBarPositions怎麽用?Java ScrollPane.setScrollBarPositions使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在com.badlogic.gdx.scenes.scene2d.ui.ScrollPane的用法示例。


在下文中一共展示了ScrollPane.setScrollBarPositions方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: DirectionalLightsForm

import com.badlogic.gdx.scenes.scene2d.ui.ScrollPane; //導入方法依賴的package包/類
public DirectionalLightsForm(Skin skin, ReloadSceneListener reloadSceneListener) {
	setSkin(skin);
	addButton = new TextButton("add new light", skin);
	listener = reloadSceneListener;
	add(addButton);
	row();

	content = new Table();
	content.setBackground(DevelopmentWindow.INNER_BACKGROUND);
	content.pad(5);
	ScrollPane pane = new ScrollPane(content);
	pane.setScrollingDisabled(true, false);
	pane.setScrollBarPositions(false, true);
	pane.setScrollbarsOnTop(true);

	add(pane).height(300);
	row();

}
 
開發者ID:aphex-,項目名稱:Alien-Ark,代碼行數:20,代碼來源:DirectionalLightsForm.java

示例2: process

import com.badlogic.gdx.scenes.scene2d.ui.ScrollPane; //導入方法依賴的package包/類
@Override
public void process(final LmlParser parser, final LmlTag tag, final ScrollPane actor,
        final String rawAttributeData) {
    final String[] setup = parser.parseArray(rawAttributeData, actor);
    if (setup.length != 2) { // Alpha, delay.
        parser.throwErrorIfStrict(
                "Scroll bar positions setup needs an array with exactly 2 elements (in that order): bar on bottom, bar on right. See ScrollPane#setScrollBarPositions(boolean, boolean).");
        return;
    }
    final boolean bottom = parser.parseBoolean(rawAttributeData, actor);
    final boolean right = parser.parseBoolean(rawAttributeData, actor);
    actor.setScrollBarPositions(bottom, right);
}
 
開發者ID:czyzby,項目名稱:gdx-lml,代碼行數:14,代碼來源:ScrollBarsPositionsLmlAttribute.java

示例3: 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

示例4: DialogUI

import com.badlogic.gdx.scenes.scene2d.ui.ScrollPane; //導入方法依賴的package包/類
public DialogUI(HUDScreen parent) {
        super("對話", Assets.instance.STATUSUI_SKIN, "solidbackground");
        hudScreen = parent;
        json = new Json();
        graph = new ConversationGraph();

        //create
        talkText = new Label("", Assets.instance.STATUSUI_SKIN);
        talkText.setWrap(true);
        talkText.setAlignment(Align.left);
        items = new List<ConversationChoice>(Assets.instance.STATUSUI_SKIN);

        closeButton = new TextButton("X", Assets.instance.STATUSUI_SKIN);

        ScrollPane scrollPane = new ScrollPane(items);
        scrollPane.setOverscroll(false, false);
        scrollPane.setFadeScrollBars(false);
        scrollPane.setScrollingDisabled(true, false);
        scrollPane.setForceScroll(true, false);
        scrollPane.setScrollBarPositions(false, true);

        //layout
        this.add();
        this.add(closeButton);
        this.row();

        this.defaults().expand().fill();
        this.add(talkText).pad(10, 10, 10, 10);
        this.row();
        this.add(scrollPane).pad(10,10,10,10);

        //this.debug();
        this.pack();

        //Listeners
        items.addListener(new ClickListener() {
            @Override
            public void clicked (InputEvent event, float x, float y) {
                ConversationChoice choice = (ConversationChoice)items.getSelected();
                if( choice == null ) return;
                //TODO: pickup,sleep event etc
//                graph.notify(graph, choice.getConversationCommandEvent());
                hudScreen.executeCommandEvent(graph, choice.getConversationCommandEvent());
                populateConversationDialog(choice.getDestinationId());
            }
        });
    }
 
開發者ID:Mignet,項目名稱:Inspiration,代碼行數:48,代碼來源:DialogUI.java

示例5: 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

示例6: 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

示例7: 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.setScrollBarPositions方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。