if (bcpos == null) {
// the Positions in positionList were inside the elements
// created by the LineLM
- childPosIter = new StackingIter(positionList.listIterator());
+ childPosIter = new PositionIterator(positionList.listIterator());
while ((childLM = childPosIter.getNextChildLM()) != null) {
// set last area flag
// the Positions in positionList were inside the elements
// created by the LineLM
- childPosIter = new StackingIter(positionList.listIterator());
+ childPosIter = new PositionIterator(positionList.listIterator());
while ((childLM = childPosIter.getNextChildLM()) != null) {
// set last area flag
return adj;
}
}
- } else if (innerPosition.getLM() != this) {
+ } else if (innerPosition != null && innerPosition.getLM() != this) {
// this adjustment concerns another LM
NonLeafPosition savedPos = (NonLeafPosition) lastElement.getPosition();
lastElement.setPosition(innerPosition);
}
}
- /** A stack iterator. */
- protected static class StackingIter extends PositionIterator {
-
- /**
- * Construct a stacking iterator.
- * @param parentIter the parent iterator
- */
- StackingIter(Iterator parentIter) {
- super(parentIter);
- }
-
- /**
- * @param nextObj the next position
- * @return the layout manager of the next position
- */
- protected LayoutManager getLM(Object nextObj) {
- return ((Position) nextObj).getLM();
- }
-
- /**
- * @param nextObj the next position
- * @return the next position
- */
- protected Position getPos(Object nextObj) {
- return ((Position) nextObj);
- }
- }
-
/** A mapping position. */
protected static class MappingPosition extends Position {