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


Java ScrollPane.setScrollbarsOnTop方法代码示例

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


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

示例1: ConsoleView

import com.badlogic.gdx.scenes.scene2d.ui.ScrollPane; //导入方法依赖的package包/类
public ConsoleView(Skin skin) {
	this.skin = skin;
	entriesStack = new Table(skin);
	entriesStack.setFillParent(true);
	scrollPane = new ScrollPane(entriesStack, skin);
	scrollPane.setFadeScrollBars(false);
	scrollPane.setScrollbarsOnTop(false);
	scrollPane.setOverscroll(false, false);

	inputField = new TextField("", skin);

	this.add(scrollPane).expand().fill().pad(2).row();
	this.add(inputField).expandX().fillX().pad(4);

	setTouchable(Touchable.enabled);

	clearEntries();
}
 
开发者ID:Namek,项目名称:TheConsole_POC,代码行数:19,代码来源:ConsoleView.java

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

示例3: setupUi

import com.badlogic.gdx.scenes.scene2d.ui.ScrollPane; //导入方法依赖的package包/类
private void setupUi () {
	// setup a tiny ui with a console and a clear button.
	skin = new Skin(Gdx.files.internal("data/uiskin.json"));
	stage = new Stage();
	ui = new Table();
	ui.setSize(Gdx.graphics.getWidth(), Gdx.graphics.getHeight());
	console = new List(skin);
	scrollPane = new ScrollPane(console);
	scrollPane.setScrollbarsOnTop(true);
	TextButton clear = new TextButton("Clear", skin);
	ui.add(scrollPane).expand(true, true).fill();
	ui.row();
	ui.add(clear).expand(true, false).fill();
	stage.addActor(ui);
	clear.addListener(new ClickListener() {
		@Override
		public void clicked (InputEvent event, float x, float y) {
			clear();
		}
	});
	Gdx.input.setInputProcessor(stage);
}
 
开发者ID:basherone,项目名称:libgdxcn,代码行数:23,代码来源:ControllersTest.java

示例4: setupUI

import com.badlogic.gdx.scenes.scene2d.ui.ScrollPane; //导入方法依赖的package包/类
@Override
protected void setupUI(final PinnableWindow window, Object... params) {
	final VerticalGroup items = new VerticalGroup();
	items.left();
	items.addAction(new Action() {
		int hashCode = 0;
		
		@Override
		public boolean act(float delta) {
			int hc = getInventory().hashCode();
			if (hc != hashCode) {
				hashCode = hc;
				
				for (int i = 0; i < Item.ITEMS; i++) {
					Item item = Item.getForId(i);
					if (item == null) continue;
					
					Actor a = items.findActor(i + "");
					if (a != null) ((NonStackingInventoryListItem) a).setAmount(getInventory().get(item));
					else items.addActor(new NonStackingInventoryListItem(window.getStage(), item, getInventory().get(item)));
				}
			}
			return false;
		}
	});
	window.row().pad(0).width(400);
	final ScrollPane itemsWrap = new ScrollPane(items, Vloxlands.skin);
	itemsWrap.setScrollbarsOnTop(false);
	itemsWrap.setFadeScrollBars(false);
	itemsWrap.setScrollingDisabled(true, false);
	itemsWrap.getStyle().background.setLeftWidth(10);
	itemsWrap.getStyle().background.setRightWidth(10);
	itemsWrap.getStyle().background.setBottomHeight(10);
	itemsWrap.getStyle().background.setTopHeight(10);
	window.add(itemsWrap).left().maxHeight(100).minHeight(100).width(220).padRight(10).padRight(0);
}
 
开发者ID:Dakror,项目名称:Vloxlands,代码行数:37,代码来源:Warehouse.java

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

示例6: applyStandardSettings

import com.badlogic.gdx.scenes.scene2d.ui.ScrollPane; //导入方法依赖的package包/类
public static void applyStandardSettings(ScrollPane pane) {
	pane.setFadeScrollBars(false);
	pane.setOverscroll(false, false);
	pane.setScrollingDisabled(true, false);
	pane.setScrollbarsOnTop(true);
}
 
开发者ID:aphex-,项目名称:Opus-Prototype,代码行数:7,代码来源:Util.java

示例7: 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) {
    actor.setScrollbarsOnTop(parser.parseBoolean(rawAttributeData, actor));
}
 
开发者ID:czyzby,项目名称:gdx-lml,代码行数:6,代码来源:ScrollBarsOnTopLmlAttribute.java

示例8: setUI

import com.badlogic.gdx.scenes.scene2d.ui.ScrollPane; //导入方法依赖的package包/类
@Override
public void setUI(final PinnableWindow window, Object... params) {
	window.row().pad(0).colspan(50).padRight(-10).fillX();
	final List<Job> jobs = new List<Job>(Vloxlands.skin);
	jobs.setItems(new IdleJob(this));
	jobs.addAction(new Action() {
		@Override
		public boolean act(float delta) {
			if (jobQueue.size == 0 && jobs.getItems().get(0) instanceof IdleJob) return false;
			
			if (!jobQueue.equals(jobs.getItems())) {
				if (jobQueue.size > 0) jobs.setItems(jobQueue);
				else jobs.setItems(new IdleJob(Human.this));
				
				jobs.getSelection().setDisabled(true);
				jobs.setSelectedIndex(-1);
				window.pack();
			}
			
			return false;
		}
	});
	jobs.getSelection().setDisabled(true);
	jobs.setSelectedIndex(-1);
	jobs.getStyle().selection.setLeftWidth(10);
	jobs.getStyle().selection.setTopHeight(3);
	final ScrollPane jobsWrap = new ScrollPane(jobs, Vloxlands.skin);
	jobsWrap.setVisible(false);
	jobsWrap.setScrollbarsOnTop(false);
	jobsWrap.setFadeScrollBars(false);
	final Cell<?> cell = window.add(jobsWrap).height(0);
	
	window.row();
	ItemSlot tool = new ItemSlot(window.getStage(), this.tool);
	window.left().add(tool).spaceRight(2);
	
	ItemSlot slot = new ItemSlot(window.getStage(), carryingItemStack);
	window.add(slot).spaceRight(2);
	
	ItemSlot armor = new ItemSlot(window.getStage(), new ItemStack());
	window.add(armor).spaceRight(2);
	
	ImageButtonStyle style = new ImageButtonStyle(Vloxlands.skin.get("image_toggle", ButtonStyle.class));
	style.imageUp = Vloxlands.skin.getDrawable("queue");
	style.imageUp.setMinWidth(ItemSlot.size);
	style.imageUp.setMinHeight(ItemSlot.size);
	style.imageDown = Vloxlands.skin.getDrawable("queue");
	style.imageDown.setMinWidth(ItemSlot.size);
	style.imageDown.setMinHeight(ItemSlot.size);
	final TooltipImageButton job = new TooltipImageButton(style);
	window.getStage().addActor(job.getTooltip());
	job.setName("job");
	ClickListener cl = new ClickListener() {
		@Override
		public void clicked(InputEvent event, float x, float y) {
			cell.height(cell.getMinHeight() == 100 ? 0 : 100);
			jobsWrap.setVisible(!jobsWrap.isVisible());
			window.invalidateHierarchy();
			window.pack();
		}
	};
	job.addListener(cl);
	job.getTooltip().set("Job Queue", "Toggle Job Queue display");
	window.add(job).padRight(-10);
	
	if (params[0] == Boolean.TRUE) {
		job.setChecked(true);
		cl.clicked(null, 0, 0);
	}
}
 
开发者ID:Dakror,项目名称:Vloxlands,代码行数:71,代码来源:Human.java

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

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

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

示例12: FontPickerDialog

import com.badlogic.gdx.scenes.scene2d.ui.ScrollPane; //导入方法依赖的package包/类
/**
 * 
 */
public FontPickerDialog(final SkinEditorGame game, Field field) {

	super("Bitmap Font Picker", game.skin);

	this.game = game;
	this.field = field;

	tableFonts = new Table(game.skin);
	tableFonts.left().top().pad(5);
	tableFonts.defaults().pad(5);

	fonts = game.skinProject.getAll(BitmapFont.class);

	updateTable();

	TextButton buttonNewFont = new TextButton("New Font", game.skin);
	buttonNewFont.addListener(new ChangeListener() {

		@Override
		public void changed(ChangeEvent event, Actor actor) {

			showNewFontDialog();

		}

	});


	ScrollPane scrollPane = new ScrollPane(tableFonts, game.skin);
	scrollPane.setFlickScroll(false);
	scrollPane.setFadeScrollBars(false);
	scrollPane.setScrollbarsOnTop(true);

	getContentTable().add(scrollPane).width(720).height(420).pad(20);
	getButtonTable().add(buttonNewFont);
	getButtonTable().padBottom(15);
	button("Cancel", false);
	key(com.badlogic.gdx.Input.Keys.ESCAPE, false);

}
 
开发者ID:Longri,项目名称:cachebox3.0,代码行数:44,代码来源:FontPickerDialog.java


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