本文整理汇总了Java中com.badlogic.gdx.scenes.scene2d.ui.Cell.pad方法的典型用法代码示例。如果您正苦于以下问题:Java Cell.pad方法的具体用法?Java Cell.pad怎么用?Java Cell.pad使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.badlogic.gdx.scenes.scene2d.ui.Cell
的用法示例。
在下文中一共展示了Cell.pad方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: process
import com.badlogic.gdx.scenes.scene2d.ui.Cell; //导入方法依赖的package包/类
@Override
public void process(final LmlParser parser, final LmlTag tag, final Actor actor, final Cell<?> cell,
final String rawAttributeData) {
final Value horizontalValue = LmlUtilities.parseHorizontalValue(parser, tag.getParent(), actor,
rawAttributeData);
final Value verticalValue = LmlUtilities.parseVerticalValue(parser, tag.getParent(), actor, rawAttributeData);
cell.pad(verticalValue, horizontalValue, verticalValue, horizontalValue);
}
示例2: fillTable
import com.badlogic.gdx.scenes.scene2d.ui.Cell; //导入方法依赖的package包/类
public void fillTable() {
this.table.clear();
Widgets _widgets = this.getWidgets();
Label _createLabel = _widgets.createLabel("IP");
Cell<Label> _add = this.table.<Label>add(_createLabel);
_add.pad(LocalScreen.CELLPAD);
Widgets _widgets_1 = this.getWidgets();
Label _createLabel_1 = _widgets_1.createLabel("Name");
Cell<Label> _add_1 = this.table.<Label>add(_createLabel_1);
_add_1.pad(LocalScreen.CELLPAD);
Widgets _widgets_2 = this.getWidgets();
Label _createLabel_2 = _widgets_2.createLabel(" # / # ");
Cell<Label> _add_2 = this.table.<Label>add(_createLabel_2);
_add_2.pad(LocalScreen.CELLPAD);
Widgets _widgets_3 = this.getWidgets();
Label _createLabel_3 = _widgets_3.createLabel("");
Cell<Label> _add_3 = this.table.<Label>add(_createLabel_3);
_add_3.pad(LocalScreen.CELLPAD);
this.table.row();
for (final NetworkGameInfo game : this.games) {
{
Widgets _widgets_4 = this.getWidgets();
InetAddress _ipAddr = game.getIpAddr();
String _hostAddress = _ipAddr.getHostAddress();
Label _createLabel_4 = _widgets_4.createLabel(_hostAddress);
Cell<Label> _add_4 = this.table.<Label>add(_createLabel_4);
_add_4.pad(LocalScreen.CELLPAD);
Widgets _widgets_5 = this.getWidgets();
String _gameName = game.getGameName();
Label _createLabel_5 = _widgets_5.createLabel(_gameName);
Cell<Label> _add_5 = this.table.<Label>add(_createLabel_5);
_add_5.pad(LocalScreen.CELLPAD);
Widgets _widgets_6 = this.getWidgets();
int _currentPlayer = game.getCurrentPlayer();
String _plus = (" " + Integer.valueOf(_currentPlayer));
String _plus_1 = (_plus + " / ");
int _maxPlayer = game.getMaxPlayer();
String _plus_2 = (_plus_1 + Integer.valueOf(_maxPlayer));
String _plus_3 = (_plus_2 + " ");
Label _createLabel_6 = _widgets_6.createLabel(_plus_3);
Cell<Label> _add_6 = this.table.<Label>add(_createLabel_6);
_add_6.pad(LocalScreen.CELLPAD);
Widgets _widgets_7 = this.getWidgets();
Icons _xifexpression = null;
int _gameId = game.getGameId();
boolean _equals = (_gameId == (-1));
if (_equals) {
_xifexpression = Icons.Join;
} else {
_xifexpression = Icons.JoinActivate;
}
final Procedure0 _function = new Procedure0() {
@Override
public void apply() {
LocalScreen.this.startGame(game);
}
};
boolean _xifexpression_1 = false;
int _gameId_1 = game.getGameId();
boolean _equals_1 = (_gameId_1 == (-1));
if (_equals_1) {
_xifexpression_1 = true;
} else {
_xifexpression_1 = false;
}
MyTextButton _createButton = _widgets_7.createButton(_xifexpression, _function, _xifexpression_1);
Cell<MyTextButton> _add_7 = this.table.<MyTextButton>add(_createButton);
_add_7.pad(LocalScreen.CELLPAD);
this.table.row();
}
}
}
示例3: defaultCellOptions
import com.badlogic.gdx.scenes.scene2d.ui.Cell; //导入方法依赖的package包/类
private Cell defaultCellOptions(final Cell cell) {
Cell _pad = cell.pad(OptionTable.CELLPAD);
return _pad.align(Align.left);
}
示例4: applyPadding
import com.badlogic.gdx.scenes.scene2d.ui.Cell; //导入方法依赖的package包/类
/** Allows to set Cell's padding with the Padding object, which has be done externally, as it's not part of the
* standard libGDX API.
*
* @param cell will have the padding set according to the this object's data.
* @return the given cell for chaining. */
public Cell<?> applyPadding(final Cell<?> cell) {
cell.pad(top, left, bottom, right);
return cell;
}
示例5: setPadding
import com.badlogic.gdx.scenes.scene2d.ui.Cell; //导入方法依赖的package包/类
/** Allows to set Cell's padding with the Padding object, which has be done externally, as it's not part of the
* standard libGDX API.
*
* @param padding contains data of padding sizes.
* @param cell will have the padding set according to the given data.
* @return the given cell for chaining. */
public static Cell<?> setPadding(final Padding padding, final Cell<?> cell) {
return cell.pad(padding.getTop(), padding.getLeft(), padding.getBottom(), padding.getRight());
}