# Interface: com.pnfsoftware.jeb.client.api.IUnitFragment

A fragment representing parts of a [unit](com.pnfsoftware.jeb.core.units.IUnit.md). Fragments can be used to present documents  generated by the unit, or display regions or various representations of a unit.

## Abstract Method: getActiveAddress
- return type: `java.lang.String`

Description: Retrieve the active address in the fragment, if any.
return: the active address, or null if none

## Abstract Method: getActiveAddress
- parameter: `precision`, type: `com.pnfsoftware.jeb.core.output.AddressConversionPrecision`
- return type: `java.lang.String`

Description: Retrieve the active address in the fragment, with desired precision. Be careful that if  precision is not managed, this method will return null. Call [#getActiveAddress()](#getActiveAddress()) for  safe result.
parameter: precision: expected precision of the active address
return: the active address, or null if no address with the requested precision is available

## Abstract Method: getActiveItem
- return type: `com.pnfsoftware.jeb.core.output.IItem`

Description: Retrieve the currently active item in the fragment \(eg, the caret is on an interactive text  item\), if any.
return: an item or null

## Abstract Method: getActiveItemAsText
- return type: `java.lang.String`

Description: Retrieve the text representing the currently active item.
return: a string, or null if there is no active item or the item has no textual          representation

## Abstract Method: getUnit
- return type: `com.pnfsoftware.jeb.core.units.IUnit`

Description: Get the unit visualized by this fragment.
return: the unit, never null

## Abstract Method: isActiveItem
- parameter: `item`, type: `com.pnfsoftware.jeb.core.output.IItem`
- return type: `boolean`

Description: Determine if the provided item is currently active in the fragment.
parameter: item: item to test
return: true if the item is the active item

## Abstract Method: setActiveAddress
- parameter: `address`, type: `java.lang.String`
- return type: `boolean`

Description: Set the active address within this fragment to the provided address.
parameter: address: the address
return: success indicator

