List of usage examples for com.lowagie.text ElementTags NAME
String NAME
To view the source code for com.lowagie.text ElementTags NAME.
Click Source Link
From source file:org.apache.maven.doxia.module.itext.ITextSink.java
License:Apache License
/** {@inheritDoc} */ public void anchor(String name) { if (name == null) { throw new NullPointerException("Anchor name cannot be null!"); }// www . j av a 2 s .c o m if (StringUtils.isNotEmpty(header.getTitle())) { name = header.getTitle() + "_" + name; } String id = name; if (!DoxiaUtils.isValidId(id)) { id = DoxiaUtils.encodeId(name, true); String msg = "Modified invalid link: '" + name + "' to '" + id + "'"; logMessage("modifiedLink", msg); } writeStartElement(ElementTags.ANCHOR); writeAddAttribute(ElementTags.NAME, id); writeAddAttribute(ElementTags.FONT, font.getFontName()); writeAddAttribute(ElementTags.SIZE, font.getFontSize()); writeAddAttribute(ElementTags.STYLE, font.getFontStyle()); actionContext.setAction(SinkActionContext.ANCHOR); }