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

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

Introduction

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

Prototype

public Cell<T> space(float top, float left, float bottom, float right) 

Source Link

Usage

From source file:com.kotcrab.vis.ui.building.utilities.Padding.java

License:Apache License

/**
 * Allows to set Cell's spacing with the Padding object, which has be done externally, as it's not part of
 * the standard libGDX API. Padding holds 4 floats for each direction, so it's compatible with both
 * padding and spacing settings without any additional changes.
 * @param cell will have the padding set according to the this object's data.
 * @return the given cell for chaining./* ww w. ja  v  a 2s.  co  m*/
 */
public Cell<?> applySpacing(final Cell<?> cell) {
    cell.space(top, left, bottom, right);
    return cell;
}

From source file:com.kotcrab.vis.ui.building.utilities.Padding.java

License:Apache License

/**
 * Allows to set Cell's spacing with the Padding object, which has be done externally, as it's not part of
 * the standard libGDX API. Padding holds 4 floats for each direction, so it's compatible with both
 * padding and spacing settings without any additional changes.
 * @param spacing contains data of spacing sizes.
 * @param cell will have the padding set according to the given data.
 * @return the given cell for chaining.//from  w  w  w.ja v a  2  s . c  om
 */
public static Cell<?> setSpacing(final Padding spacing, final Cell<?> cell) {
    return cell.space(spacing.getTop(), spacing.getLeft(), spacing.getBottom(), spacing.getRight());
}