if (fobj.getLeaderPatternWidth().getValue(this) > width) {
spacer = new Space();
spacer.setIPD(fobj.getLeaderPatternWidth().getValue(this) - width);
width = fobj.getLeaderPatternWidth().getValue(this);
}
FilledArea fa = new FilledArea();
fa.setUnitWidth(width);
fa.addChildArea(t);
if (spacer != null) {
fa.addChildArea(spacer);
}
fa.setBPD(t.getBPD());
leaderArea = fa;
} else if (fobj.getLeaderPattern() == EN_USECONTENT) {
if (fobj.getChildNodes() == null) {
InlineLevelEventProducer eventProducer = InlineLevelEventProducer.Provider.get(
getFObj().getUserAgent().getEventBroadcaster());
eventProducer.leaderWithoutContent(this, getFObj().getLocator());
return null;
}
// child FOs are assigned to the InlineStackingLM
fobjIter = null;
// get breaks then add areas to FilledArea
FilledArea fa = new FilledArea();
clm = new ContentLayoutManager(fa, this);
addChildLM(clm);
InlineLayoutManager lm;
lm = new InlineLayoutManager(fobj);
clm.addChildLM(lm);
lm.initialize();
LayoutContext childContext = new LayoutContext(0);
childContext.setAlignmentContext(context.getAlignmentContext());
contentList = clm.getNextKnuthElements(childContext, 0);
int width = clm.getStackingSize();
if (width != 0) {
Space spacer = null;
if (fobj.getLeaderPatternWidth().getValue(this) > width) {
spacer = new Space();
spacer.setIPD(fobj.getLeaderPatternWidth().getValue(this) - width);
width = fobj.getLeaderPatternWidth().getValue(this);
}
fa.setUnitWidth(width);
if (spacer != null) {
fa.addChildArea(spacer);
}
leaderArea = fa;
} else {
//Content collapsed to nothing, so use a space
leaderArea = new Space();