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


Java ScrollPaneStyle类代码示例

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


ScrollPaneStyle类属于com.badlogic.gdx.scenes.scene2d.ui.ScrollPane包,在下文中一共展示了ScrollPaneStyle类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: stylePropertyChanged

import com.badlogic.gdx.scenes.scene2d.ui.ScrollPane.ScrollPaneStyle; //导入依赖的package包/类
@Override
public void stylePropertyChanged(StyleProperty styleProperty,
        Actor styleActor) {
    if (styleProperty.type == Drawable.class) {
        dialogFactory.showDialogDrawables(styleProperty);
    } else if (styleProperty.type == Color.class) {
        dialogFactory.showDialogColors(styleProperty);
    } else if (styleProperty.type == BitmapFont.class) {
        dialogFactory.showDialogFonts(styleProperty);
    } else if (styleProperty.type == Float.TYPE) {
        main.getUndoableManager().addUndoable(new UndoableManager.DoubleUndoable(main, styleProperty, ((Spinner) styleActor).getValue()), false);
    } else if (styleProperty.type == ScrollPaneStyle.class) {
        main.getUndoableManager().addUndoable(new UndoableManager.SelectBoxUndoable(root, styleProperty, (SelectBox) styleActor), true);
    } else if (styleProperty.type == LabelStyle.class) {
        main.getUndoableManager().addUndoable(new UndoableManager.SelectBoxUndoable(root, styleProperty, (SelectBox) styleActor), true);
    } else if (styleProperty.type == ListStyle.class) {
        main.getUndoableManager().addUndoable(new UndoableManager.SelectBoxUndoable(root, styleProperty, (SelectBox) styleActor), true);
    }
}
 
开发者ID:raeleus,项目名称:skin-composer,代码行数:20,代码来源:MainListener.java

示例2: b

import com.badlogic.gdx.scenes.scene2d.ui.ScrollPane.ScrollPaneStyle; //导入依赖的package包/类
protected final Actor b(Skin paramSkin, Stage paramStage)
{
  Label.LabelStyle localLabelStyle = new Label.LabelStyle((Label.LabelStyle)paramSkin.get("default", Label.LabelStyle.class));
  localLabelStyle.fontColor = Color.WHITE;
  Label localLabel = new Label(this.a, localLabelStyle);
  localLabel.setWrap(true);
  localLabel.setAlignment(10);
  localLabel.setWidth(0.95F * paramStage.getWidth());
  localLabel.setHeight(0.95F * paramStage.getHeight());
  h localh = new h(localLabel, new ScrollPane.ScrollPaneStyle(), 0.0F, this.b, this.c);
  localh.setScrollY(0.0F);
  Table localTable = new Table();
  localTable.setWidth(paramStage.getWidth() - 10.0F);
  localTable.setHeight(0.3F * paramStage.getHeight());
  localTable.setX(5.0F);
  localTable.setY(5.0F);
  localTable.add(localh).a(e.a(1.0F)).b(e.b(1.0F)).a(4.0F, 4.0F, 4.0F, 4.0F).l().i();
  return localTable;
}
 
开发者ID:isnuryusuf,项目名称:ingress-indonesia-dev,代码行数:20,代码来源:v.java

示例3: b

import com.badlogic.gdx.scenes.scene2d.ui.ScrollPane.ScrollPaneStyle; //导入依赖的package包/类
protected final Table b(Skin paramSkin, float paramFloat)
{
  Label localLabel = new Label("Welcome, friend, to the struggle for a brighter age.  Recruit the like minded for the Enlightened.\n\nSeek the future.  Find a nearby Portal.  Claim it.  XM is power.  XM is evolution.  XM is all.  Spread the enlightenment.\n\n- Collect XM\n- Discover and claim new Portals\n- Link Portals to form XM Fields\n- Dismantle Resistance XM Fields\n\n", (Label.LabelStyle)paramSkin.get("jarvis-message-label", Label.LabelStyle.class));
  localLabel.setWrap(true);
  localLabel.setAlignment(10);
  localLabel.setWidth(paramFloat * 0.9F);
  localLabel.layout();
  h localh = new h(localLabel, new ScrollPane.ScrollPaneStyle(), 0.0F, bs.l.c(), 0.05F);
  localh.setScrollPercentY(0.0F);
  localh.setScrollingDisabled(true, false);
  Table localTable = new Table();
  localTable.setX(0.0F);
  localTable.setWidth(paramFloat);
  localTable.add(localh).l().k().a(e.a(0.9F)).b(e.b(0.9F)).g(15.0F).e(e.b(0.1F));
  return localTable;
}
 
开发者ID:isnuryusuf,项目名称:ingress-indonesia-dev,代码行数:17,代码来源:ba.java

示例4: b

import com.badlogic.gdx.scenes.scene2d.ui.ScrollPane.ScrollPaneStyle; //导入依赖的package包/类
protected final Table b(Skin paramSkin, float paramFloat)
{
  Label localLabel = new Label("Authentication complete.  You are now a Humanist agent.  Our struggle is only beginning.  If you know others who want to save the future, initiate them.\n\nKeep Exploring.  Find a Portal near you.  Claim it.  Save humanity.  Save yourself.  Resist corrupting thoughts.\n\n- Collect XM\n- Discover and claim new Portals\n- Link Portals to form XM Fields\n- Dismantle Enlightened XM Fields\n\n", (Label.LabelStyle)paramSkin.get("message-label", Label.LabelStyle.class));
  localLabel.setWrap(true);
  localLabel.setAlignment(10);
  localLabel.setWidth(paramFloat * 0.9F);
  localLabel.layout();
  h localh = new h(localLabel, new ScrollPane.ScrollPaneStyle(), 0.0F, bs.j.c(), 0.05F);
  localh.setScrollPercentY(0.0F);
  localh.setScrollingDisabled(true, false);
  Table localTable = new Table();
  localTable.setX(0.0F);
  localTable.setWidth(paramFloat);
  localTable.add(localh).l().k().a(e.a(0.9F)).b(e.b(0.95F)).a(10.0F, 10.0F, 10.0F, 10.0F);
  return localTable;
}
 
开发者ID:isnuryusuf,项目名称:ingress-indonesia-dev,代码行数:17,代码来源:a.java

示例5: a

import com.badlogic.gdx.scenes.scene2d.ui.ScrollPane.ScrollPaneStyle; //导入依赖的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

示例6: LogMenu

import com.badlogic.gdx.scenes.scene2d.ui.ScrollPane.ScrollPaneStyle; //导入依赖的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

示例7: addScrollPaneStyles

import com.badlogic.gdx.scenes.scene2d.ui.ScrollPane.ScrollPaneStyle; //导入依赖的package包/类
private void addScrollPaneStyles() {
    ScrollPaneStyle style = new ScrollPaneStyle();
    Drawable scroll = newDrawable("pixel", 1, 1, 1, 0.20f);
    Drawable knob = newDrawable("pixel", 1, 1, 1, 0.40f);
    scroll.setMinWidth(10);
    knob.setMinWidth(10);
    style.vScroll = style.hScroll = scroll;
    style.vScrollKnob = style.hScrollKnob = knob;
    add("default", style);
}
 
开发者ID:danirod,项目名称:rectball,代码行数:11,代码来源:RectballSkin.java

示例8: layout

import com.badlogic.gdx.scenes.scene2d.ui.ScrollPane.ScrollPaneStyle; //导入依赖的package包/类
@Override
public void layout () {
	Drawable bg = style.background;
	BitmapFont font = style.font;

	if (bg != null) {
		prefHeight = Math.max(bg.getTopHeight() + bg.getBottomHeight() + font.getCapHeight() - font.getDescent() * 2,
			bg.getMinHeight());
	} else
		prefHeight = font.getCapHeight() - font.getDescent() * 2;

	float maxItemWidth = 0;
	for (int i = 0; i < items.size; i++)
		maxItemWidth = Math.max(font.getBounds(items.get(i).toString()).width, maxItemWidth);

	prefWidth = maxItemWidth;
	if (bg != null) prefWidth += bg.getLeftWidth() + bg.getRightWidth();

	ListStyle listStyle = style.listStyle;
	ScrollPaneStyle scrollStyle = style.scrollStyle;
	prefWidth = Math.max(
		prefWidth,
		maxItemWidth
			+ (scrollStyle.background == null ? 0 : scrollStyle.background.getLeftWidth()
				+ scrollStyle.background.getRightWidth())
			+ listStyle.selection.getLeftWidth()
			+ listStyle.selection.getRightWidth()
			+ Math.max(style.scrollStyle.vScroll != null ? style.scrollStyle.vScroll.getMinWidth() : 0,
				style.scrollStyle.vScrollKnob != null ? style.scrollStyle.vScrollKnob.getMinWidth() : 0));
}
 
开发者ID:basherone,项目名称:libgdxcn,代码行数:31,代码来源:SelectBox.java

示例9: SelectBoxStyle

import com.badlogic.gdx.scenes.scene2d.ui.ScrollPane.ScrollPaneStyle; //导入依赖的package包/类
public SelectBoxStyle (BitmapFont font, Color fontColor, Drawable background, ScrollPaneStyle scrollStyle,
	ListStyle listStyle) {
	this.font = font;
	this.fontColor.set(fontColor);
	this.background = background;
	this.scrollStyle = scrollStyle;
	this.listStyle = listStyle;
}
 
开发者ID:basherone,项目名称:libgdxcn,代码行数:9,代码来源:SelectBox.java

示例10: ScrollList

import com.badlogic.gdx.scenes.scene2d.ui.ScrollPane.ScrollPaneStyle; //导入依赖的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

示例11: FilesListWidget

import com.badlogic.gdx.scenes.scene2d.ui.ScrollPane.ScrollPaneStyle; //导入依赖的package包/类
public FilesListWidget(Skin skin) {
	super(false);

	style = skin.get(FilesListWidgetStyle.class);
	folderStyle = new FileIconWidgetStyle(style.folderIcon, style.font,
			style.fontColor, style.selected, style.over);
	fileStyle = new FileIconWidgetStyle(style.fileIcon, style.font,
			style.fontColor, style.selected, style.over);

	filesContainer = new Group();

	ScrollPaneStyle scrollStyle = skin.get(ScrollPaneStyle.class);
	scrollPane = new ScrollPane(filesContainer, scrollStyle);
	scrollPane.setFlickScroll(false);
	scrollPane.setFlingTime(0);
	scrollPane.setSmoothScrolling(false);

	currentPath = new TextField("", skin);
	currentPath.addListener(new InputListener() {
		@Override
		public boolean keyDown(InputEvent event, int keycode) {
			switch (keycode) {
			case Keys.ENTER:
				String path = currentPath.getText();
				FileHandle fileHandle = Gdx.files.absolute(path);
				if (fileHandle.exists()) {
					setSelectedFile(fileHandle, true);
				}
				return true;
			}
			return false;
		}
	});

	add(currentPath).expandX();
	add(scrollPane).expand(true, true);

}
 
开发者ID:e-ucm,项目名称:ead,代码行数:39,代码来源:FilesListWidget.java

示例12: a

import com.badlogic.gdx.scenes.scene2d.ui.ScrollPane.ScrollPaneStyle; //导入依赖的package包/类
public a(com.nianticproject.ingress.shared.playerprofile.a parama, Skin paramSkin, c paramc, float paramFloat)
{
  this.a = ((com.nianticproject.ingress.shared.playerprofile.a)an.a(parama));
  this.b = ((Skin)an.a(paramSkin));
  this.c = ((c)an.a(paramc));
  this.h = l.a(32.0F);
  this.g = paramFloat;
  this.f = new Table();
  this.f.defaults().j(l.a(8.0F));
  ScrollPane.ScrollPaneStyle localScrollPaneStyle = (ScrollPane.ScrollPaneStyle)paramSkin.get("avatar-color-picker", ScrollPane.ScrollPaneStyle.class);
  ScrollPane localScrollPane = new ScrollPane(this.f, localScrollPaneStyle);
  localScrollPane.setScrollingDisabled(false, true);
  localScrollPane.setFadeScrollBars(false);
  add(localScrollPane).o().g().c(this.h + 2.0F * paramFloat);
}
 
开发者ID:isnuryusuf,项目名称:ingress-indonesia-dev,代码行数:16,代码来源:a.java

示例13: aa

import com.badlogic.gdx.scenes.scene2d.ui.ScrollPane.ScrollPaneStyle; //导入依赖的package包/类
public aa(Skin paramSkin, int paramInt, af paramaf, ag paramag)
{
  this.c = paramSkin;
  this.a = paramaf;
  this.b = paramag;
  this.e = new Table();
  this.d = new ab(this, this.e, new ScrollPane.ScrollPaneStyle());
  setWidth(paramInt);
  this.d.setWidth(paramInt);
  this.d.setScrollingDisabled(false, true);
  Table localTable1 = new Table();
  Table localTable2 = new Table();
  localTable2.setBackground(paramSkin.getDrawable("ops-title-background"));
  localTable1.add(localTable2).o().g();
  Label localLabel = new Label("OPS", paramSkin, "ops-title");
  localLabel.setAlignment(16, 16);
  localTable2.add(localLabel).o().g().m().h(e.a(0.02F));
  localTable1.row();
  Table localTable3 = new Table();
  this.f = new Table();
  this.f.setBackground(paramSkin.getDrawable("ops-scroll-indicator-left"));
  this.g = new Table();
  this.g.setBackground(paramSkin.getDrawable("ops-scroll-indicator-right"));
  localTable3.add(this.f).n().f().k().a(e.a(0.1F));
  localTable3.add(this.g).n().f().m().a(e.a(0.1F));
  Actor[] arrayOfActor = new Actor[2];
  arrayOfActor[0] = this.d;
  arrayOfActor[1] = localTable3;
  localTable1.stack(arrayOfActor);
  Table localTable4 = new Table();
  localTable4.setWidth(getWidth());
  localTable4.setHeight(getHeight());
  Button localButton = new Button(paramSkin, "ops-close");
  localButton.addListener(new ac(this));
  localTable4.add(localButton).n().k().j();
  stack(new Actor[] { localTable1, localTable4 });
}
 
开发者ID:isnuryusuf,项目名称:ingress-indonesia-dev,代码行数:38,代码来源:aa.java

示例14: h

import com.badlogic.gdx.scenes.scene2d.ui.ScrollPane.ScrollPaneStyle; //导入依赖的package包/类
public h(Actor paramActor, ScrollPane.ScrollPaneStyle paramScrollPaneStyle, float paramFloat1, float paramFloat2, float paramFloat3)
{
  super(paramActor, paramScrollPaneStyle);
  this.c = paramFloat2;
  this.d = paramFloat3;
  this.e = paramFloat1;
  this.f = 0L;
  if (paramFloat1 > 0.0F);
  for (this.h = (0.5F * (paramFloat1 * paramFloat2)); ; this.h = 0.0F)
  {
    setScrollingDisabled(true, false);
    addListener(new i(this));
    return;
  }
}
 
开发者ID:isnuryusuf,项目名称:ingress-indonesia-dev,代码行数:16,代码来源:h.java

示例15: resetProperties

import com.badlogic.gdx.scenes.scene2d.ui.ScrollPane.ScrollPaneStyle; //导入依赖的package包/类
public void resetProperties() {
    properties.clear();
    
    if (clazz.equals(Button.class)) {
        newStyleProperties(ButtonStyle.class);
    } else if (clazz.equals(CheckBox.class)) {
        newStyleProperties(CheckBoxStyle.class);
        properties.get("checkboxOn").optional = false;
        properties.get("checkboxOff").optional = false;
        properties.get("font").optional = false;
    } else if (clazz.equals(ImageButton.class)) {
        newStyleProperties(ImageButtonStyle.class);
    } else if (clazz.equals(ImageTextButton.class)) {
        newStyleProperties(ImageTextButtonStyle.class);
        properties.get("font").optional = false;
    } else if (clazz.equals(Label.class)) {
        newStyleProperties(LabelStyle.class);
        properties.get("font").optional = false;
    } else if (clazz.equals(List.class)) {
        newStyleProperties(ListStyle.class);
        properties.get("font").optional = false;
        properties.get("fontColorSelected").optional = false;
        properties.get("fontColorUnselected").optional = false;
        properties.get("selection").optional = false;
    } else if (clazz.equals(ProgressBar.class)) {
        newStyleProperties(ProgressBarStyle.class);
        
        //Though specified as optional in the doc, there are bugs without "background" being mandatory
        properties.get("background").optional = false;
    } else if (clazz.equals(ScrollPane.class)) {
        newStyleProperties(ScrollPaneStyle.class);
    } else if (clazz.equals(SelectBox.class)) {
        newStyleProperties(SelectBoxStyle.class);
        properties.get("font").optional = false;
        properties.get("fontColor").optional = false;
        properties.get("scrollStyle").optional = false;
        properties.get("scrollStyle").value = "default";
        properties.get("listStyle").optional = false;
        properties.get("listStyle").value = "default";
    } else if (clazz.equals(Slider.class)) {
        newStyleProperties(SliderStyle.class);
        
        //Though specified as optional in the doc, there are bugs without "background" being mandatory
        properties.get("background").optional = false;
    } else if (clazz.equals(SplitPane.class)) {
        newStyleProperties(SplitPaneStyle.class);
        properties.get("handle").optional = false;
    } else if (clazz.equals(TextButton.class)) {
        newStyleProperties(TextButtonStyle.class);
        properties.get("font").optional = false;
    } else if (clazz.equals(TextField.class)) {
        newStyleProperties(TextFieldStyle.class);
        properties.get("font").optional = false;
        properties.get("fontColor").optional = false;
    } else if (clazz.equals(TextTooltip.class)) {
        newStyleProperties(TextTooltipStyle.class);
        properties.get("label").optional = false;
        properties.get("label").value = "default";
    } else if (clazz.equals(Touchpad.class)) {
        newStyleProperties(TouchpadStyle.class);
    } else if (clazz.equals(Tree.class)) {
        newStyleProperties(TreeStyle.class);
        properties.get("plus").optional = false;
        properties.get("minus").optional = false;
    } else if (clazz.equals(Window.class)) {
        newStyleProperties(WindowStyle.class);
        properties.get("titleFont").optional = false;
    }
}
 
开发者ID:raeleus,项目名称:skin-composer,代码行数:70,代码来源:StyleData.java


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