Class AbstractAttributeEditor<T>

    • Constructor Detail

      • AbstractAttributeEditor

        public AbstractAttributeEditor()
    • Method Detail

      • getSize

        public Size getSize()
        返回编辑器弹出窗的缺省大小
        Specified by:
        getSize in interface IAttributeEditor
        Returns:
      • getRuntimeParameters

        public List<ParameterValue> getRuntimeParameters()
        获取编辑器选项 这个选项一定不为空 并且融合了 设计期和运行期 的所有编辑器参数选项
        Returns:
      • option

        public <T> T option​(String name,
                            T defaultValue)
        首先从运行时中寻找参数 然后从 设计时中寻找参数
        Parameters:
        name -
        defaultValue -
        Returns:
      • onEditorOptionChanged

        public void onEditorOptionChanged​(String key)
        某个编辑属性改变了值
        Parameters:
        key - 如果key is null or empty 更新所有的属性编辑器组件的选项
      • expandExtraWidget

        public void expandExtraWidget​(com.google.gwt.user.client.ui.Widget widget,
                                      boolean appendOrRemove)
        扩展属性编辑器编辑框
        Parameters:
        widget -
        appendOrRemove -
      • editAttribute

        public void editAttribute​(ParameterValues runtimeParameters,
                                  IAttribute attribute)
        设置组件编辑器的内容 通过组件工厂 AttributeEditorFactory 创建一个编辑器组件实例后 子组件必须首先调用此方法 处理一些基础数据 参见下拉框编辑器的设计 DropdownAttributeEditor
        Specified by:
        editAttribute in interface IAttributeEditor
        Parameters:
        runtimeParameters - 编辑器选项 是一个 KV Ma,继承的组件自己定义所需的参数
        attribute - 属性编辑器对应的属性内容
      • castToValue

        public Object castToValue​(String value)
        根据 DataType 将字符串转化为对象
        Parameters:
        value -
        Returns:
      • notifyValueChanged

        public void notifyValueChanged()
        通知监听器 属性发生了变化
      • readAttributeValue

        public Object readAttributeValue​(ParameterValue attribute,
                                         Object defaultValue)
        读取attribute的值 如果为空 返回缺省值
        Parameters:
        attribute -
        defaultValue -
        Returns:
      • fromUI

        public abstract void fromUI()
        从UI获取数据到 对象实体中
        Specified by:
        fromUI in interface IAttributeEditor