* commit '48553273c9f97c5e9a48dfa25a56826dfb8d75d5': (37 commits) REPORT-50204 未保存点击预览,提示保存模板的弹窗,点击取消后再弹窗 REPORT-50191 设计器-服务器数据集-左下角图标变化失效 【问题原因】REPORT-49782任务中补充图标的时候,图标名称写错了,导致没识别出来 【改动思路】修改图标名称 CHART-18080 变量名更换 CHART-18619 gis国际化默认值修改 REPORT-50030 单元格外边框设置其他颜色设计器内显示与黑色不一样 CHART-18348 调整富文本组件尺寸 KERNEL-6368【代码检测】XML注入(XML External Entity Injection) 无JIRA任务 上传下因代码冲突被删除的svg图标 REPORT-48965 使用批量添加 减少容器复制次数 REPORT-48965 出现concurrentModification异常 CHART-18080 修复数字输入框输入中文时自动删除数字问题 REPORT-45944 ui调整 REPORT-48324 聚合报表,超链在设计器中切换模板后显示不对 REPORT-48999 填报-填报属性设置-填报属性快捷设置远程设计修改无效 REPORT-47438 判断跟随自主界面的条件再优化补充下 REPORT-48324 聚合报表,超链在设计器中切换模板后显示不对 REPORT-48933 设计器菜单-社区下新增“工单中心”链接 REPORT-45944 日文版模板重命名弹窗显示不全 REPORT-47438 设计器弹窗部分弹窗不跟随主屏位置 REPORT-47438 设计器弹窗部分弹窗不跟随主屏位置 ...final/10.0
@ -0,0 +1,26 @@
|
||||
package com.fr.design.actions.community; |
||||
|
||||
|
||||
import com.fr.design.i18n.Toolkit; |
||||
import com.fr.design.utils.BrowseUtils; |
||||
import com.fr.general.CloudCenter; |
||||
|
||||
import java.awt.event.ActionEvent; |
||||
|
||||
/** |
||||
* @Description 工单中心 |
||||
* @Author Henry.Wang |
||||
* @Date 2021/3/8 14:02 |
||||
**/ |
||||
public class WorkOrderCenterAction extends UpAction { |
||||
public WorkOrderCenterAction() { |
||||
this.setSmallIcon("/com/fr/design/images/bbs/workOrderCenter"); |
||||
this.setName(Toolkit.i18nText("Fine-Design_Basic_Commuinity_Work_Order_Center")); |
||||
} |
||||
|
||||
@Override |
||||
public void actionPerformed(ActionEvent arg0) { |
||||
String url = CloudCenter.getInstance().acquireUrlByKind("bbs.work.order.center"); |
||||
BrowseUtils.browser(url); |
||||
} |
||||
} |
@ -0,0 +1,20 @@
|
||||
package com.fr.design.fun; |
||||
|
||||
import com.fr.design.actions.UpdateAction; |
||||
import com.fr.stable.fun.mark.Selectable; |
||||
|
||||
/** |
||||
* 替换插件管理入口 |
||||
* @author Lucian.Chen |
||||
* @version 10.0 |
||||
* Created by Lucian.Chen on 2021/2/20 |
||||
*/ |
||||
public interface PluginManagerProvider extends Selectable { |
||||
|
||||
String MARK_STRING = "PluginManagerProvider"; |
||||
|
||||
int CURRENT_LEVEL = 1; |
||||
|
||||
// 插件管理
|
||||
UpdateAction pluginManagerAction(); |
||||
} |
@ -0,0 +1,30 @@
|
||||
package com.fr.design.fun.impl; |
||||
|
||||
import com.fr.design.fun.PluginManagerProvider; |
||||
import com.fr.stable.fun.assist.Selector; |
||||
import com.fr.stable.fun.impl.AbstractProvider; |
||||
import com.fr.stable.fun.mark.API; |
||||
|
||||
/** |
||||
* @author Lucian.Chen |
||||
* @version 10.0 |
||||
* Created by Lucian.Chen on 2021/2/20 |
||||
*/ |
||||
@API(level = PluginManagerProvider.CURRENT_LEVEL) |
||||
public abstract class AbstractPluginManagerProvider extends AbstractProvider implements PluginManagerProvider { |
||||
|
||||
public int currentAPILevel() { |
||||
return CURRENT_LEVEL; |
||||
} |
||||
|
||||
@Override |
||||
public String mark4Provider() { |
||||
return getClass().getName(); |
||||
} |
||||
|
||||
@Override |
||||
public Selector selector() { |
||||
return Selector.ALWAYS; |
||||
} |
||||
|
||||
} |
@ -0,0 +1,57 @@
|
||||
package com.fr.design.i18n; |
||||
|
||||
import com.fr.design.dialog.BasicDialog; |
||||
import com.fr.general.GeneralContext; |
||||
import com.fr.locale.LocaleManager; |
||||
import com.fr.locale.impl.FineLocaleManager; |
||||
|
||||
import java.awt.Dimension; |
||||
import java.util.Map; |
||||
|
||||
/** |
||||
* Created by kerry on 2/23/21 |
||||
*/ |
||||
public class DesignSizeI18nManager { |
||||
private static final String I18N_DIMENSION_PATH = "com/fr/design/i18n/dimension"; |
||||
private static final String DIMENSION_REGEX = "^[1-9]\\d*\\*[1-9]\\d*$"; |
||||
private static final String SEPARATOR_REGEX = "\\*"; |
||||
private static final int WIDTH_INDEX = 0; |
||||
private static final int HEIGHT_INDEX = 1; |
||||
private static final int SPLIT_LENGTH = 2; |
||||
|
||||
private static DesignSizeI18nManager instance = new DesignSizeI18nManager(); |
||||
|
||||
public static DesignSizeI18nManager getInstance() { |
||||
return instance; |
||||
} |
||||
|
||||
private LocaleManager localeManager = FineLocaleManager.create(); |
||||
|
||||
private DesignSizeI18nManager() { |
||||
localeManager.addResource(I18N_DIMENSION_PATH); |
||||
} |
||||
|
||||
public Dimension i18nDimension(String key) { |
||||
if (!containKey(key)) { |
||||
return BasicDialog.DEFAULT; |
||||
} |
||||
String dimension = localeManager.getLocalBundle(GeneralContext.getLocale()).getText(localeManager, key); |
||||
return parseDimensionFromText(dimension); |
||||
} |
||||
|
||||
private boolean containKey(String key) { |
||||
Map<String, String> localeKV = localeManager.getLocalBundle(GeneralContext.getLocale()).getKV(localeManager); |
||||
return localeKV != null && localeKV.containsKey(key); |
||||
} |
||||
|
||||
private Dimension parseDimensionFromText(String dimensionText) { |
||||
if (!dimensionText.matches(DIMENSION_REGEX)) { |
||||
return BasicDialog.DEFAULT; |
||||
} |
||||
String[] arr = dimensionText.split(SEPARATOR_REGEX); |
||||
if (arr.length < SPLIT_LENGTH) { |
||||
return BasicDialog.DEFAULT; |
||||
} |
||||
return new Dimension(Integer.parseInt(arr[WIDTH_INDEX]), Integer.parseInt(arr[HEIGHT_INDEX])); |
||||
} |
||||
} |
@ -0,0 +1,21 @@
|
||||
package com.fr.design.plugin; |
||||
|
||||
import com.fr.design.dialog.UIDialog; |
||||
|
||||
/** |
||||
* @author hades |
||||
* @version 10.0 |
||||
* Created by hades on 2021/3/8 |
||||
*/ |
||||
public class DesignerPluginContext { |
||||
|
||||
private static UIDialog DIALOG; |
||||
|
||||
public static UIDialog getPluginDialog() { |
||||
return DIALOG; |
||||
} |
||||
|
||||
public static void setPluginDialog(UIDialog pluginDialog) { |
||||
DesignerPluginContext.DIALOG = pluginDialog; |
||||
} |
||||
} |
@ -0,0 +1 @@
|
||||
com.fr.design.report.ReportColumnsPane=800*600 |
@ -0,0 +1 @@
|
||||
# \u9ED8\u8BA4\u4E3A\u7C7B\u7684\u5168\u9650\u5B9A\u540D\uFF08\u53EF\u81EA\u5B9A\u4E49key\uFF09= width * height |
After Width: | Height: | Size: 207 B |
After Width: | Height: | Size: 696 B |
Before Width: | Height: | Size: 864 B After Width: | Height: | Size: 864 B |
Before Width: | Height: | Size: 804 B After Width: | Height: | Size: 804 B |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
@ -0,0 +1,80 @@
|
||||
package com.fr.design.i18n; |
||||
|
||||
import com.fr.general.GeneralContext; |
||||
import com.fr.invoke.Reflect; |
||||
import org.easymock.EasyMock; |
||||
import org.junit.Assert; |
||||
import org.junit.Test; |
||||
import org.junit.runner.RunWith; |
||||
import org.powermock.api.easymock.PowerMock; |
||||
import org.powermock.core.classloader.annotations.PrepareForTest; |
||||
import org.powermock.modules.junit4.PowerMockRunner; |
||||
|
||||
import java.awt.Dimension; |
||||
import java.util.Locale; |
||||
|
||||
/** |
||||
* Created by kerry on 2/24/21 |
||||
*/ |
||||
@RunWith(PowerMockRunner.class) |
||||
@PrepareForTest(GeneralContext.class) |
||||
public class DesignSizeI18nManagerTest { |
||||
@Test |
||||
public void testI18nDimension() { |
||||
Dimension dimension = DesignSizeI18nManager.getInstance().i18nDimension("com.fr.design.report.ReportColumnsPane"); |
||||
validDimension(dimension, 660, 600); |
||||
|
||||
PowerMock.mockStatic(GeneralContext.class); |
||||
EasyMock.expect(GeneralContext.getLocale()).andReturn(Locale.ENGLISH).times(3); |
||||
PowerMock.replayAll(); |
||||
|
||||
dimension = DesignSizeI18nManager.getInstance().i18nDimension("com.fr.design.report.ReportColumnsPane"); |
||||
validDimension(dimension, 800, 600); |
||||
} |
||||
|
||||
@Test |
||||
public void testContainKey() { |
||||
PowerMock.mockStatic(GeneralContext.class); |
||||
EasyMock.expect(GeneralContext.getLocale()).andReturn(Locale.ENGLISH).times(3); |
||||
PowerMock.replayAll(); |
||||
|
||||
boolean result = Reflect.on(DesignSizeI18nManager.getInstance()).call("containKey", "testKey").get(); |
||||
Assert.assertFalse(result); |
||||
|
||||
result = Reflect.on(DesignSizeI18nManager.getInstance()).call("containKey", "com.fr.design.report.ReportColumnsPane").get(); |
||||
Assert.assertTrue(result); |
||||
|
||||
} |
||||
|
||||
@Test |
||||
public void testParseDimensionFromText() { |
||||
String dimensionText = "800*600"; |
||||
Dimension result = Reflect.on(DesignSizeI18nManager.getInstance()).call("parseDimensionFromText", dimensionText).get(); |
||||
validDimension(result, 800, 600); |
||||
|
||||
dimensionText = "800* 600"; |
||||
result = Reflect.on(DesignSizeI18nManager.getInstance()).call("parseDimensionFromText", dimensionText).get(); |
||||
validDimension(result, 660, 600); |
||||
|
||||
dimensionText = " 800*600"; |
||||
result = Reflect.on(DesignSizeI18nManager.getInstance()).call("parseDimensionFromText", dimensionText).get(); |
||||
validDimension(result, 660, 600); |
||||
|
||||
dimensionText = "800*600s"; |
||||
result = Reflect.on(DesignSizeI18nManager.getInstance()).call("parseDimensionFromText", dimensionText).get(); |
||||
validDimension(result, 660, 600); |
||||
|
||||
dimensionText = "800s*600"; |
||||
result = Reflect.on(DesignSizeI18nManager.getInstance()).call("parseDimensionFromText", dimensionText).get(); |
||||
validDimension(result, 660, 600); |
||||
|
||||
dimensionText = "800-600"; |
||||
result = Reflect.on(DesignSizeI18nManager.getInstance()).call("parseDimensionFromText", dimensionText).get(); |
||||
validDimension(result, 660, 600); |
||||
} |
||||
|
||||
private void validDimension(Dimension dimension, int width, int height) { |
||||
Assert.assertEquals(width, dimension.width); |
||||
Assert.assertEquals(height, dimension.height); |
||||
} |
||||
} |
Before Width: | Height: | Size: 344 B After Width: | Height: | Size: 810 B |
Before Width: | Height: | Size: 750 B After Width: | Height: | Size: 905 B |
Before Width: | Height: | Size: 344 B After Width: | Height: | Size: 819 B |
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 2.8 KiB |
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 3.5 KiB |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 2.9 KiB |
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 2.7 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 2.7 KiB |