# LineBreaker.ParagraphConstraints

Added in[API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Summary:[Ctors](https://developer.android.com/reference/android/graphics/text/LineBreaker.ParagraphConstraints#pubctors)\|[Methods](https://developer.android.com/reference/android/graphics/text/LineBreaker.ParagraphConstraints#pubmethods)\|[Inherited Methods](https://developer.android.com/reference/android/graphics/text/LineBreaker.ParagraphConstraints#inhmethods)  

# LineBreaker.ParagraphConstraints

*** ** * ** ***

[Kotlin](https://developer.android.com/reference/kotlin/android/graphics/text/LineBreaker.ParagraphConstraints "View this page in Kotlin")\|Java

`
public
static


class
LineBreaker.ParagraphConstraints
`  
`

extends `[Object](https://developer.android.com/reference/java/lang/Object)`


``


`

|---|--------------------------------------------------------|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | android.graphics.text.LineBreaker.ParagraphConstraints |

<br />

*** ** * ** ***

Line breaking constraints for single paragraph.

## Summary

|                                                                 ### Public constructors                                                                  ||
|-------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| ` `[ParagraphConstraints](https://developer.android.com/reference/android/graphics/text/LineBreaker.ParagraphConstraints#ParagraphConstraints())`() ` |

|                                                                                                           ### Public methods                                                                                                            ||
|------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` float`   | ` `[getDefaultTabStop](https://developer.android.com/reference/android/graphics/text/LineBreaker.ParagraphConstraints#getDefaultTabStop())`() ` Returns the default tab stops in pixels.                                    |
| ` float`   | ` `[getFirstWidth](https://developer.android.com/reference/android/graphics/text/LineBreaker.ParagraphConstraints#getFirstWidth())`() ` Return the first line's width for this paragraph in pixel.                          |
| ` int`     | ` `[getFirstWidthLineCount](https://developer.android.com/reference/android/graphics/text/LineBreaker.ParagraphConstraints#getFirstWidthLineCount())`() ` Return the number of lines to apply the first line's width.       |
| ` float[]` | ` `[getTabStops](https://developer.android.com/reference/android/graphics/text/LineBreaker.ParagraphConstraints#getTabStops())`() ` Returns the array of tab stops in pixels.                                               |
| ` float`   | ` `[getWidth](https://developer.android.com/reference/android/graphics/text/LineBreaker.ParagraphConstraints#getWidth())`() ` Return the width for this paragraph in pixels.                                                |
| ` void`    | ` `[setIndent](https://developer.android.com/reference/android/graphics/text/LineBreaker.ParagraphConstraints#setIndent(float,%20int))`(float firstWidth, int firstWidthLineCount) ` Set indent for this paragraph.         |
| ` void`    | ` `[setTabStops](https://developer.android.com/reference/android/graphics/text/LineBreaker.ParagraphConstraints#setTabStops(float[],%20float))`(float[] tabStops, float defaultTabStop) ` Set tab stops for this paragraph. |
| ` void`    | ` `[setWidth](https://developer.android.com/reference/android/graphics/text/LineBreaker.ParagraphConstraints#setWidth(float))`(float width) ` Set width for this paragraph.                                                 |

| ### Inherited methods |
|-----------------------|---|
| From class` `[java.lang.Object](https://developer.android.com/reference/java/lang/Object)` ` |--------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` `[Object](https://developer.android.com/reference/java/lang/Object)          | ` `[clone](https://developer.android.com/reference/java/lang/Object#clone())`() ` Creates and returns a copy of this object.                                                                                                                                                      | | ` boolean`                                                                     | ` `[equals](https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object))`(`[Object](https://developer.android.com/reference/java/lang/Object)` obj) ` Indicates whether some other object is "equal to" this one.                                           | | ` void`                                                                        | ` `[finalize](https://developer.android.com/reference/java/lang/Object#finalize())`() ` Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.                                                          | | ` final `[Class](https://developer.android.com/reference/java/lang/Class)`<?>` | ` `[getClass](https://developer.android.com/reference/java/lang/Object#getClass())`() ` Returns the runtime class of this`Object`.                                                                                                                                                | | ` int`                                                                         | ` `[hashCode](https://developer.android.com/reference/java/lang/Object#hashCode())`() ` Returns a hash code value for the object.                                                                                                                                                 | | ` final void`                                                                  | ` `[notify](https://developer.android.com/reference/java/lang/Object#notify())`() ` Wakes up a single thread that is waiting on this object's monitor.                                                                                                                            | | ` final void`                                                                  | ` `[notifyAll](https://developer.android.com/reference/java/lang/Object#notifyAll())`() ` Wakes up all threads that are waiting on this object's monitor.                                                                                                                         | | ` `[String](https://developer.android.com/reference/java/lang/String)          | ` `[toString](https://developer.android.com/reference/java/lang/Object#toString())`() ` Returns a string representation of the object.                                                                                                                                            | | ` final void`                                                                  | ` `[wait](https://developer.android.com/reference/java/lang/Object#wait(long,%20int))`(long timeoutMillis, int nanos) ` Causes the current thread to wait until it is awakened, typically by being*notified* or*interrupted*, or until a certain amount of real time has elapsed. | | ` final void`                                                                  | ` `[wait](https://developer.android.com/reference/java/lang/Object#wait(long))`(long timeoutMillis) ` Causes the current thread to wait until it is awakened, typically by being*notified* or*interrupted*, or until a certain amount of real time has elapsed.                   | | ` final void`                                                                  | ` `[wait](https://developer.android.com/reference/java/lang/Object#wait())`() ` Causes the current thread to wait until it is awakened, typically by being*notified* or*interrupted*.                                                                                             | ||

## Public constructors

### ParagraphConstraints

Added in[API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public ParagraphConstraints ()
```

<br />

<br />

## Public methods

### getDefaultTabStop

Added in[API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public float getDefaultTabStop ()
```

Returns the default tab stops in pixels.  
The units of this value are pixels.

<br />

|                                   Returns                                    ||
|---------|---------------------------------------------------------------------|
| `float` | The units of this value are pixels. Value is 0.0f or greater <br /> |

**See also:**

- [setTabStops(float, float)](https://developer.android.com/reference/android/graphics/text/LineBreaker.ParagraphConstraints#setTabStops(float[],%20float))  

### getFirstWidth

Added in[API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public float getFirstWidth ()
```

Return the first line's width for this paragraph in pixel.  
The units of this value are pixels.

<br />

|                                   Returns                                    ||
|---------|---------------------------------------------------------------------|
| `float` | The units of this value are pixels. Value is 0.0f or greater <br /> |

**See also:**

- [setIndent(float, int)](https://developer.android.com/reference/android/graphics/text/LineBreaker.ParagraphConstraints#setIndent(float,%20int))  

### getFirstWidthLineCount

Added in[API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public int getFirstWidthLineCount ()
```

Return the number of lines to apply the first line's width.  
The units of this value are pixels.

<br />

|                                 Returns                                 ||
|-------|------------------------------------------------------------------|
| `int` | The units of this value are pixels. Value is 0 or greater <br /> |

**See also:**

- [setIndent(float, int)](https://developer.android.com/reference/android/graphics/text/LineBreaker.ParagraphConstraints#setIndent(float,%20int))  

### getTabStops

Added in[API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public float[] getTabStops ()
```

Returns the array of tab stops in pixels.

<br />

|                  Returns                   ||
|-----------|---------------------------------|
| `float[]` | This value may be`null`. <br /> |

**See also:**

- [setTabStops(float, float)](https://developer.android.com/reference/android/graphics/text/LineBreaker.ParagraphConstraints#setTabStops(float[],%20float))  

### getWidth

Added in[API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public float getWidth ()
```

Return the width for this paragraph in pixels.  
The units of this value are pixels.

<br />

|                                   Returns                                    ||
|---------|---------------------------------------------------------------------|
| `float` | The units of this value are pixels. Value is 0.0f or greater <br /> |

**See also:**

- [setWidth(float)](https://developer.android.com/reference/android/graphics/text/LineBreaker.ParagraphConstraints#setWidth(float))  

### setIndent

Added in[API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public void setIndent (float firstWidth, 
                int firstWidthLineCount)
```

Set indent for this paragraph.

<br />

|                                                                     Parameters                                                                      ||
|-----------------------|------------------------------------------------------------------------------------------------------------------------------|
| `firstWidth`          | `float`: the line width of the starting of the paragraph The units of this value are pixels. Value is 0.0f or greater <br /> |
| `firstWidthLineCount` | `int`: the number of lines that applies the firstWidth The units of this value are pixels. Value is 0 or greater <br />      |

**See also:**

- [getFirstWidth()](https://developer.android.com/reference/android/graphics/text/LineBreaker.ParagraphConstraints#getFirstWidth())
- [getFirstWidthLineCount()](https://developer.android.com/reference/android/graphics/text/LineBreaker.ParagraphConstraints#getFirstWidthLineCount())  

### setTabStops

Added in[API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public void setTabStops (float[] tabStops, 
                float defaultTabStop)
```

Set tab stops for this paragraph.

<br />

|                                                                 Parameters                                                                 ||
|------------------|--------------------------------------------------------------------------------------------------------------------------|
| `tabStops`       | `float`: the array of pixels of tap stopping position This value may be`null`. <br />                                    |
| `defaultTabStop` | `float`: pixels of the default tab stopping position The units of this value are pixels. Value is 0.0f or greater <br /> |

**See also:**

- [getTabStops()](https://developer.android.com/reference/android/graphics/text/LineBreaker.ParagraphConstraints#getTabStops())
- [getDefaultTabStop()](https://developer.android.com/reference/android/graphics/text/LineBreaker.ParagraphConstraints#getDefaultTabStop())  

### setWidth

Added in[API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public void setWidth (float width)
```

Set width for this paragraph.

<br />

|                                      Parameters                                       ||
|---------|------------------------------------------------------------------------------|
| `width` | `float`: The units of this value are pixels. Value is 0.0f or greater <br /> |

**See also:**

- [getWidth()](https://developer.android.com/reference/android/graphics/text/LineBreaker.ParagraphConstraints#getWidth())