Package net.java.textilej.parser

Examples of net.java.textilej.parser.LinkAttributes


        }
      }
      if (pageName.startsWith("#")) {
        builder.link(href, altText);
      } else {
        Attributes attributes = new LinkAttributes();
        attributes.setTitle(pageName);
        builder.link(attributes,href, altText);
      }
    }
View Full Code Here


  private void applyLinkAttributes(Attributes attributes, String href) {
    applyAttributes(attributes);
    boolean hasTarget = false;
    String rel = linkRel;
    if (attributes instanceof LinkAttributes) {
      LinkAttributes linkAttributes = (LinkAttributes) attributes;
      if (linkAttributes.getTarget() != null) {
        hasTarget = true;
        writer.writeAttribute("target", linkAttributes.getTarget());
      }
      if (linkAttributes.getRel() != null) {
        rel = rel==null?linkAttributes.getRel():linkAttributes.getRel()+' '+rel;
      }
    }
    if (attributes.getTitle() != null && attributes.getTitle().length() > 0) {
      writer.writeAttribute("title", attributes.getTitle());
    }
View Full Code Here

      String href = parts.length > 1?parts[1]:parts[0];
      String tip = parts.length > 2?parts[2]:null;
      if (text == null || text.length() == 0) {
        text = href;
      }
      Attributes attributes = new LinkAttributes();
      attributes.setTitle(tip);
      getBuilder().link(attributes,href, text);
    }
View Full Code Here

TOP

Related Classes of net.java.textilej.parser.LinkAttributes

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.