Class AbstractAttribute
- java.lang.Object
-
- cn.mapway.ui.client.mvc.attribute.AbstractAttribute
-
- All Implemented Interfaces:
IAttribute
- Direct Known Subclasses:
CheckBoxAttribute,ColorBoxAttribute,DateTimeAttribute,DropdownAttribute,ImageUploadBoxAttribute,LabelAttribute,PaddingBoxAttribute,ParameterAttribute,SimpleCheckBoxAttribute,SimpleColorBoxAttribute,SimpleDropdownBoxAttribute,SimpleTextBoxAttribute,TextAreaAttribute,TextBoxAttribute
public abstract class AbstractAttribute extends Object implements IAttribute
AbstractAttribute 提供大部分的属性定义接口- Author:
- zhang
-
-
Field Summary
Fields Modifier and Type Field Description protected StringaltNamestatic StringBASIC_GROUPprotected intdataTypeprotected StringdefaultValueprotected Stringdescriptionprotected StringerrorTipprotected Stringgroupprotected Stringiconprotected Stringnameprotected IOptionProvideroptionProviderprotected Integerrankprotected BooleanreadOnlyprotected Booleanrequiredprotected Stringtipprotected Stringvalidatorprotected Booleanvisible
-
Constructor Summary
Constructors Constructor Description AbstractAttribute()AbstractAttribute(String name)AbstractAttribute(String name, String alterName)AbstractAttribute(String name, String alterName, String customEditCode)构建一个自定义模块的属性
-
Method Summary
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface cn.mapway.ui.client.mvc.attribute.IAttribute
getValue, setValue
-
-
-
-
Field Detail
-
BASIC_GROUP
public static final String BASIC_GROUP
- See Also:
- Constant Field Values
-
altName
protected String altName
-
dataType
protected int dataType
-
defaultValue
protected String defaultValue
-
description
protected String description
-
readOnly
protected Boolean readOnly
-
required
protected Boolean required
-
validator
protected String validator
-
group
protected String group
-
rank
protected Integer rank
-
tip
protected String tip
-
errorTip
protected String errorTip
-
icon
protected String icon
-
optionProvider
protected IOptionProvider optionProvider
-
name
protected String name
-
visible
protected Boolean visible
-
-
Method Detail
-
getId
public String getId()
Description copied from interface:IAttribute唯一ID- Specified by:
getIdin interfaceIAttribute- Returns:
-
getRuntimeParameters
public ParameterValues getRuntimeParameters()
Description copied from interface:IAttribute获取运行时期 的参数- Specified by:
getRuntimeParametersin interfaceIAttribute- Returns:
-
parseParameters
public AbstractAttribute parseParameters(String parameters)
解析设计器的组件参数- Parameters:
parameters- is a list [{IAttribute},{IAttribute}]- Returns:
-
parseEditor
public AbstractAttribute parseEditor(String editor)
editor JSON字符串中包含了所有的额编辑器信息 处理编辑器代码 editorCode 以及设计器的参数 designOpotions- Returns:
-
getName
public String getName()
- Specified by:
getNamein interfaceIAttribute
-
setName
public AbstractAttribute setName(String name)
-
getAltName
public String getAltName()
- Specified by:
getAltNamein interfaceIAttribute
-
setAltName
public AbstractAttribute setAltName(String altName)
-
getDefaultValue
public String getDefaultValue()
- Specified by:
getDefaultValuein interfaceIAttribute
-
setDefaultValue
public AbstractAttribute setDefaultValue(String defaultValue)
-
getDescription
public String getDescription()
- Specified by:
getDescriptionin interfaceIAttribute
-
setDescription
public AbstractAttribute setDescription(String description)
-
isReadonly
public boolean isReadonly()
- Specified by:
isReadonlyin interfaceIAttribute
-
setReadOnly
public AbstractAttribute setReadOnly(boolean readOnly)
-
isRequired
public boolean isRequired()
- Specified by:
isRequiredin interfaceIAttribute
-
setRequired
public AbstractAttribute setRequired(boolean required)
-
getDataType
public int getDataType()
- Specified by:
getDataTypein interfaceIAttribute
-
setDataType
public AbstractAttribute setDataType(int dataType)
-
getValidateRegx
public String getValidateRegx()
- Specified by:
getValidateRegxin interfaceIAttribute
-
setValidateRegx
public AbstractAttribute setValidateRegx(String validateRegx)
-
getGroup
public String getGroup()
- Specified by:
getGroupin interfaceIAttribute
-
setGroup
public AbstractAttribute setGroup(String group)
-
getRank
public int getRank()
- Specified by:
getRankin interfaceIAttribute
-
setRank
public AbstractAttribute setRank(int rank)
-
getTip
public String getTip()
- Specified by:
getTipin interfaceIAttribute
-
setTip
public AbstractAttribute setTip(String tip)
-
getErrorTip
public String getErrorTip()
- Specified by:
getErrorTipin interfaceIAttribute
-
setErrorTip
public AbstractAttribute setErrorTip(String errorTip)
-
getIcon
public String getIcon()
- Specified by:
getIconin interfaceIAttribute
-
setIcon
public AbstractAttribute setIcon(String icon)
-
getOptionProvider
public IOptionProvider getOptionProvider()
- Specified by:
getOptionProviderin interfaceIAttribute
-
setOptionProvider
public AbstractAttribute setOptionProvider(IOptionProvider optionProvider)
-
getEditorMetaData
public IEditorMetaData getEditorMetaData()
Description copied from interface:IAttribute编辑这个属性需要的属性编辑器信息 将会替代 上面的getEditorCode designOption getOptions等字段 完成后 上面的字段将会被删除- Specified by:
getEditorMetaDatain interfaceIAttribute- Returns:
-
setEditorData
public AbstractAttribute setEditorData(IEditorMetaData editorData)
-
getAttrVisible
public boolean getAttrVisible()
Description copied from interface:IAttribute获取编辑器显示或者隐藏- Specified by:
getAttrVisiblein interfaceIAttribute- Returns:
-
setAttrVisible
public IAttribute setAttrVisible(boolean visible)
设置编辑器显示或者隐藏- Specified by:
setAttrVisiblein interfaceIAttribute- Parameters:
visible-- Returns:
-
notifyPropertyChange
public void notifyPropertyChange()
属性发生变化 通知UI- Specified by:
notifyPropertyChangein interfaceIAttribute
-
setChangeCallback
public IAttribute setChangeCallback(IAttributePropertyChangeCallback callback)
Description copied from interface:IAttribute设置属性改变的回调- Specified by:
setChangeCallbackin interfaceIAttribute- Returns:
-
param
public AbstractAttribute param(String key, String value)
-
findParameterValue
public ParameterValue findParameterValue(String key)
查找 [key] 的参数信息- Parameters:
key-- Returns:
-
replaceParameter
public AbstractAttribute replaceParameter(String key, Object value, boolean init)
替换参数- Parameters:
key-value-init-- Returns:
-
-