Package fitnesse.html

Examples of fitnesse.html.HtmlTag.addAttribute()


    Map<Object, Object> hash = (Map) getValue();
    HtmlTag table = new HtmlTag("table");
    table.addAttribute("class", "hash_table");
    for (Map.Entry<Object, Object> entry : hash.entrySet()) {
      HtmlTag row = new HtmlTag("tr");
      row.addAttribute("class", "hash_row");
      table.add(row);
      String key = entry.getKey().toString();
      HtmlTag keyCell = new HtmlTag("td", key.trim());
      keyCell.addAttribute("class", "hash_key");
      row.add(keyCell);
View Full Code Here


      HtmlTag row = new HtmlTag("tr");
      row.addAttribute("class", "hash_row");
      table.add(row);
      String key = entry.getKey().toString();
      HtmlTag keyCell = new HtmlTag("td", key.trim());
      keyCell.addAttribute("class", "hash_key");
      row.add(keyCell);

      String value = entry.getValue().toString();
      HtmlTag valueCell = new HtmlTag("td", value.trim());
      valueCell.addAttribute("class", "hash_value");
View Full Code Here

      keyCell.addAttribute("class", "hash_key");
      row.add(keyCell);

      String value = entry.getValue().toString();
      HtmlTag valueCell = new HtmlTag("td", value.trim());
      valueCell.addAttribute("class", "hash_value");
      row.add(valueCell);
    }
    return table.html().trim();
  }
View Full Code Here

        return content;
    }
   
    private String makeLinkToExistingWikiPage(String qualifiedName, String linkBody, String linkClass) {
        HtmlTag link = new HtmlTag("a", linkBody);
        link.addAttribute("href", qualifiedName);
        if (linkClass != null) {
          link.addAttribute("class", linkClass);
        }
        return link.htmlInline();
    }
View Full Code Here

   
    private String makeLinkToExistingWikiPage(String qualifiedName, String linkBody, String linkClass) {
        HtmlTag link = new HtmlTag("a", linkBody);
        link.addAttribute("href", qualifiedName);
        if (linkClass != null) {
          link.addAttribute("class", linkClass);
        }
        return link.htmlInline();
    }

    private String makeLinkToNonExistentWikiPage(String text, String url) {
View Full Code Here

        return link.htmlInline();
    }

    private String makeLinkToNonExistentWikiPage(String text, String url) {
        HtmlTag link = new HtmlTag("a", "[?]");
        link.addAttribute("title", "create page");
        link.addAttribute("href", url+ "?edit&amp;nonExistent=true");
        return text + link.htmlInline();
    }

    private String makeParentPath(SourcePage page, String content) {
View Full Code Here

    }

    private String makeLinkToNonExistentWikiPage(String text, String url) {
        HtmlTag link = new HtmlTag("a", "[?]");
        link.addAttribute("title", "create page");
        link.addAttribute("href", url+ "?edit&amp;nonExistent=true");
        return text + link.htmlInline();
    }

    private String makeParentPath(SourcePage page, String content) {
        return page.findParentPath(content.substring(1));
View Full Code Here

    }
   
    public String toTarget(Translator translator, Symbol symbol) {
        HtmlTag html = new HtmlTag("hr");
        int size = symbol.getContent().length() - 3;
        if (size > 1) html.addAttribute("size", Integer.toString(size));
        return html.html();
    }
}
View Full Code Here

        Reference reference = new Reference(translator.translate(link.childAt(0)));
        String prefix = link.getContent();
        HtmlTag tag;
        if (link.hasProperty(Link.ImageProperty) || reference.isImage()) {
            tag = new HtmlTag("img");
            tag.addAttribute("src", reference.makeUrl(prefix));
            String imageClass = link.getProperty(Link.ImageProperty);
            if (imageClass.length() > 0) tag.addAttribute("class", imageClass);
            String width = link.getProperty(Link.WidthProperty);
            if (width.length() > 0) tag.addAttribute("width", width);
            String style = link.getProperty(Link.StyleProperty);
View Full Code Here

        HtmlTag tag;
        if (link.hasProperty(Link.ImageProperty) || reference.isImage()) {
            tag = new HtmlTag("img");
            tag.addAttribute("src", reference.makeUrl(prefix));
            String imageClass = link.getProperty(Link.ImageProperty);
            if (imageClass.length() > 0) tag.addAttribute("class", imageClass);
            String width = link.getProperty(Link.WidthProperty);
            if (width.length() > 0) tag.addAttribute("width", width);
            String style = link.getProperty(Link.StyleProperty);
            if (style.length() > 0) tag.addAttribute("style", style);
        }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.