# Class TableLayout.Constraint

java.lang.Object
com.codename1.ui.table.TableLayout.Constraint

Enclosing class:
  `TableLayout`

public static class TableLayout.Constraint extends Object
Represents the layout constraint for an entry within the table indicating the desired position/behavior of the component.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Constraint()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `int`
  `getColumn()`

  ###### Returns

  `int`
  `getHeightPercentage()`

  ###### Returns

  `int`
  `getHorizontalAlign()`

  ###### Returns

  `int`
  `getHorizontalSpan()`

  ###### Returns

  `int`
  `getRow()`

  ###### Returns

  `int`
  `getVerticalAlign()`

  ###### Returns

  `int`
  `getVerticalSpan()`

  ###### Returns

  `int`
  `getWidthPercentage()`

  ###### Returns

  `TableLayout.Constraint`
  `ha(int align)`
  Sets the horizontal alignment of the table cell
  `TableLayout.Constraint`
  `heightPercentage(int height)`
  Sets the row height based on percentage of the parent
  `TableLayout.Constraint`
  `horizontalAlign(int align)`
  Sets the horizontal alignment of the table cell
  `TableLayout.Constraint`
  `horizontalSpan(int span)`
  Sets the cells to span horizontally, this number must never be smaller than 1
  `TableLayout.Constraint`
  `hp(int height)`
  Sets the row height based on percentage of the parent
  `TableLayout.Constraint`
  `hs(int span)`
  Sets the cells to span horizontally, this number must never be smaller than 1
  `void`
  `setHeightPercentage(int height)`
  Sets the row height based on percentage of the parent
  `void`
  `setHorizontalAlign(int align)`
  Sets the horizontal alignment of the table cell
  `void`
  `setHorizontalSpan(int span)`
  Sets the cells to span horizontally, this number must never be smaller than 1
  `void`
  `setVerticalAlign(int valign)`
  Sets the vertical alignment of the table cell
  `void`
  `setVerticalSpan(int span)`
  Sets the cells to span vertically, this number must never be smaller than 1
  `void`
  `setWidthPercentage(int width)`
  Sets the column width based on percentage of the parent
  `String`
  `toString()`
  `TableLayout.Constraint`
  `va(int valign)`
  Sets the vertical alignment of the table cell
  `TableLayout.Constraint`
  `verticalAlign(int valign)`
  Sets the vertical alignment of the table cell
  `TableLayout.Constraint`
  `verticalSpan(int span)`
  Sets the cells to span vertically, this number must never be smaller than 1
  `TableLayout.Constraint`
  `vs(int span)`
  Sets the cells to span vertically, this number must never be smaller than 1
  `TableLayout.Constraint`
  `widthPercentage(int width)`
  Sets the column width based on percentage of the parent
  `TableLayout.Constraint`
  `wp(int width)`
  Sets the column width based on percentage of the parent

  ### Methods inherited from class Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### Constraint

    public Constraint()

- ## Method Details

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Object`

  - ### verticalSpan

    public TableLayout.Constraint verticalSpan(int span)

    Sets the cells to span vertically, this number must never be smaller than 1

    ###### Parameters

    - `span`: a number larger than 1

    ###### Returns

    this

  - ### vs

    public TableLayout.Constraint vs(int span)

    Sets the cells to span vertically, this number must never be smaller than 1

    ###### Parameters

    - `span`: a number larger than 1

    ###### Returns

    this

  - ### horizontalSpan

    public TableLayout.Constraint horizontalSpan(int span)

    Sets the cells to span horizontally, this number must never be smaller than 1

    ###### Parameters

    - `span`: a number larger than 1

  - ### hs

    public TableLayout.Constraint hs(int span)

    Sets the cells to span horizontally, this number must never be smaller than 1

    ###### Parameters

    - `span`: a number larger than 1

  - ### widthPercentage

    public TableLayout.Constraint widthPercentage(int width)

    Sets the column width based on percentage of the parent

    ###### Parameters

    - `width`: negative number indicates ignoring this member

  - ### wp

    public TableLayout.Constraint wp(int width)

    Sets the column width based on percentage of the parent

    ###### Parameters

    - `width`: negative number indicates ignoring this member

  - ### heightPercentage

    public TableLayout.Constraint heightPercentage(int height)

    Sets the row height based on percentage of the parent

    ###### Parameters

    - `height`: negative number indicates ignoring this member

  - ### hp

    public TableLayout.Constraint hp(int height)

    Sets the row height based on percentage of the parent

    ###### Parameters

    - `height`: negative number indicates ignoring this member

  - ### horizontalAlign

    public TableLayout.Constraint horizontalAlign(int align)

    Sets the horizontal alignment of the table cell

    ###### Parameters

    - `align`: Component.LEFT/RIGHT/CENTER

  - ### ha

    public TableLayout.Constraint ha(int align)

    Sets the horizontal alignment of the table cell

    ###### Parameters

    - `align`: Component.LEFT/RIGHT/CENTER

  - ### verticalAlign

    public TableLayout.Constraint verticalAlign(int valign)

    Sets the vertical alignment of the table cell

    ###### Parameters

    - `valign`: Component.TOP/BOTTOM/CENTER

  - ### va

    public TableLayout.Constraint va(int valign)

    Sets the vertical alignment of the table cell

    ###### Parameters

    - `valign`: Component.TOP/BOTTOM/CENTER

  - ### getRow

    public int getRow()

    ###### Returns

    the row

  - ### getColumn

    public int getColumn()

    ###### Returns

    the column

  - ### getWidthPercentage

    public int getWidthPercentage()

    ###### Returns

    the width

  - ### setWidthPercentage

    public void setWidthPercentage(int width)

    Sets the column width based on percentage of the parent

    ###### Parameters

    - `width`: negative number indicates ignoring this member

  - ### getHeightPercentage

    public int getHeightPercentage()

    ###### Returns

    the height

  - ### setHeightPercentage

    public void setHeightPercentage(int height)

    Sets the row height based on percentage of the parent

    ###### Parameters

    - `height`: negative number indicates ignoring this member

  - ### getHorizontalSpan

    public int getHorizontalSpan()

    ###### Returns

    the spanHorizontal

  - ### setHorizontalSpan

    public void setHorizontalSpan(int span)

    Sets the cells to span horizontally, this number must never be smaller than 1

    ###### Parameters

    - `span`: a number larger than 1

  - ### getVerticalSpan

    public int getVerticalSpan()

    ###### Returns

    the spanVertical

  - ### setVerticalSpan

    public void setVerticalSpan(int span)

    Sets the cells to span vertically, this number must never be smaller than 1

    ###### Parameters

    - `span`: a number larger than 1

  - ### getHorizontalAlign

    public int getHorizontalAlign()

    ###### Returns

    the align

  - ### setHorizontalAlign

    public void setHorizontalAlign(int align)

    Sets the horizontal alignment of the table cell

    ###### Parameters

    - `align`: Component.LEFT/RIGHT/CENTER

  - ### getVerticalAlign

    public int getVerticalAlign()

    ###### Returns

    the valign

  - ### setVerticalAlign

    public void setVerticalAlign(int valign)

    Sets the vertical alignment of the table cell

    ###### Parameters

    - `valign`: Component.TOP/BOTTOM/CENTER