Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
titleAbstractMobileParamStyleProvider
collapsetrue
package com.fr.report.fun.impl;

import com.fr.json.JSONException;
import com.fr.json.JSONObject;
import com.fr.log.FineLoggerFactory;
import com.fr.report.fun.MobileParamStyleProvider;
import com.fr.stable.fun.impl.AbstractProvider;
import com.fr.stable.fun.mark.API;



@API(level = MobileParamStyleProvider.CURRENT_LEVEL)
public abstract class AbstractMobileParamStyleProvider extends AbstractProvider implements MobileParamStyleProvider {

    @Override
    public int currentAPILevel() {
        return CURRENT_LEVEL;
    }

    @Override
    public String mark4Provider() {
        return getClass().getName();
    }

    @Override
    public JSONObject createJSON() {
        JSONObject jo = JSONObject.create();
        try {
            jo.put("queryType", getStyleType());
        } catch (JSONException e) {
            FineLoggerFactory.getLogger().error(e.getMessage(), e);
        }
        return jo;
    }
}

 


接口接入

Code Block
<extra-report>
    <MobileParamStyleProvider class="com.fr.plugin.topparameterstyle.MobileParamStyleDefine"/>
</extra-report>

...

在设计器的参数面板下移动端->手机属性,可以选择移动端参数面板展现的位置。

接口示例

示例源码:httphttps://cloudcode.finedevelopfanruan.com:2015/projectsfanruan/FD/repos/demo-parameter-style/browse

注意事项

移动端需要对增加的参数面板样式有相应的实现。