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^EzZ|4ld2S){#-g+l*<$ojT;hpV8%m=PeStbl)$
z>T4aQLr#rko78{-T~yW4v7V;oaGX0cKCd75^$pjZka_JBdw9-${iTU-Ch
zqX~qmIq6!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#JKAM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Vy#N8k1oq3XUkoNDCJataP7D$f5)7fC
zp@?t*8p6ZF!w?r2$MEy#PX>2)cd**uKs_L@00a=zf2g0-)zulUU%$?Es?%ZKGdh{qbOhDlQ5I{_zU;>5ir%#`N0V4x;3CtiyMkcTstgNgId3kvZ
zii(P0SBi>?!eavo^53l2aa1_&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