public class Button extends Widget
限定符和类型 | 字段和说明 |
---|---|
protected java.lang.String |
hotkeys |
protected java.lang.String |
iconName |
protected boolean |
showIcon |
protected boolean |
showText |
protected java.lang.String |
text |
AFTEREDIT, AFTERINIT, BEFOREEDIT, CHANGE, DEFAULT_FONT_SIZE, disabled, EVENT_CLICK, EVENT_STATECHANGE, invisible, STOPEDIT, widgetName, XML_TAG
构造器和说明 |
---|
Button() |
Button(java.lang.String text) |
Button(java.lang.String text,
java.lang.String iconName) |
限定符和类型 | 方法和说明 |
---|---|
java.lang.Object |
clone() |
protected JSONObject |
createChildConfig(Repository repo) |
JSONObject |
createJSONConfig(Repository repo,
Calculator c,
NodeVisitor nodeVisitor)
以JSONObject方式返回button的配置信息
|
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getHotkeys() |
java.lang.String |
getIconName() |
java.lang.String |
getText() |
java.lang.String |
getXType()
控件xType,每个控件的特有标记和控件一一对应
|
boolean |
isEditor()
是否为编辑器
|
boolean |
isShowIcon()
是否展示icon
|
boolean |
isShowText()
是否文本
|
void |
readXML(XMLableReader reader)
Read XML.
|
java.lang.String |
resolveText(Repository repo)
解决文本
|
void |
setHotkeys(java.lang.String hotkeys) |
void |
setIconName(java.lang.String iconName) |
void |
setShowIcon(boolean b)
设置参数
|
void |
setShowText(boolean b)
设置展示文本
|
void |
setText(java.lang.String text) |
java.lang.String[] |
supportedEvents()
支持事件
|
java.lang.Object |
value2Config(java.lang.Object value,
CalculatorProvider ca)
对按钮文本的特殊处理,当button的text属性为空时,返回处理过的值,这个值就是按钮的文本内容。
|
void |
writeXML(XMLPrintWriter writer)
Write XML.
|
acceptType, changeOnlyVisibleAuthorityState, changeUsableAuthorityState, changeVisibleAuthorityState, cleanAuthority, dealInvisible, dealWithPresentableValue, getContentHeight, getContentWidth, getDescription, getDisableAction, getEnableAction, getInvisibleAction, getLabelName, getVisibleAction, getWidgetName, getWidgetPrivilegeControl, hasDataOnInit, hashCode, isChartRelated, isDirtyWidget, isDoneUsableAuthority, isDoneVisibleAuthority, isEnabled, isUsableAuthority, isVisible, isVisibleAuthority, resize, resize, setChartRelated, setDescription, setEnabled, setLabelName, setVisible, setWidgetName, setWidgetPrivilegeControl, supportMobile, toImage, toImage, toString, updateChildBounds
addListener, clearListeners, createJSONListener, createListeners, dealWithListener4Compatible, getConvertMap, getListener, getListenerSize
copy, getId, getNameSpace, setId, setNameSpace
getClassInfo, getData, invalidate, isLoad, setClassInfo, setData
protected java.lang.String text
protected java.lang.String iconName
protected boolean showIcon
protected boolean showText
protected java.lang.String hotkeys
public Button()
public Button(java.lang.String text)
public Button(java.lang.String text, java.lang.String iconName)
public boolean isShowIcon()
public void setShowIcon(boolean b)
b
- 参数public boolean isShowText()
public void setShowText(boolean b)
b
- 参数文本.public java.lang.String getHotkeys()
public void setHotkeys(java.lang.String hotkeys)
public java.lang.String getXType()
Widget
public java.lang.String[] supportedEvents()
supportedEvents
在类中 Observer
public java.lang.String resolveText(Repository repo)
repo
- 请求public java.lang.String getText()
public java.lang.String getIconName()
public void setText(java.lang.String text)
public void setIconName(java.lang.String iconName)
protected JSONObject createChildConfig(Repository repo) throws JSONException
JSONException
public JSONObject createJSONConfig(Repository repo, Calculator c, NodeVisitor nodeVisitor) throws JSONException
createJSONConfig
在类中 Widget
nodeVisitor
- 节点访问repo
- : see 请求c
- : 指定解析器JSONException
- 异常public java.lang.Object value2Config(java.lang.Object value, CalculatorProvider ca)
value2Config
在类中 Widget
value
- 值ca
- 计算器public void readXML(XMLableReader reader)
Widget
readXML
在接口中 XMLReadable
readXML
在类中 Widget
reader
- XML读取对象XMLableReader
public void writeXML(XMLPrintWriter writer)
Widget
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
在接口中 FCloneable
clone
在类中 Widget
java.lang.CloneNotSupportedException
- 如果克隆失败则抛出此异常