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

Basic definition of a view, visually representing a [unit](IUnit). A client may have 0, 1, or many views representing a given unit. Each view aggregates fragments representing documents generated by the unit, such as texts, tables, trees, etc.

## Method: getActiveFragment
- return type: `com.pnfsoftware.jeb.client.api.IUnitFragment`

Description: Get the active fragment of the view.
return: the active fragment, or null if none

## Method: getFragmentLabel
- parameter: `fragment`, type: `com.pnfsoftware.jeb.client.api.IUnitFragment`
- return type: `java.lang.String`

Description: Get the optional fragment label.
parameter: fragment: target fragment
return: the label, or null if none

## Method: getFragments
- return type: `java.util.List<? extends com.pnfsoftware.jeb.client.api.IUnitFragment>`

Description: Get the fragments of units represented by this view. Fragments can be used to present documents generated by the unit, or display regions or various representations of a unit. A view should have at least one fragment, even though that fragment may physically occupy the entire view.
return: a list of fragments

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

Description: Get the view label. Typically, the view label is used to briefly describe a view and may be displayed in a title bar.
return: the label

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

Description: Get the unit represented by this view.
return: the unit

## Method: setActiveFragment
- parameter: `fragment`, type: `com.pnfsoftware.jeb.client.api.IUnitFragment`

Description: Set which fragment of the view should be active. The active fragment is the primary one and/or is visible and has the focus \(assuming the holding view is itself visible\).
parameter: fragment: fragment to activate

## Method: setFocus

Description: Bring the current view into focus. If the view is hidden, it should be brought up front.

## Method: setFragmentLabel
- parameter: `fragment`, type: `com.pnfsoftware.jeb.client.api.IUnitFragment`
- parameter: `label`, type: `java.lang.String`

Description: Set the fragment label.
parameter: fragment: target fragment
parameter: label: new label

## Method: setLabel
- parameter: `label`, type: `java.lang.String`

Description: Set the view label.
parameter: label: new label

