org.apache.fop.area

## Class RegionViewport

- java.lang.Object
- - org.apache.fop.area.AreaTreeObject
  - - org.apache.fop.area.Area
    - - org.apache.fop.area.RegionViewport

All Implemented Interfaces:
  Serializable, Cloneable, Viewport

    public class RegionViewport
    extends Area
    implements Viewport

Region Viewport area. This object represents the region-viewport-area. It has a region-reference-area as its child. These areas are described in the fo:region-body description in the XSL Recommendation.

See Also:
  Serialized Form

### Field Summary

### Fields inherited from class org.apache.fop.area.Area

`bidiLevel, bpd, CLASS_ABSOLUTE, CLASS_BEFORE_FLOAT, CLASS_FIXED, CLASS_FOOTNOTE, CLASS_MAX, CLASS_NORMAL, CLASS_SIDE_FLOAT, effectiveIPD, ipd, log, ORIENT_0, ORIENT_180, ORIENT_270, ORIENT_90, traits`

### Fields inherited from class org.apache.fop.area.AreaTreeObject

`extensionAttachments, foreignAttributes`

### Constructor Summary

Constructors
Constructor and Description
`RegionViewport(Rectangle2D viewArea)` Create a new region-viewport-area

### Method Summary

All Methods Instance Methods Concrete Methods
`Object` `clone()`
`Rectangle` `getClipRectangle()` Returns the clipping rectangle of this viewport area.
`RegionReference` `getRegionReference()` Get the region-reference-area for this region viewport.
`Rectangle2D` `getViewArea()` Get the view area of this viewport.
`boolean` `hasClip()` Returns true if this area will clip overflowing content.
`void` `setClip(boolean c)` Set the clipping for this region viewport.
`void` `setRegionReference(RegionReference reg)` Set the region-reference-area for this region viewport.
`void` `setWritingModeTraits(WritingModeTraitsGetter wmtg)` Sets the writing mode traits for the region reference of this region viewport

### Methods inherited from class org.apache.fop.area.Area

`activateEffectiveIPD, addChildArea, addTrait, getAllocBPD, getAllocIPD, getAreaClass, getBidiLevel, getBorderAndPaddingWidthAfter, getBorderAndPaddingWidthBefore, getBorderAndPaddingWidthEnd, getBorderAndPaddingWidthStart, getBPD, getChangeBarList, getEffectiveAllocIPD, getEffectiveIPD, getIPD, getSpaceAfter, getSpaceBefore, getSpaceEnd, getSpaceStart, getTrait, getTraitAsBoolean, getTraitAsInteger, getTraits, hasTrait, hasTraits, isFromFootnote, resetBidiLevel, setAreaClass, setBidiLevel, setBPD, setChangeBarList, setFromFootnote, setIPD, setTraits, toString`

### Methods inherited from class org.apache.fop.area.AreaTreeObject

`addExtensionAttachment, getExtensionAttachments, getForeignAttributes, getForeignAttributeValue, hasExtensionAttachments, setExtensionAttachments, setForeignAttribute, setForeignAttributes`

### Methods inherited from class java.lang.Object

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

### Constructor Detail

#### RegionViewport

    public RegionViewport(Rectangle2D viewArea)

Create a new region-viewport-area

Parameters:
  `viewArea` - the view area of this viewport

### Method Detail

#### setRegionReference

    public void setRegionReference(RegionReference reg)

Set the region-reference-area for this region viewport.

Parameters:
  `reg` - the child region-reference-area inside this viewport

#### getRegionReference

    public RegionReference getRegionReference()

Get the region-reference-area for this region viewport.

Returns:
  the child region-reference-area inside this viewport

#### setClip

    public void setClip(boolean c)

Set the clipping for this region viewport.

Parameters:
  `c` - the clipping value

#### hasClip

    public boolean hasClip()

Returns true if this area will clip overflowing content.

Specified by:
  `hasClip` in interface `Viewport`
Returns:
  `true` if the overflow trait has the value "hidden", "scroll" or "error-if-overflow"

#### getClipRectangle

    public Rectangle getClipRectangle()

Returns the clipping rectangle of this viewport area.

Specified by:
  `getClipRectangle` in interface `Viewport`
Returns:
  the clipping rectangle expressed in the viewport's coordinate system, or null if clipping is disabled

#### getViewArea

    public Rectangle2D getViewArea()

Get the view area of this viewport.

Returns:
  the viewport rectangle area

#### clone

    public Object clone()
                 throws CloneNotSupportedException

Overrides:
  `clone` in class `Area`
Throws:
  `CloneNotSupportedException`

#### setWritingModeTraits

    public void setWritingModeTraits(WritingModeTraitsGetter wmtg)

Sets the writing mode traits for the region reference of this region viewport

Overrides:
  `setWritingModeTraits` in class `Area`
Parameters:
  `wmtg` - a WM traits getter