Example usage for com.badlogic.gdx.scenes.scene2d.ui VerticalGroup right

List of usage examples for com.badlogic.gdx.scenes.scene2d.ui VerticalGroup right

Introduction

In this page you can find the example usage for com.badlogic.gdx.scenes.scene2d.ui VerticalGroup right.

Prototype

public VerticalGroup right() 

Source Link

Document

Sets Align#right and clears Align#left for the alignment of widgets within the vertical group.

Usage

From source file:es.eucm.ead.engine.processors.controls.layouts.VerticalLayoutProcessor.java

License:Open Source License

@Override
public Component getComponent(VerticalLayout component) {
    VerticalLayoutComponent verticalLayout = gameLoop.createComponent(VerticalLayoutComponent.class);
    for (Control control : component.getControls()) {
        addControls(verticalLayout, componentLoader.toEngineComponent(control));
    }/*ww  w. j a v a  2  s .c  om*/

    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;
}