From de1a0e2dcc6188beb460ffed1b1ca4eb31953599 Mon Sep 17 00:00:00 2001 From: felix xia <125861688@qq.com> Date: Thu, 2 Jan 2020 16:51:39 +0800 Subject: [PATCH] release1.0 --- .gitee/ISSUE_TEMPLATE.zh-CN.md | 13 - .gitee/PULL_REQUEST_TEMPLATE.zh-CN.md | 15 - build.xml | 22 +- document/digitroll.png | Bin 0 -> 5515 bytes document/使用手册.txt | 15 + plugin-widget-digitroll.iml | 18 - plugin-widget-digitroll10.iml | 52 +++ plugin.xml | 12 +- pom.xml | 14 + .../widget/digitroll/DigitRollWidget.java | 319 +++++++++++++++++ .../digitroll/JavaScriptFileLoader.java | 19 +- .../widget/digitroll/OptionProvider.java | 32 +- src/com/fr/plugin/widget/digitroll/Util.java | 20 ++ .../fr/plugin/widget/digitroll/Widget.java | 321 ------------------ .../fr/plugin/widget/digitroll/WidgetUI.java | 84 ----- .../digitroll/editor/DigitRollAlign.java | 28 -- .../digitroll/images/digitroll_display.png | Bin 5885 -> 9645 bytes .../digitroll/images/digitroll_icon.png | Bin 744 -> 3234 bytes .../{local => locale}/digitroll.properties | 7 +- .../digitroll_zh_CN.properties | 7 +- .../digitroll/ui/DecimalPlacesEditor.java | 21 ++ .../DigitRollDataSourceEditor.java | 23 +- .../digitroll/ui/DigitRollWidgetUI.java | 88 +++++ .../fr/plugin/widget/digitroll/web/countUp.js | 12 +- .../widget/digitroll/web/widget.digitRoll.js | 41 ++- 25 files changed, 631 insertions(+), 552 deletions(-) delete mode 100644 .gitee/ISSUE_TEMPLATE.zh-CN.md delete mode 100644 .gitee/PULL_REQUEST_TEMPLATE.zh-CN.md create mode 100644 document/digitroll.png create mode 100644 document/使用手册.txt delete mode 100644 plugin-widget-digitroll.iml create mode 100644 plugin-widget-digitroll10.iml create mode 100644 pom.xml create mode 100644 src/com/fr/plugin/widget/digitroll/DigitRollWidget.java delete mode 100644 src/com/fr/plugin/widget/digitroll/Widget.java delete mode 100644 src/com/fr/plugin/widget/digitroll/WidgetUI.java delete mode 100644 src/com/fr/plugin/widget/digitroll/editor/DigitRollAlign.java rename src/com/fr/plugin/widget/digitroll/{local => locale}/digitroll.properties (69%) rename src/com/fr/plugin/widget/digitroll/{local => locale}/digitroll_zh_CN.properties (73%) create mode 100644 src/com/fr/plugin/widget/digitroll/ui/DecimalPlacesEditor.java rename src/com/fr/plugin/widget/digitroll/{editor => ui}/DigitRollDataSourceEditor.java (78%) create mode 100644 src/com/fr/plugin/widget/digitroll/ui/DigitRollWidgetUI.java diff --git a/.gitee/ISSUE_TEMPLATE.zh-CN.md b/.gitee/ISSUE_TEMPLATE.zh-CN.md deleted file mode 100644 index f09d98d..0000000 --- a/.gitee/ISSUE_TEMPLATE.zh-CN.md +++ /dev/null @@ -1,13 +0,0 @@ -### 该问题是怎么引起的? - - - -### 重现步骤 - - - -### 报错信息 - - - - diff --git a/.gitee/PULL_REQUEST_TEMPLATE.zh-CN.md b/.gitee/PULL_REQUEST_TEMPLATE.zh-CN.md deleted file mode 100644 index 534be43..0000000 --- a/.gitee/PULL_REQUEST_TEMPLATE.zh-CN.md +++ /dev/null @@ -1,15 +0,0 @@ -### 该Pull Request关联的Issue - - -### 修改描述 - - - -### 测试用例 - - - -### 修复效果的截屏 - - - diff --git a/build.xml b/build.xml index ea5647b..0c13001 100644 --- a/build.xml +++ b/build.xml @@ -1,14 +1,11 @@ - + - - - - + @@ -17,7 +14,7 @@ - + @@ -27,19 +24,10 @@ - - - - - - - - + @@ -125,5 +113,7 @@ + + diff --git a/document/digitroll.png b/document/digitroll.png new file mode 100644 index 0000000000000000000000000000000000000000..a10fef4ab24142031e540b41e8011a5b6f916c63 GIT binary patch literal 5515 zcmbW52{=^k+rX!J?J6Q8A|m@*_GLyCk|MH$|?|`@ZY@f7f-+{hV{2=iK-6Jm-F%``o{$w@eIAu<^5j zK%f&w*RGm_K*#?4eX@XoCmfX5FM)#9_nM7A2*l3)`#c89%02@;Wbn|vsS5&?Cx-2r zr2zNBuGh?Of|5NP)ZDC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u9zHHePs5E3l^N8hl!RL@_VUi>L0T2(MbHR z9CJSPxy)%2HMFHe7b_U2sDZXk=-`VULsjrn6UH$4=0}a?s zCu#=lU3~O{M9$+OLpxgd%gz_EY}lTfCJ3Gremap+wzvz1GdmrmHkfG@Chl8lr(trQ zSr@~&Vdl@mV5O4HA{f13m(b7!#&U@rw0WA$EbPG_NK0^ly#~)cjY=AFvuc@(HqG;u zV#O8jOg$$RSM+4F3^^Eqv6m`85hL)kF{Svj6C2}#8@g!AfJL)axWKU14W-Tyu4RdpMnX;-O-HCkpZ%@ zTQ(hF>MDe`92Qy3qcxk{qWx;s#WirjTYx+w66xF1g7367iv(yIiTz2Xfa-3ewUVj6JPy#mV5L6MMAkK1BPbzX7C! zm3C`$^m-(HP^wJ41BOHF=1p&MOwfQWx<}uA%gsP3#D4e*p69 z@!%`J^XrB*FuQ~%i)?0#02Q|KiuBwjc$yP#68@X?7$@uNQe{^%NPc{^$1gieRj)F! z%Gz@&@}7Ik2Gg^E*XmuyR0{(cXkO9@3wSA?bE=y@yd-s!~ z(z2UV3@Lt$ zeDF6T361Evx709^e?W_MwO(XL;^MnBzNKrmZ(FJiptoa} zemlv(XxzUb*8jlBzUTt@N*Ta9ZNq+B6RLy5i1`0MUh}%I@$W&t&J;-dWyJmw2tDZE VKOYR$0>CNANZ;gYsh)Gxe*irgjQ0Ql literal 0 HcmV?d00001 diff --git a/document/使用手册.txt b/document/使用手册.txt new file mode 100644 index 0000000..df663c0 --- /dev/null +++ b/document/使用手册.txt @@ -0,0 +1,15 @@ +数字滚动控件使用手册 + + 数字滚动控件,用于决策报表中以滚动的方式显示数据源中的数字。 + +一、设置数据源 + 数据源有两种:1、通过公式生成随机数;2、从数据集读取数据。数据可以是整数,小数。 + +二、属性设置 + 1、持续时间:设置数据滚动动画的持续时间。 + 2、前/后缀:设置显示在数字前/后的字符。 + 3、文字大小:调整数字的大小。 + 3、文字颜色。 + 4、背景颜色。 + 5、分组:勾选分组后,10000显示为10,000 + 6、小数位数:设置小数点后显示的位数。 \ No newline at end of file diff --git a/plugin-widget-digitroll.iml b/plugin-widget-digitroll.iml deleted file mode 100644 index 20fe623..0000000 --- a/plugin-widget-digitroll.iml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/plugin-widget-digitroll10.iml b/plugin-widget-digitroll10.iml new file mode 100644 index 0000000..ac8c778 --- /dev/null +++ b/plugin-widget-digitroll10.iml @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/plugin.xml b/plugin.xml index fbbb73d..537ea40 100644 --- a/plugin.xml +++ b/plugin.xml @@ -1,15 +1,15 @@ - com.fr.plugin.widget.digitroll - + com.fr.plugin.widget.digitroll.v10 + yes 1.0 - 8.0 - 2017-8-05 + 10.0 + 2019-12-01 Felix [2018-07-13]Felix:首发

+

[2019-12-30]Felix:首发

]]>
@@ -23,7 +23,7 @@ - +
diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..3842156 --- /dev/null +++ b/pom.xml @@ -0,0 +1,14 @@ + + + 4.0.0 + + + com.fr.plugin + starter + 10.0 + + jar + plugin-widget-digitroll10 + \ No newline at end of file diff --git a/src/com/fr/plugin/widget/digitroll/DigitRollWidget.java b/src/com/fr/plugin/widget/digitroll/DigitRollWidget.java new file mode 100644 index 0000000..08c37bc --- /dev/null +++ b/src/com/fr/plugin/widget/digitroll/DigitRollWidget.java @@ -0,0 +1,319 @@ +package com.fr.plugin.widget.digitroll; + +import com.fr.base.Formula; +import com.fr.base.ParameterMapNameSpace; +import com.fr.form.data.DataBinding; +import com.fr.form.ui.DataControl; +import com.fr.form.ui.DirectWriteEditor; +import com.fr.form.ui.Widget; +import com.fr.form.ui.WidgetValue; +import com.fr.form.ui.concept.data.ValueInitializer; +import com.fr.json.JSONArray; +import com.fr.json.JSONException; +import com.fr.json.JSONObject; +import com.fr.log.FineLoggerFactory; +import com.fr.script.Calculator; +import com.fr.stable.ArrayUtils; +import com.fr.stable.CodeUtils; +import com.fr.stable.core.NodeVisitor; +import com.fr.stable.script.CalculatorProvider; +import com.fr.stable.web.Repository; +import com.fr.stable.xml.XMLPrintWriter; +import com.fr.stable.xml.XMLableReader; +import com.fr.web.core.TemplateSessionIDInfo; +import com.fr.web.utils.WebUtils; + +import javax.servlet.http.HttpServletRequest; +import java.awt.*; + + +public class DigitRollWidget extends DirectWriteEditor implements DataControl { + + public static final String XTYPE = "digitroll"; + public static final String DURATION = "duration"; + public static final String FONT_SIZE = "fontSize"; + public static final String FONT_COLOR = "fontColor"; + public static final String BACKGROUND_COLOR = "backgroundColor"; + public static final String PREFIX = "prefix"; + public static final String SUFFIX = "suffix"; + public static final String GROUP = "group"; + public static final String DECIMAL_PALACES = "decimalPlaces"; + public static final String DECIMAL = "decimal"; + + private ValueInitializer widgetValue; + private int duration; + private int fontSize; + private Object fontColor; + private Object backgroundColor; + private String prefix; + private String suffix; + private boolean group; + private int decimalPlaces; + + public DigitRollWidget() { + widgetValue = new WidgetValue(); + duration = 0; + fontSize = 70; + fontColor = new Color(204, 204, 204); + backgroundColor = new Color(51, 51, 51); + prefix = ""; + suffix = ""; + setGroup(true); + setDecimalPlaces(0); + } + + public boolean isGroup() { + return group; + } + + public void setGroup(boolean group) { + this.group = group; + } + + public int getDecimalPlaces() { + return decimalPlaces; + } + + public void setDecimalPlaces(int decimalPlaces) { + this.decimalPlaces = decimalPlaces; + } + + public int getDuration() { + return this.duration; + } + + public void setDuration(int duration) { + this.duration = duration; + } + + public ValueInitializer getWidgetValue() { + return this.widgetValue; + } + + public void setWidgetValue(ValueInitializer widgetValue) { + this.widgetValue = widgetValue; + } + + public int getFontSize() { + return fontSize; + } + + public void setFontSize(int fontSize) { + this.fontSize = fontSize; + } + + public Object getFontColor() { + return fontColor; + } + + public void setFontColor(Object fontColor) { + this.fontColor = fontColor; + } + + public Object getBackgroundColor() { + return backgroundColor; + } + + public void setBackgroundColor(Object backgroundColor) { + this.backgroundColor = backgroundColor; + } + + public String getPrefix() { + return prefix; + } + + public void setPrefix(String prefix) { + this.prefix = prefix; + } + + public String getSuffix() { + return suffix; + } + + public void setSuffix(String suffix) { + this.suffix = suffix; + } + + @Override + public String getXType() {//控件类型,参考其他的案例,返回的是文本框 + return XTYPE; + } + + @Override + public int[] getValueType() { + return new int[]{TYPE_FORMULA, TYPE_DATABINDING}; + } + + @Override + public String[] dependence(CalculatorProvider calculatorProvider) { + return super.dependence(calculatorProvider); + } + + @Override + public String getDataBindDefaultValue(CalculatorProvider calculatorProvider) { + return null; + } + + /** + * 读取插件的值 + */ + private int dataSetCursor = 0; + + private double getWidgetValue(Calculator calculator) throws Exception { + double value = 0; + if (this.widgetValue.getValue() == null) { + value = 0; + } else if (this.widgetValue.getValue() instanceof Formula) { + Object v = calculator.eval((Formula) this.widgetValue.getValue()); + value = Util.valueChangeToDouble(v); + } else if (this.widgetValue.getValue() instanceof DataBinding) { + calculator.setAttribute(Widget.NAME, this.getWidgetName().toUpperCase()); + calculator.setAttribute(ValueInitializer.RETURN_ARRAY, true); + calculator.setAttribute(ValueInitializer.VALUE_REPEAT, true); + Object r = getWidgetValue().executeResult(calculator); + if (r instanceof Object[]) { + Object[] ra = (Object[]) r; + dataSetCursor %= ra.length; + Object val = ra[dataSetCursor++]; + return Util.valueChangeToDouble(val); + } else { + return (Util.valueChangeToDouble(r)); + } + } + return value; + } + + @Override + public void createValueResult(CalculatorProvider calculatorProvider, JSONObject jsonObject) { + Object result = null; + try { + if (widgetValue.getValue() instanceof Formula) { + result = calculatorProvider.eval((Formula) widgetValue.getValue()); + } else if (widgetValue.getValue() instanceof DataBinding) { + calculatorProvider.setAttribute(Widget.NAME, this.getWidgetName().toUpperCase()); + calculatorProvider.setAttribute(ValueInitializer.RETURN_ARRAY, true); + calculatorProvider.setAttribute(ValueInitializer.VALUE_REPEAT, true); + result = getWidgetValue().executeResult(calculatorProvider); + } + jsonObject.put(this.widgetName.toUpperCase(), result == null ? 0 : result); + } catch (Exception e) { + FineLoggerFactory.getLogger().error(e.getMessage(), e); + } + } + + @Override + public String getFormatText() { + return ""; + } + + @Override + public JSONObject createJSONConfig(Repository repository, + Calculator calculator, + NodeVisitor visitor) throws JSONException { + JSONObject jsonConfig = super.createJSONConfig(repository, calculator, visitor); + Object value = jsonConfig.get("value"); + if (value != null) { + Double v = 0d; + try { + JSONArray jsonArray = (JSONArray) value; + v = jsonArray.getDouble(0); + } catch (Exception e) { + FineLoggerFactory.getLogger().error(e.getMessage(), e); + } + jsonConfig.put("value", v); + } + + jsonConfig.put(DURATION, this.value2Config(this.duration, calculator)); + jsonConfig.put(PREFIX, getPrefix()); + jsonConfig.put(SUFFIX, getSuffix()); + jsonConfig.put(FONT_COLOR, Util.colorValueToHexString(((Color) getFontColor()).getRGB())); + jsonConfig.put(BACKGROUND_COLOR, Util.colorValueToHexString(((Color) getBackgroundColor()).getRGB())); + jsonConfig.put(FONT_SIZE, getFontSize()); + jsonConfig.put(GROUP, isGroup()); + //jsonConfig.put(DECIMAL, (getDecimalPlaces() <= 0 ? false : true)); + jsonConfig.put(DECIMAL_PALACES, getDecimalPlaces()); + + String[] dependence = this.dependence(calculator); + if (!ArrayUtils.isEmpty(dependence)) { + jsonConfig.put("dependence", dependence); + } + return jsonConfig; + } + + @Override + public JSONArray createJSONData(TemplateSessionIDInfo sessionIDInfor, + Calculator calculator, HttpServletRequest request) throws Exception { + JSONArray jsonArray; + jsonArray = super.createJSONData(sessionIDInfor, calculator, request); + ParameterMapNameSpace parameterMapNameSpace = ParameterMapNameSpace.create(sessionIDInfor.getParameterMap4Execute()); + DependenceNameSpace dependenceNameSpace = new DependenceNameSpace(CodeUtils.cjkDecode(WebUtils.getHTTPRequestParameter(request, "dependence"))); + calculator.pushNameSpace(parameterMapNameSpace); + calculator.pushNameSpace(dependenceNameSpace); + JSONObject jsonObject = new JSONObject(); + jsonObject.put("value", this.getWidgetValue(calculator)); + jsonArray.put(jsonObject); + calculator.removeNameSpace(parameterMapNameSpace); + calculator.removeNameSpace(dependenceNameSpace); + return jsonArray; + } + + @Override + public String[] supportedEvents() { + return new String[0]; + } + + @Override + public void readXML(XMLableReader reader) { + super.readXML(reader); + if (reader.isChildNode()) { + String tagName = reader.getTagName(); + if (tagName.equals("DigitRollAttr")) { + String s = null; + if ((s = reader.getAttrAsString(DURATION, null)) != null) { + this.setDuration(Integer.parseInt(s)); + } + if ((s = reader.getAttrAsString(FONT_SIZE, null)) != null) { + setFontSize(Integer.parseInt(s)); + } + + int color; + if ((color = reader.getAttrAsInt(FONT_COLOR, -1)) != -1) { + setFontColor(new Color(color)); + } + if ((color = reader.getAttrAsInt(BACKGROUND_COLOR, -1)) != -1) { + setBackgroundColor(new Color(color)); + } + setPrefix(reader.getAttrAsString(PREFIX, "")); + setSuffix(reader.getAttrAsString(SUFFIX, "")); + setDecimalPlaces(reader.getAttrAsInt(DECIMAL_PALACES, 0)); + setGroup(reader.getAttrAsBoolean(GROUP, true)); + + } else if ("widgetValue".equals(tagName)) { + this.widgetValue = new WidgetValue(); + reader.readXMLObject(this.widgetValue); + } + } + } + + @Override + public void writeXML(XMLPrintWriter writer) { + super.writeXML(writer); + writer.startTAG("DigitRollAttr"); + if (this.duration != 0) { + writer.attr(DURATION, this.getDuration()); + } + + writer.attr(FONT_SIZE, getFontSize()); + writer.attr(FONT_COLOR, ((Color) getFontColor()).getRGB()); + writer.attr(BACKGROUND_COLOR, ((Color) getBackgroundColor()).getRGB()); + writer.attr(PREFIX, getPrefix()); + writer.attr(SUFFIX, getSuffix()); + writer.attr(GROUP, isGroup()); + writer.attr(DECIMAL_PALACES, getDecimalPlaces()); + writer.end(); + + if (this.widgetValue != null) { + this.widgetValue.writeXML(writer); + } + } +} diff --git a/src/com/fr/plugin/widget/digitroll/JavaScriptFileLoader.java b/src/com/fr/plugin/widget/digitroll/JavaScriptFileLoader.java index 38f375d..e33107e 100644 --- a/src/com/fr/plugin/widget/digitroll/JavaScriptFileLoader.java +++ b/src/com/fr/plugin/widget/digitroll/JavaScriptFileLoader.java @@ -1,15 +1,30 @@ package com.fr.plugin.widget.digitroll; +import com.fr.general.Inter; +import com.fr.plugin.PluginLicense; +import com.fr.plugin.PluginLicenseManager; import com.fr.stable.fun.Authorize; import com.fr.stable.fun.impl.AbstractJavaScriptFileHandler; +import javax.swing.*; + @Authorize( callSignKey = Constants.PLUGIN_ID ) public class JavaScriptFileLoader extends AbstractJavaScriptFileHandler { + private PluginLicense license = PluginLicenseManager.getInstance().getPluginLicenseByID(Constants.PLUGIN_ID); + @Override public String[] pathsForFiles() { - return new String[]{ - "/com/fr/plugin/widget/digitroll/web/widget.digitRoll.js"}; + if (license.isAvailable()) { + return new String[]{ + "/com/fr/plugin/widget/digitroll/web/widget.digitRoll.js"}; + } else { + JOptionPane.showMessageDialog(null + , Inter.getLocText("Plugin-DigitRoll_License_Expired") + , Inter.getLocText("Plugin-DigitRoll_License_Title") + , JOptionPane.PLAIN_MESSAGE); + return null; + } } } diff --git a/src/com/fr/plugin/widget/digitroll/OptionProvider.java b/src/com/fr/plugin/widget/digitroll/OptionProvider.java index e48355a..1e08405 100644 --- a/src/com/fr/plugin/widget/digitroll/OptionProvider.java +++ b/src/com/fr/plugin/widget/digitroll/OptionProvider.java @@ -1,39 +1,23 @@ package com.fr.plugin.widget.digitroll; import com.fr.design.fun.impl.AbstractFormWidgetOptionProvider; -import com.fr.form.ui.Widget; import com.fr.general.Inter; -import com.fr.plugin.ExtraClassManager; -import com.fr.stable.fun.FunctionHelper; -import com.fr.stable.fun.FunctionProcessor; -import com.fr.stable.fun.impl.AbstractFunctionProcessor; - +import com.fr.plugin.transform.ExecuteFunctionRecord; +import com.fr.plugin.transform.FunctionRecorder; +import com.fr.plugin.widget.digitroll.ui.DigitRollWidgetUI; +@FunctionRecorder public class OptionProvider extends AbstractFormWidgetOptionProvider { - private static FunctionProcessor ONEFUNCTION = new AbstractFunctionProcessor() { - public int getId() { - return FunctionHelper.generateFunctionID(Constants.PLUGIN_ID); - } - - public String toString() { - return Inter.getLocText("Plugin-DigitRoll_Widget"); - } - }; - + @ExecuteFunctionRecord @Override - public Class classForWidget() { - FunctionProcessor processor = ExtraClassManager.getInstance().getFunctionProcessor(); - if (processor != null) { - processor.recordFunction(ONEFUNCTION); - } - - return Widget.class; + public Class classForWidget() { + return DigitRollWidget.class; } @Override public Class appearanceForWidget() { //界面类 - return WidgetUI.class; + return DigitRollWidgetUI.class; } @Override diff --git a/src/com/fr/plugin/widget/digitroll/Util.java b/src/com/fr/plugin/widget/digitroll/Util.java index 673fe73..c345d03 100644 --- a/src/com/fr/plugin/widget/digitroll/Util.java +++ b/src/com/fr/plugin/widget/digitroll/Util.java @@ -1,6 +1,7 @@ package com.fr.plugin.widget.digitroll; import com.fr.base.FRContext; +import com.fr.log.FineLoggerFactory; import java.math.BigDecimal; @@ -30,4 +31,23 @@ public class Util { return value; } + + public static double valueChangeToDouble(Object o) { + double value = 0; + if (o instanceof Integer) { + value = ((Integer) o).doubleValue(); + } else if (o instanceof BigDecimal) { + value = ((BigDecimal) o).doubleValue(); + } else if (o instanceof Double) { + value = ((Double) o).doubleValue(); + } else if (o instanceof String) { + try { + value = Double.parseDouble(o.toString()); + } catch (Exception e) { + FineLoggerFactory.getLogger().error(e.getMessage()); + } + } + + return value; + } } diff --git a/src/com/fr/plugin/widget/digitroll/Widget.java b/src/com/fr/plugin/widget/digitroll/Widget.java deleted file mode 100644 index 48628fc..0000000 --- a/src/com/fr/plugin/widget/digitroll/Widget.java +++ /dev/null @@ -1,321 +0,0 @@ -package com.fr.plugin.widget.digitroll; - -import com.fr.base.FRContext; -import com.fr.base.Formula; -import com.fr.base.ParameterMapNameSpace; -import com.fr.form.data.DataBinding; -import com.fr.form.ui.DataControl; -import com.fr.form.ui.DirectWriteEditor; -import com.fr.form.ui.WidgetValue; -import com.fr.general.Inter; -import com.fr.general.ModuleContext; -import com.fr.json.JSONArray; -import com.fr.json.JSONException; -import com.fr.json.JSONObject; -import com.fr.plugin.PluginLicense; -import com.fr.plugin.PluginLicenseManager; -import com.fr.script.Calculator; -import com.fr.stable.ArrayUtils; -import com.fr.stable.CodeUtils; -import com.fr.stable.core.NodeVisitor; -import com.fr.stable.script.CalculatorProvider; -import com.fr.stable.web.Repository; -import com.fr.stable.xml.XMLPrintWriter; -import com.fr.stable.xml.XMLableReader; -import com.fr.web.core.SessionIDInfor; -import com.fr.web.utils.WebUtils; - -import javax.servlet.http.HttpServletRequest; -import java.awt.*; - - -public class Widget extends DirectWriteEditor implements DataControl { - public static final int TYPE_YEAR_NONE = 8; - public static final String ALIGN = "align"; - public static final String DURATION = "duration"; - public static final String FONT_SIZE = "fontSize"; - public static final String FONT_COLOR = "fontColor"; - public static final String BACKGROUND_COLOR = "backgroundColor"; - public static final String PREFIX = "prefix"; - public static final String SUFFIX = "suffix"; - public static final String CSS = "css"; - - private WidgetValue widgetValue = new WidgetValue(); - private String align = new String(); - private int duration = 0; - private int fontSize = 70; - private Object fontColor = new Color(204, 204, 204); - private Object backgroundColor = new Color(51, 51, 51); - private String prefix; - private String suffix; - - public Widget() { - } - - public String getAlign() { - return this.align; - } - - public void setAlign(String align) { - this.align = align; - } - - public int getDuration() { - return this.duration; - } - - public void setDuration(int duration) { - this.duration = duration; - } - - public WidgetValue getWidgetValue() { - return this.widgetValue; - } - - public void setWidgetValue(WidgetValue widgetValue) { - this.widgetValue = widgetValue; - } - - public int getFontSize() { - return fontSize; - } - - public void setFontSize(int fontSize) { - this.fontSize = fontSize; - } - - public Object getFontColor() { - return fontColor; - } - - public void setFontColor(Object fontColor) { - this.fontColor = fontColor; - } - - public Object getBackgroundColor() { - return backgroundColor; - } - - public void setBackgroundColor(Object backgroundColor) { - this.backgroundColor = backgroundColor; - } - - public String getPrefix() { - return prefix; - } - - public void setPrefix(String prefix) { - this.prefix = prefix; - } - - public String getSuffix() { - return suffix; - } - - public void setSuffix(String suffix) { - this.suffix = suffix; - } - - @Override - public String getXType() {//控件类型,参考其他的案例,返回的是文本框 - return "digitroll"; - } - - @Override - // 数据源类型:空置,公式,字段 - public int[] getValueType() { - return new int[]{TYPE_YEAR_NONE, TYPE_FORMULA, TYPE_DATABINDING}; - } - - @Override - public String[] dependence(CalculatorProvider calculatorProvider) { - return super.dependence(calculatorProvider); - } - - private int getWidgetValueFM(Calculator calculator) throws Exception { - int value = 0; - if (this.widgetValue.getValue() == null) { - value = 0; - } else if (this.widgetValue.getValue() instanceof Formula) { - Object v = calculator.eval((Formula) this.widgetValue.getValue()); - value = Util.valueChangeToInt(v); - } else if (this.widgetValue.getValue() instanceof DataBinding) { - value = this.getWidgetValueByBinding(calculator); - } - - return value; - } - - private int getWidgetValueByBinding(Calculator calculator) { - int value = 0; - WidgetValue.WidgetValueInfo valueInfo = new WidgetValue.WidgetValueInfo(this.getWidgetName()); - Object result = this.getWidgetValue().createAttrResult(valueInfo, calculator, new JSONObject()); - value = Util.valueChangeToInt(result); - return value; - } - - @Override - public void createValueResult(DataControl dataControl, Calculator calculator, - JSONObject jsonObject, JSONObject jsonObject1) { - if (this.getWidgetValue() != null) { - WidgetValue.WidgetValueInfo valueInfo = new WidgetValue.WidgetValueInfo(this.getWidgetName()); - Object result = this.getWidgetValue().createAttrResult(valueInfo, calculator, jsonObject1); - - try { - jsonObject.put(this.widgetName.toUpperCase(), result == null ? "" : result); - } catch (JSONException e) { - FRContext.getLogger().error(e.getMessage(), e); - } - } - } - - @Override - public String getFormatText() { - return ""; - } - - @Override - public JSONObject createJSONConfig(Repository repository, - Calculator calculator, - NodeVisitor visitor) throws JSONException { - // 许可证 - PluginLicense pluginLicense = PluginLicenseManager.getInstance().getPluginLicenseByID(Constants.PLUGIN_ID); - if (pluginLicense.isAvailable()) { - JSONObject jsonConfig = super.createJSONConfig(repository, calculator, visitor); - try { - Object value = jsonConfig.get("value"); - int v = Util.valueChangeToInt(value); - if (value == null) { - jsonConfig.remove("value"); - } else if (value instanceof String) { - jsonConfig.put("value", (new JSONObject()).put("digitroll", v)); - } else { - jsonConfig.put("value", v); - } - } catch (Exception e) { - e.printStackTrace(); - } - - if (this.align != null) { - jsonConfig.put(ALIGN, this.value2Config(this.align, calculator)); - } - - jsonConfig.put(DURATION, this.value2Config(this.duration, calculator)); - jsonConfig.put(PREFIX, getPrefix()); - jsonConfig.put(SUFFIX, getSuffix()); - jsonConfig.put(CSS, buildCss()); - - String[] dependence = this.dependence(calculator); - if (!ArrayUtils.isEmpty(dependence)) { - jsonConfig.put("dependence", dependence); - } - return jsonConfig; - } else { - return licenseErr(); - } - } - - private String buildCss() { - StringBuilder css = new StringBuilder(); - String fontClr = Util.colorValueToHexString(((Color) getFontColor()).getRGB()); - String bgClr = Util.colorValueToHexString(((Color) getBackgroundColor()).getRGB()); - css.append("color:" + fontClr + ';'); - css.append("font-size:" + getFontSize() + ';'); - css.append("background:" + bgClr + ";"); - css.append("position:absolute;"); - css.append("left:0px;"); - css.append("top:0px;"); - return css.toString(); - } - - @Override - public JSONArray createJSONData(SessionIDInfor sessionIDInfor, - Calculator calculator, HttpServletRequest request) throws Exception { - PluginLicense pluginLicense = PluginLicenseManager.getInstance().getPluginLicenseByID(Constants.PLUGIN_ID); - JSONArray errorMsg; - if (pluginLicense.isAvailable()) { - errorMsg = super.createJSONData(sessionIDInfor, calculator, request); - ParameterMapNameSpace parameterMapNameSpace = ParameterMapNameSpace.create(sessionIDInfor.getParameterMap4Execute()); - DependenceNameSpace dependenceNameSpace = new DependenceNameSpace(CodeUtils.cjkDecode(WebUtils.getHTTPRequestParameter(request, "dependence"))); - calculator.pushNameSpace(parameterMapNameSpace); - calculator.pushNameSpace(dependenceNameSpace); - JSONObject jsonObject = new JSONObject(); - jsonObject.put("value", this.getWidgetValueFM(calculator)); - errorMsg.put(jsonObject); - calculator.removeNameSpace(parameterMapNameSpace); - calculator.removeNameSpace(dependenceNameSpace); - return errorMsg; - } else { - errorMsg = new JSONArray(); - errorMsg.put(licenseErr()); - return errorMsg; - } - } - - private JSONObject licenseErr() throws JSONException { - return (new JSONObject()).put("text", Inter.getLocText("Plugin-Flip_License_Expired")) - .put("value", Inter.getLocText("Plugin-Flip_License_Expired")); - } - - private boolean isDesign() { - return ModuleContext.isModuleStarted("com.fr.design.module.DesignerModule"); - } - - @Override - public String[] supportedEvents() { - return new String[0]; - } - - @Override - public void readXML(XMLableReader reader) { - super.readXML(reader); - if (reader.isChildNode()) { - String tagName = reader.getTagName(); - if (tagName.equals("DigitRollAttr")) { - String s = null; - if ((s = reader.getAttrAsString(ALIGN, null)) != null) { - this.setAlign(s); - } - if ((s = reader.getAttrAsString(DURATION, null)) != null) { - this.setDuration(Integer.parseInt(s)); - } - if ((s = reader.getAttrAsString(FONT_SIZE, null)) != null) { - setFontSize(Integer.parseInt(s)); - } - - int color; - if ((color = reader.getAttrAsInt(FONT_COLOR, -1)) != -1) { - setFontColor(new Color(color)); - } - if ((color = reader.getAttrAsInt(BACKGROUND_COLOR, -1)) != -1) { - setBackgroundColor(new Color(color)); - } - } else if ("widgetValue".equals(tagName)) { - this.widgetValue = new WidgetValue(); - reader.readXMLObject(this.widgetValue); - } - } - } - - @Override - public void writeXML(XMLPrintWriter writer) { - super.writeXML(writer); - writer.startTAG("DigitRollAttr"); - if (this.align != null) { - writer.attr(ALIGN, this.getAlign().toString()); - } - - if (this.duration != 0) { - writer.attr(DURATION, this.getDuration()); - } - - writer.attr(FONT_SIZE, getFontSize()); - writer.attr(FONT_COLOR, ((Color) getFontColor()).getRGB()); - writer.attr(BACKGROUND_COLOR, ((Color) getBackgroundColor()).getRGB()); - writer.end(); - - if (this.widgetValue != null) { - this.widgetValue.writeXML(writer); - } - } -} diff --git a/src/com/fr/plugin/widget/digitroll/WidgetUI.java b/src/com/fr/plugin/widget/digitroll/WidgetUI.java deleted file mode 100644 index c372950..0000000 --- a/src/com/fr/plugin/widget/digitroll/WidgetUI.java +++ /dev/null @@ -1,84 +0,0 @@ -package com.fr.plugin.widget.digitroll; - -import com.fr.design.designer.creator.CRPropertyDescriptor; -import com.fr.design.designer.creator.XWidgetCreator; -import com.fr.design.gui.ilable.UILabel; -import com.fr.design.gui.itextfield.UITextField; -import com.fr.design.layout.FRGUIPaneFactory; -import com.fr.design.mainframe.widget.editors.ColorEditor; -import com.fr.form.ui.Widget; -import com.fr.general.IOUtils; -import com.fr.general.Inter; -import com.fr.plugin.widget.digitroll.editor.DigitRollAlign; -import com.fr.plugin.widget.digitroll.editor.DigitRollDataSourceEditor; -import com.fr.stable.ArrayUtils; - -import javax.swing.*; -import java.awt.*; -import java.beans.IntrospectionException; - -public class WidgetUI extends XWidgetCreator { - private UITextField textField; - - public WidgetUI(Widget widget, Dimension dimension) { - super(widget, dimension); - } - - @Override - protected JComponent initEditor() { - //界面,就是在拖动到主面板上的时候,添加了一个LABLE控件,然后显示图标,并居中对齐 - if (this.editor == null) { - this.editor = FRGUIPaneFactory.createBorderLayout_S_Pane(); - UILabel label = new UILabel(); - label.setIcon(IOUtils.readIcon("/com/fr/plugin/widget/digitroll/images/digitroll_display.png")); - label.setHorizontalAlignment(0); - label.setVerticalAlignment(0); - this.editor.add(label, "Center"); - this.textField = new UITextField(5); - this.textField.setOpaque(false); - this.editor.add(this.textField, "South"); - this.editor.setBackground(Color.WHITE); - } - - return this.editor; - } - - public CRPropertyDescriptor[] supportedDescriptor() throws IntrospectionException { - return ArrayUtils.addAll(super.supportedDescriptor() - , new CRPropertyDescriptor[]{ - (new CRPropertyDescriptor("widgetValue", this.data.getClass())) - .setI18NName(Inter.getLocText("Plugin-DigitRoll_DataSource")) - .setEditorClass(DigitRollDataSourceEditor.class) - .putKeyValue("category", "Advanced"), - (new CRPropertyDescriptor("align", this.data.getClass())) - .setI18NName(Inter.getLocText("Plugin-DigitRoll_AlignType")) - .setEditorClass(DigitRollAlign.class) - .putKeyValue("category", "Advanced"), - (new CRPropertyDescriptor("duration", this.data.getClass())) - .setI18NName(Inter.getLocText("Plugin-DigitRoll_Duration")) - .putKeyValue("category", "Advanced"), - (new CRPropertyDescriptor("prefix", this.data.getClass())) - .setI18NName(Inter.getLocText("Plugin-DigitRoll_Prefix")) - .putKeyValue("category", "Advanced"), - (new CRPropertyDescriptor("suffix", this.data.getClass())) - .setI18NName(Inter.getLocText("Plugin-DigitRoll_Suffix")) - .putKeyValue("category", "Advanced"), - (new CRPropertyDescriptor("fontSize", this.data.getClass())) - .setI18NName(Inter.getLocText("Plugin-DigitRoll_FontSize")) - .putKeyValue("category", "Advanced"), - (new CRPropertyDescriptor("fontColor", this.data.getClass())) - .setI18NName(Inter.getLocText("Plugin-DigitRoll_ColorFont")) - .setEditorClass(ColorEditor.class) - .putKeyValue("category", "Advanced"), - (new CRPropertyDescriptor("backgroundColor", this.data.getClass())) - .setI18NName(Inter.getLocText("Plugin-DigitRoll_ColorBackground")) - .setEditorClass(ColorEditor.class) - .putKeyValue("category", "Advanced") - } - ); - } - - public String getIconPath() { - return "com/fr/plugin/widget/digitroll/images/digitroll_icon.png"; - } -} diff --git a/src/com/fr/plugin/widget/digitroll/editor/DigitRollAlign.java b/src/com/fr/plugin/widget/digitroll/editor/DigitRollAlign.java deleted file mode 100644 index 3944c31..0000000 --- a/src/com/fr/plugin/widget/digitroll/editor/DigitRollAlign.java +++ /dev/null @@ -1,28 +0,0 @@ -package com.fr.plugin.widget.digitroll.editor; - -import com.fr.design.mainframe.widget.editors.ComboEditor; -import com.fr.general.Inter; - -import javax.swing.*; -import java.util.Vector; - -public class DigitRollAlign extends ComboEditor { - public DigitRollAlign() { - } - - public ComboBoxModel model() { - Vector vector = new Vector(); - vector.add(Inter.getLocText("Plugin-DigitRoll_AlignLeft")); - vector.add(Inter.getLocText("Plugin-DigitRoll_AlignCenter")); - vector.add(Inter.getLocText("Plugin-DigitRoll_AlignRight")); - return new DefaultComboBoxModel(vector); - } - - /*public void setValue(Object o) { - this.comboBox.setSelectedItem(o); - }*/ - - /*public Object getValue() { - return this.comboBox.getSelectedItem(); - }*/ -} diff --git a/src/com/fr/plugin/widget/digitroll/images/digitroll_display.png b/src/com/fr/plugin/widget/digitroll/images/digitroll_display.png index da530a2553d97e5fe9e51aa1b0c1ce4943a51ce5..a064861b077c90c38ee2e81b7bd26ae40f12506a 100644 GIT binary patch literal 9645 zcmZu%WmMHo6aU{!_oYkVQcAa!q;yDkcS@&H7wIku>5y)a?v_ScTDrUQ<@x@8nB6mH zV|Hie?C$(#!;}=HFi=TQ0RX^|krr2ZtzrKWGU995BV;`MTESb2ei8+M>S*r=<%Cxr zYAUVr2>?Q{03h;}o?Zv}ivWPn7Xa9c004n403aT55eV`C08~C}F)<}2D+gBx7b^!x zsEn8x)X~|&!uqp007wsHBzdT*%@Kr*w|RWc8D#^j1h2Go0+U_|1`@_8#71;*n4DbI zl(}GR3Gq}aX{BD+A0-+M@oEU3S``uvG95dSgc_5B!(wVSVajGT5*%BGodDiFE zFgf7>Jekjgj#^<<+}P}46gZny>s!E@G>W0qk|xud8Cq|$vy9yMKNnma1Xr>omgVV% zRMDGFvwTN*a1Zd7@yDR$l>Vg3)Q{FT0Kv(lHplwHq=ZC0S6%%tE-p@vrxK+Xw+jc^ zrA3La#J5eBkn)#^qsqrg62NFA%%=7tg1G_}HpUG6UVbo{;sszoiyX-2I-0RQ39yEN zMVq6loisF(u#B z4YN@~A`#`ZLKqNz$BQr)Ah$-+2(k}&Fv63ESsD?vBBDXyjVU?A{WmG`rEw=iMxcmh zSWTksN)SAhzKm))LKeLYr?n!bhME%0zew5>mvupOrIgpQFHRo(4rLd7nV zQkQ}=A|y|`{l)^q8U3Tjr21UTr;KctVz?KzDrlbJQ29{%5aJGgK$Pk&UK?>dZlrsI zl^j#rN!FFoh4JsL6PhP|>)RE?lNielm(%=PNpGHKeqV5hNbFlH+(Tr_K$`BiA8B(E z9pg@6r}5G>CD`R*{^Bf7)Yb8xk)A(zCB5b1Dfi;^r2o)RS|ja2_TKEV?9u*^pQZW` zpZ6Plj_J&K2fo9;i-MQvmhP7O##}9$E14^1BE8;3W1ylsDdSvcR$&&ji86Q)&#B@` z&rDB9Uoic(n4~yCg<8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mIq6!MP(C0S6+y~bzVB&Q2?PY1SgOKIBp=2B#bYBHBea^D1ezmkB@Lo2;|}Re zPMU^p*W5_2e6Rl3`ShjUI%BI77K}t=Kbkl5o8QRB;JAL!!>ifZJlVm$Y%ZTXD$k^E>D@|D*$ztBm4A<2gn0Nkd3dc zW@sTFw$I@Q--J6b@8>W6vSG*r>9{HjVaEXBmtrMFIW`E=9K$maiXQM@hJRg-IT|Cz zpV;<*UrAc>;<!EEpjX`i`#iG>J_a$?D@8e~ zj{Xrxc|6)+p`=+e?2j+2FZjRW>3?Gb%e@NLQF%KqD+i-f;1e?QDcJkWMl2=~Xnk-W Vwtlht9p+yH7iSNrGDj}|zW_U&oo@gD diff --git a/src/com/fr/plugin/widget/digitroll/images/digitroll_icon.png b/src/com/fr/plugin/widget/digitroll/images/digitroll_icon.png index 3ca516a303fbd07105864a3f3127159b51b0da3e..d0231cdd3c879b79df6d5cfae1c9f2bf2ba4013a 100644 GIT binary patch delta 3223 zcmV;I3~2M{1)>>{D}S+$eEU(80000WV@Og>004&%004{+008|`004nN004b?008NW z002DY000@xb3BE2000U(X+uL$P-t&-Z*ypGa3D!TLm+T+Z)Rz1WdHz3$DNjUR8-d% zhtIutdZEoQ0#b(FyTAa_dy`&8VVD_UC<6{NG_fI~0ue<-ntvilP{e@IP$X7Fu@Dqg zum>avC@~mCR4i{s){CyJy!Z0*`{S%{?X&l}`|Q2XS{DG4r!SY621@~u$`kN|Je=tf zkx_K)0Du7=V1OwAOjbs^U$A=!5XsBUg`OdD0$&6H@OoIh0&vsNGk{J9|DU8;>3o6c zm;e!*vpE?o5q}qmI3-JvF1F8#m>QQXW*8-Az9>Nv%ZWK*kqtikEV84R*{M9Xh{ZXl zvs2k(?iKO2Od&_ah_8qXGr62B5#JKAMv5?%E8;ie*i;TP0{|3BY!`4?i6S-;F^L}% ziKdLpOAxi2$L0#SX*@cY_n(^h55xYX#km%V()bZjV~l{*bt*u9?FT3d5g^g~ z#a;iSZ@&02Abxq_DwB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a1_&S)Q2bX{Rsd7t3kGHu zs3J(%F<4ny!qWl7dZ+<^{sL2?1UT&g1P~)IH$r}9osYIvy6I00000NkvXXu0mjfeyc1U diff --git a/src/com/fr/plugin/widget/digitroll/local/digitroll.properties b/src/com/fr/plugin/widget/digitroll/locale/digitroll.properties similarity index 69% rename from src/com/fr/plugin/widget/digitroll/local/digitroll.properties rename to src/com/fr/plugin/widget/digitroll/locale/digitroll.properties index c8daf03..01f1d40 100644 --- a/src/com/fr/plugin/widget/digitroll/local/digitroll.properties +++ b/src/com/fr/plugin/widget/digitroll/locale/digitroll.properties @@ -1,14 +1,17 @@ Plugin-DigitRoll_Widget=DigitRoll +Plugin-DigitRoll_Advanced=Advanced Plugin-DigitRoll_License_Expired=Expired +Plugin-DigitRoll_License_Title=License Plugin-DigitRoll_DataSource=DataSource -Plugin-DigitRoll_AlignType=AlignType Plugin-DigitRoll_Duration=Duration Plugin-DigitRoll_Prefix=Prefix Plugin-DigitRoll_Suffix=Suffix -Plugin-DigitRoll_None=NoneValue +Plugin-DigitRoll_Formula=Formula Plugin-DigitRoll_AlignLeft=Left Plugin-DigitRoll_AlignCenter=Center Plugin-DigitRoll_AlignRight=Right Plugin-DigitRoll_FontSize = FontSize Plugin-DigitRoll_ColorFont=FontColor Plugin-DigitRoll_ColorBackground=BackgroundColor +Plugin-DigitRoll_Group=Use Grouping +Plugin-DigitRoll_DecimalPlaces=Decimal Places \ No newline at end of file diff --git a/src/com/fr/plugin/widget/digitroll/local/digitroll_zh_CN.properties b/src/com/fr/plugin/widget/digitroll/locale/digitroll_zh_CN.properties similarity index 73% rename from src/com/fr/plugin/widget/digitroll/local/digitroll_zh_CN.properties rename to src/com/fr/plugin/widget/digitroll/locale/digitroll_zh_CN.properties index d898e50..4d8e90a 100644 --- a/src/com/fr/plugin/widget/digitroll/local/digitroll_zh_CN.properties +++ b/src/com/fr/plugin/widget/digitroll/locale/digitroll_zh_CN.properties @@ -1,14 +1,17 @@ Plugin-DigitRoll_Widget=\u6EDA\u52A8\u6570\u5B57 +Plugin-DigitRoll_Advanced=\u9AD8\u7EA7 Plugin-DigitRoll_License_Expired=\u8BB8\u53EF\u8BC1\u5DF2\u8FC7\u671F +Plugin-DigitRoll_License_Title=\u8BB8\u53EF\u8BC1 Plugin-DigitRoll_DataSource=\u6570\u636E\u6E90 -Plugin-DigitRoll_AlignType=\u5BF9\u9F50\u65B9\u5F0F Plugin-DigitRoll_Duration=\u6301\u7EED\u65F6\u95F4\uFF08\u79D2\uFF09 Plugin-DigitRoll_Prefix=\u524D\u7F00 Plugin-DigitRoll_Suffix=\u540E\u7F00 -Plugin-DigitRoll_None=\u7A7A\u503C +Plugin-DigitRoll_Formula=\u516C\u5F0F Plugin-DigitRoll_AlignLeft=\u5DE6\u5BF9\u9F50 Plugin-DigitRoll_AlignCenter=\u5C45\u4E2D\u5BF9\u9F50 Plugin-DigitRoll_AlignRight=\u53F3\u5BF9\u9F50 Plugin-DigitRoll_FontSize = \u6587\u5B57\u5927\u5C0F Plugin-DigitRoll_ColorFont=\u6587\u5B57\u989C\u8272 Plugin-DigitRoll_ColorBackground=\u80CC\u666F\u989C\u8272 +Plugin-DigitRoll_Group=\u5206\u7EC4 +Plugin-DigitRoll_DecimalPlaces=\u5C0F\u6570\u4F4D\u6570 diff --git a/src/com/fr/plugin/widget/digitroll/ui/DecimalPlacesEditor.java b/src/com/fr/plugin/widget/digitroll/ui/DecimalPlacesEditor.java new file mode 100644 index 0000000..076b8d1 --- /dev/null +++ b/src/com/fr/plugin/widget/digitroll/ui/DecimalPlacesEditor.java @@ -0,0 +1,21 @@ +package com.fr.plugin.widget.digitroll.ui; + +import com.fr.design.mainframe.widget.editors.ComboEditor; + +import javax.swing.*; +import java.util.Vector; + +public class DecimalPlacesEditor extends ComboEditor { + + public DecimalPlacesEditor() { + } + + @Override + public ComboBoxModel model() { + Vector vector = new Vector(); + for (int i = 0; i < 11; i++) { + vector.add(i); + } + return new DefaultComboBoxModel(vector); + } +} diff --git a/src/com/fr/plugin/widget/digitroll/editor/DigitRollDataSourceEditor.java b/src/com/fr/plugin/widget/digitroll/ui/DigitRollDataSourceEditor.java similarity index 78% rename from src/com/fr/plugin/widget/digitroll/editor/DigitRollDataSourceEditor.java rename to src/com/fr/plugin/widget/digitroll/ui/DigitRollDataSourceEditor.java index 955852b..42f23f2 100644 --- a/src/com/fr/plugin/widget/digitroll/editor/DigitRollDataSourceEditor.java +++ b/src/com/fr/plugin/widget/digitroll/ui/DigitRollDataSourceEditor.java @@ -1,10 +1,9 @@ -package com.fr.plugin.widget.digitroll.editor; +package com.fr.plugin.widget.digitroll.ui; import com.fr.design.Exception.ValidationException; import com.fr.design.editor.ValueEditorPane; import com.fr.design.editor.editor.Editor; import com.fr.design.editor.editor.FormulaEditor; -import com.fr.design.editor.editor.NoneEditor; import com.fr.design.mainframe.widget.editors.AbstractPropertyEditor; import com.fr.design.mainframe.widget.editors.DataBindingEditor; import com.fr.design.mainframe.widget.editors.ServerDataBindingEditor; @@ -20,7 +19,7 @@ import java.beans.PropertyChangeListener; public class DigitRollDataSourceEditor extends AbstractPropertyEditor { private DataControl widget; - private ValueEditorPane wep; + private ValueEditorPane pane; public DigitRollDataSourceEditor(Object o) { this.widget = (DataControl) o; @@ -37,8 +36,8 @@ public class DigitRollDataSourceEditor extends AbstractPropertyEditor { }); } - this.wep = new ValueEditorPane(editors); - this.wep.addPropertyChangeListener("value", new PropertyChangeListener() { + this.pane = new ValueEditorPane(editors); + this.pane.addPropertyChangeListener("value", new PropertyChangeListener() { public void propertyChange(PropertyChangeEvent evt) { DigitRollDataSourceEditor.this.firePropertyChanged(); } @@ -58,12 +57,10 @@ public class DigitRollDataSourceEditor extends AbstractPropertyEditor { public static Editor createWidgetValueEditorByType(int type, boolean onlyServer) { switch (type) { - case 2: + case DataControl.TYPE_DATABINDING: return (Editor) (onlyServer ? new ServerDataBindingEditor() : new DataBindingEditor()); - case 3: - return new FormulaEditor(Inter.getLocText("Parameter-Formula")); - case 8: - return new NoneEditor((String) null, Inter.getLocText("Plugin-DigitRoll_None")); + case DataControl.TYPE_FORMULA: + return new FormulaEditor(Inter.getLocText("Plugin-DigitRoll_Formula")); default: return null; } @@ -73,16 +70,16 @@ public class DigitRollDataSourceEditor extends AbstractPropertyEditor { } public Component getCustomEditor() { - return this.wep; + return this.pane; } public Object getValue() { - return new WidgetValue(this.wep.update()); + return new WidgetValue(this.pane.update()); } public void setValue(Object value) { if (value != null) { - this.wep.populate(((WidgetValue) value).getValue()); + this.pane.populate(((WidgetValue) value).getValue()); } } } diff --git a/src/com/fr/plugin/widget/digitroll/ui/DigitRollWidgetUI.java b/src/com/fr/plugin/widget/digitroll/ui/DigitRollWidgetUI.java new file mode 100644 index 0000000..07e0615 --- /dev/null +++ b/src/com/fr/plugin/widget/digitroll/ui/DigitRollWidgetUI.java @@ -0,0 +1,88 @@ +package com.fr.plugin.widget.digitroll.ui; + +import com.fr.design.designer.creator.CRPropertyDescriptor; +import com.fr.design.designer.creator.XWidgetCreator; +import com.fr.design.editor.editor.SpinnerIntegerEditor; +import com.fr.design.gui.ilable.UILabel; +import com.fr.design.gui.itextfield.UITextField; +import com.fr.design.layout.FRGUIPaneFactory; +import com.fr.design.mainframe.widget.editors.BooleanEditor; +import com.fr.design.mainframe.widget.editors.ColorEditor; +import com.fr.form.ui.Widget; +import com.fr.general.IOUtils; +import com.fr.general.Inter; +import com.fr.stable.ArrayUtils; + +import javax.swing.*; +import java.awt.*; +import java.beans.IntrospectionException; + +import static com.fr.plugin.widget.digitroll.DigitRollWidget.*; + +public class DigitRollWidgetUI extends XWidgetCreator { + private UITextField textField; + + public DigitRollWidgetUI(Widget widget, Dimension dimension) { + super(widget, dimension); + } + + @Override + protected JComponent initEditor() { + if (this.editor == null) { + this.editor = FRGUIPaneFactory.createBorderLayout_S_Pane(); + UILabel label = new UILabel(); + label.setIcon(IOUtils.readIcon("/com/fr/plugin/widget/digitroll/images/digitroll_display.png")); + label.setHorizontalAlignment(0); + label.setVerticalAlignment(0); + this.editor.add(label, "Center"); + this.textField = new UITextField(5); + this.textField.setOpaque(false); + this.editor.add(this.textField, "South"); + this.editor.setBackground(Color.WHITE); + } + + return this.editor; + } + + public CRPropertyDescriptor[] supportedDescriptor() throws IntrospectionException { + String advanced = Inter.getLocText("Plugin-DigitRoll_Advanced"); + return ArrayUtils.addAll(super.supportedDescriptor(), + (new CRPropertyDescriptor("widgetValue", this.data.getClass())) + .setI18NName(Inter.getLocText("Plugin-DigitRoll_DataSource")) + .setEditorClass(DigitRollDataSourceEditor.class) + .putKeyValue("category", advanced), + (new CRPropertyDescriptor(DURATION, this.data.getClass())) + .setI18NName(Inter.getLocText("Plugin-DigitRoll_Duration")) + .putKeyValue("category", advanced), + (new CRPropertyDescriptor(PREFIX, this.data.getClass())) + .setI18NName(Inter.getLocText("Plugin-DigitRoll_Prefix")) + .putKeyValue("category", advanced), + (new CRPropertyDescriptor(SUFFIX, this.data.getClass())) + .setI18NName(Inter.getLocText("Plugin-DigitRoll_Suffix")) + .putKeyValue("category", advanced), + (new CRPropertyDescriptor(FONT_SIZE, this.data.getClass())) + .setI18NName(Inter.getLocText("Plugin-DigitRoll_FontSize")) + .putKeyValue("category", advanced), + (new CRPropertyDescriptor(FONT_COLOR, this.data.getClass())) + .setI18NName(Inter.getLocText("Plugin-DigitRoll_ColorFont")) + .setEditorClass(ColorEditor.class) + .putKeyValue("category", advanced), + (new CRPropertyDescriptor(BACKGROUND_COLOR, this.data.getClass())) + .setI18NName(Inter.getLocText("Plugin-DigitRoll_ColorBackground")) + .setEditorClass(ColorEditor.class) + .putKeyValue("category", advanced), + (new CRPropertyDescriptor(GROUP, this.data.getClass())) + .setI18NName(Inter.getLocText("Plugin-DigitRoll_Group")) + .setEditorClass(BooleanEditor.class) + .putKeyValue("category", advanced), + (new CRPropertyDescriptor(DECIMAL_PALACES, this.data.getClass())) + .setI18NName(Inter.getLocText("Plugin-DigitRoll_DecimalPlaces")) + .setEditorClass(DecimalPlacesEditor.class) + .putKeyValue("category", advanced) + ); + } + + public String getIconPath() { + return "com/fr/plugin/widget/digitroll/images/digitroll_icon.png"; + } +} diff --git a/src/com/fr/plugin/widget/digitroll/web/countUp.js b/src/com/fr/plugin/widget/digitroll/web/countUp.js index cf7523e..893780e 100644 --- a/src/com/fr/plugin/widget/digitroll/web/countUp.js +++ b/src/com/fr/plugin/widget/digitroll/web/countUp.js @@ -3,6 +3,13 @@ countUp.js by @inorganik +The MIT License (MIT) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ // target = id of html element or var of previously selected html element where counting occurs @@ -239,7 +246,10 @@ var CountUp = function (target, startVal, endVal, decimals, duration, options) { return; } self.error = ''; - if (newEndVal === self.frameVal) return; + if (newEndVal === self.frameVal) { + if (self.callback) self.callback(); + return; + } cancelAnimationFrame(self.rAF); self.paused = false; delete self.startTime; diff --git a/src/com/fr/plugin/widget/digitroll/web/widget.digitRoll.js b/src/com/fr/plugin/widget/digitroll/web/widget.digitRoll.js index d337dcd..6a5a8ca 100644 --- a/src/com/fr/plugin/widget/digitroll/web/widget.digitRoll.js +++ b/src/com/fr/plugin/widget/digitroll/web/widget.digitRoll.js @@ -13,11 +13,38 @@ FR.$defaultImport('/com/fr/plugin/widget/digitroll/web/countUp.js', 'js'); var o = this.options; var element = this.element; - var widget = '
'; - var widgetId = $(widget).appendTo(element); - o.options.prefix = o.prefix; - o.options.suffix = o.suffix; - var digitRoll = new CountUp(widgetId, 0, o.value, 0/*o.decimals*/, o.duration, o.options); + var widget = element[0]; + + var $widget = $(''); + var widgetId = $widget.appendTo(element); + $widget.css({ + 'position': 'absolute', + 'left': '50%', + 'top': '50%', + '-webkit-transform': 'translate(-50%, -50%)', + '-moz-transform': 'translate(-50%, -50%)', + '-ms-transform': 'translate(-50%, -50%)', + '-o-transform': 'translate(-50%, -50%)', + 'transform': 'translate(-50%, -50%)' + }); + + this.element.css({ + 'font-size': o.fontSize + 'px', + 'background-color': o.backgroundColor, + 'color': o.fontColor, + 'text-align': "center" + }); + var options = { + useEasing: true, // 过渡动画效果,默认ture + useGrouping: o.group, // 千分位效果,例:1000->1,000。默认true + separator: ',', // 使用千分位时分割符号 + decimal: '.', // 小数位分割符号 + prefix: o.prefix, // 前置符号 + suffix: o.suffix // 后置符号,可汉字 + }; + + //debugger; + var digitRoll = new CountUp(widgetId[0], o.value, o.value, o.decimalPlaces, o.duration, options); var callback = function () { $.ajax({ @@ -31,7 +58,7 @@ } }); }; - if (!digitRoll.error) { + if (!digitRoll.error) { digitRoll.start(callback); } else { console.error(digitRoll.error); @@ -39,5 +66,5 @@ } }); - $.shortcut("digitRoll", FR.DigitRoll); + $.shortcut("digitroll", FR.DigitRoll); })(jQuery); \ No newline at end of file