Java 类com.badlogic.gdx.scenes.scene2d.ui.VerticalGroup 实例源码

项目:enklave    文件:ScreenChat.java   
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();
}
项目:enklave    文件:ScreenChat.java   
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();
}
项目:JavityEngine    文件:JXmlUi.java   
private void addVerticalGroup(Table table, Element element) {
        VerticalGroup verticalGroup = new VerticalGroup();
        ScrollPane scrollPane = new ScrollPane(verticalGroup, skin);

        Cell<ScrollPane> cell = table.add(scrollPane);
        ObjectMap<String, String> atrributes = element.getAttributes();
        if (atrributes == null) {
            atrributes = new ObjectMap<String, String>();
        }

        for (String key : atrributes.keys()) {
            if (key.equalsIgnoreCase("name")) {
                verticalGroup.setName(atrributes.get(key));
            }
        }
        cellPrepare(cell, atrributes);
//      addChildrens(element, horizontalGroup);

        actorsMap.put(verticalGroup.getName(), verticalGroup);      
    }
项目:gdx-lml    文件:CellPadTopLmlAttribute.java   
@Override
protected void processForActor(final LmlParser parser, final LmlTag tag, final Actor actor,
        final String rawAttributeData) {
    // Parsed if actor is not in a cell:
    if (actor instanceof Table) {
        final Value verticalValue = LmlUtilities.parseVerticalValue(parser, tag.getParent(), actor,
                rawAttributeData);
        ((Table) actor).padTop(verticalValue);
    } else if (actor instanceof VerticalGroup) {
        ((VerticalGroup) actor).padTop(parser.parseFloat(rawAttributeData, actor));
    } else if (actor instanceof HorizontalGroup) {
        ((HorizontalGroup) actor).padTop(parser.parseFloat(rawAttributeData, actor));
    } else if (actor instanceof Container<?>) {
        ((Container<?>) actor)
                .padTop(LmlUtilities.parseVerticalValue(parser, tag.getParent(), actor, rawAttributeData));
    } else {
        // Exception:
        super.processForActor(parser, tag, actor, rawAttributeData);
    }
}
项目:gdx-lml    文件:CellPadLeftLmlAttribute.java   
@Override
protected void processForActor(final LmlParser parser, final LmlTag tag, final Actor actor,
        final String rawAttributeData) {
    // Parsed if actor is not in a cell:
    if (actor instanceof Table) {
        final Value horizontalValue = LmlUtilities.parseHorizontalValue(parser, tag.getParent(), actor,
                rawAttributeData);
        ((Table) actor).padLeft(horizontalValue);
    } else if (actor instanceof VerticalGroup) {
        ((VerticalGroup) actor).padLeft(parser.parseFloat(rawAttributeData, actor));
    } else if (actor instanceof HorizontalGroup) {
        ((HorizontalGroup) actor).padLeft(parser.parseFloat(rawAttributeData, actor));
    } else if (actor instanceof Container<?>) {
        ((Container<?>) actor)
                .padLeft(LmlUtilities.parseHorizontalValue(parser, tag.getParent(), actor, rawAttributeData));
    } else {
        // Exception:
        super.processForActor(parser, tag, actor, rawAttributeData);
    }
}
项目:gdx-lml    文件:CellPadRightLmlAttribute.java   
@Override
protected void processForActor(final LmlParser parser, final LmlTag tag, final Actor actor,
        final String rawAttributeData) {
    // Parsed if actor is not in a cell:
    if (actor instanceof Table) {
        final Value horizontalValue = LmlUtilities.parseHorizontalValue(parser, tag.getParent(), actor,
                rawAttributeData);
        ((Table) actor).padRight(horizontalValue);
    } else if (actor instanceof VerticalGroup) {
        ((VerticalGroup) actor).padRight(parser.parseFloat(rawAttributeData, actor));
    } else if (actor instanceof HorizontalGroup) {
        ((HorizontalGroup) actor).padRight(parser.parseFloat(rawAttributeData, actor));
    } else if (actor instanceof Container<?>) {
        ((Container<?>) actor)
                .padRight(LmlUtilities.parseHorizontalValue(parser, tag.getParent(), actor, rawAttributeData));
    } else {
        // Exception:
        super.processForActor(parser, tag, actor, rawAttributeData);
    }
}
项目:gdx-lml    文件:CellAlignLmlAttribute.java   
@Override
protected void processForActor(final LmlParser parser, final LmlTag tag, final Actor actor,
        final String rawAttributeData) {
    // Applied if not in a cell.
    if (actor instanceof Label) {
        ((Label) actor).setAlignment(LmlUtilities.parseAlignment(parser, actor, rawAttributeData));
    } else if (actor instanceof Table) {
        ((Table) actor).align(LmlUtilities.parseAlignment(parser, actor, rawAttributeData));
    } else if (actor instanceof Image) {
        ((Image) actor).setAlign(LmlUtilities.parseAlignment(parser, actor, rawAttributeData));
    } else if (actor instanceof HorizontalGroup) {
        ((HorizontalGroup) actor).align(LmlUtilities.parseAlignment(parser, actor, rawAttributeData));
    } else if (actor instanceof VerticalGroup) {
        ((VerticalGroup) actor).align(LmlUtilities.parseAlignment(parser, actor, rawAttributeData));
    } else if (actor instanceof TextField) {
        ((TextField) actor).setAlignment(LmlUtilities.parseAlignment(parser, actor, rawAttributeData));
    } else {
        // Exception:
        super.processForActor(parser, tag, actor, rawAttributeData);
    }
}
项目:gdx-lml    文件:CellPadBottomLmlAttribute.java   
@Override
protected void processForActor(final LmlParser parser, final LmlTag tag, final Actor actor,
        final String rawAttributeData) {
    // Parsed if actor is not in a cell:
    if (actor instanceof Table) {
        final Value verticalValue = LmlUtilities.parseVerticalValue(parser, tag.getParent(), actor,
                rawAttributeData);
        ((Table) actor).padBottom(verticalValue);
    } else if (actor instanceof VerticalGroup) {
        ((VerticalGroup) actor).padBottom(parser.parseFloat(rawAttributeData, actor));
    } else if (actor instanceof HorizontalGroup) {
        ((HorizontalGroup) actor).padBottom(parser.parseFloat(rawAttributeData, actor));
    } else if (actor instanceof Container<?>) {
        ((Container<?>) actor)
                .padBottom(LmlUtilities.parseVerticalValue(parser, tag.getParent(), actor, rawAttributeData));
    } else {
        // Exception:
        super.processForActor(parser, tag, actor, rawAttributeData);
    }
}
项目:HAW-SE2-projecthorse    文件:LootGallery.java   
/**
 * Initialisiert die UI-Elemente.
 */
private void initializeUiElements() {
    DefaultScrollPane tableContainer;

    tableWidth = width - 150;
    tableHeight = height - 300;
    lootTable = new VerticalGroup();
    lootTable.space(10);
    lootTable.align(Align.left + Align.top);
    lootTable.setWidth(tableWidth);

    tableContainer = new DefaultScrollPane(lootTable, tableHeight,
            tableWidth);
    tableContainer.setPosition(75, 50);
    tableContainer.toFront();

    stage.addActor(tableContainer);

    // switch button erstellen
    stage.addActor(createSwitchButton());
}
项目:GdxStudio    文件:Serializer.java   
public static void setup(){
    registerSerializer(Actor.class, new ActorSerializer());
    registerSerializer(Scene.class, new SceneSerializer());
    registerSerializer(ImageJson.class, new ImageJson());
    registerSerializer(Label.class, new LabelSerializer());
    registerSerializer(Button.class, new ButtonSerializer());
    registerSerializer(TextButton.class, new TextButtonSerializer());
    registerSerializer(Table.class, new TableSerializer());
    registerSerializer(CheckBox.class, new CheckBoxSerializer());
    registerSerializer(SelectBox.class, new SelectBoxSerializer());
    registerSerializer(List.class, new ListSerializer());
    registerSerializer(Slider.class, new SliderSerializer());
    registerSerializer(TextField.class, new TextFieldSerializer());
    registerSerializer(Touchpad.class, new TouchpadSerializer());
    registerSerializer(Sprite.class, new SpriteSerializer());

    registerSerializer(Dialog.class, new DialogSerializer());
    registerSerializer(SplitPane.class, new SplitPaneSerializer());
    registerSerializer(ScrollPane.class, new ScrollPaneSerializer());
    registerSerializer(Stack.class, new StackSerializer());
    registerSerializer(Tree.class, new TreeSerializer());
    registerSerializer(Table.class, new TableSerializer());
    registerSerializer(ButtonGroup.class, new ButtonGroupSerializer());
    registerSerializer(HorizontalGroup.class, new HorizontalGroupSerializer());
    registerSerializer(VerticalGroup.class, new VerticalGroupSerializer());
}
项目:craft    文件:ItemWidget.java   
private Actor generateRight(Item item) {
  VerticalGroup layout = new VerticalGroup();
  layout.align(Align.left);
  layout.padLeft(15f);
  name.setColor(item.getRarity().getColor());
  name.setFontScale(0.90f);
  layout.addActor(name);
  Table descContainer = new Table();
  level = new StarLevelWidget(item.getLevel(), 7);
  availability = new AvailabilityIcon(item);
  descContainer.add(level);
  descContainer.right().add(availability).padLeft(70f).padTop(27f);
  layout.addActor(descContainer);
  layout.setTouchable(Touchable.disabled);
  return layout;
}
项目:ead    文件:VerticalLayoutProcessor.java   
@Override
public Component getComponent(VerticalLayout component) {
    VerticalLayoutComponent verticalLayout = gameLoop
            .createComponent(VerticalLayoutComponent.class);
    for (Control control : component.getControls()) {
        addControls(verticalLayout,
                componentLoader.toEngineComponent(control));
    }

    VerticalGroup group = verticalLayout.getControl();
    switch (component.getAlign()) {
    case LEFT:
        group.left();
        break;
    case CENTER:
        group.center();
        break;
    case RIGHT:
        group.right();
        break;
    }
    group.pack();
    return verticalLayout;
}
项目:MMORPG_Prototype    文件:InventoryDialog.java   
public InventoryDialog(UserInterface linkedInterface, Integer linkedFieldGold)
{
    super("Inventory", Settings.DEFAULT_SKIN);
    this.linkedInterface = linkedInterface;

    Button closeButton = new CloseButton(this);
    getTitleTable().add(closeButton).size(15, 15).padRight(-5).top().right();

    for (int i = 0; i < numberOfPages; i++)
        inventoryPages.add(new InventoryPage(this, i));
    currentPageButtons.addActor(inventoryPages.get(0));
    addActor(currentPageButtons);

    Table contentTable = this.getContentTable();
    contentTable.add(currentPageButtons);
    VerticalGroup switchButtons = new VerticalGroup().space(0).pad(0).top().padTop(-8).fill();

    for (int i = 0; i < numberOfPages; i++)
    {
        InventoryTextField<Item> switchButton = createSwitchButton(i);
        switchButtons.addActor(switchButton);
        switchPageButtons.add(switchButton);
    }
    switchPageButtons.get(0).setColor(0.5f, 0.5f, 0.5f, 1);

    contentTable.add(switchButtons);
    contentTable.row();
    goldLabel.setValue(linkedFieldGold);
    goldLabel.update();
    contentTable.add(goldLabel).left();
    contentTable.row();

    this.setX(1230);
    this.setY(43);
    this.pack();
}
项目:gdx-lml    文件:CellSpaceLmlAttribute.java   
@Override
protected void processForActor(final LmlParser parser, final LmlTag tag, final Actor actor,
        final String rawAttributeData) {
    // Parsed if actor is not in a cell:
    if (actor instanceof VerticalGroup) {
        ((VerticalGroup) actor).space(parser.parseFloat(rawAttributeData, actor));
    } else if (actor instanceof HorizontalGroup) {
        ((HorizontalGroup) actor).space(parser.parseFloat(rawAttributeData, actor));
    } else {
        // Exception:
        super.processForActor(parser, tag, actor, rawAttributeData);
    }
}
项目:HAW-SE2-projecthorse    文件:Popup.java   
/**
 * Inizialisierung der VerticalGroup.
 */
private void createContentGroup() {
    contentGroup = new VerticalGroup();

    contentGroup.space(10);
    contentGroup.setHeight(popupHeight);
    contentGroup.setWidth(popupWidth);
    contentGroup.align(Align.center);

    content.addActor(contentGroup);
}
项目:HAW-SE2-projecthorse    文件:Credits.java   
/**
 * Default Konstruktor.
 */
public Credits() {
    // Laden und Abspielen der Hintergrundmusik
    AssetManager.loadMusic("mainMenu");
    music = audioManager.getMusic("mainMenu", "belotti.mp3");
    if (!music.isPlaying()) {
        music.setLooping(true);
        music.play();
    }

    // stage initialisieren
    stage = new Stage(getViewport());
    InputManager.addInputProcessor(stage);
    background = new Image(AssetManager.getTextureRegion("ui",
            "panel_beige"));
    background.setSize(width, height);
    stage.addActor(background);

    // Scroll Panel initialisieren
    textContainer = new VerticalGroup();
    initializeText();

    scroller = new DefaultScrollPane(textContainer, height * 0.8f, width);
    scroller.setPosition(0, height * 0.08f);
    scroller.setupFadeScrollBars(1f, 2f);
    scroller.setFadeScrollBars(true);
    stage.addActor(scroller);

}
项目:HAW-SE2-projecthorse    文件:MainMenu.java   
/**
 * Initialisiert die Tabelle.
 */
private void initTable() {

    table = new VerticalGroup();
    table.setHeight((float) (height * 0.5));
    table.setY((height / 2) - table.getHeight() / 2);
    table.setWidth(width);
}
项目:HAW-SE2-projecthorse    文件:SplashScreen.java   
/**
 * Initialisiert die Tabelle.
 */
private void initTable() {

    table = new VerticalGroup();
    table.setHeight((float) (height * 0.1));
    table.setY((height / 2) - table.getHeight() / 2);
    table.setWidth(width);
}
项目:Vloxlands    文件:Warehouse.java   
@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);
}
项目:gdx-lml    文件:VerticalGroupPaddingBottomLmlAttribute.java   
@Override
public Class<VerticalGroup> getHandledType() {
    return VerticalGroup.class;
}
项目:gdx-lml    文件:VerticalGroupPaddingBottomLmlAttribute.java   
@Override
public void process(final LmlParser parser, final LmlTag tag, final VerticalGroup actor,
        final String rawAttributeData) {
    actor.padBottom(parser.parseFloat(rawAttributeData, actor));
}
项目:gdx-lml    文件:VerticalGroupPaddingRightLmlAttribute.java   
@Override
public Class<VerticalGroup> getHandledType() {
    return VerticalGroup.class;
}
项目:gdx-lml    文件:VerticalGroupPaddingRightLmlAttribute.java   
@Override
public void process(final LmlParser parser, final LmlTag tag, final VerticalGroup actor,
        final String rawAttributeData) {
    actor.padRight(parser.parseFloat(rawAttributeData, actor));
}
项目:gdx-lml    文件:VerticalGroupFillLmlAttribute.java   
@Override
public Class<VerticalGroup> getHandledType() {
    return VerticalGroup.class;
}
项目:gdx-lml    文件:VerticalGroupFillLmlAttribute.java   
@Override
public void process(final LmlParser parser, final LmlTag tag, final VerticalGroup actor,
        final String rawAttributeData) {
    actor.fill(parser.parseFloat(rawAttributeData, actor));
}
项目:gdx-lml    文件:VerticalGroupSpacingLmlAttribute.java   
@Override
public Class<VerticalGroup> getHandledType() {
    return VerticalGroup.class;
}
项目:gdx-lml    文件:VerticalGroupSpacingLmlAttribute.java   
@Override
public void process(final LmlParser parser, final LmlTag tag, final VerticalGroup actor,
        final String rawAttributeData) {
    actor.space(parser.parseFloat(rawAttributeData, actor));
}
项目:gdx-lml    文件:VerticalGroupPaddingTopLmlAttribute.java   
@Override
public Class<VerticalGroup> getHandledType() {
    return VerticalGroup.class;
}
项目:gdx-lml    文件:VerticalGroupPaddingTopLmlAttribute.java   
@Override
public void process(final LmlParser parser, final LmlTag tag, final VerticalGroup actor,
        final String rawAttributeData) {
    actor.padTop(parser.parseFloat(rawAttributeData, actor));
}
项目:gdx-lml    文件:VerticalGroupAlignmentLmlAttribute.java   
@Override
public Class<VerticalGroup> getHandledType() {
    return VerticalGroup.class;
}
项目:gdx-lml    文件:VerticalGroupAlignmentLmlAttribute.java   
@Override
public void process(final LmlParser parser, final LmlTag tag, final VerticalGroup actor,
        final String rawAttributeData) {
    actor.align(LmlUtilities.parseAlignment(parser, actor, rawAttributeData));
}
项目:gdx-lml    文件:VerticalGroupPaddingLeftLmlAttribute.java   
@Override
public Class<VerticalGroup> getHandledType() {
    return VerticalGroup.class;
}
项目:gdx-lml    文件:VerticalGroupPaddingLeftLmlAttribute.java   
@Override
public void process(final LmlParser parser, final LmlTag tag, final VerticalGroup actor,
        final String rawAttributeData) {
    actor.padLeft(parser.parseFloat(rawAttributeData, actor));
}
项目:gdx-lml    文件:VerticalGroupPaddingLmlAttribute.java   
@Override
public Class<VerticalGroup> getHandledType() {
    return VerticalGroup.class;
}
项目:gdx-lml    文件:VerticalGroupPaddingLmlAttribute.java   
@Override
public void process(final LmlParser parser, final LmlTag tag, final VerticalGroup actor,
        final String rawAttributeData) {
    actor.pad(parser.parseFloat(rawAttributeData, actor));
}
项目:gdx-lml    文件:VerticalGroupReverseLmlAttribute.java   
@Override
public Class<VerticalGroup> getHandledType() {
    return VerticalGroup.class;
}
项目:gdx-lml    文件:VerticalGroupReverseLmlAttribute.java   
@Override
public void process(final LmlParser parser, final LmlTag tag, final VerticalGroup actor,
        final String rawAttributeData) {
    actor.reverse(parser.parseBoolean(rawAttributeData, actor));
}
项目:gdx-lml    文件:VerticalGroupLmlTag.java   
@Override
protected Group getNewInstanceOfGroup(final LmlActorBuilder builder) {
    return new VerticalGroup();
}
项目:gdx-lml    文件:DragPaneLmlActorBuilder.java   
@Override
public WidgetGroup getGroup() {
    return new VerticalGroup();
}
项目:gdx-lml-vis    文件:DragPaneLmlActorBuilder.java   
@Override
public WidgetGroup getGroup() {
    return new VerticalGroup();
}