Exemplo n.º 1
0
 /**
  * Sets the background drawable and sets the table's padding to {@link Drawable#getBottomHeight()}
  * , {@link Drawable#getTopHeight()}, {@link Drawable#getLeftWidth()}, and {@link
  * Drawable#getRightWidth()}.
  *
  * @param background If null, the background will be cleared and all padding is removed.
  */
 public void setBackground(Drawable background) {
   if (this.background == background) return;
   this.background = background;
   if (background == null) pad(null);
   else {
     padBottom(background.getBottomHeight());
     padTop(background.getTopHeight());
     padLeft(background.getLeftWidth());
     padRight(background.getRightWidth());
     invalidate();
   }
 }
Exemplo n.º 2
0
 public void resize(int width, int height) {
   stage.getViewport().update(width, height, true);
   root.invalidate();
 }
Exemplo n.º 3
0
 /** Removes all actors and cells from the table. */
 public void clearChildren() {
   super.clearChildren();
   layout.clear();
   invalidate();
 }
Exemplo n.º 4
0
 /**
  * Causes the contents to be clipped if they exceed the table widget bounds. Enabling clipping
  * will set {@link #setTransform(boolean)} to true.
  */
 public void setClip(boolean enabled) {
   clip = enabled;
   setTransform(enabled);
   invalidate();
 }