List of usage examples for com.lowagie.text ElementTags REFERENCE
String REFERENCE
To view the source code for com.lowagie.text ElementTags REFERENCE.
Click Source Link
From source file:org.apache.maven.doxia.module.itext.ITextSink.java
License:Apache License
/** {@inheritDoc} */ public void link(String name) { if (name == null) { throw new NullPointerException("Link name cannot be null!"); }//from ww w.j a v a 2s . co m font.setColor(Color.BLUE); font.addUnderlined(); writeStartElement(ElementTags.ANCHOR); if (StringUtils.isNotEmpty(name) && name.startsWith("#") && StringUtils.isNotEmpty(header.getTitle())) { name = "#" + DoxiaUtils.encodeId(header.getTitle(), true) + "_" + name.substring(1); } writeAddAttribute(ElementTags.REFERENCE, HtmlTools.escapeHTML(name)); writeAddAttribute(ElementTags.FONT, font.getFontName()); writeAddAttribute(ElementTags.SIZE, font.getFontSize()); writeAddAttribute(ElementTags.STYLE, font.getFontStyle()); writeAddAttribute(ElementTags.BLUE, font.getFontColorBlue()); writeAddAttribute(ElementTags.GREEN, font.getFontColorGreen()); writeAddAttribute(ElementTags.RED, font.getFontColorRed()); actionContext.setAction(SinkActionContext.LINK); }