当前位置: 首页>>代码示例>>Java>>正文


Java RawHtml类代码示例

本文整理汇总了Java中com.sun.tools.doclets.formats.html.markup.RawHtml的典型用法代码示例。如果您正苦于以下问题:Java RawHtml类的具体用法?Java RawHtml怎么用?Java RawHtml使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


RawHtml类属于com.sun.tools.doclets.formats.html.markup包,在下文中一共展示了RawHtml类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: throwsTagOutput

import com.sun.tools.doclets.formats.html.markup.RawHtml; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
public Content throwsTagOutput(ThrowsTag throwsTag) {
    ContentBuilder body = new ContentBuilder();
    Content excName = (throwsTag.exceptionType() == null) ?
            new RawHtml(throwsTag.exceptionName()) :
            htmlWriter.getLink(new LinkInfoImpl(configuration, LinkInfoImpl.Kind.MEMBER,
            throwsTag.exceptionType()));
    body.addContent(HtmlTree.CODE(excName));
    Content desc = htmlWriter.commentTagsToContent(throwsTag, null,
        throwsTag.inlineTags(), false);
    if (desc != null && !desc.isEmpty()) {
        body.addContent(" - ");
        body.addContent(desc);
    }
    HtmlTree result = HtmlTree.DD(body);
    return result;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:20,代码来源:TagletWriterImpl.java

示例2: getTagletOutput

import com.sun.tools.doclets.formats.html.markup.RawHtml; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
public Content getTagletOutput(Doc doc, TagletWriter writer) throws IllegalArgumentException {
	Tag[] tags = doc.tags(getName());
	if (tags.length==0 && doc instanceof MethodDoc) { // inherit if necessary and possible
		final DocFinder.Output inheritedDoc = DocFinder.search(new DocFinder.Input((MethodDoc) doc, this));
		tags = inheritedDoc.holderTag == null ? tags : new Tag[] {inheritedDoc.holderTag};
	}
	if (tags.length==0)
		return null;
	final StringBuilder out = writeHeader(new StringBuilder());
	for(Tag tag : tags) { 
		writeTag(out, tag, writer);
	}
	return new RawHtml(out.toString());
}
 
开发者ID:emina,项目名称:kodkod,代码行数:19,代码来源:SpecificationTaglet.java

示例3: returnSelectJS

import com.sun.tools.doclets.formats.html.markup.RawHtml; //导入依赖的package包/类
/**
 * Prepares the javascript code to control the actions of the particular
 * select.
 *
 * @param generatorDivsIDs the divsIDs that should be shown, when the
 * particular option in the select is selected
 * @param methodID the unique identifier of the method, from which the
 * unique ID of select and also the unique variable name used for storing
 * last selected value is dedicated
 * @return the content that contains generated JS code
 */
private static Content returnSelectJS(ArrayList<String> generatorDivsIDs, String methodID) {
    String selectName = methodID + "workloadSelect";

    //we need a variable to store the last selected div in order to be able to hide it, when some new option is selected
    String lastSelectedVariableName = selectName + "Last";

    StringBuilder sb = new StringBuilder();
    sb.append("var " + lastSelectedVariableName + " = \"" + generatorDivsIDs.get(0) + "\";");
    sb.append("$(\"#" + selectName + "\").change(function() {");
    sb.append("var now = $(\"#" + selectName + "\").val();");
    sb.append("$(\"#\" + now).show();");
    sb.append("$(\"#\" + " + lastSelectedVariableName + ").hide();");
    sb.append(lastSelectedVariableName + " = now;");

    sb.append("});");
    return new RawHtml(sb.toString());
}
 
开发者ID:arahusky,项目名称:performance_javadoc,代码行数:29,代码来源:PerformanceWriter.java

示例4: addSliderControl

import com.sun.tools.doclets.formats.html.markup.RawHtml; //导入依赖的package包/类
/**
 * Adds the control of the single (= not range) slider
 *
 * @param it the InfoItem that describes the slider
 * @param saveValues whether to save slider values or not
 * @return the control code
 */
private static Content addSliderControl(InfoItem it, boolean saveValues) {
    StringBuilder sb = new StringBuilder();

    if (saveValues) {
        //storing all informations from slider
        sb.append(returnCodeValue(it.textbox));
        sb.append(returnCodeMinValueSlider(it.slider));
        sb.append(returnCodeMaxValueSlider(it.slider));
        sb.append(returnCodeStepValueSlider(it.slider));
    }

    //checking, whether the value is number
    sb.append(returnNaNCheck(it.description, saveValues));

    //if it is a number: checking, whether the value is at least as big as min and not bigger then max
    sb.append("else {" + returnRangeCheck(it.description));

    //and also whether it could be reached by adding the step to minimal value
    sb.append(returnStepCheck(it.description));
    sb.append("}; ");

    return new RawHtml(sb.toString());
}
 
开发者ID:arahusky,项目名称:performance_javadoc,代码行数:31,代码来源:JSControlWriter.java

示例5: addParameterEnum

import com.sun.tools.doclets.formats.html.markup.RawHtml; //导入依赖的package包/类
/**
 * Adds the select html select tag with given enumValues and id to the
 * content
 *
 * @param enumValues the options of the select tag
 * @param description description of the select tag
 * @param content the Content to which the select tag should be added
 * @param workloadName the workloadName from which (with number) the unique
 * ID will be counted
 * @param number the number of parameter in the generator
 */
private void addParameterEnum(Object[] enumValues, String description, Content content, String workloadName, int number) {
    String uniqueSelectName = workloadName + "_" + number;

    StringBuilder sb = new StringBuilder();
    sb.append("<p><label for=\"" + uniqueSelectName + "\">" + description + "</label>: <select id=\"" + uniqueSelectName + "\">");

    for (Object f : enumValues) {
        sb.append("<option>" + f + "</option>");
    }

    sb.append("</select> </p>");
    content.addContent(new RawHtml(sb.toString()));

    //registering this select to the control
    JSControlWriter.addEnumControl(uniqueSelectName, description);
}
 
开发者ID:arahusky,项目名称:performance_javadoc,代码行数:28,代码来源:PerformanceBodyWriter.java

示例6: deprecatedTagOutput

import com.sun.tools.doclets.formats.html.markup.RawHtml; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
public Content deprecatedTagOutput(Doc doc) {
    ContentBuilder result = new ContentBuilder();
    Tag[] deprs = doc.tags("deprecated");
    if (doc instanceof ClassDoc) {
        if (Util.isDeprecated((ProgramElementDoc) doc)) {
            result.addContent(HtmlTree.SPAN(HtmlStyle.deprecatedLabel,
                    new StringContent(configuration.getText("doclet.Deprecated"))));
            result.addContent(RawHtml.nbsp);
            if (deprs.length > 0) {
                Tag[] commentTags = deprs[0].inlineTags();
                if (commentTags.length > 0) {
                    result.addContent(commentTagsToOutput(null, doc,
                        deprs[0].inlineTags(), false)
                    );
                }
            }
        }
    } else {
        MemberDoc member = (MemberDoc) doc;
        if (Util.isDeprecated((ProgramElementDoc) doc)) {
            result.addContent(HtmlTree.SPAN(HtmlStyle.deprecatedLabel,
                    new StringContent(configuration.getText("doclet.Deprecated"))));
            result.addContent(RawHtml.nbsp);
            if (deprs.length > 0) {
                Content body = commentTagsToOutput(null, doc,
                    deprs[0].inlineTags(), false);
                if (!body.isEmpty())
                    result.addContent(HtmlTree.SPAN(HtmlStyle.deprecationComment, body));
            }
        } else {
            if (Util.isDeprecated(member.containingClass())) {
                result.addContent(HtmlTree.SPAN(HtmlStyle.deprecatedLabel,
                        new StringContent(configuration.getText("doclet.Deprecated"))));
                result.addContent(RawHtml.nbsp);
            }
        }
    }
    return result;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:43,代码来源:TagletWriterImpl.java

示例7: paramTagOutput

import com.sun.tools.doclets.formats.html.markup.RawHtml; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
public Content paramTagOutput(ParamTag paramTag, String paramName) {
    ContentBuilder body = new ContentBuilder();
    body.addContent(HtmlTree.CODE(new RawHtml(paramName)));
    body.addContent(" - ");
    body.addContent(htmlWriter.commentTagsToContent(paramTag, null, paramTag.inlineTags(), false));
    HtmlTree result = HtmlTree.DD(body);
    return result;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:12,代码来源:TagletWriterImpl.java

示例8: propertyTagOutput

import com.sun.tools.doclets.formats.html.markup.RawHtml; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
public Content propertyTagOutput(Tag tag, String prefix) {
    Content body = new ContentBuilder();
    body.addContent(new RawHtml(prefix));
    body.addContent(" ");
    body.addContent(HtmlTree.CODE(new RawHtml(tag.text())));
    body.addContent(".");
    Content result = HtmlTree.P(body);
    return result;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:13,代码来源:TagletWriterImpl.java

示例9: simpleTagOutput

import com.sun.tools.doclets.formats.html.markup.RawHtml; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
public Content simpleTagOutput(Tag[] simpleTags, String header) {
    ContentBuilder result = new ContentBuilder();
    result.addContent(HtmlTree.DT(HtmlTree.SPAN(HtmlStyle.simpleTagLabel, new RawHtml(header))));
    ContentBuilder body = new ContentBuilder();
    for (int i = 0; i < simpleTags.length; i++) {
        if (i > 0) {
            body.addContent(", ");
        }
        body.addContent(htmlWriter.commentTagsToContent(
                simpleTags[i], null, simpleTags[i].inlineTags(), false));
    }
    result.addContent(HtmlTree.DD(body));
    return result;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:18,代码来源:TagletWriterImpl.java

示例10: valueTagOutput

import com.sun.tools.doclets.formats.html.markup.RawHtml; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
public Content valueTagOutput(FieldDoc field, String constantVal,
        boolean includeLink) {
    return includeLink ?
        htmlWriter.getDocLink(LinkInfoImpl.Kind.VALUE_TAG, field,
            constantVal, false) : new RawHtml(constantVal);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:10,代码来源:TagletWriterImpl.java

示例11: getTagletOutput

import com.sun.tools.doclets.formats.html.markup.RawHtml; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
public Content getTagletOutput(Tag tag, TagletWriter writer)
        throws IllegalArgumentException {
    Content output = writer.getOutputInstance();
    output.addContent(new RawHtml(legacyTaglet.toString(tag)));
    return output;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:10,代码来源:LegacyTaglet.java

示例12: deprecatedTagOutput

import com.sun.tools.doclets.formats.html.markup.RawHtml; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
public Content deprecatedTagOutput(Doc doc) {
    ContentBuilder result = new ContentBuilder();
    Tag[] deprs = doc.tags("deprecated");
    if (doc instanceof ClassDoc) {
        if (utils.isDeprecated((ProgramElementDoc) doc)) {
            result.addContent(HtmlTree.SPAN(HtmlStyle.deprecatedLabel,
                    new StringContent(configuration.getText("doclet.Deprecated"))));
            result.addContent(RawHtml.nbsp);
            if (deprs.length > 0) {
                Tag[] commentTags = deprs[0].inlineTags();
                if (commentTags.length > 0) {
                    result.addContent(commentTagsToOutput(null, doc,
                        deprs[0].inlineTags(), false)
                    );
                }
            }
        }
    } else {
        MemberDoc member = (MemberDoc) doc;
        if (utils.isDeprecated((ProgramElementDoc) doc)) {
            result.addContent(HtmlTree.SPAN(HtmlStyle.deprecatedLabel,
                    new StringContent(configuration.getText("doclet.Deprecated"))));
            result.addContent(RawHtml.nbsp);
            if (deprs.length > 0) {
                Content body = commentTagsToOutput(null, doc,
                    deprs[0].inlineTags(), false);
                if (!body.isEmpty())
                    result.addContent(HtmlTree.SPAN(HtmlStyle.deprecationComment, body));
            }
        } else {
            if (utils.isDeprecated(member.containingClass())) {
                result.addContent(HtmlTree.SPAN(HtmlStyle.deprecatedLabel,
                        new StringContent(configuration.getText("doclet.Deprecated"))));
                result.addContent(RawHtml.nbsp);
            }
        }
    }
    return result;
}
 
开发者ID:campolake,项目名称:openjdk9,代码行数:43,代码来源:TagletWriterImpl.java


注:本文中的com.sun.tools.doclets.formats.html.markup.RawHtml类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。