Esempio n. 1
0
 /**
  * Creates a table with a skin, which enables the {@link #add(String)} and {@link #add(String,
  * String)} methods to be used.
  */
 public Table(Skin skin) {
   this.skin = skin;
   layout = new TableLayout();
   layout.setTable(this);
   setTransform(false);
   setTouchable(Touchable.childrenOnly);
 }
Esempio n. 2
0
 public void draw(Batch batch, float parentAlpha) {
   validate();
   drawBackground(batch, parentAlpha);
   if (isTransform()) {
     applyTransform(batch, computeTransform());
     if (clip) {
       boolean draw =
           background == null
               ? clipBegin(0, 0, getWidth(), getHeight())
               : clipBegin(
                   layout.getPadLeft(),
                   layout.getPadBottom(),
                   getWidth() - layout.getPadLeft() - layout.getPadRight(),
                   getHeight() - layout.getPadBottom() - layout.getPadTop());
       if (draw) {
         drawChildren(batch, parentAlpha);
         clipEnd();
       }
     } else drawChildren(batch, parentAlpha);
     resetTransform(batch);
   } else super.draw(batch, parentAlpha);
 }
Esempio n. 3
0
 /** Padding at the left edge of the table. */
 public Table padLeft(float padLeft) {
   layout.padLeft(padLeft);
   return this;
 }
Esempio n. 4
0
 /** If true (the default), positions and sizes are rounded to integers. */
 public void setRound(boolean round) {
   layout.round = round;
 }
Esempio n. 5
0
 /** Returns {@link #getPadTop()} plus {@link #getPadBottom()}. */
 public float getPadY() {
   return layout.getPadTop() + layout.getPadBottom();
 }
Esempio n. 6
0
 public float getPadRight() {
   return layout.getPadRight();
 }
Esempio n. 7
0
 public float getPadBottom() {
   return layout.getPadBottom();
 }
Esempio n. 8
0
 public float getPadLeft() {
   return layout.getPadLeft();
 }
Esempio n. 9
0
 /**
  * Adds {@link Align#bottom} and clears {@link Align#top} for the alignment of the logical table
  * within the table widget.
  */
 public Table bottom() {
   layout.bottom();
   return this;
 }
Esempio n. 10
0
 /**
  * Adds {@link Align#left} and clears {@link Align#right} for the alignment of the logical table
  * within the table widget.
  */
 public Table left() {
   layout.left();
   return this;
 }
Esempio n. 11
0
 /**
  * Adds {@link Align#top} and clears {@link Align#bottom} for the alignment of the logical table
  * within the table widget.
  */
 public Table top() {
   layout.top();
   return this;
 }
Esempio n. 12
0
 /**
  * Sets the alignment of the logical table within the table widget to {@link Align#center}. This
  * clears any other alignment.
  */
 public Table center() {
   layout.center();
   return this;
 }
Esempio n. 13
0
 /**
  * Sets the alignment of the logical table within the table widget. Set to {@link Align#center},
  * {@link Align#top}, {@link Align#bottom} , {@link Align#left} , {@link Align#right}, or any
  * combination of those.
  */
 public Table align(int align) {
   layout.align(align);
   return this;
 }
Esempio n. 14
0
 /** Padding at the right edge of the table. */
 public Table padRight(float padRight) {
   layout.padRight(padRight);
   return this;
 }
Esempio n. 15
0
 /** Padding at the bottom edge of the table. */
 public Table padBottom(float padBottom) {
   layout.padBottom(padBottom);
   return this;
 }
Esempio n. 16
0
 public float getPadTop() {
   return layout.getPadTop();
 }
Esempio n. 17
0
 public Value getPadLeftValue() {
   return layout.getPadLeftValue();
 }
Esempio n. 18
0
 /**
  * Adds {@link Align#right} and clears {@link Align#left} for the alignment of the logical table
  * within the table widget.
  */
 public Table right() {
   layout.right();
   return this;
 }
Esempio n. 19
0
 public Value getPadBottomValue() {
   return layout.getPadBottomValue();
 }
Esempio n. 20
0
 /** Turns on table debug lines. */
 public Table debugTable() {
   layout.debugTable();
   return this;
 }
Esempio n. 21
0
 public Value getPadRightValue() {
   return layout.getPadRightValue();
 }
Esempio n. 22
0
 /** Turns on cell debug lines. */
 public Table debugCell() {
   layout.debugCell();
   return this;
 }
Esempio n. 23
0
 /** Returns {@link #getPadLeft()} plus {@link #getPadRight()}. */
 public float getPadX() {
   return layout.getPadLeft() + layout.getPadRight();
 }
Esempio n. 24
0
 /** Turns on widget debug lines. */
 public Table debugWidget() {
   layout.debugWidget();
   return this;
 }
Esempio n. 25
0
 public int getAlign() {
   return layout.getAlign();
 }
Esempio n. 26
0
 /** Turns on debug lines. */
 public Table debug(Debug debug) {
   layout.debug(debug);
   return this;
 }
Esempio n. 27
0
 public Debug getDebug() {
   return layout.getDebug();
 }
Esempio n. 28
0
 public Value getPadTopValue() {
   return layout.getPadTopValue();
 }
Esempio n. 29
0
 public void addDebugRectangle(
     TableLayout layout, Debug type, float x, float y, float w, float h) {
   drawDebug = true;
   if (layout.debugRects == null) layout.debugRects = new Array();
   layout.debugRects.add(new DebugRect(type, x, layout.getTable().getHeight() - y, w, h));
 }
Esempio n. 30
0
 /** Padding at the top edge of the table. */
 public Table padTop(float padTop) {
   layout.padTop(padTop);
   return this;
 }