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

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

Introduction

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

Prototype

public <A extends Actor> Cell<A> setActor(A newActor) 

Source Link

Document

Sets the actor in this cell and adds the actor to the cell's table.

Usage

From source file:com.forerunnergames.peril.client.ui.screens.game.play.modes.peril.BattleGrid.java

License:Open Source License

private static void setCellActor(final Cell<?> cell, final Actor actor) {
    cell.setActor(actor);
}

From source file:es.eucm.ead.editor.view.builders.project.ProjectView.java

License:Open Source License

private Actor buildToolbar(Skin skin) {
    MultiWidget toolbar = new MultiWidget(skin, SkinConstants.STYLE_TOOLBAR);

    LinearLayout project = new LinearLayout(true);
    project.add(WidgetBuilder.toolbarIcon(SkinConstants.IC_GO, null, CloseProject.class));
    project.add(new Container<TextButton>(title = WidgetBuilder.textButton("", SkinConstants.STYLE_TOOLBAR))
            .width(0).fillX()).expandX().marginLeft(WidgetBuilder.dpToPixels(8));

    title.getLabel().setAlignment(Align.left);
    Cell cell = title.getLabelCell();
    LinearLayout titleCell = new LinearLayout(true);
    titleCell.add(new Image(skin, SkinConstants.IC_EDIT)).marginRight(WidgetBuilder.dpToPixels(8));
    titleCell.add(title.getLabel());/* w w  w.  j  av  a  2  s.  c  o  m*/
    cell.setActor(titleCell);
    title.padLeft(WidgetBuilder.dpToPixels(8));
    WidgetBuilder.actionOnClick(title, Rename.class, Selection.MOKAP);

    project.add(WidgetBuilder.toolbarIcon(SkinConstants.IC_SHARE, null, ShareProject.class));
    project.add(WidgetBuilder.toolbarIcon(SkinConstants.IC_PLAY, null, ChangeView.class, PlayView.class));

    toolbar.addWidgets(project);
    return toolbar;
}