Package fitnesse.html

Examples of fitnesse.html.HtmlTag.addAttribute()


    public String toTarget(Translator translator, Symbol symbol) {
        HtmlTag table = new HtmlTag("table");
        table.addAttribute("class", "hash_table");
        for (Symbol child: symbol.getChildren()) {
            HtmlTag row = new HtmlTag("tr");
            row.addAttribute("class", "hash_row");
            table.add(row);
            for (int i = 0; i < 2; i++) {
                String body = translator.translate(child.childAt(i));
                HtmlTag cell = new HtmlTag("td", body.trim());
                cell.addAttribute("class", cellClasses[i]);
View Full Code Here


            row.addAttribute("class", "hash_row");
            table.add(row);
            for (int i = 0; i < 2; i++) {
                String body = translator.translate(child.childAt(i));
                HtmlTag cell = new HtmlTag("td", body.trim());
                cell.addAttribute("class", cellClasses[i]);
                row.add(cell);
            }
        }
        return table.html();
   }
View Full Code Here

        return generateHtml(option, title, body);
    }

    private String makeInvisibleSection(String body) {
        HtmlTag section = new HtmlTag("div", body);
        section.addAttribute("class", "invisible");
        return section.html();
    }

    public static String generateHtml(String state, String titleText, String bodyText) {
        HtmlTag outerBlock = new HtmlTag("div");
View Full Code Here

        return section.html();
    }

    public static String generateHtml(String state, String titleText, String bodyText) {
        HtmlTag outerBlock = new HtmlTag("div");
        outerBlock.addAttribute("class", "collapsible" + state);
       
        outerBlock.add(new RawHtml("<ul>" +
            "<li><a href='#' class='expandall'>Expand</a></li>" +
            "<li><a href='#' class='collapseall'>Collapse</a></li>" +
            "</ul>"));
View Full Code Here

            "<li><a href='#' class='expandall'>Expand</a></li>" +
            "<li><a href='#' class='collapseall'>Collapse</a></li>" +
            "</ul>"));

        HtmlTag title = new HtmlTag("p", titleText);
        title.addAttribute("class", "title");
        outerBlock.add(title);
       
        HtmlTag body = new HtmlTag("div", bodyText);
        outerBlock.add(body);
       
View Full Code Here

    public String toTarget(Translator translator, Symbol symbol) {
        HtmlTag result = new HtmlTag("span", "variable defined: "
                + translator.translate(symbol.childAt(0))
                + "="
                + translator.translate(symbol.childAt(1)));
        result.addAttribute("class", "meta");
        return result.html();
    }
}
View Full Code Here

        return sb.toString();
    }

    private String error(String string) {
        HtmlTag tag = new HtmlTag("p");
        tag.addAttribute("style", "color:red");
        tag.add(string);
        return tag.htmlInline();
    }

}
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.