📄 formatting.java
字号:
package com.wiley.compBooks.EJwithUML.Base.HtmlPrimitives.Core;import com.wiley.compBooks.EJwithUML.Base.HtmlPrimitives.Layout.*;/** The Formatting class contains some convenience methods for * formatting attributes.*/public class Formatting{ /** if the value is -1 then ignore the attribute. Otherwise * include attribute name with value in quotes*/ public static String convertToAttribute(String name, int value) { return (value == -1) ? "" : " " +name+ "=\"" +value+ "\""; } /** Include attribute name with value in quotes*/ public static String convertToAttribute(String name, String value) { return (value == null) ? "" : " " +name+ "=\"" +value+ "\""; } /** Include attribute if value is true.*/ public static String convertToAttribute(String name, boolean value) { return (value == false) ? "" : " "+name; } /** Include attribute name with value in quotes*/ public static String convertToAttribute(String name, HAlignment value) { return (value == null) ? "" : " " +name+ "=\"" +value+ "\""; } /** Include attribute name with value in quotes*/ public static String convertToAttribute(String name, VAlignment value) { return (value == null) ? "" : " " +name+ "=\"" +value+ "\""; } /** Include attribute name with value in quotes */ public static String convertToAttribute(String name, Style value) { return (value == null) ? "" : " " +name+ "=\"" +value+ "\""; }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -