}
}
public Status layout(Area area) throws FOPException {
BlockArea blockArea;
blockArea = (BlockArea) area;
boolean textDecoration;
//retrieving font property information for fo:leader
String fontFamily = this.properties.get("font-family").getString();
String fontStyle = this.properties.get("font-style").getString();
String fontWeight = this.properties.get("font-weight").getString();
int fontSize =
this.properties.get("font-size").getLength().mvalue();
// font-variant support
// added by Eric SCHAEFFER
int fontVariant =
this.properties.get("font-variant").getEnum();
FontState fontstate = new FontState(area.getFontInfo(), fontFamily,
fontStyle, fontWeight, fontSize, fontVariant);
//color properties
ColorType c = this.properties.get("color").getColorType();
float red = c.red();
float green = c.green();
float blue = c.blue();
int whiteSpaceCollapse = this.properties.get(
"white-space-collapse").getEnum();
int wrapOption = this.parent.properties.get("wrap-option").getEnum();
int tmp = this.properties.get("text-decoration").getEnum();
if (tmp == org.apache.fop.fo.properties.TextDecoration.UNDERLINE) {
textDecoration = true;
} else {
textDecoration = false;
}
//Character specific properties
char characterValue = this.properties.get("character").getCharacter();
// initialize id
String id = this.properties.get("id").getString();
blockArea.getIDReferences().initializeID(id, blockArea);
LineArea la = blockArea.getCurrentLineArea();
if(la == null) {
return new Status(Status.AREA_FULL_NONE);
}
la.changeFont(fontstate);
la.changeColor(red, green, blue);
la.changeWrapOption(wrapOption);
la.changeWhiteSpaceCollapse(whiteSpaceCollapse);
blockArea.setupLinkSet(this.getLinkSet());
int result = la.addCharacter(characterValue, this.getLinkSet(), textDecoration);
if (result == Character.DOESNOT_FIT) {
la = blockArea.createNextLineArea();
if(la == null) {
return new Status(Status.AREA_FULL_NONE);
}
la.changeFont(fontstate);
la.changeColor(red, green, blue);
la.changeWrapOption(wrapOption);
la.changeWhiteSpaceCollapse(whiteSpaceCollapse);
blockArea.setupLinkSet(this.getLinkSet());
la.addCharacter(characterValue, this.getLinkSet(), textDecoration);
}
return new Status(Status.OK);
}