📄 submitprimitive.java
字号:
package com.wiley.compBooks.EJwithUML.Base.HtmlPrimitives.FormPrimitives;import com.wiley.compBooks.EJwithUML.Base.HtmlPrimitives.Core.*;/** * The SubmitPrimitive class encapsulates the details of building * the HTML for a submit button. */public class SubmitPrimitive implements IHtmlPrimitive{ private String label; private String name; private Style style; /** Construct a simple submit button with the default label. */ public SubmitPrimitive() { } /** Construct an submit input with the specified label and style.*/ public SubmitPrimitive(String label, Style style) { this.label = label; this.style = style; } /** Construct an submit input with the specified label.*/ public SubmitPrimitive(String label) { this.label = label; } /** Set the name of this submit button for internal use. */ public void setName(String name) { this.name = name; } /** Build the content for this primitive and append it to * the specified buffer.*/ public void buildContent(StringBuffer buffer) { String type_string = Formatting.convertToAttribute("type", "submit"); String value_string = Formatting.convertToAttribute("value", this.label); String name_string = Formatting.convertToAttribute("name", this.name); String class_string = Formatting.convertToAttribute("class", this.style); buffer.append("<input" +type_string+value_string+name_string+class_string+ ">"); buffer.append("</input>"); }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -