private MinOptMax effSpaceBefore;
private MinOptMax effSpaceAfter;
- private static class StackingIter extends PositionIterator {
- StackingIter(Iterator parentIter) {
- super(parentIter);
- }
-
- protected LayoutManager getLM(Object nextObj) {
- return ((Position) nextObj).getLM();
- }
-
- protected Position getPos(Object nextObj) {
- return ((Position) nextObj);
- }
- }
-
/**
* Create a new list block layout manager.
* @param node list-block to create the layout manager for
}
/** {@inheritDoc} */
+ @Override
public void initialize() {
foSpaceBefore = new SpaceVal(
getListBlockFO().getCommonMarginBlock().spaceBefore, this).getSpace();
}
/** {@inheritDoc} */
+ @Override
public List getNextKnuthElements(LayoutContext context, int alignment) {
resetSpaces();
List returnList = super.getNextKnuthElements(context, alignment);
}
/** {@inheritDoc} */
+ @Override
public List getChangedKnuthElements(List oldList, int alignment) {
//log.debug("LBLM.getChangedKnuthElements>");
return super.getChangedKnuthElements(oldList, alignment);
* @param parentIter the position iterator
* @param layoutContext the layout context for adding areas
*/
+ @Override
public void addAreas(PositionIterator parentIter,
LayoutContext layoutContext) {
getParentArea(null);
// "unwrap" the NonLeafPositions stored in parentIter
// and put them in a new list;
- LinkedList positionList = new LinkedList();
+ LinkedList<Position> positionList = new LinkedList<Position>();
Position pos;
while (parentIter.hasNext()) {
- pos = (Position)parentIter.next();
+ pos = parentIter.next();
if (pos.getIndex() >= 0) {
if (firstPos == null) {
firstPos = pos;
addMarkersToPage(true, isFirst(firstPos), isLast(lastPos));
- StackingIter childPosIter = new StackingIter(positionList.listIterator());
+ PositionIterator childPosIter = new PositionIterator(positionList.listIterator());
while ((childLM = childPosIter.getNextChildLM()) != null) {
// Add the block areas to Area
// set the space adjustment ratio
* @param childArea the child area
* @return the parent area of the child
*/
+ @Override
public Area getParentArea(Area childArea) {
if (curBlockArea == null) {
curBlockArea = new Block();
package org.apache.fop.layoutmgr.list;
-import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
private int xoffset;
private int itemIPD;
- private static class StackingIter extends PositionIterator {
- StackingIter(Iterator parentIter) {
- super(parentIter);
- }
-
- protected LayoutManager getLM(Object nextObj) {
- return ((Position) nextObj).getLM();
- }
-
- protected Position getPos(Object nextObj) {
- return ((Position) nextObj);
- }
- }
-
/**
* Create a new Cell layout manager.
* @param node list-item-label node
}
/** {@inheritDoc} */
+ @Override
public List getChangedKnuthElements(List oldList, int alignment) {
//log.debug(" ListItemContentLayoutManager.getChanged>");
return super.getChangedKnuthElements(oldList, alignment);
* @param parentIter the iterator of the break positions
* @param layoutContext the layout context for adding the areas
*/
+ @Override
public void addAreas(PositionIterator parentIter,
LayoutContext layoutContext) {
getParentArea(null);
// "unwrap" the NonLeafPositions stored in parentIter
// and put them in a new list;
- LinkedList positionList = new LinkedList();
+ LinkedList<Position> positionList = new LinkedList<Position>();
Position pos;
while (parentIter.hasNext()) {
- pos = (Position)parentIter.next();
+ pos = parentIter.next();
if (pos == null) {
continue;
}
addMarkersToPage(true, isFirst(firstPos), isLast(lastPos));
- StackingIter childPosIter = new StackingIter(positionList.listIterator());
+ PositionIterator childPosIter = new PositionIterator(positionList.listIterator());
while ((childLM = childPosIter.getNextChildLM()) != null) {
// Add the block areas to Area
lc.setFlags(LayoutContext.FIRST_AREA, childLM == firstLM);
* @param childArea the child area to get the parent for
* @return the parent area
*/
+ @Override
public Area getParentArea(Area childArea) {
if (curBlockArea == null) {
curBlockArea = new Block();
*
* @param childArea the child to add to the cell
*/
+ @Override
public void addChildArea(Area childArea) {
if (curBlockArea != null) {
curBlockArea.addBlock((Block) childArea);