本文整理汇总了Java中org.rendersnake.HtmlCanvas._div方法的典型用法代码示例。如果您正苦于以下问题:Java HtmlCanvas._div方法的具体用法?Java HtmlCanvas._div怎么用?Java HtmlCanvas._div使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.rendersnake.HtmlCanvas
的用法示例。
在下文中一共展示了HtmlCanvas._div方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: generateNode
import org.rendersnake.HtmlCanvas; //导入方法依赖的package包/类
protected void generateNode(StructureNode structureNode, HtmlCanvas html, Content content) throws IOException {
if (structureNode.getNodes() != null && structureNode.getNodes().size() > 0) {
html.div(class_(structureNode.getCss()));
for (StructureNode childNode : structureNode.getNodes()) {
generateNode(childNode, html, content);
}
html._div();
} else {
html.div(class_(structureNode.getCss()));
if (!StringUtils.isBlank(structureNode.getNodeId())) {
if (content.getContentNodes() != null) {
Optional<ContentNode> node = content.getContentNodes().stream()
.filter(n -> n.getNodeId().equals(structureNode.getNodeId())).findFirst();
if (node.isPresent()) {
generateNode(node.get(), html);
}
}
}
html._div();
}
}
示例2: renderHierarchy
import org.rendersnake.HtmlCanvas; //导入方法依赖的package包/类
private void renderHierarchy(HtmlCanvas html, ClassDocAccess classDocAccess) throws IOException {
List<Type> hierarchy = classDocAccess.getHierarchy();
if (!hierarchy.isEmpty()) {
html.div(class_("hierarchy"));
for (int cnt = 0; cnt < hierarchy.size(); cnt++) {
int flags = ClassNameRenderable.FQN;
if (cnt < hierarchy.size() - 1) {
flags |= ClassNameRenderable.LINK;
}
html.p(style("text-indent:" + cnt * 2 + "em;")).write(cnt > 0 ? "↳" : " ",
false).render(new ClassNameRenderable(generator, hierarchy.get(cnt), flags))._p();
}
html._div();
} else {
html.div(class_("separator")).close();
}
}
示例3: renderConstructors
import org.rendersnake.HtmlCanvas; //导入方法依赖的package包/类
private void renderConstructors(HtmlCanvas html, ClassDocAccess classDoc) throws IOException {
List<ConstructorDoc> constructors = classDoc.getConstructors(false);
if (constructors.size() > 0) {
html.h2().content("Constructors");
}
for (ConstructorDoc constructor : constructors) {
html.div(class_("api")).a(name(getAnchor(constructor)))._a();
html.write(constructor.modifiers()).write(' ').strong().content(constructor.name());
renderExecutableMemberParams(html, constructor);
html._div();
renderDeprecated(html, constructor);
html.p().render(new InlineTagsRenderer(generator, constructor.inlineTags(), constructor.position()))._p();
if (constructor.paramTags().length > 0) {
html.h4().content("Parameters:");
html.p(class_("indent"));
for (ParamTag param : constructor.paramTags()) {
html.strong().content(param.parameterName()).write(": ").render(new InlineTagsRenderer(generator,
param.inlineTags(), param.position())).br();
}
html._p();
}
renderSince(html, constructor);
renderSee(html, constructor);
}
}
示例4: renderOn
import org.rendersnake.HtmlCanvas; //导入方法依赖的package包/类
@Override
public void renderOn(HtmlCanvas html) throws IOException {
MarkupPage page = PageRenderer.getPage(html);
MarkupDoc markupDoc = page.getMarkupDoc();
LinkedList<IndexDoc> indexes = new LinkedList<>();
// build indexes list in reverse order
IndexDoc indexDoc = generator.getRootProjectDoc().getIndexDoc(markupDoc);
while (indexDoc != null && indexDoc != rootIndexDoc) {
indexes.addFirst(indexDoc);
indexDoc = generator.getRootProjectDoc().getIndexDoc(indexDoc.getParentContainer());
}
html.div(class_("nav"));
writeIndexes(indexes, 0, markupDoc, page, html);
html._div();
}
示例5: generatePiechart
import org.rendersnake.HtmlCanvas; //导入方法依赖的package包/类
private void generatePiechart(HtmlCanvas reportPageBody, IRunTestResults iRunTestResults) throws IOException {
HtmlCanvas divSummary = reportPageBody.div();
divSummary.div(new HtmlAttributes().id(PIECHART_ID))._div();
HtmlCanvas divTestSummary = divSummary.div(new HtmlAttributes().class_(TEST_SUMMARY_CLASS));
int passedCount = iRunTestResults.getPassedTests().size();
int skippedCount = iRunTestResults.getSkippedTests().size();
int failedCount = iRunTestResults.getFailedTests().size();
divTestSummary.h2().content(format(PASSED_TESTS, passedCount));
divTestSummary.h2().content(format(FAILED_TESTS, failedCount));
divTestSummary.h2().content(format(SKIPPED_TESTS, skippedCount));
divTestSummary._div();
divSummary._div();
// Hidden divs used to be able to link data to piechart.js
reportPageBody.div(new HtmlAttributes().id(PASSED.toLowerCase(ENGLISH))
.class_(HIDDEN_CLASS)).content(passedCount);
reportPageBody.div(new HtmlAttributes().id(FAILED.toLowerCase(ENGLISH))
.class_(HIDDEN_CLASS)).content(failedCount);
reportPageBody.div(new HtmlAttributes().id(SKIPPED.toLowerCase(ENGLISH))
.class_(HIDDEN_CLASS)).content(skippedCount);
}
示例6: renderOn
import org.rendersnake.HtmlCanvas; //导入方法依赖的package包/类
@Override
public void renderOn(HtmlCanvas html) throws IOException {
if (currentRecipe == null) {
System.out.println("No recipe defined. Stacktrace for call: ");
Exception runtimeException = new RuntimeException();
runtimeException.printStackTrace();
return;
}
html.macros().stylesheet("/bootstrap-v4/css/bootstrap.min.css");
html.div(id("recipeView").class_("text-center"));
renderMash(html);
renderHops(html);
renderFermentation(html);
renderDryHops(html);
html._div();
}
示例7: renderOn
import org.rendersnake.HtmlCanvas; //导入方法依赖的package包/类
@Override
public final void renderOn(HtmlCanvas html) throws IOException {
html.div(class_("content"));
doRenderOn(html);
html.div(class_("footer")).write("Generated by ").a(href("https://github.com/nicolaschriste/docdown"))
.content("Docdown " + DocdownDoclet.version)._div();
html._div();
}
示例8: doRenderOn
import org.rendersnake.HtmlCanvas; //导入方法依赖的package包/类
@Override
protected void doRenderOn(HtmlCanvas html) throws IOException {
ClassPage page = PageRenderer.getPage(html);
ClassDocAccess classDocAccess = new ClassDocAccess(generator.getRootDoc(), page.getClassDoc());
ClassDoc classDoc = page.getClassDoc();
html.div(class_("api_header")).p().content(getModifier(classDoc)).h1();
html.render(new ClassNameRenderable(generator, classDoc, ClassNameRenderable.BOUNDS));
html._h1();
renderSuperclass(html, classDocAccess);
renderImplementedInterfaces(html, classDocAccess);
html._div();
renderHierarchy(html, classDocAccess);
renderSubclasses(html, classDocAccess);
if (classDoc.inlineTags() != null && classDoc.inlineTags().length > 0) {
html.h2().content("Overview");
html.p().render(new InlineTagsRenderer(generator, classDoc.inlineTags(), classDoc.position()))._p();
}
html.h2().content("Summary");
renderEnumValuesSummary(html, classDocAccess);
renderFieldSummary(html, classDocAccess);
renderConstructorsSummary(html, classDocAccess);
renderMethodsSummary(html, classDocAccess);
renderEnumValues(html, classDocAccess);
renderFields(html, classDocAccess);
renderConstructors(html, classDocAccess);
renderMethods(html, classDocAccess);
}
示例9: renderMethods
import org.rendersnake.HtmlCanvas; //导入方法依赖的package包/类
private void renderMethods(HtmlCanvas html, ClassDocAccess classDoc) throws IOException {
List<MethodDoc> methods = classDoc.getMethods(false);
if (methods.size() > 0) {
html.h2().content("Methods");
}
for (MethodDoc methodDoc : methods) {
html.div(class_("api")).a(name(getAnchor(methodDoc)))._a();
html.write(methodDoc.modifiers()).write(' ').render(new ClassNameRenderable(generator,
methodDoc.returnType(), ClassNameRenderable.LINK)).write(' ').strong().content(methodDoc.name());
renderExecutableMemberParams(html, methodDoc);
html._div();
renderDeprecated(html, methodDoc);
html.p().render(new InlineTagsRenderer(generator, methodDoc.inlineTags(), methodDoc.position()))._p();
if (methodDoc.paramTags().length > 0) {
html.h4().content("Parameters:");
html.p(class_("indent"));
for (ParamTag param : methodDoc.paramTags()) {
html.strong().content(param.parameterName()).write(": ").render(new InlineTagsRenderer(generator,
param.inlineTags(), param.position())).br();
}
html._p();
}
Tag[] returnTags = methodDoc.tags("return");
if (returnTags.length > 0) {
html.h4().content("Returns:");
html.p(class_("indent")).render(new InlineTagsRenderer(generator, returnTags[0].inlineTags(),
returnTags[0].position()))._p();
}
renderSince(html, methodDoc);
renderSee(html, methodDoc);
}
}
示例10: generateHeader
import org.rendersnake.HtmlCanvas; //导入方法依赖的package包/类
void generateHeader(HtmlCanvas reportPageBody, String cloudSlangImage) throws IOException {
HtmlCanvas headerDiv = reportPageBody.div(new HtmlAttributes().id(HEADER_BAR_ID));
HtmlCanvas anchor = headerDiv.a(new HtmlAttributes().href(HTTP_CLOUD_SLANG_IO).target(BLANK));
HtmlCanvas img = new HtmlCanvas().img(new HtmlAttributes().src(cloudSlangImage).alt(CLOUD_SLANG_LOGO_ALT));
anchor.content(img.toHtml(), false);
headerDiv._div();
reportPageBody.h1(new HtmlAttributes().class_(REPORT_TITLE_CLASS)).content(TEST_CASE_REPORT);
}
示例11: getForm
import org.rendersnake.HtmlCanvas; //导入方法依赖的package包/类
@Override
public HtmlCanvas getForm() throws IOException {
HtmlCanvas html = new HtmlCanvas();
html.div(id("NewWaitTrigger").class_(""));
html.form(id("newTriggersForm"));
html.input(id("type").name("type").class_("form-control m-t")
.hidden("true").value("Wait"));
html.input(class_("inputBox temperature form-control m-t")
.type("number").add("step", "any")
.add("placeholder", Messages.MINUTES)
.name(WAITTIMEMINS).value(""));
html.input(class_("inputBox temperature form-control m-t")
.type("number").add("step", "any")
.add("placeholder", Messages.SECS)
.name(WAITTIMESECS).value(""));
html.input(class_("inputBox form-control m-t")
.name(NOTES).value("")
.add("placeholder", Messages.NOTES)
.value(this.note));
html.button(name("submitWait")
.class_("btn btn-primary col-md-12")
.add("data-toggle", "clickover")
.onClick("submitNewTriggerStep(this);"))
.write(Messages.ADD_TRIGGER)
._button();
html._form();
html._div();
return html;
}
示例12: getEditForm
import org.rendersnake.HtmlCanvas; //导入方法依赖的package包/类
@Override
public HtmlCanvas getEditForm() throws IOException {
HtmlCanvas html = new HtmlCanvas();
html.div(id("EditWaitTrigger").class_(""));
html.form(id("editTriggersForm"));
html.input(id("type").name("type")
.hidden("true").value("Wait"));
html.input(id("type").name("position")
.hidden("position").value("" + this.position));
html.input(class_("inputBox temperature form-control")
.type("number").add("step", "any")
.add("placeholder", Messages.MINUTES)
.name(WAITTIMEMINS)
.value(Double.toString(this.minutes)));
html.input(class_("inputBox temperature form-control")
.type("number").add("step", "any")
.add("placeholder", Messages.SECS)
.name(WAITTIMESECS)
.value(Double.toString(this.seconds)));
html.input(class_("inputBox form-control")
.name(NOTES).value("")
.add("placeholder", Messages.NOTES)
.value(this.note));
html.button(name("submitWait")
.class_("btn col-md-12")
.add("data-toggle", "clickover")
.onClick("updateTriggerStep(this);"))
.write(Messages.ADD_TRIGGER)
._button();
html._form();
html._div();
return html;
}
示例13: renderFermentation
import org.rendersnake.HtmlCanvas; //导入方法依赖的package包/类
public HtmlCanvas renderFermentation(HtmlCanvas html) throws IOException
{
if (currentRecipe.getFermentStepSize() > 0) {
html.div(id("recipeFermProfile"));
html.div(class_("lead")).write(Messages.FERMENT_PROFILE);
html._div();
html.table(id("fermentTable").class_("table table-striped table-bordered"));
html.tr();
html.th().write(Messages.NAME)._th();
html.th().write(Messages.TEMP)._th();
html.th().write(Messages.TIME)._th();
html._tr();
for (int i = 0; i < currentRecipe.getFermentStepSize(); i++) {
html.tr(id("fermStep-" + i));
html.td(id("ferm-Name")).write(currentRecipe.getFermentStepType(i))._td();
html.td(id("ferm-Temp")).write(String.format("%.2f", currentRecipe.getFermentStepTemp(i)) + currentRecipe.getFermentStepTempU(i))._td();
html.td(id("ferm-Time")).write(currentRecipe.getFermentStepTime(i) + " days")._td();
html._tr();
}
html._table();
html.select(name("tempprobe").class_("form-control"));
html.option(value("").selected_if(true))
.write("Select Probe")
._option();
for (PID entry: LaunchControl.pidList) {
html.option(value(entry.getName()))
.write(entry.getName())
._option();
}
html._select();
html.button(id("setFermProfile").class_("btn btn-default").onClick("setFermProfile(this)"))
.write(Messages.SET_FERM_PROFILE)._button();
html._div();
}
return html;
}
示例14: getForm
import org.rendersnake.HtmlCanvas; //导入方法依赖的package包/类
/**
* Get the Form HTML Canvas representing a temperature trigger.
* @return {@link org.rendersnake.HtmlCanvas} representing the input form.
* @throws IOException when the HTMLCanvas could not be created.
*/
@Override
public final HtmlCanvas getForm() throws IOException {
HtmlCanvas html = new HtmlCanvas(new PrettyWriter());
html.div(id("NewTempTrigger").class_(""));
html.form(id("newTriggersForm"));
html.input(id("type").name("type").class_("form-control m-t")
.hidden("true").value("Temperature"));
html.input(id("type").name("position").class_("form-control m-t")
.hidden("position").value("" + this.position));
html.input(class_("inputBox temperature form-control m-t")
.type("number").add("step", "any")
.add("placeholder", Messages.SET_POINT)
.name("targetTemperature").value(""));
html.input(class_("inputBox temperature form-control m-t")
.type("number").add("step", "any")
.add("placeholder", Messages.END_TEMP)
.name("exitTemperature").value(""));
html.input(class_("inputBox form-control m-t")
.name("method").value("")
.add("placeholder", Messages.METHOD));
html.input(class_("inputBox form-control m-t")
.name("stepType").value("")
.add("placeholder", Messages.TYPE));
// Add the on/off values
html.select(class_("form-control m-t").name("mode")
.id("mode"));
html.option(value(""))
.write("")
._option();
html.option(value(TemperatureTrigger.INCREASE))
.write(TemperatureTrigger.INCREASE)
._option();
html.option(value(TemperatureTrigger.DECREASE))
.write(TemperatureTrigger.DECREASE)
._option();
html._select();
html.button(name("submitTemperature")
.class_("btn btn-primary m-t col-md-12")
.add("data-toggle", "clickover")
.onClick("submitNewTriggerStep(this);"))
.write(Messages.ADD_TRIGGER)
._button();
html._form();
html._div();
return html;
}
示例15: getEditForm
import org.rendersnake.HtmlCanvas; //导入方法依赖的package包/类
/**
* Get the Form HTML Canvas representing a temperature trigger.
* @return {@link org.rendersnake.HtmlCanvas} representing the input form.
* @throws IOException when the HTMLCanvas could not be created.
*/
@Override
public final HtmlCanvas getEditForm() throws IOException {
HtmlCanvas html = new HtmlCanvas(new PrettyWriter());
html.div(id("EditTempTrigger").class_(""));
html.form(id("editTriggersForm"));
html.input(id("type").name("type")
.hidden("true").value("Temperature"));
html.input(id("type").name("position")
.hidden("position").value("" + this.position));
html.input(class_("inputBox temperature form-control")
.type("number").add("step", "any")
.add("placeholder", Messages.SET_POINT)
.value(this.targetTemp.toPlainString())
.name("targetTemperature"));
html.input(class_("inputBox temperature form-control")
.type("number").add("step", "any")
.add("placeholder", Messages.END_TEMP)
.value(this.targetTemp.toPlainString())
.name("exitTemperature"));
html.input(class_("inputBox form-control")
.name("method").value("")
.value(this.method)
.add("placeholder", Messages.METHOD));
html.input(class_("inputBox form-control")
.name("stepType").value("")
.value(this.type)
.add("placeholder", Messages.TYPE));
// Add the on/off values
html.select(class_("holo-spinner").name("mode")
.id("mode"));
html.option(value(""))
.write("")
._option();
html.option(value(TemperatureTrigger.INCREASE)
.selected_if(
this.mode.equals(TemperatureTrigger.INCREASE)))
.write(TemperatureTrigger.INCREASE)
._option();
html.option(value(TemperatureTrigger.DECREASE)
.selected_if(
this.mode.equals(TemperatureTrigger.DECREASE)))
.write(TemperatureTrigger.DECREASE)
._option();
html._select();
html.button(name("submitTemperature")
.class_("btn col-md-12")
.add("data-toggle", "clickover")
.onClick("updateTriggerStep(this);"))
.write(Messages.ADD_TRIGGER)
._button();
html._form();
html._div();
return html;
}