本文整理汇总了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);
}
}
示例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;
}
示例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;
}
示例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;
}
示例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);
}
示例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();
}
示例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);
}
示例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));
}
示例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;
}
示例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);
}
示例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);
}
示例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);
}
示例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 });
}
示例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;
}
}
示例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;
}
}