Browse Source
* commit 'af694f2dc8c28339aff4a9a1f3c2fec4df7fbf49': REPORT-68161 填报-模板web属性-切换设置时,编辑行背景设置的点击逻辑确认 REPORT-66767 存储过程数据集报错提示窗口没有内容的问题 REPORT-67954 远程设计时数据集面板数据连接空白的问题 CHART-22972 HyperlinkProvider接口对图表超链不起作用 CHART-22972 HyperlinkProvider接口对图表超链不起作用 REPORT-67119 在线组件库Tab面板重复显示 KERNEL-9928 重构水印 1.水印接口规范 REPORT-60538 英日韩环境未屏蔽在线组件库 11.0 -> 10.0 DEC-22333 设计器使用一段时间后卡死 REPORT-66167 解决图表栏有时候无法显示某些图表的问题 无jira 新建水印npe 1.新建决策模板时改成从全局读取水印persist/10.0 10.0.19.10.2022.4.3
superman
3 years ago
13 changed files with 194 additions and 92 deletions
@ -0,0 +1,49 @@ |
|||||||
|
package com.fr.common.listener; |
||||||
|
|
||||||
|
import com.fr.design.data.DesignTableDataManager; |
||||||
|
import javax.swing.event.AncestorEvent; |
||||||
|
import javax.swing.event.AncestorListener; |
||||||
|
import javax.swing.event.ChangeListener; |
||||||
|
|
||||||
|
/** |
||||||
|
* 管理数据集相关监听的注册 |
||||||
|
* |
||||||
|
* 原本的监听生命周期注册与销毁: |
||||||
|
* |
||||||
|
* 创建时组件时进行注册,在模板关闭时进行销毁 |
||||||
|
* 但是在模板未关闭的这段时间,如果不断的打开和关闭某些弹窗,次数达到一定程度,会导致出现大量内存占用,除非此时关闭模板 |
||||||
|
* |
||||||
|
* 改成以下模式: |
||||||
|
* |
||||||
|
* 当组件可见或者被添加到某个大组件 注册相关监听 |
||||||
|
* 当组件不可见或者被移除时 立即移除相关监听 |
||||||
|
* 及时清理无效监听,减少实时内存占用 |
||||||
|
* |
||||||
|
* |
||||||
|
* @author hades |
||||||
|
* @version 11.0 |
||||||
|
* Created by hades on 2022/2/14 |
||||||
|
*/ |
||||||
|
public class ManageDsListenerRegisterListener implements AncestorListener { |
||||||
|
|
||||||
|
private ChangeListener changeListener; |
||||||
|
|
||||||
|
public ManageDsListenerRegisterListener(ChangeListener changeListener) { |
||||||
|
this.changeListener = changeListener; |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
public void ancestorAdded(AncestorEvent event) { |
||||||
|
DesignTableDataManager.addDsChangeListener(changeListener); |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
public void ancestorRemoved(AncestorEvent event) { |
||||||
|
DesignTableDataManager.removeDsChangeLister(changeListener); |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
public void ancestorMoved(AncestorEvent event) { |
||||||
|
// do nothing
|
||||||
|
} |
||||||
|
} |
@ -0,0 +1,26 @@ |
|||||||
|
package com.fr.design.locale.impl; |
||||||
|
|
||||||
|
import com.fr.general.GeneralContext; |
||||||
|
import com.fr.general.locale.LocaleMark; |
||||||
|
|
||||||
|
import java.util.HashMap; |
||||||
|
import java.util.Locale; |
||||||
|
import java.util.Map; |
||||||
|
|
||||||
|
public class ShowOnlineWidgetMark implements LocaleMark<Boolean> { |
||||||
|
private Map<Locale, Boolean> map = new HashMap<>(); |
||||||
|
|
||||||
|
public ShowOnlineWidgetMark() { |
||||||
|
map.put(Locale.CHINA, true); |
||||||
|
map.put(Locale.TAIWAN, true); |
||||||
|
map.put(Locale.US, false); |
||||||
|
map.put(Locale.KOREA, false); |
||||||
|
map.put(Locale.JAPAN, false); |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
public Boolean getValue() { |
||||||
|
Boolean result = map.get(GeneralContext.getLocale()); |
||||||
|
return result == null ? false : result; |
||||||
|
} |
||||||
|
} |
Loading…
Reference in new issue