📄 textprimitive.java
字号:
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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -