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


Java ScrollPane.setFadeScrollBars方法代碼示例

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


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

示例1: addPreviewProperties

import com.badlogic.gdx.scenes.scene2d.ui.ScrollPane; //導入方法依賴的package包/類
private void addPreviewProperties(Table bottom, InputListener scrollPaneListener) {
    Label label = new Label("Preview Properties", getSkin(), "title");
    bottom.add(label);

    bottom.row();
    previewPropertiesTable = new Table();
    previewPropertiesTable.defaults().pad(5.0f);

    ScrollPane scrollPane = new ScrollPane(previewPropertiesTable, getSkin());
    scrollPane.setFadeScrollBars(false);
    scrollPane.setFlickScroll(false);
    scrollPane.addListener(scrollPaneListener);
    bottom.add(scrollPane).grow().padTop(10.0f).padBottom(10.0f);
    
    refreshPreviewProperties();
}
 
開發者ID:raeleus,項目名稱:skin-composer,代碼行數:17,代碼來源:RootTable.java

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

示例3: PlacedArtifactTable

import com.badlogic.gdx.scenes.scene2d.ui.ScrollPane; //導入方法依賴的package包/類
public PlacedArtifactTable() {
	setBackground(Styles.NINE_PATCH_POPUP_BG_01);

	selectBox = new SelectBox<ArtifactDefinitions.ConcreteArtifactType>(Styles.UI_SKIN);
	selectBox.setItems(ArtifactDefinitions.ConcreteArtifactType.values());
	add(selectBox);

	addButton = new TextButton("add artifact", Styles.UI_SKIN);
	add(addButton);
	row();

	artifactContent = new Table();
	scrollPane = new ScrollPane(artifactContent);
	scrollPane.setFadeScrollBars(false);
	add(scrollPane).colspan(2).height(200);

	pack();
}
 
開發者ID:aphex-,項目名稱:Alien-Ark,代碼行數:19,代碼來源:PlacedArtifactTable.java

示例4: addListWindow

import com.badlogic.gdx.scenes.scene2d.ui.ScrollPane; //導入方法依賴的package包/類
protected CollapsableWindow addListWindow (String title, List list, float x, float y) {
	CollapsableWindow window = new CollapsableWindow(title, skin);
	window.row();
	ScrollPane pane = new ScrollPane(list, skin);
	pane.setFadeScrollBars(false);
	window.add(pane);
	window.pack();
	window.pack();
	if (window.getHeight() > hudHeight) {
		window.setHeight(hudHeight);
	}
	window.setX(x < 0 ? hudWidth - (window.getWidth() - (x + 1)) : x);
	window.setY(y < 0 ? hudHeight - (window.getHeight() - (y + 1)) : y);
	window.layout();
	window.collapse();
	hud.addActor(window);
	pane.setScrollX(0);
	pane.setScrollY(0);
	return window;
}
 
開發者ID:basherone,項目名稱:libgdxcn,代碼行數:21,代碼來源:BaseG3dHudTest.java

示例5: InteractionsDialog

import com.badlogic.gdx.scenes.scene2d.ui.ScrollPane; //導入方法依賴的package包/類
public InteractionsDialog(String title, Skin skin) {
	super(title, skin);
	
	center();
	setMovable(false);
	setResizable(false);
	setModal(true);
	pad(20);
	padTop(30);
	
	table = new Table(skin);
	ScrollPane scroll = new ScrollPane(table, skin, "window");
	TextButton acceptButton = new TextButton("OK", skin);
	Game game = AppMain.user.getGame();
	users = new Array<String>(game.getUsers());
	users.removeValue(AppMain.user.getUserName(), false);
	
	scroll.setFadeScrollBars(false);
	
	getButtonTable().defaults().width(175).height(100);
	getContentTable().padTop(20);
	getContentTable().padBottom(5);
	getContentTable().add(scroll).width(600).height(350);
	button(acceptButton);
}
 
開發者ID:javosuher,項目名稱:Terminkalender,代碼行數:26,代碼來源:InteractionsDialog.java

示例6: addBehaviorSelectionWindow

import com.badlogic.gdx.scenes.scene2d.ui.ScrollPane; //導入方法依賴的package包/類
protected CollapsableWindow addBehaviorSelectionWindow (String title, List<String> testList, float x, float y) {

		CollapsableWindow window = new CollapsableWindow(title, skin);
		window.row();

		ScrollPane pane = new ScrollPane(testList, skin);
		pane.setFadeScrollBars(false);
		pane.setScrollX(0);
		pane.setScrollY(0);

		window.add(pane);
		window.pack();
		window.pack();
		if (window.getHeight() > stage.getHeight()) {
			window.setHeight(stage.getHeight());
		}
		window.setX(x < 0 ? stage.getWidth() - (window.getWidth() - (x + 1)) : x);
		window.setY(y < 0 ? stage.getHeight() - (window.getHeight() - (y + 1)) : y);
		window.layout();
		window.collapse();
		stage.addActor(window);

		return window;
	}
 
開發者ID:libgdx,項目名稱:gdx-ai,代碼行數:25,代碼來源:PathFinderTests.java

示例7: addTestSelectionWindow

import com.badlogic.gdx.scenes.scene2d.ui.ScrollPane; //導入方法依賴的package包/類
protected CollapsableWindow addTestSelectionWindow (String title, List<String> testList, float x, float y) {
	CollapsableWindow window = new CollapsableWindow(title, skin);
	window.row();

	ScrollPane pane = new ScrollPane(testList, skin);
	pane.setFadeScrollBars(false);
	pane.setScrollX(0);
	pane.setScrollY(0);

	window.add(pane);
	window.pack();
	window.pack();
	if (window.getHeight() > stage.getHeight()) {
		window.setHeight(stage.getHeight());
	}
	window.setX(x < 0 ? stage.getWidth() - (window.getWidth() - (x + 1)) : x);
	window.setY(y < 0 ? stage.getHeight() - (window.getHeight() - (y + 1)) : y);
	window.layout();
	window.collapse();
	stage.addActor(window);

	return window;
}
 
開發者ID:libgdx,項目名稱:gdx-ai,代碼行數:24,代碼來源:MessageTests.java

示例8: addPreview

import com.badlogic.gdx.scenes.scene2d.ui.ScrollPane; //導入方法依賴的package包/類
private void addPreview(Table top, InputListener scrollPaneListener) {
    Label label = new Label("Preview", getSkin(), "title");
    top.add(label);

    top.row();
    previewTable = new Table(getSkin());
    previewTable.setBackground("white");
    ScrollPane scrollPane = new ScrollPane(previewTable, getSkin());
    scrollPane.setFadeScrollBars(false);
    scrollPane.setFlickScroll(false);
    scrollPane.addListener(scrollPaneListener);
    top.add(scrollPane).grow().padTop(10.0f).padBottom(10.0f);

    refreshPreview();
}
 
開發者ID:raeleus,項目名稱:skin-composer,代碼行數:16,代碼來源:RootTable.java

示例9: buildComponent

import com.badlogic.gdx.scenes.scene2d.ui.ScrollPane; //導入方法依賴的package包/類
private void buildComponent() {
	Inventory inventory = ic.getInventory();
	Table inventoryTable = new Table();
	ScrollPane srollPane = new ScrollPane(inventoryTable, style.scrollPaneStyle);
	srollPane.setFadeScrollBars(false);
	srollPane.setOverscroll(false, false);
	int slotCounter = 0;
	
	int numberOfAllRows = (int) (50f*(10f / style.cols));
	
	for (int i = 0; i < numberOfAllRows; ++i) {
		for (int j = 0; j < style.cols; ++j, ++slotCounter) {
			InventoryItemButton button = new InventoryItemButton(
					style.inventorySlotStyle,
					slotCounter,
					inventory,
					CoreUtil.equals(inventory.getParentContainer(), merchant) ? BagType.MERCHANT : BagType.BACKPACK,
					merchant);
			button.addListener(listener);
			inventoryTable.add(button).width(style.inventorySlotWidth).height(style.inventorySlotHeight).space(style.inventorySlotSpacing);
		}
		inventoryTable.row();
	}
	
	if (label != null) {
		add(new Label(" "+label+":", style.headingStyle)).prefWidth(style.cols*(style.inventorySlotWidth+style.inventorySlotSpacing)).fill();
		add(new Label("", style.borderStyle)).prefWidth(style.borderWidth).fill();
	}
	row();
	
	add(srollPane).prefHeight(style.rows*(style.inventorySlotHeight+style.inventorySlotSpacing)).prefWidth(style.cols*(style.inventorySlotWidth+style.inventorySlotSpacing)+style.borderWidth).colspan(2);
	row();
}
 
開發者ID:mganzarcik,項目名稱:fabulae,代碼行數:34,代碼來源:InventoryComponent.java

示例10: SpellsComponent

import com.badlogic.gdx.scenes.scene2d.ui.ScrollPane; //導入方法依賴的package包/類
public SpellsComponent(GameCharacter character, PerksComponentStyle style, EventListener listener) {
	super();
	spellButtons = new Array<SpellButton>();
	this.character = character;
	
	Table spellsTable = new Table();
	ScrollPane backScrollPane = new ScrollPane(spellsTable, style.scrollPaneStyle);
	backScrollPane.setFadeScrollBars(false);		
	backScrollPane.setOverscroll(false, false);
	
	Array<Spell> spells = character.getSpells();
	
	spells.sort(new Comparator<Spell>() {
		@Override
		public int compare(Spell o1, Spell o2) {
			int result = Integer.compare(o1.getLevelRequirement(), o2.getLevelRequirement());
			if (result == 0) {
				result = Integer.compare(o1.getRank(), o2.getRank());
			}
			return result;
		}
	});
	
	int i = 0;
	for (Spell s : spells) {
		if (i == style.itemsPerRow) {
			spellsTable.row();
			i = 0;
		}
		SpellButton spellButton = new SpellButton(character, s, style.perkButtonStyle);
		spellButton.addListener(listener);
		spellButtons.add(spellButton);
		spellsTable.add(spellButton).space(5).top().left();
		++i;
	}
	
	add(backScrollPane).fill().expand().top().width(backScrollPane.getPrefWidth());
	recomputeSpells();
}
 
開發者ID:mganzarcik,項目名稱:fabulae,代碼行數:40,代碼來源:SpellsComponent.java

示例11: create

import com.badlogic.gdx.scenes.scene2d.ui.ScrollPane; //導入方法依賴的package包/類
public void create() {
  HashSet<Procedure0> _newHashSet = CollectionLiterals.<Procedure0>newHashSet();
  this.updateProcedures = _newHashSet;
  Table _table = new Table();
  this.table = _table;
  this.table.setFillParent(false);
  Skin _skin = this.widgets.getSkin();
  final ScrollPane scrollpane = new ScrollPane(this.table, _skin);
  scrollpane.setSize(Layout.OPTION_SIZE.x, Layout.OPTION_SIZE.y);
  scrollpane.setPosition(Layout.OPTION_SCROLL.x, Layout.OPTION_SCROLL.y);
  scrollpane.setCancelTouchFocus(false);
  scrollpane.setFadeScrollBars(false);
  this.stage.addActor(scrollpane);
}
 
開發者ID:CymricNPG,項目名稱:abattle,代碼行數:15,代碼來源:OptionTable.java

示例12: PlacedRaceWayPointTable

import com.badlogic.gdx.scenes.scene2d.ui.ScrollPane; //導入方法依賴的package包/類
public PlacedRaceWayPointTable() {
	setBackground(Styles.NINE_PATCH_POPUP_BG_01);

	addButton = new TextButton("add", Styles.UI_SKIN);
	add(addButton);
	row();

	content = new Table();
	scrollPane = new ScrollPane(content);
	scrollPane.setFadeScrollBars(false);
	add(scrollPane).height(200);

	pack();
}
 
開發者ID:aphex-,項目名稱:Alien-Ark,代碼行數:15,代碼來源:PlacedRaceWayPointTable.java

示例13: mainValues

import com.badlogic.gdx.scenes.scene2d.ui.ScrollPane; //導入方法依賴的package包/類
private void mainValues(ScrollPane scrollTable) {
	getTitleTable().padTop(35);
	setMovable(false);
	
	add(scrollTable).expand().fill().padTop(50);
	scrollTable.setFadeScrollBars(false);
}
 
開發者ID:javosuher,項目名稱:Terminkalender,代碼行數:8,代碼來源:ScrollWindow.java

示例14: ScrollList

import com.badlogic.gdx.scenes.scene2d.ui.ScrollPane; //導入方法依賴的package包/類
public ScrollList (ListStyle liststyle,ScrollPaneStyle scrollpanestyle ) {
	super();
	list = new List (new String[]{""},liststyle);
	scrollpane = new ScrollPane (list,scrollpanestyle);
	scrollpane.setFadeScrollBars(false);
	addActor(scrollpane);
}
 
開發者ID:s76,項目名稱:zesp2013,代碼行數:8,代碼來源:ScrollList.java

示例15: RoomChatPanel

import com.badlogic.gdx.scenes.scene2d.ui.ScrollPane; //導入方法依賴的package包/類
public RoomChatPanel (float w, float h) {
	super();
	
	content = new StringBuilder();
	chatprint= new Label(content,Resources._skin);
	
	inputfield = new TextField("",Resources._skin);
	inputfield.setWidth(w);
	inputfield.setMaxLength(max_char_per_mess);
	inputfield.setMessageText("Enter to send ...");
	inputfield.addListener(new InputListener() {
		RoomChat__ chat = new RoomChat__();
		public boolean keyTyped(InputEvent event, char character) {
			if ( character == 13) {
				chat.content = inputfield.getText().getBytes();
				Resources._nclient.sendRoomChat(chat);
				inputfield.setText("");
			}
			return false;
		};
	} );
	
	scrpane = new ScrollPane(chatprint, Resources._skin);
	scrpane.setSize(w,h-inputfield.getHeight()-1);
	scrpane.setFadeScrollBars(false);
	scrpane.setPosition(0,inputfield.getHeight()+1);

	addActor(scrpane);
	addActor(inputfield);
	
	
	this.h = h;
	this.w = w;
}
 
開發者ID:s76,項目名稱:zesp2013,代碼行數:35,代碼來源:RoomChatPanel.java


注:本文中的com.badlogic.gdx.scenes.scene2d.ui.ScrollPane.setFadeScrollBars方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。