private class InlineViewportMaker extends AbstractMaker {
public void startElement(Attributes attributes) {
int level = XMLUtil.getAttributeAsInt(attributes, "level", -1);
InlineViewport viewport = new InlineViewport(null, level);
transferForeignObjects(attributes, viewport);
setAreaAttributes(attributes, viewport);
setTraits(attributes, viewport, SUBSET_COMMON);
setTraits(attributes, viewport, SUBSET_BOX);
setTraits(attributes, viewport, SUBSET_COLOR);
viewport.setContentPosition(XMLUtil.getAttributeAsRectangle2D(attributes, "pos"));
viewport.setClip(XMLUtil.getAttributeAsBoolean(attributes, "clip", false));
viewport.setBlockProgressionOffset
( XMLUtil.getAttributeAsInt(attributes, "offset", 0) );
Area parent = (Area)areaStack.peek();
parent.addChildArea(viewport);
areaStack.push(viewport);
}