Ejemplo n.º 1
0
 public Content getHyperLink(DocLink link, Content label, String title, String target) {
   HtmlTree anchor = HtmlTree.A(link.toString(), label);
   if (title != null && title.length() != 0) {
     anchor.addAttr(HtmlAttr.TITLE, title);
   }
   if (target != null && target.length() != 0) {
     anchor.addAttr(HtmlAttr.TARGET, target);
   }
   return anchor;
 }
Ejemplo n.º 2
0
 public Content getHyperLink(
     DocLink link, Content label, boolean strong, String stylename, String title, String target) {
   Content body = label;
   if (strong) {
     body = HtmlTree.SPAN(HtmlStyle.typeNameLink, body);
   }
   if (stylename != null && stylename.length() != 0) {
     HtmlTree t = new HtmlTree(HtmlTag.FONT, body);
     t.addAttr(HtmlAttr.CLASS, stylename);
     body = t;
   }
   HtmlTree l = HtmlTree.A(link.toString(), body);
   if (title != null && title.length() != 0) {
     l.addAttr(HtmlAttr.TITLE, title);
   }
   if (target != null && target.length() != 0) {
     l.addAttr(HtmlAttr.TARGET, target);
   }
   return l;
 }
Ejemplo n.º 3
0
 /**
  * Get the link.
  *
  * @param sectionName The section name to which the link will be created.
  * @return a DocLink object for the hyper link
  */
 public DocLink getDocLink(SectionName sectionName) {
   return DocLink.fragment(sectionName.getName());
 }
Ejemplo n.º 4
0
 /**
  * Get the link.
  *
  * @param sectionName The section name combined with where to which the link will be created.
  * @param where The fragment combined with sectionName to which the link will be created.
  * @return a DocLink object for the hyper link
  */
 public DocLink getDocLink(SectionName sectionName, String where) {
   return DocLink.fragment(sectionName.getName() + getName(where));
 }
Ejemplo n.º 5
0
 /**
  * Get the link.
  *
  * @param where Position of the link in the file.
  * @return a DocLink object for the hyper link
  */
 public DocLink getDocLink(String where) {
   return DocLink.fragment(getName(where));
 }