# Interface: com.pnfsoftware.jeb.client.api.IUnitFragment

A fragment representing parts of a [unit](IUnit). Fragments can be used to present documents generated by the unit, or display regions or various representations of a unit.

## Method: getActiveAddress
- return type: `java.lang.String`

Description: Retrieve the active address in the fragment, if any.
return: 

## 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: 

## 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

## 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

## Method: getUnit
- return type: `com.pnfsoftware.jeb.core.units.IUnit`

Description: Get the unit visualized by this fragment.
return: the unit, never null

## 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: 
return: 

## 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

