* @param block the block area to add
*/
public void addBlock(Block block) {
+ addBlock(block, true);
+ }
+
+ /**
+ * Add the block to this block area.
+ *
+ * @param block the block area to add
+ * @param autoHeight increase the height of the block.
+ */
+ public void addBlock(Block block, boolean autoHeight) {
if (children == null) {
children = new ArrayList();
}
- height += block.getHeight();
+ if (autoHeight) {
+ height += block.getHeight();
+ }
children.add(block);
}
// this.propertyList.get("baseline-shift");
// this.propertyList.get("destination-place-offset");
// this.propertyList.get("dominant-baseline");
- String ext = propertyList.get("external-destination").getString();
+ String ext = propertyList.get(PR_EXTERNAL_DESTINATION).getString();
setupID();
// this.propertyList.get("indicate-destination");
- String internal = propertyList.get("internal-destination").getString();
+ String internal = propertyList.get(PR_INTERNAL_DESTINATION).getString();
if (ext.length() > 0) {
link = ext;
external = true;
* This gets the sizes for the image and the dimensions and clipping.
*/
public void setup() {
- url = this.propertyList.get("src").getString();
+ url = this.propertyList.get(PR_SRC).getString();
if (url == null) {
return;
}
url = ImageFactory.getURL(url);
// assume lr-tb for now
- Length ipd = propertyList.get("inline-progression-dimension.optimum").getLength();
+ Length ipd = propertyList.get(PR_INLINE_PROGRESSION_DIMENSION).getLength();
if (!ipd.isAuto()) {
viewWidth = ipd.getValue();
} else {
- ipd = propertyList.get("width").getLength();
+ ipd = propertyList.get(PR_WIDTH).getLength();
if (!ipd.isAuto()) {
viewWidth = ipd.getValue();
}
}
- Length bpd = propertyList.get("block-progression-dimension.optimum").getLength();
+ Length bpd = propertyList.get(PR_BLOCK_PROGRESSION_DIMENSION | CP_OPTIMUM).getLength();
if (!bpd.isAuto()) {
viewHeight = bpd.getValue();
} else {
- bpd = propertyList.get("height").getLength();
+ bpd = propertyList.get(PR_HEIGHT).getLength();
if (!bpd.isAuto()) {
viewHeight = bpd.getValue();
}
int cwidth = -1;
int cheight = -1;
- Length ch = propertyList.get("content-height").getLength();
+ Length ch = propertyList.get(PR_CONTENT_HEIGHT).getLength();
if (!ch.isAuto()) {
/*if (ch.scaleToFit()) {
if (viewHeight != -1) {
} else {*/
cheight = ch.getValue();
}
- Length cw = propertyList.get("content-width").getLength();
+ Length cw = propertyList.get(PR_CONTENT_WIDTH).getLength();
if (!cw.isAuto()) {
/*if (cw.scaleToFit()) {
if (viewWidth != -1) {
cwidth = cw.getValue();
}
- int scaling = propertyList.get("scaling").getEnum();
+ int scaling = propertyList.get(PR_SCALING).getEnum();
if ((scaling == Scaling.UNIFORM) || (cwidth == -1) || cheight == -1) {
ImageFactory fact = ImageFactory.getInstance();
fopimage = fact.getImage(url, getUserAgent());
}
if (cwidth > viewWidth || cheight > viewHeight) {
- int overflow = propertyList.get("overflow").getEnum();
+ int overflow = propertyList.get(PR_OVERFLOW).getEnum();
if (overflow == Overflow.HIDDEN) {
clip = true;
} else if (overflow == Overflow.ERROR_IF_OVERFLOW) {
int xoffset = 0;
int yoffset = 0;
- int da = propertyList.get("display-align").getEnum();
+ int da = propertyList.get(PR_DISPLAY_ALIGN).getEnum();
switch(da) {
case DisplayAlign.BEFORE:
break;
break;
}
- int ta = propertyList.get("text-align").getEnum();
+ int ta = propertyList.get(PR_TEXT_ALIGN).getEnum();
switch(ta) {
case TextAlign.CENTER:
xoffset = (viewWidth - cwidth) / 2;
public int computeXOffset (int ipd, int cwidth) {
int xoffset = 0;
- int ta = propertyList.get("text-align").getEnum();
+ int ta = propertyList.get(PR_TEXT_ALIGN).getEnum();
switch (ta) {
case TextAlign.CENTER:
xoffset = (ipd - cwidth) / 2;
public int computeYOffset(int bpd, int cheight) {
int yoffset = 0;
- int da = propertyList.get("display-align").getEnum();
+ int da = propertyList.get(PR_DISPLAY_ALIGN).getEnum();
switch (da) {
case DisplayAlign.BEFORE:
break;
// this.propertyList.get("z-index");
// color properties
- ColorType c = this.propertyList.get("color").getColorType();
+ ColorType c = this.propertyList.get(PR_COLOR).getColorType();
float red = c.getRed();
float green = c.getGreen();
float blue = c.getBlue();
// fo:leader specific properties
// determines the pattern of leader; allowed values: space, rule,dots, use-content
- leaderPattern = this.propertyList.get("leader-pattern").getEnum();
+ leaderPattern = this.propertyList.get(PR_LEADER_PATTERN).getEnum();
switch(leaderPattern) {
case LeaderPattern.SPACE:
// use Space
// the following properties only apply
// for leader-pattern = "rule"
ruleThickness =
- propertyList.get("rule-thickness").getLength().getValue();
- ruleStyle = propertyList.get("rule-style").getEnum();
+ propertyList.get(PR_RULE_THICKNESS).getLength().getValue();
+ ruleStyle = propertyList.get(PR_RULE_STYLE).getEnum();
break;
case LeaderPattern.DOTS:
break;
// if leaderPatternWidth = 0 = default = use-font-metric
patternWidth =
- this.propertyList.get("leader-pattern-width").getLength().getValue();
+ this.propertyList.get(PR_LEADER_PATTERN_WIDTH).getLength().getValue();
}
// this.propertyList.get("provisional-distance-between-starts");
// this.propertyList.get("provisional-label-separation");
- this.align = this.propertyList.get("text-align").getEnum();
- this.alignLast = this.propertyList.get("text-align-last").getEnum();
+ this.align = this.propertyList.get(PR_TEXT_ALIGN).getEnum();
+ this.alignLast = this.propertyList.get(PR_TEXT_ALIGN_LAST).getEnum();
this.lineHeight =
- this.propertyList.get("line-height").getLength().getValue();
+ this.propertyList.get(PR_LINE_HEIGHT).getLength().getValue();
this.startIndent =
- this.propertyList.get("start-indent").getLength().getValue();
+ this.propertyList.get(PR_START_INDENT).getLength().getValue();
this.endIndent =
- this.propertyList.get("end-indent").getLength().getValue();
+ this.propertyList.get(PR_END_INDENT).getLength().getValue();
this.spaceBefore =
- this.propertyList.get("space-before.optimum").getLength().getValue();
+ this.propertyList.get(PR_SPACE_BEFORE | CP_OPTIMUM).getLength().getValue();
this.spaceAfter =
- this.propertyList.get("space-after.optimum").getLength().getValue();
+ this.propertyList.get(PR_SPACE_AFTER | CP_OPTIMUM).getLength().getValue();
this.spaceBetweenListRows = 0; // not used at present
this.backgroundColor =
- this.propertyList.get("background-color").getColorType();
+ this.propertyList.get(PR_BACKGROUND_COLOR).getColorType();
}
// this.propertyList.get("keep-with-previous");
// this.propertyList.get("relative-align");
- this.align = this.propertyList.get("text-align").getEnum();
- this.alignLast = this.propertyList.get("text-align-last").getEnum();
+ this.align = this.propertyList.get(PR_TEXT_ALIGN).getEnum();
+ this.alignLast = this.propertyList.get(PR_TEXT_ALIGN_LAST).getEnum();
this.lineHeight =
- this.propertyList.get("line-height").getLength().getValue();
+ this.propertyList.get(PR_LINE_HEIGHT).getLength().getValue();
this.spaceBefore =
- this.propertyList.get("space-before.optimum").getLength().getValue();
+ this.propertyList.get(PR_SPACE_BEFORE | CP_OPTIMUM).getLength().getValue();
this.spaceAfter =
- this.propertyList.get("space-after.optimum").getLength().getValue();
+ this.propertyList.get(PR_SPACE_AFTER | CP_OPTIMUM).getLength().getValue();
}
// this.propertyList.get("text-transform");
// this.propertyList.get("word-spacing");
- ColorType c = this.propertyList.get("color").getColorType();
+ ColorType c = this.propertyList.get(PR_COLOR).getColorType();
this.red = c.getRed();
this.green = c.getGreen();
this.blue = c.getBlue();
- this.wrapOption = this.propertyList.get("wrap-option").getEnum();
+ this.wrapOption = this.propertyList.get(PR_WRAP_OPTION).getEnum();
}
// this.propertyList.get("text-transform");
// this.propertyList.get("word-spacing");
- ColorType c = this.propertyList.get("color").getColorType();
+ ColorType c = this.propertyList.get(PR_COLOR).getColorType();
this.red = c.getRed();
this.green = c.getGreen();
this.blue = c.getBlue();
- this.wrapOption = this.propertyList.get("wrap-option").getEnum();
- this.refId = this.propertyList.get("ref-id").getString();
+ this.wrapOption = this.propertyList.get(PR_WRAP_OPTION).getEnum();
+ this.refId = this.propertyList.get(PR_REF_ID).getString();
if (this.refId.equals("")) {
//throw new FOPException("page-number-citation must contain \"ref-id\"");
public void handleAttrs(Attributes attlist) throws FOPException {
super.handleAttrs(attlist);
this.retrieveClassName =
- this.propertyList.get("retrieve-class-name").getString();
+ this.propertyList.get(PR_RETRIEVE_CLASS_NAME).getString();
this.retrievePosition =
- this.propertyList.get("retrieve-position").getEnum();
+ this.propertyList.get(PR_RETRIEVE_POSITION).getEnum();
this.retrieveBoundary =
- this.propertyList.get("retrieve-boundary").getEnum();
+ this.propertyList.get(PR_RETRIEVE_BOUNDARY).getEnum();
}
public String getRetrieveClassName() {
// this.propertyList.get("width");
// this.propertyList.get("writing-mode");
- this.breakBefore = this.propertyList.get("break-before").getEnum();
- this.breakAfter = this.propertyList.get("break-after").getEnum();
+ this.breakBefore = this.propertyList.get(PR_BREAK_BEFORE).getEnum();
+ this.breakAfter = this.propertyList.get(PR_BREAK_AFTER).getEnum();
this.spaceBefore = this.propertyList.get(
- "space-before.optimum").getLength().getValue();
+ PR_SPACE_BEFORE | CP_OPTIMUM).getLength().getValue();
this.spaceAfter = this.propertyList.get(
- "space-after.optimum").getLength().getValue();
+ PR_SPACE_AFTER | CP_OPTIMUM).getLength().getValue();
this.backgroundColor =
- this.propertyList.get("background-color").getColorType();
+ this.propertyList.get(PR_BACKGROUND_COLOR).getColorType();
this.ipd = this.propertyList.get(
- "inline-progression-dimension").getLengthRange();
- this.height = this.propertyList.get("height").getLength().getValue();
+ PR_INLINE_PROGRESSION_DIMENSION).getLengthRange();
+ this.height = this.propertyList.get(PR_HEIGHT).getLength().getValue();
this.bAutoLayout = (this.propertyList.get(
- "table-layout").getEnum() == TableLayout.AUTO);
+ PR_TABLE_LAYOUT).getEnum() == TableLayout.AUTO);
this.omitHeaderAtBreak = this.propertyList.get(
- "table-omit-header-at-break").getEnum()
+ PR_TABLE_OMIT_HEADER_AT_BREAK).getEnum()
== TableOmitHeaderAtBreak.TRUE;
this.omitFooterAtBreak = this.propertyList.get(
- "table-omit-footer-at-break").getEnum()
+ PR_TABLE_OMIT_FOOTER_AT_BREAK).getEnum()
== TableOmitFooterAtBreak.TRUE;
}
setupID();
this.spaceBefore = this.propertyList.get(
- "space-before.optimum").getLength().getValue();
+ PR_SPACE_BEFORE | CP_OPTIMUM).getLength().getValue();
this.spaceAfter = this.propertyList.get(
- "space-after.optimum").getLength().getValue();
+ PR_SPACE_AFTER | CP_OPTIMUM).getLength().getValue();
this.backgroundColor =
- this.propertyList.get("background-color").getColorType();
+ this.propertyList.get(PR_BACKGROUND_COLOR).getColorType();
}
// this.propertyList.get("width");
this.iColNumber =
- propertyList.get("column-number").getNumber().intValue();
+ propertyList.get(PR_COLUMN_NUMBER).getNumber().intValue();
if (iColNumber < 0) {
iColNumber = 0;
}
this.numColumnsSpanned =
- this.propertyList.get("number-columns-spanned").getNumber().intValue();
+ this.propertyList.get(PR_NUMBER_COLUMNS_SPANNED).getNumber().intValue();
if (numColumnsSpanned < 1) {
numColumnsSpanned = 1;
}
this.numRowsSpanned =
- this.propertyList.get("number-rows-spanned").getNumber().intValue();
+ this.propertyList.get(PR_NUMBER_ROWS_SPANNED).getNumber().intValue();
if (numRowsSpanned < 1) {
numRowsSpanned = 1;
}
this.backgroundColor =
- this.propertyList.get("background-color").getColorType();
+ this.propertyList.get(PR_BACKGROUND_COLOR).getColorType();
- bSepBorders = (this.propertyList.get("border-collapse").getEnum()
+ bSepBorders = (this.propertyList.get(PR_BORDER_COLLAPSE).getEnum()
== BorderCollapse.SEPARATE);
calcBorders(propMgr.getBorderAndPadding());
// Vertical cell alignment
- verticalAlign = this.propertyList.get("display-align").getEnum();
+ verticalAlign = this.propertyList.get(PR_DISPLAY_ALIGN).getEnum();
if (verticalAlign == DisplayAlign.AUTO) {
// Depends on all cells starting in row
bRelativeAlign = true;
- verticalAlign = this.propertyList.get("relative-align").getEnum();
+ verticalAlign = this.propertyList.get(PR_RELATIVE_ALIGN).getEnum();
} else {
bRelativeAlign = false; // Align on a per-cell basis
}
this.minCellHeight =
- this.propertyList.get("height").getLength().getValue();
+ this.propertyList.get(PR_HEIGHT).getLength().getValue();
}
/**
* but it inherits.
*/
int iSep = propertyList.get(
- "border-separation.inline-progression-direction").getLength().getValue();
+ PR_BORDER_SEPARATION | CP_INLINE_PROGRESSION_DIRECTION).getLength().getValue();
this.startAdjust = iSep / 2 + bp.getBorderStartWidth(false)
+ bp.getPaddingStart(false);
// Offset of content rectangle in the block-progression direction
borderSeparation = propertyList.get(
- "border-separation.block-progression-direction").getLength().getValue();
+ PR_BORDER_SEPARATION | CP_BLOCK_PROGRESSION_DIRECTION).getLength().getValue();
this.beforeOffset = borderSeparation / 2
+ bp.getBorderBeforeWidth(false)
+ bp.getPaddingBefore(false);
// this.propertyList.get("number-columns-spanned");
// this.propertyList.get("visibility");
- iColumnNumber = propertyList.get("column-number").getNumber().intValue();
+ iColumnNumber = propertyList.get(PR_COLUMN_NUMBER).getNumber().intValue();
numColumnsRepeated =
- propertyList.get("number-columns-repeated").getNumber().intValue();
+ propertyList.get(PR_NUMBER_COLUMNS_REPEATED).getNumber().intValue();
this.backgroundColor =
- this.propertyList.get("background-color").getColorType();
+ this.propertyList.get(PR_BACKGROUND_COLOR).getColorType();
- Property prop = this.propertyList.get("column-width");
+ Property prop = this.propertyList.get(PR_COLUMN_WIDTH);
if (prop != null) {
- columnWidthPropVal = propertyList.get("column-width").getLength();
+ columnWidthPropVal = propertyList.get(PR_COLUMN_WIDTH).getLength();
// This won't include resolved table-units or % values yet.
columnWidth = columnWidthPropVal.getValue();
* object.
*/
public void end() {
- src = this.propertyList.get("src").getString();
- profileName = this.propertyList.get("color-profile-name").getString();
- intent = this.propertyList.get("rendering-intent").getEnum();
+ src = this.propertyList.get(PR_SRC).getString();
+ profileName = this.propertyList.get(PR_COLOR_PROFILE_NAME).getString();
+ intent = this.propertyList.get(PR_RENDERING_INTENT).getEnum();
this.propertyList = null;
}
validateParent(parent);
- this.pagePosition = this.propertyList.get("page-position").getEnum();
- this.oddOrEven = this.propertyList.get("odd-or-even").getEnum();
- this.blankOrNotBlank = this.propertyList.get("blank-or-not-blank").getEnum();
+ this.pagePosition = this.propertyList.get(PR_PAGE_POSITION).getEnum();
+ this.oddOrEven = this.propertyList.get(PR_ODD_OR_EVEN).getEnum();
+ this.blankOrNotBlank = this.propertyList.get(PR_BLANK_OR_NOT_BLANK).getEnum();
}
/**
if (pagePosition == PagePosition.REST) {
return false;
} else if (pagePosition == PagePosition.LAST) {
- // how the hell do you know at this point?
+ // ?? how can one know at this point?
getLogger().debug("LAST PagePosition NYI");
return false;
}
if (pagePosition == PagePosition.FIRST) {
return false;
} else if (pagePosition == PagePosition.LAST) {
- // how the hell do you know at this point?
+ // ?? how can one know at this point?
getLogger().debug("LAST PagePosition NYI");
// potentially valid, don't return
}
// we are now on the first page of the page sequence
thisIsFirstPage = true;
- ipnValue = this.propertyList.get("initial-page-number").getString();
+ ipnValue = this.propertyList.get(PR_INITIAL_PAGE_NUMBER).getString();
if (ipnValue.equals("auto")) {
pageNumberType = AUTO;
}
- String masterName = this.propertyList.get("master-reference").getString();
+ String masterName = this.propertyList.get(PR_MASTER_REFERENCE).getString();
this.simplePageMaster =
this.layoutMasterSet.getSimplePageMaster(masterName);
if (this.simplePageMaster == null) {
// get the 'format' properties
this.pageNumberGenerator =
- new PageNumberGenerator(this.propertyList.get("format").getString(),
- this.propertyList.get("grouping-separator").getCharacter(),
- this.propertyList.get("grouping-size").getNumber().intValue(),
- this.propertyList.get("letter-value").getEnum());
+ new PageNumberGenerator(this.propertyList.get(PR_FORMAT).getString(),
+ this.propertyList.get(PR_GROUPING_SEPARATOR).getCharacter(),
+ this.propertyList.get(PR_GROUPING_SIZE).getNumber().intValue(),
+ this.propertyList.get(PR_LETTER_VALUE).getEnum());
this.pageNumberGenerator.enableLogging(getLogger());
this.forcePageCount =
- this.propertyList.get("force-page-count").getEnum();
+ this.propertyList.get(PR_FORCE_PAGE_COUNT).getEnum();
// this.propertyList.get("country");
// this.propertyList.get("language");
+ "of simple-page-master, not "
+ parent.getName());
}
- this.wm = this.propertyList.get("writing-mode").getEnum();
+ this.wm = this.propertyList.get(PR_WRITING_MODE).getEnum();
// this.propertyList.get("clip");
// this.propertyList.get("display-align");
- this.overflow = this.propertyList.get("overflow").getEnum();
+ this.overflow = this.propertyList.get(PR_OVERFLOW).getEnum();
}
public abstract Rectangle getViewportRectangle(FODimension pageRefRect);
public void end() {
super.end();
bPrecedence =
- (this.propertyList.get("precedence").getEnum() == Precedence.TRUE);
+ (this.propertyList.get(PR_PRECEDENCE).getEnum() == Precedence.TRUE);
}
/**
public void end() {
// The problem with this is that it might not be known yet....
// Supposing extent is calculated in terms of percentage
- this.extent = this.propertyList.get("extent").getLength().getValue();
+ this.extent = this.propertyList.get(PR_EXTENT).getLength().getValue();
}
/**
if (parent.getName().equals("fo:layout-master-set")) {
LayoutMasterSet layoutMasterSet = (LayoutMasterSet)parent;
- masterName = this.propertyList.get("master-name").getString();
+ masterName = this.propertyList.get(PR_MASTER_NAME).getString();
if (masterName == null) {
getLogger().warn("simple-page-master does not have "
+ "a master-name and so is being ignored");
CommonMarginInline mProps = propMgr.getMarginInlineProps();
Property prop;
- prop = this.propertyList.get("baseline-shift");
+ prop = this.propertyList.get(PR_BASELINE_SHIFT);
if (prop instanceof LengthProperty) {
Length bShift = prop.getLength();
} else if (prop instanceof EnumProperty) {
int bShift = prop.getEnum();
}
- ColorType col = this.propertyList.get("color").getColorType();
- Length lHeight = this.propertyList.get("line-height").getLength();
+ ColorType col = this.propertyList.get(PR_COLOR).getColorType();
+ Length lHeight = this.propertyList.get(PR_LINE_HEIGHT).getLength();
int lShiftAdj = this.propertyList.get(
- "line-height-shift-adjustment").getEnum();
- int vis = this.propertyList.get("visibility").getEnum();
- Length zIndex = this.propertyList.get("z-index").getLength();
+ PR_LINE_HEIGHT_SHIFT_ADJUSTMENT).getEnum();
+ int vis = this.propertyList.get(PR_VISIBILITY).getEnum();
+ Length zIndex = this.propertyList.get(PR_Z_INDEX).getLength();
}
import org.apache.fop.fo.PropertyList;
import org.apache.fop.area.CTM;
import org.apache.fop.datatypes.FODimension;
+import org.apache.fop.datatypes.Length;
import org.apache.fop.traits.MinOptMax;
/**
private boolean clip = false;
private int overflow;
private PropertyManager propManager;
+ private Length width;
+ private Length height;
/**
* Create a new block container layout manager.
absoluteCTM = CTM.getCTMandRelDims(pm.getAbsRefOrient(),
pm.getWritingMode(), rect, relDims);
}
+ height = pm.getPropertyList().get("height").getLength();
+ width = pm.getPropertyList().get("width").getLength();
}
protected int getRotatedIPD() {
return getAbsoluteBreakPoss(context);
}
- Rectangle2D rect = new Rectangle2D.Double(0, 0, context.getRefIPD(),
- context.getStackLimit().opt);
+ int ipd = context.getRefIPD();
+ int bpd = context.getStackLimit().opt;
+ if (!width.isAuto()) {
+ ipd = width.getValue();
+ }
+ if (!height.isAuto()) {
+ bpd = height.getValue();
+ }
+ Rectangle2D rect = new Rectangle2D.Double(0, 0, ipd, bpd);
relDims = new FODimension(0, 0);
absoluteCTM = CTM.getCTMandRelDims(propManager.getAbsRefOrient(),
propManager.getWritingMode(), rect, relDims);
double[] vals = absoluteCTM.toArray();
MinOptMax stackLimit;
- int ipd = context.getRefIPD();
boolean rotated = vals[0] == 0.0;
if (rotated) {
// rotated 90 degrees
stackSize));
childLC.setRefIPD(ipd);
+ boolean over = false;
while (!curLM.isFinished()) {
if ((bp = curLM.getNextBreakPoss(childLC)) != null) {
stackSize.add(bp.getStackingSize());
} else {
curLM.resetPosition(null);
}
+ over = true;
break;
}
lastPos = bp;
childBreaks.add(bp);
+ if (bp.nextBreakOverflows()) {
+ over = true;
+ break;
+ }
+
childLC.setStackLimit(MinOptMax.subtract(
stackLimit, stackSize));
}
breakPoss = new BreakPoss(new LeafPosition(this,
childBreaks.size() - 1));
breakPoss.setStackingSize(stackSize);
+ if (over) {
+ breakPoss.setFlag(BreakPoss.NEXT_OVERFLOWS, true);
+ }
return breakPoss;
}
}
public Area getParentArea(Area childArea) {
if (curBlockArea == null) {
viewportBlockArea = new BlockViewport();
+ TraitSetter.addBorders(viewportBlockArea,
+ propManager.getBorderAndPadding());
+ TraitSetter.addBackground(viewportBlockArea,
+ propManager.getBackgroundProps());
+
if (abProps.absolutePosition == AbsolutePosition.ABSOLUTE) {
viewportBlockArea.setXOffset(abProps.left);
viewportBlockArea.setYOffset(abProps.top);
viewportBlockArea.setWidth(relDims.bpd);
viewportBlockArea.setCTM(absoluteCTM);
viewportBlockArea.setClip(clip);
+ } else {
+ viewportBlockArea.setWidth(relDims.ipd);
+ if (!height.isAuto()) {
+ viewportBlockArea.setHeight(relDims.bpd);
+ }
}
}
curBlockArea = new Block();
- viewportBlockArea.addBlock(curBlockArea);
if (abProps.absolutePosition == AbsolutePosition.ABSOLUTE) {
viewportBlockArea.setPositioning(Block.ABSOLUTE);
*/
public void addChild(Area childArea) {
if (curBlockArea != null) {
- curBlockArea.addBlock((Block) childArea);
+ curBlockArea.addBlock((Block) childArea, height.isAuto());
}
}
}
}
+ /*
+ * Force current area to be added to parent area.
+ */
+ protected void flush() {
+ super.flush();
+ viewportBlockArea.addBlock(curBlockArea);
+ }
+
}