renderSnakeHTML生成库

联合创作 · 2023-09-21 23:52

RenderSnake 是一个轻量级的Java类库用来通过Java方法生产html页面,包含4个核心类库:

  • HtmlCanvas , a class that has methods for all HTML 4.01 and HTML5 tags for opening and closing it
  • HtmlAttributes, a class that has methods for all existing HTML attributes for setting an attribute value
  • Renderable, a interface that is used to create component classes. Each component must implement the method renderOn(HtmlCanvas)
  • PageContext, a Map-like object to store any information that is used for rendering a Page.

示例代码:

canvas.html()
        .body()
          .h1().write("RenderSnake")._h1()
        ._body()
      ._html()
浏览 7
点赞
评论
收藏
分享

手机扫一扫分享

编辑 分享
举报
评论
图片
表情
推荐
点赞
评论
收藏
分享

手机扫一扫分享

编辑 分享
举报