Package fitnesse.html

Examples of fitnesse.html.HtmlTag.addAttribute()


            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);
        }
        else {
            tag = new HtmlTag("a", body);
View Full Code Here


            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);
        }
        else {
            tag = new HtmlTag("a", body);
            tag.addAttribute("href", reference.makeUrl(prefix));
        }
View Full Code Here

            String style = link.getProperty(Link.StyleProperty);
            if (style.length() > 0) tag.addAttribute("style", style);
        }
        else {
            tag = new HtmlTag("a", body);
            tag.addAttribute("href", reference.makeUrl(prefix));
        }
        return tag.htmlInline();
    }

    private class Reference {
View Full Code Here

        }

        HtmlTag alias = new HtmlTag("a", linkBody);

        if (linkReference.childAt(0).isType(Link.symbolType)) {
            alias.addAttribute("href", linkReferenceString.startsWith("http://files/") ? linkReferenceString.substring(7) : linkReferenceString);
        } else {
            alias.addAttribute("href", translator.translate(linkReference));
        }

        return alias.htmlInline();
View Full Code Here

        HtmlTag alias = new HtmlTag("a", linkBody);

        if (linkReference.childAt(0).isType(Link.symbolType)) {
            alias.addAttribute("href", linkReferenceString.startsWith("http://files/") ? linkReferenceString.substring(7) : linkReferenceString);
        } else {
            alias.addAttribute("href", translator.translate(linkReference));
        }

        return alias.htmlInline();
    }
}
View Full Code Here

        this.page = page;
    }

    public HtmlTag buildLevel(SourcePage page) {
        HtmlTag list = new HtmlTag("ul");
        list.addAttribute("class", "toc" + level);
        for (SourcePage child: getSortedChildren(page)) {
            list.add(buildListItem(child));
        }
        return list;
    }
View Full Code Here

    }

    public HtmlTag buildItem(SourcePage page) {
        HtmlTag listItem = new HtmlTag("li");
        HtmlTag link = new HtmlTag("a", buildBody(page));
        link.addAttribute("href", buildReference(page));
        link.addAttribute("class", getBooleanPropertiesClasses(page));
        listItem.add(link);
        String help = page.getProperty(PageData.PropertyHELP);
        if (help.length() > 0) {
            if (hasOption("-h", Contents.HELP_TOC)) {
View Full Code Here

    public HtmlTag buildItem(SourcePage page) {
        HtmlTag listItem = new HtmlTag("li");
        HtmlTag link = new HtmlTag("a", buildBody(page));
        link.addAttribute("href", buildReference(page));
        link.addAttribute("class", getBooleanPropertiesClasses(page));
        listItem.add(link);
        String help = page.getProperty(PageData.PropertyHELP);
        if (help.length() > 0) {
            if (hasOption("-h", Contents.HELP_TOC)) {
                listItem.add(HtmlUtil.makeSpanTag("pageHelp", ": " + help));
View Full Code Here

        if (help.length() > 0) {
            if (hasOption("-h", Contents.HELP_TOC)) {
                listItem.add(HtmlUtil.makeSpanTag("pageHelp", ": " + help));
            }
            else {
                link.addAttribute("title", help);
            }
        }
        return listItem;
    }
View Full Code Here

    private static final String[] cellClasses = {"hash_key", "hash_value"};

    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++) {
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.