public class ColorBackground extends AbstractBackground
DEFAULT_SIZE| 构造器和说明 |
|---|
ColorBackground() |
| 限定符和类型 | 方法和说明 |
|---|---|
java.lang.Object |
clone()
克隆一个当前对象
|
protected java.awt.image.BufferedImage |
createBufferedImage(int width,
int height) |
JSONObject |
createJSONConfig(Repository repo)
控件背景输出json到web端.
|
void |
drawWithGradientLine(java.awt.Graphics g,
java.awt.Shape shape)
根据指定的画图对象和几何图形来画具有渐变色的边框的颜色背景
|
boolean |
equals(java.lang.Object object)
判断当前对象是否和指定的对象相等
|
int |
fixHashCode(int code)
修正哈希码
|
java.lang.String |
getBackgroundType()
颜色背景在web端作为辨识的字符串
|
java.awt.Color |
getColor()
返回颜色背景所使用的颜色
|
static ColorBackground |
getInstance()
获取一个没有颜色的背景
|
static ColorBackground |
getInstance(java.awt.Color color)
获取指定颜色的背景
|
int |
hashCode()
重写下hashcode,条件属性设置背景颜色时,用到了clone方法,
style里的缓存map用get的时候拿不到已缓存的,导致内存泄漏
|
void |
paint(java.awt.Graphics g,
java.awt.Shape shape)
根据指定的画图对象和几何图形来画颜色背景
|
Background |
readAdditionalAttr(XMLableReader reader)
读取 添加的背景属性
|
JSONObject |
toJSONObject()
将颜色背景输出成JSON对象
|
JSONObject |
toJSONObject(Repository repo,
java.awt.Dimension size) |
void |
writeAdditionalAttr(XMLPrintWriter writer)
输出 添加属性
|
layoutDidChange, paint, paintImage, preDealBackground, readXML, toJSONObject, traverseForExport, writeXMLpublic static ColorBackground getInstance()
public static ColorBackground getInstance(java.awt.Color color)
color - 背景指定的颜色public java.awt.Color getColor()
public void paint(java.awt.Graphics g,
java.awt.Shape shape)
g - 画图对象shape - 几何图形public JSONObject toJSONObject(Repository repo, java.awt.Dimension size) throws JSONException
toJSONObject 在接口中 BackgroundtoJSONObject 在类中 AbstractBackgroundJSONExceptionprotected java.awt.image.BufferedImage createBufferedImage(int width,
int height)
public void drawWithGradientLine(java.awt.Graphics g,
java.awt.Shape shape)
g - 画图对象shape - 几何图形public boolean equals(java.lang.Object object)
equals 在接口中 Backgroundequals 在类中 java.lang.Objectobject - 指定的对象public int hashCode()
hashCode 在类中 java.lang.Objectpublic int fixHashCode(int code)
fixHashCode 在接口中 BackgroundfixHashCode 在类中 AbstractBackgroundcode - 已经计算好的哈希码public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
clone 在接口中 Backgroundclone 在接口中 FCloneableclone 在类中 AbstractBackgroundjava.lang.CloneNotSupportedExceptionpublic JSONObject toJSONObject() throws JSONException
toJSONObject 在接口中 BackgroundtoJSONObject 在类中 AbstractBackgroundJSONExceptionpublic java.lang.String getBackgroundType()
public Background readAdditionalAttr(XMLableReader reader)
readAdditionalAttr 在接口中 BackgroundreadAdditionalAttr 在类中 AbstractBackgroundreader - 读取public void writeAdditionalAttr(XMLPrintWriter writer)
writeAdditionalAttr 在接口中 BackgroundwriteAdditionalAttr 在类中 AbstractBackgroundwriter - 输出添加属性public JSONObject createJSONConfig(Repository repo) throws JSONException
AbstractBackgroundcreateJSONConfig 在接口中 BackgroundcreateJSONConfig 在类中 AbstractBackgroundrepo - 浏览器上下文JSONException