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


Java ScrollPane.setScrollingDisabled方法代码示例

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


在下文中一共展示了ScrollPane.setScrollingDisabled方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: ScrollInventoryActor

import com.badlogic.gdx.scenes.scene2d.ui.ScrollPane; //导入方法依赖的package包/类
public ScrollInventoryActor(Inventory inventory, int slots) {
	defaults().space(4f);

	add(new Label(inventory.getDisplayName(), new LabelStyle(Fonts.hud, Color.WHITE)));
	row();

	inner = new Table();
	inner.defaults().space(4f);
	for (int i = 0; i < inventory.itemStacks.length; i++) {
		SlotActor slotActor = new SlotActor(inventory, i);
		inner.add(slotActor);

		if ((i + 1) % inventory.width == 0) {
			inner.row();
		}
	}
	inner.pack();

	scrollPane = new ScrollPane(inner);
	scrollPane.setScrollingDisabled(true, false);
	add(scrollPane).height(slots * CALIBRATION_PER_ROW).fill();
	row();
	pack();
}
 
开发者ID:RedTroop,项目名称:Cubes_2,代码行数:25,代码来源:ScrollInventoryActor.java

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

示例4: ScrollInventoryActor

import com.badlogic.gdx.scenes.scene2d.ui.ScrollPane; //导入方法依赖的package包/类
public ScrollInventoryActor(Inventory inventory, int slots) {
  defaults().space(4f);

  add(new Label(inventory.getDisplayName(), new LabelStyle(Fonts.hud, Color.WHITE)));
  row();

  inner = new Table();
  inner.defaults().space(4f);
  for (int i = 0; i < inventory.itemStacks.length; i++) {
    SlotActor slotActor = new SlotActor(inventory, i);
    inner.add(slotActor);

    if ((i + 1) % inventory.width == 0) {
      inner.row();
    }
  }
  inner.pack();

  scrollPane = new ScrollPane(inner);
  scrollPane.setScrollingDisabled(true, false);
  add(scrollPane).height(slots * CALIBRATION_PER_ROW).fill();
  row();
  pack();
}
 
开发者ID:RedTroop,项目名称:Cubes,代码行数:25,代码来源:ScrollInventoryActor.java

示例5: createAlienInventory

import com.badlogic.gdx.scenes.scene2d.ui.ScrollPane; //导入方法依赖的package包/类
private void createAlienInventory() {
	alienTable = new Table();
	alienTable.setWidth(INVENTORY_WIDTH);
	alienTable.padTop(6);
	alienTable.padRight(2);
	alienTable.padLeft(2);
	alienTable.padBottom(6);
	alienTable.top().left();

	ScrollPane alienScrollPane = new ScrollPane(alienTable);
	alienScrollPane.setX(Gdx.graphics.getWidth() - INVENTORY_OFFSET_X - INVENTORY_WIDTH);

	alienScrollPane.setY(INVENTORY_Y);
	alienScrollPane.setWidth(INVENTORY_WIDTH);
	alienScrollPane.setHeight(INVENTORY_HEIGHT);
	alienScrollPane.setScrollingDisabled(true, false);

	stage.addActor(alienScrollPane);

	alienCount = new Label("0", skin);
	alienCount.setStyle(Styles.LABEL_VALUE_ARTIFACT);
	alienCount.setX(Gdx.graphics.getWidth() - 120);
	alienCount.setY(560);

	stage.addActor(alienCount);
}
 
开发者ID:aphex-,项目名称:Alien-Ark,代码行数:27,代码来源:ArkScreen.java

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

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

示例8: onCreateView

import com.badlogic.gdx.scenes.scene2d.ui.ScrollPane; //导入方法依赖的package包/类
@Override
protected void onCreateView(Skin skin) {
	this.skin = skin;
	scrollPane = new ScrollPane(null, skin) {

		@Override
		public void scrollY(float pixels) {
			super.scrollY(pixels);
			model.setRelativePosition(scrollPane.getScrollPercentY());
		}

	};

	refresh();
	scrollPane.setWidth(getWidth() - getPadLeft() - getPadRight());
	scrollPane.setHeight(getHeight() - getPadTop() - getPadBottom());
	RelativeLayout.marginLeft(
			RelativeLayout.marginBottom(scrollPane, getPadBottom()),
			getPadLeft());
	scrollPane.setScrollingDisabled(true, false);
	addActor(scrollPane);
}
 
开发者ID:halfreal,项目名称:spezi-gdx,代码行数:23,代码来源:VerticalListWidget.java

示例9: onCreateView

import com.badlogic.gdx.scenes.scene2d.ui.ScrollPane; //导入方法依赖的package包/类
@Override
protected void onCreateView(Skin skin) {
	this.skin = skin;
	scrollPane = new ScrollPane(null, skin) {
		@Override
		protected void scrollX(float pixelsX) {
			super.scrollX(pixelsX);
			model.setRelativePosition(scrollPane.getScrollPercentX());
		}
	};

	refresh();
	scrollPane.setWidth(getWidth() - getPadLeft() - getPadRight());
	scrollPane.setHeight(getHeight() - getPadTop() - getPadBottom());
	RelativeLayout.marginLeft(
			RelativeLayout.marginBottom(scrollPane, getPadBottom()),
			getPadLeft());

	scrollPane.setScrollingDisabled(false, true);
	addActor(scrollPane);
}
 
开发者ID:halfreal,项目名称:spezi-gdx,代码行数:22,代码来源:HorizontalListWidget.java

示例10: a

import com.badlogic.gdx.scenes.scene2d.ui.ScrollPane; //导入方法依赖的package包/类
public final void a(Skin paramSkin, Stage paramStage)
{
  this.k = ((Label.LabelStyle)paramSkin.get("mission-list", Label.LabelStyle.class));
  this.l = ((Label.LabelStyle)paramSkin.get("mission-list-disabled", Label.LabelStyle.class));
  this.d = ((TextButton.TextButtonStyle)paramSkin.get("mission-list", TextButton.TextButtonStyle.class));
  this.e = ((TextButton.TextButtonStyle)paramSkin.get("mission-list-completed", TextButton.TextButtonStyle.class));
  this.f = ((TextButton.TextButtonStyle)paramSkin.get("mission-list-selected", TextButton.TextButtonStyle.class));
  this.g = ((Button.ButtonStyle)paramSkin.get("default", TextButton.TextButtonStyle.class));
  this.h = ((Button.ButtonStyle)paramSkin.get("disabled", Button.ButtonStyle.class));
  this.o = paramSkin.getDrawable("nav-button-clear");
  this.b = new Table();
  this.b.setWidth(paramStage.getWidth());
  this.b.setHeight(paramStage.getHeight());
  cc.a(this.a, new aa(paramSkin, (int)paramStage.getWidth(), cc.b(this.a), com.nianticproject.ingress.common.ui.widget.ag.c));
  this.b.add(cc.c(this.a));
  this.b.row();
  this.c = new Table();
  this.c.setWidth(-10 + (int)paramStage.getWidth());
  ScrollPane localScrollPane = new ScrollPane(this.c, new ScrollPane.ScrollPaneStyle());
  localScrollPane.setScrollY(0.0F);
  localScrollPane.setScrollingDisabled(true, false);
  this.b.add(localScrollPane).g().o().p().j().a(5.0F, 5.0F, 5.0F, 5.0F);
  paramStage.addActor(this.b);
}
 
开发者ID:isnuryusuf,项目名称:ingress-indonesia-dev,代码行数:25,代码来源:cf.java

示例11: LogMenu

import com.badlogic.gdx.scenes.scene2d.ui.ScrollPane; //导入方法依赖的package包/类
public LogMenu() {
  label = new Label("", new LabelStyle(Fonts.smallHUD, Color.BLACK));
  label.setWrap(true);
  Drawable background = new TextureRegionDrawable(Assets.getTextureRegion("core:hud/LogBackground.png"));
  scrollPane = new ScrollPane(label, new ScrollPaneStyle(background, null, null, null, null));
  scrollPane.setScrollingDisabled(true, false);
  back = MenuTools.getBackButton(this);
  
  stage.addActor(scrollPane);
  stage.addActor(back);
  
  refresh();
}
 
开发者ID:RedTroop,项目名称:Cubes_2,代码行数:14,代码来源:LogMenu.java

示例12: createArtifactsInventory

import com.badlogic.gdx.scenes.scene2d.ui.ScrollPane; //导入方法依赖的package包/类
private void createArtifactsInventory() {
	artifactsTable = new Table();
	artifactsTable.setWidth(INVENTORY_WIDTH);

	artifactsTable.padTop(6);
	artifactsTable.padRight(2);
	artifactsTable.padLeft(2);
	artifactsTable.padBottom(6);
	artifactsTable.top().left();
	ScrollPane artifactsScrollPane = new ScrollPane(artifactsTable);

	artifactsScrollPane.setX(INVENTORY_OFFSET_X);
	artifactsScrollPane.setY(INVENTORY_Y);
	artifactsScrollPane.setWidth(INVENTORY_WIDTH);
	artifactsScrollPane.setHeight(INVENTORY_HEIGHT);
	artifactsScrollPane.setScrollingDisabled(true, false);

	stage.addActor(artifactsScrollPane);

	artifactCount = new Label("0", skin);
	artifactCount.setStyle(Styles.LABEL_VALUE_ARTIFACT);
	artifactCount.setX(275);
	artifactCount.setY(560);

	stage.addActor(artifactCount);

}
 
开发者ID:aphex-,项目名称:Alien-Ark,代码行数:28,代码来源:ArkScreen.java

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

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

示例15: LayerSelector

import com.badlogic.gdx.scenes.scene2d.ui.ScrollPane; //导入方法依赖的package包/类
public LayerSelector(GroupEditor groupeditor, GroupEditorStyle style) {
	super();
	this.style = style;
	this.groupEditor = groupeditor;
	scrollPane = new ScrollPane(layers = new LinearLayout(true));
	scrollPane.setScrollingDisabled(false, true);
	scrollPane.setOverscroll(false, false);
	add(scrollPane).fillX();
	setBackground(style.layersBackground);
	this.addListener(new ClickListener() {

		@Override
		public void clicked(InputEvent event, float x, float y) {
			Actor target = event.getTarget();
			if (target instanceof Layer) {
				if (!groupEditor.isMultipleSelection()) {
					for (Actor layer : layers.getChildren()) {
						if (layer != target) {
							((Layer) layer).setChecked(false);
						}
					}
				}
				groupEditor.addToSelection(((Layer) target).actor);
				groupEditor.fireSelection();
			}
		}
	});
}
 
开发者ID:e-ucm,项目名称:ead,代码行数:29,代码来源:LayerSelector.java


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