Example usage for com.badlogic.gdx.scenes.scene2d.ui Cell padTop

List of usage examples for com.badlogic.gdx.scenes.scene2d.ui Cell padTop

Introduction

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

Prototype

Value padTop

To view the source code for com.badlogic.gdx.scenes.scene2d.ui Cell padTop.

Click Source Link

Usage

From source file:com.forerunnergames.peril.client.ui.widgets.Widgets.java

License:Open Source License

public static void padCell(final Cell<?> cell, final float paddingAmount, final CellPadding paddingType) {
    Arguments.checkIsNotNull(cell, "cell");
    Arguments.checkIsNotNegative(paddingAmount, "paddingAmount");
    Arguments.checkIsNotNull(paddingType, "paddingType");

    switch (paddingType) {
    case LEFT: {/*from ww  w. j a va2  s.c  o  m*/
        cell.padLeft(paddingAmount);
        break;
    }
    case RIGHT: {
        cell.padRight(paddingAmount);
        break;
    }
    case TOP: {
        cell.padTop(paddingAmount);
        break;
    }
    case BOTTOM: {
        cell.padBottom(paddingAmount);
        break;
    }
    case ALL: {
        cell.pad(paddingAmount);
    }
    default: {
        throw new IllegalStateException(
                "Unknown " + CellPadding.class.getSimpleName() + " value [" + paddingType + "]");
    }
    }
}