Example usage for com.badlogic.gdx.scenes.scene2d.ui ScrollPane getWidget

List of usage examples for com.badlogic.gdx.scenes.scene2d.ui ScrollPane getWidget

Introduction

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

Prototype

public Actor getWidget() 

Source Link

Document

Returns the actor embedded in this scroll pane, or null.

Usage

From source file:es.eucm.ead.editor.view.widgets.layouts.TrackLayout.java

License:Open Source License

/**
 * Have to use this method to use {@link TrackLayout} in {@link ScrollPane}
 * Is necessary that the {@link ScrollPane} contains a {@link Table}
 * /*w  w  w .j av a  2s  .  c o m*/
 * @param scroll
 */
public void setInScroll(ScrollPane scroll) {
    if (scroll.getWidget() instanceof Table) {
        this.scroll = scroll;
        ((Table) scroll.getWidget()).add(this).fill().expand();
        ((Table) scroll.getWidget()).row();
    }
}