private Length orphanContentLimit;
/** collection of columns in this table */
- private List columns = new ArrayList();
+ private List<FONode> columns = new ArrayList<FONode>();
private ColumnNumberManager columnNumberManager = new ColumnNumberManager();
*
* @return a list of {@link TableColumn} elements, may contain null elements
*/
- public List getColumns() {
+ public List<FONode> getColumns() {
return columns;
}
}
public void recreateChildrenLMs() {
- childLMs = new ArrayList();
+ childLMs = new ArrayList<>();
isFinished = false;
if (fobj == null) {
return;
* @return the first PageViewport that contains the ID trait
*/
public PageViewport getFirstPVWithID(String idref) {
- List list = idTracker.getPageViewportsContainingID(idref);
+ List<PageViewport> list = idTracker.getPageViewportsContainingID(idref);
if (list != null && list.size() > 0) {
- return (PageViewport) list.get(0);
+ return list.get(0);
}
return null;
}
* @return the last PageViewport that contains the ID trait
*/
public PageViewport getLastPVWithID(String idref) {
- List list = idTracker.getPageViewportsContainingID(idref);
+ List<PageViewport> list = idTracker.getPageViewportsContainingID(idref);
if (list != null && list.size() > 0) {
- return (PageViewport) list.get(list.size() - 1);
+ return list.get(list.size() - 1);
}
return null;
}
while ((curLM = getChildLM()) != null) {
LayoutContext childLC = makeChildLayoutContext(context);
- List returnedList = null;
+ List<ListElement> returnedList = null;
if (!curLM.isFinished()) {
returnedList = curLM.getNextKnuthElements(childLC, alignment);
}
* @param sourceList source list
* @param targetList target list receiving the wrapped position elements
*/
- protected void wrapPositionElements(List sourceList, List targetList) {
+ protected void wrapPositionElements(List sourceList, List<ListElement> targetList) {
wrapPositionElements(sourceList, targetList, false);
}
* @param targetList target list receiving the wrapped position elements
* @param force if true, every Position is wrapped regardless of its LM of origin
*/
- protected void wrapPositionElements(List sourceList, List targetList, boolean force) {
+ protected void wrapPositionElements(List sourceList, List<ListElement> targetList, boolean force) {
ListIterator listIter = sourceList.listIterator();
Object tempElement;
* @param targetList target list receiving the wrapped position elements
* @param force if true, every Position is wrapped regardless of its LM of origin
*/
- protected void wrapPositionElement(ListElement el, List targetList, boolean force) {
+ protected void wrapPositionElement(ListElement el, List<ListElement> targetList, boolean force) {
if (force || el.getLayoutManager() != this) {
el.setPosition(notifyPos(new NonLeafPosition(this, el.getPosition())));
}
private int penaltyWidth;
private int penaltyValue;
private int breakClass;
- private List pendingBeforeMarks;
- private List pendingAfterMarks;
+ private List<ListElement> pendingBeforeMarks;
+ private List<ListElement> pendingAfterMarks;
/**
* Main constructor
}
/** @return the pending border and padding elements at the before edge */
- public List getPendingBeforeMarks() {
+ public List<ListElement> getPendingBeforeMarks() {
return this.pendingBeforeMarks;
}
/** @return the pending border and padding elements at the after edge */
- public List getPendingAfterMarks() {
+ public List<ListElement> getPendingAfterMarks() {
return this.pendingAfterMarks;
}
private ElementListObserver() {
}
- private static List activeObservers;
+ private static List<Observer> activeObservers;
/**
* Adds a new Observer to the list.
*/
public static void addObserver(Observer observer) {
if (!isObservationActive()) {
- activeObservers = new java.util.ArrayList();
+ activeObservers = new java.util.ArrayList<>();
}
activeObservers.add(observer);
}
private List<FootnoteBodyLayoutManager> footnoteList;
private List<FloatContentLayoutManager> floatContentLMs;
/** List of Knuth elements. This is a list of LinkedList elements. */
- private List elementLists;
+ private List<List<KnuthElement>> elementLists;
/**
* Creates a new box.
*/
public void addElementList(List list) {
if (elementLists == null) {
- elementLists = new LinkedList();
+ elementLists = new LinkedList<>();
}
elementLists.add(list);
}
*
* @return a list of KnuthElement sequences corresponding to footnotes cited in this box
*/
- public List getElementLists() {
+ public List<List<KnuthElement>> getElementLists() {
return elementLists;
}
* A list of pending marks (border and padding) on the after edge when a page break occurs.
* May be null.
*/
- private List pendingAfterMarks;
+ private List<ListElement> pendingAfterMarks;
/**
* A list of pending marks (border and padding) on the before edge when a page break occurs.
* May be null.
*/
- private List pendingBeforeMarks;
+ private List<ListElement> pendingBeforeMarks;
/** Current hyphenation context. May be null. */
private HyphContext hyphContext;
/** @param source from which pending marks are copied */
public void copyPendingMarksFrom(LayoutContext source) {
if (source.pendingAfterMarks != null) {
- this.pendingAfterMarks = new java.util.ArrayList(source.pendingAfterMarks);
+ this.pendingAfterMarks = new java.util.ArrayList<>(source.pendingAfterMarks);
}
if (source.pendingBeforeMarks != null) {
- this.pendingBeforeMarks = new java.util.ArrayList(source.pendingBeforeMarks);
+ this.pendingBeforeMarks = new java.util.ArrayList<>(source.pendingBeforeMarks);
}
}
*/
public void addPendingAfterMark(UnresolvedListElementWithLength element) {
if (this.pendingAfterMarks == null) {
- this.pendingAfterMarks = new java.util.ArrayList();
+ this.pendingAfterMarks = new java.util.ArrayList<>();
}
this.pendingAfterMarks.add(element);
}
* @return the pending border and padding elements at the after edge
* @see #addPendingAfterMark(UnresolvedListElementWithLength)
*/
- public List getPendingAfterMarks() {
+ public List<ListElement> getPendingAfterMarks() {
if (this.pendingAfterMarks != null) {
return Collections.unmodifiableList(this.pendingAfterMarks);
} else {
*/
public void addPendingBeforeMark(UnresolvedListElementWithLength element) {
if (this.pendingBeforeMarks == null) {
- this.pendingBeforeMarks = new java.util.ArrayList();
+ this.pendingBeforeMarks = new java.util.ArrayList<>();
}
this.pendingBeforeMarks.add(element);
}
* @return the pending border and padding elements at the before edge
* @see #addPendingBeforeMark(UnresolvedListElementWithLength)
*/
- public List getPendingBeforeMarks() {
+ public List<ListElement> getPendingBeforeMarks() {
if (this.pendingBeforeMarks != null) {
return Collections.unmodifiableList(this.pendingBeforeMarks);
} else {
* @param node the FO node for which the LayoutManagers are made
* @param lms the list to which the LayoutManagers are added
*/
- void makeLayoutManagers(FONode node, List lms);
+ void makeLayoutManagers(FONode node, List<LayoutManager> lms);
/**
* Make a specific LayoutManager for the node.
/** {@inheritDoc} */
public LayoutManager makeLayoutManager(FONode node) {
- List lms = new ArrayList();
+ List<LayoutManager> lms = new ArrayList<>();
makeLayoutManagers(node, lms);
if (lms.size() == 0) {
throw new IllegalStateException("LayoutManager for class "
+ node.getClass()
+ " found, only one may be declared.");
}
- return (LayoutManager) lms.get(0);
+ return lms.get(0);
}
/** {@inheritDoc} */
childLC.setRefIPD(context.getRefIPD());
childLC.setWritingMode(context.getWritingMode());
- List returnedList = null;
+ List<ListElement> returnedList = null;
// The following is a HACK! Ignore leading and trailing white space
boolean ignore = curLM instanceof TextLayoutManager;
if (!curLM.isFinished()) {
private int floatHeight;
private int floatYOffset;
- private List relayedFootnotesList;
- private List relayedLengthList;
+ private List<ListElement> relayedFootnotesList;
+ private List<Integer> relayedLengthList;
private int relayedTotalFootnotesLength;
private int relayedInsertedFootnotesLength;
private boolean relayedFootnotesPending;
pageBreakHandled = true;
}
- public void holdFootnotes(List fl, List ll, int tfl, int ifl, boolean fp, boolean nf, int fnfi, int fli,
- int fei, MinOptMax fsl, int pfli, int pfei) {
+ public void holdFootnotes(List fl, List<Integer> ll, int tfl, int ifl, boolean fp, boolean nf, int fnfi, int fli,
+ int fei, MinOptMax fsl, int pfli, int pfei) {
relayedFootnotesList = fl;
relayedLengthList = ll;
relayedTotalFootnotesLength = tfl;
handlingStartOfFloat = false;
}
- public void loadFootnotes(List fl, List ll, int tfl, int ifl, boolean fp, boolean nf, int fnfi, int fli,
+ public void loadFootnotes(List fl, List<Integer> ll, int tfl, int ifl, boolean fp, boolean nf, int fnfi, int fli,
int fei, MinOptMax fsl, int pfli, int pfei) {
footnotesList = fl;
lengthList = ll;
return flowIPD;
}
- public void holdFootnotes(List fl, List ll, int tfl, int ifl, boolean fp, boolean nf, int fnfi, int fli,
- int fei, MinOptMax fsl, int pfli, int pfei) {
+ public void holdFootnotes(List fl, List<Integer> ll, int tfl, int ifl, boolean fp, boolean nf, int fnfi, int fli,
+ int fei, MinOptMax fsl, int pfli, int pfei) {
if (fl != null && fl.size() > 0) {
pageBreaker.holdFootnotes(fl, ll, tfl, ifl, fp, nf, fnfi, fli, fei, fsl, pfli, pfei);
}
.get(eventBroadcaster);
eventProducer.nonRestartableContentFlowingToNarrowerPage(this);
}
- breaker.firstElementsForRestart = new LinkedList();
+ breaker.firstElementsForRestart = new LinkedList<>();
boolean boxFound = false;
Iterator iter = blockList.listIterator(positionIndex + 1);
Position position = null;
* @param isFirst Resolution at the beginning of a (full) element list
* @param isLast Resolution at the end of a (full) element list
*/
- private SpaceResolver(List first, BreakElement breakPoss, List second,
+ private SpaceResolver(List first, BreakElement breakPoss, List<ListElement> second,
boolean isFirst, boolean isLast) {
this.isFirst = isFirst;
this.isLast = isLast;
boolean first = true;
boolean last = false;
boolean skipNextElement = false;
- List unresolvedFirst = new java.util.ArrayList();
- List unresolvedSecond = new java.util.ArrayList();
- List currentGroup;
+ List<ListElement> unresolvedFirst = new java.util.ArrayList<>();
+ List<ListElement> unresolvedSecond = new java.util.ArrayList<>();
+ List<ListElement> currentGroup;
ListIterator iter = elems.listIterator();
while (iter.hasNext()) {
ListElement el = (ListElement)iter.next();
LOG.trace("Swap first and second parts in no-break condition,"
+ " second part is empty.");
//The first list is reversed, so swap if this shouldn't happen
- List swapList = unresolvedSecond;
+ List<ListElement> swapList = unresolvedSecond;
unresolvedSecond = unresolvedFirst;
unresolvedFirst = swapList;
}
private boolean startsReferenceArea;
private boolean hasForcing;
- private List spaceVals = new ArrayList();
+ private List<SpaceVal> spaceVals = new ArrayList<SpaceVal>();
/**
* Creates a new SpaceSpecifier.
ss.startsReferenceArea = startsReferenceArea;
ss.hasForcing = hasForcing;
// Clone the vector, but share the objects in it!
- ss.spaceVals = new ArrayList();
+ ss.spaceVals = new ArrayList<SpaceVal>();
ss.spaceVals.addAll(spaceVals);
return ss;
} catch (CloneNotSupportedException cnse) {
// Start from the end and count conditional specifiers
// Stop at first non-conditional
for (; lastIndex > 0; --lastIndex) {
- SpaceVal spaceVal = (SpaceVal) spaceVals.get(lastIndex - 1);
+ SpaceVal spaceVal = spaceVals.get(lastIndex - 1);
if (!spaceVal.isConditional()) {
break;
}
MinOptMax resolvedSpace = MinOptMax.ZERO;
int maxPrecedence = -1;
for (int index = 0; index < lastIndex; index++) {
- SpaceVal spaceVal = (SpaceVal) spaceVals.get(index);
+ SpaceVal spaceVal = spaceVals.get(index);
MinOptMax space = spaceVal.getSpace();
if (hasForcing) {
resolvedSpace = resolvedSpace.plus(space);
* {@inheritDoc}
*/
public List<LayoutManager> getChildLMs() {
- List childLMs = new ArrayList(1);
+ List<LayoutManager> childLMs = new ArrayList<>(1);
childLMs.add(childLM);
return childLMs;
}
depth += 1;
KnuthElement returnedElement;
- LinkedList returnedList = new LinkedList();
+ LinkedList returnedList = new LinkedList<>();
LinkedList<ListElement> returnList = new LinkedList<>();
InlineLevelLayoutManager prevLM = null;
InlineLevelLayoutManager currLM;
InlineLevelLayoutManager curLM;
while ((curLM = (InlineLevelLayoutManager) getChildLM()) != null) {
- List inlineElements = curLM.getNextKnuthElements(inlineLC, effectiveAlignment);
+ List<KnuthSequence> inlineElements = curLM.getNextKnuthElements(inlineLC, effectiveAlignment);
if (inlineElements == null || inlineElements.size() == 0) {
/* curLM.getNextKnuthElements() returned null or an empty list;
* this can happen if there is nothing more to layout,
}
if (lastPar != null) {
- KnuthSequence firstSeq = (KnuthSequence) inlineElements.get(0);
+ KnuthSequence firstSeq = inlineElements.get(0);
// finish last paragraph before a new block sequence
if (!firstSeq.isInlineSequence()) {
// hyphenate every word
ListIterator currParIterator = currPar.listIterator(currPar.ignoreAtStart);
// list of TLM involved in hyphenation
- List updateList = new LinkedList();
+ List<Update> updateList = new LinkedList<>();
KnuthElement firstElement;
KnuthElement nextElement;
// current InlineLevelLayoutManager
processUpdates(currPar, updateList);
}
- private void processUpdates(Paragraph par, List<ListElement> updateList) {
+ private void processUpdates(Paragraph par, List<Update> updateList) {
// create iterator for the updateList
ListIterator updateListIterator = updateList.listIterator();
Update currUpdate;
* The positionList must contain one area-generating position,
* which creates one line area.
*/
- List positionList = new ArrayList(1);
+ List<Position> positionList = new ArrayList<>(1);
Position innerPosition = pos.getPosition();
positionList.add(innerPosition);
/** default constructor */
public LineLayoutPossibilities() {
- possibilitiesList = new java.util.ArrayList();
- savedPossibilities = new java.util.ArrayList();
+ possibilitiesList = new java.util.ArrayList<>();
+ savedPossibilities = new java.util.ArrayList<>();
optimumIndex = -1;
}
savedOptLineCount = 0;
}
savedPossibilities = possibilitiesList;
- possibilitiesList = new java.util.ArrayList();
+ possibilitiesList = new java.util.ArrayList<>();
}
/**
private int changeOffset;
private int thisStart;
private int tempStart;
- private List changeList = new LinkedList();
+ private List<PendingChange> changeList = new LinkedList<>();
private AlignmentContext alignmentContext;
import org.apache.fop.layoutmgr.ElementListUtils;
import org.apache.fop.layoutmgr.FloatContentLayoutManager;
import org.apache.fop.layoutmgr.FootenoteUtil;
+import org.apache.fop.layoutmgr.FootnoteBodyLayoutManager;
import org.apache.fop.layoutmgr.Keep;
import org.apache.fop.layoutmgr.KnuthBlockBox;
import org.apache.fop.layoutmgr.KnuthElement;
// collect footnote information
// TODO this should really not be done like this. ListItemLM should remain as
// footnote-agnostic as possible
- LinkedList<LayoutManager> footnoteList = new LinkedList<LayoutManager>();
+ LinkedList<FootnoteBodyLayoutManager> footnoteList = new LinkedList<>();
for (int i = 0; i < elementLists.length; i++) {
footnoteList.addAll(FootenoteUtil.getFootnotes(elementLists[i], start[i], end[i]));
}
import org.apache.fop.fo.flow.table.PrimaryGridUnit;
import org.apache.fop.fo.properties.CommonBorderPaddingBackground;
import org.apache.fop.layoutmgr.ElementListUtils;
+import org.apache.fop.layoutmgr.FootnoteBodyLayoutManager;
import org.apache.fop.layoutmgr.Keep;
import org.apache.fop.layoutmgr.KnuthBlockBox;
import org.apache.fop.layoutmgr.KnuthBox;
import org.apache.fop.layoutmgr.KnuthElement;
import org.apache.fop.layoutmgr.KnuthPenalty;
+import org.apache.fop.layoutmgr.ListElement;
import org.apache.fop.traits.MinOptMax;
/**
private PrimaryGridUnit pgu;
/** Knuth elements for this active cell. */
- private List elementList;
+ private List<ListElement> elementList;
/** Iterator over the Knuth element list. */
private ListIterator knuthIter;
/** Number of the row where the row-span ends, zero-based. */
/** Value of the penalty ending this step, 0 if the step does not end on a penalty. */
private int penaltyValue;
/** List of footnotes for this step. */
- private List footnoteList;
+ private List<FootnoteBodyLayoutManager> footnoteList;
/**
* One of {@link Constants#EN_AUTO}, {@link Constants#EN_COLUMN},
* {@link Constants#EN_PAGE}, {@link Constants#EN_EVEN_PAGE},
this.penaltyValue = other.penaltyValue;
if (other.footnoteList != null) {
if (this.footnoteList == null) {
- this.footnoteList = new ArrayList();
+ this.footnoteList = new ArrayList<>();
}
this.footnoteList.addAll(other.footnoteList);
}
} else {
if (el instanceof KnuthBlockBox && ((KnuthBlockBox) el).hasAnchors()) {
if (afterNextStep.footnoteList == null) {
- afterNextStep.footnoteList = new LinkedList();
+ afterNextStep.footnoteList = new LinkedList<>();
}
afterNextStep.footnoteList.addAll(((KnuthBlockBox) el).getFootnoteBodyLMs());
}
private Table table;
private WritingModeTraitsGetter wmTraits;
- private List columns = new java.util.ArrayList();
- private List colWidths = new java.util.ArrayList();
+ private List<TableColumn> columns = new java.util.ArrayList<TableColumn>();
+ private List<Length> colWidths = new java.util.ArrayList<Length>();
private int maxColIndexReferenced;
}
private void prepareColumns() {
- List rawCols = table.getColumns();
+ List<FONode> rawCols = table.getColumns();
if (rawCols != null) {
int colnum = 1;
for (Object rawCol : rawCols) {
}
}
}
- return (TableColumn) columns.get(size - 1);
+ return columns.get(size - 1);
} else {
- return (TableColumn) columns.get(index - 1);
+ return columns.get(index - 1);
}
}
for (int i = columns.size(); --i >= 0;) {
if (columns.get(i) != null) {
- col = (TableColumn) columns.get(i);
+ col = columns.get(i);
colWidth = col.getColumnWidth();
colWidths.add(0, colWidth);
}
for (int i = (col + nrColSpan - 1), nc = colWidths.size(); ++i < nc;) {
int effCol = i;
if (colWidths.get(effCol) != null) {
- xoffset += ((Length) colWidths.get(effCol)).getValue(context);
+ xoffset += colWidths.get(effCol).getValue(context);
}
}
return xoffset;
effCol = colWidths.size() - 1;
}
if (colWidths.get(effCol) != null) {
- xoffset += ((Length) colWidths.get(effCol)).getValue(context);
+ xoffset += colWidths.get(effCol).getValue(context);
}
}
return xoffset;
effIndex = colWidths.size() - 1;
}
if (colWidths.get(effIndex) != null) {
- sum += ((Length) colWidths.get(effIndex)).getValue(context);
+ sum += colWidths.get(effIndex).getValue(context);
}
}
return sum;
childLC.setRefIPD(spanWidth);
//Get the element list for the cell contents
- List elems = primary.getCellLM().getNextKnuthElements(
+ List<ListElement> elems = primary.getCellLM().getNextKnuthElements(
childLC, alignment);
ElementListObserver.observe(elems, "table-cell", primary.getCell().getId());
primary.setElements(elems);
}
}
computeRowHeights();
- List elements = tableStepper.getCombinedKnuthElementsForRowGroup(context,
+ List<ListElement> elements = tableStepper.getCombinedKnuthElementsForRowGroup(context,
rowGroup, bodyType);
returnList.addAll(elements);
}
* This is particularly needed for spanned cells where you need to know the y-offset
* of the starting row when the area is generated at the time the cell is closed.
*/
- private List rowOffsets = new ArrayList();
+ private List<Integer> rowOffsets = new ArrayList<>();
private int[] cellHeights;
private boolean[] firstCellOnPage;
/** See {@link RowPainter#registerPartBackgroundArea(Block)}. */
private CommonBorderPaddingBackground tablePartBackground;
/** See {@link RowPainter#registerPartBackgroundArea(Block)}. */
- private List tablePartBackgroundAreas;
+ private List<Block> tablePartBackgroundAreas;
private TableContentLayoutManager tclm;
if (background.hasBackground()) {
tablePartBackground = background;
if (tablePartBackgroundAreas == null) {
- tablePartBackgroundAreas = new ArrayList();
+ tablePartBackgroundAreas = new ArrayList<Block>();
}
}
tablePartOffset = currentRowOffset;
* @return its y-offset on the page
*/
private int getRowOffset(int rowIndex) {
- return (Integer) rowOffsets.get(rowIndex - firstRowIndex);
+ return rowOffsets.get(rowIndex - firstRowIndex);
}
// TODO get rid of that
private Block curBlockArea;
- //private List childBreaks = new java.util.ArrayList();
-
/**
* Create a new table and caption layout manager.
* @param node table-and-caption FO
private Block curBlockArea;
- //private List childBreaks = new ArrayList();
-
/**
* Create a new Caption layout manager.
* @param node table-caption FO
cellIPD = referenceIPD;
cellIPD -= getIPIndents();
- List returnedList;
+ List<ListElement> returnedList;
List<ListElement> contentList = new LinkedList<>();
List<ListElement> returnList = new LinkedList<>();
}
primaryGridUnit.setKeepWithNext(context.getKeepWithNextPending());
- returnedList = new LinkedList();
+ returnedList = new LinkedList<>();
if (!contentList.isEmpty()) {
wrapPositionElements(contentList, returnList);
} else {
}
//Space resolution
SpaceResolver.resolveElementList(returnList);
- if (((KnuthElement) returnList.get(0)).isForcedBreak()) {
+ if (returnList.get(0).isForcedBreak()) {
primaryGridUnit.setBreakBefore(((KnuthPenalty) returnList.get(0)).getBreakClass());
returnList.remove(0);
assert !returnList.isEmpty();
if (rowGroup != null) {
RowGroupLayoutManager rowGroupLM = new RowGroupLayoutManager(getTableLM(), rowGroup,
stepper);
- List nextRowGroupElems = rowGroupLM.getNextKnuthElements(context, alignment, bodyType);
+ List<ListElement> nextRowGroupElems = rowGroupLM.getNextKnuthElements(context, alignment, bodyType);
keepWithPrevious = keepWithPrevious.compare(context.getKeepWithPreviousPending());
breakBefore = context.getBreakBefore();
int breakBetween = context.getBreakAfter();
this.usedBPD = 0;
RowPainter painter = new RowPainter(this, layoutContext);
- List tablePositions = new java.util.ArrayList();
- List headerElements = null;
- List footerElements = null;
+ List<Position> tablePositions = new java.util.ArrayList<>();
+ List<ListElement> headerElements = null;
+ List<ListElement> footerElements = null;
Position firstPos = null;
Position lastPos = null;
Position lastCheckPos = null;
private void addHeaderFooterAreas(List elements, TablePart part, RowPainter painter,
boolean lastOnPage) {
- List lst = new java.util.ArrayList(elements.size());
+ List<Position> lst = new java.util.ArrayList<>(elements.size());
for (Iterator iter = new KnuthPossPosIter(elements); iter.hasNext();) {
Position pos = (Position) iter.next();
/*
private void addBodyAreas(Iterator iterator, RowPainter painter,
boolean lastOnPage) {
painter.startBody();
- List lst = new java.util.ArrayList();
+ List<TableContentPosition> lst = new java.util.ArrayList<>();
TableContentPosition pos = (TableContentPosition) iterator.next();
boolean isFirstPos = pos.getFlag(TableContentPosition.FIRST_IN_ROWGROUP)
&& pos.getRow().getFlag(EffRow.FIRST_IN_PART);
public static final int LAST_IN_ROWGROUP = 2;
/** the list of CellParts making up this position */
- protected List cellParts;
+ protected List<CellPart> cellParts;
/** effective row this position belongs to */
private EffRow row;
/** flags for the position */
* @param cellParts the list of CellPart instances
* @param row effective row this position belongs to
*/
- protected TableContentPosition(LayoutManager lm, List cellParts,
- EffRow row) {
+ protected TableContentPosition(LayoutManager lm, List<CellPart> cellParts,
+ EffRow row) {
super(lm);
this.cellParts = cellParts;
this.row = row;
}
TablePart getTablePart() {
- return ((CellPart) cellParts.get(0)).pgu.getTablePart();
+ return cellParts.get(0).pgu.getTablePart();
}
/**
import java.util.List;
import org.apache.fop.layoutmgr.LayoutManager;
+import org.apache.fop.layoutmgr.ListElement;
import org.apache.fop.layoutmgr.Position;
/**
class TableHFPenaltyPosition extends Position {
/** Element list for the header */
- protected List headerElements;
+ protected List<ListElement> headerElements;
/** Element list for the footer */
- protected List footerElements;
+ protected List<ListElement> footerElements;
/**
* Creates a new TableHFPenaltyPosition
import java.util.List;
import org.apache.fop.layoutmgr.LayoutManager;
+import org.apache.fop.layoutmgr.ListElement;
import org.apache.fop.layoutmgr.Position;
/**
/** True indicates a position for a header, false for a footer. */
protected boolean header;
/** Element list representing the header/footer */
- protected List nestedElements;
+ protected List<ListElement> nestedElements;
/**
* Creates a new TableHeaderFooterPosition.
* @param nestedElements Element list representing the header/footer
*/
protected TableHeaderFooterPosition(LayoutManager lm,
- boolean header, List nestedElements) {
+ boolean header, List<ListElement> nestedElements) {
super(lm);
this.header = header;
this.nestedElements = nestedElements;
private int halfBorderSeparationIPD;
/** See {@link TableLayoutManager#registerColumnBackgroundArea(TableColumn, Block, int)}. */
- private List columnBackgroundAreas;
+ private List<ColumnBackgroundInfo> columnBackgroundAreas;
private Position auxiliaryPosition;
void registerColumnBackgroundArea(TableColumn column, Block backgroundArea, int xShift) {
addBackgroundArea(backgroundArea);
if (columnBackgroundAreas == null) {
- columnBackgroundAreas = new ArrayList();
+ columnBackgroundAreas = new ArrayList<>();
}
columnBackgroundAreas.add(new ColumnBackgroundInfo(column, backgroundArea, xShift));
}
private boolean rowFinished;
/** Cells spanning the current row. */
- private List activeCells = new LinkedList();
+ private List<ActiveCell> activeCells = new LinkedList<>();
/** Cells that will start the next row. */
- private List nextActiveCells = new LinkedList();
+ private List<ActiveCell> nextActiveCells = new LinkedList<>();
/**
* True if the next row is being delayed, that is, if cells spanning the current and