textprimitive.java

来自「考勤管理系统源码」· Java 代码 · 共 44 行

JAVA
44
字号
package com.wiley.compBooks.EJwithUML.Base.HtmlPrimitives.ContentElements;import com.wiley.compBooks.EJwithUML.Base.HtmlPrimitives.Core.*;import java.util.*;/** * The TextPrimitive class encapsulates the details of building * simple text. * */public class TextPrimitive implements IHtmlPrimitive{  private StringBuffer content = new StringBuffer();  /** Construct a TextPrimitive object with the specified text   *  as its initial content.*/  public TextPrimitive(String text)  {    this.content.append(text);  }  /** Construct a TextPrimitive object with no initial content. */  public TextPrimitive()  {  }  /** Add the specified text to the cummulative content. */  public void addText(String text)  {    this.content.append(text);  }  /** Add a line break to the cummulative content.*/  public void addLineBreak()  {    this.content.append("</br>");  }  /** Build the content for this primitive and append it to the   *  specified buffer.*/  public void buildContent(StringBuffer buffer)  {    buffer.append(this.content.toString());  }}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?