Browse Source
* commit 'e689c3c8432f10ff85d85b1f5dd1978b7b68804b': (50 commits) REPORT-84965 插件-插件管理-插件id里有下划线,安装之后无法删除 【问题原因】后端解析'_'时,仅考虑有一个'_' 【改动思路】使用最后出现的'_'分隔id和version 【review建议】无 REPORT-85960 起始页,点击最近打开的fvs模板,模板打开失败--更改一下工具类 REPORT-86023 起始页先进入本地目录,再进入次管远程目录,会有服务器选项 默认是不会刷新工具栏的。这里刷新一下。 (吐槽一下:权限管理有点太散了 REPORT-85960 起始页,点击最近打开的fvs模板,模板打开失败 REPORT-85960 起始页,点击最近打开的fvs模板,模板打开失败 模板助手打开模板时会获取 path, 如果当前是使用空页面打开,则会 npe, 在主JAR兼容一下 REPORT-85774 sqlserver死锁 REPORT-85902 fix:字段名数据面板多了下拉栏 REPORT-85880 数据表现与处理-公式-公式编辑区域显示不正常 REPORT-85880 数据表现与处理-公式-公式编辑区域显示不正常 nojira fvs plugin 打包报错 REPORT-85600修复一下错误的名称 顺带着改个名字,看着难受 REPORT-85293【启动优化】起始页新增加载进度条视觉效果确认 全屏效果在 windows 上需要处理一下。 REPORT-75091 && REPORT-80693 数据脱敏一期&二期 【问题原因】迭代延期,屏蔽功能入口 【改动思路】同上 【review建议】 REPORT-85293【启动优化】起始页新增加载进度条视觉效果确认 ProgressDialog 用错了,这个只能是使用的时候才创建 不然大小有问题 REPORT-84427 【查找与替换】切换查找内容会出现无法定位的情况(特殊场景) REPORT-85210 && REPORT-85293 1-加载条样式优化 2-启动异常报错优化 3-给异步加载 envmanager 提供配置 REPORT-84428 设置像&模板内容频繁切换会出现空白或全选的异常情况 fix:格式化 REPORT-84617 模板认证卡慢更新迭代 fix: REPORT-83197【设计器】启动页性能优化 处理一部分问题 ...fix-lag
superman
2 years ago
74 changed files with 2715 additions and 1665 deletions
@ -0,0 +1,120 @@
|
||||
package com.fr.design.data.datapane.preview.desensitization.view; |
||||
|
||||
import com.fr.base.svg.IconUtils; |
||||
import com.fr.design.constants.UIConstants; |
||||
import com.fr.design.data.datapane.preview.PreviewTablePane; |
||||
import com.fr.design.gui.ibutton.UIToggleButton; |
||||
import com.fr.design.gui.ilable.UILabel; |
||||
import com.fr.design.gui.itoolbar.UIToolbar; |
||||
import com.fr.design.i18n.Toolkit; |
||||
import com.fr.design.menu.SeparatorDef; |
||||
import com.fr.design.menu.ToolBarDef; |
||||
|
||||
import javax.swing.Icon; |
||||
import javax.swing.JPanel; |
||||
import java.awt.Component; |
||||
import java.awt.FlowLayout; |
||||
import java.awt.event.MouseAdapter; |
||||
import java.awt.event.MouseEvent; |
||||
|
||||
/** |
||||
* 数据集预览-脱敏配置面板,主要展示当前脱敏开启状态、当前脱敏设定数量等 |
||||
* |
||||
* @author Yvan |
||||
* @version 11.0 |
||||
* Created by Yvan on 2022/11/14 |
||||
*/ |
||||
public class PreviewTableDesensitizationPane extends JPanel { |
||||
|
||||
private static final String DATA_DESENSITIZATION_CONFIG = Toolkit.i18nText("Fine-Design_Report_Desensitization_Config"); |
||||
private static final String LEFT_BRACKET = "("; |
||||
private static final String RIGHT_BRACKET = ")"; |
||||
private static final String COUNT = Toolkit.i18nText("Fine-Design_Report_Desensitization_Count"); |
||||
|
||||
/** |
||||
* 预览面板 |
||||
*/ |
||||
private PreviewTablePane previewTablePane; |
||||
|
||||
/** |
||||
* "数据脱敏设置"-标签 |
||||
*/ |
||||
private UILabel desensitizationLabel; |
||||
|
||||
/** |
||||
* 脱敏效果预览按钮 |
||||
*/ |
||||
private UIToggleButton previewToggle; |
||||
|
||||
|
||||
public PreviewTableDesensitizationPane(PreviewTablePane previewTablePane) { |
||||
this.previewTablePane = previewTablePane; |
||||
initComponents(); |
||||
} |
||||
|
||||
/** |
||||
* 初始化面板 |
||||
*/ |
||||
private void initComponents() { |
||||
this.setLayout(new FlowLayout(FlowLayout.LEFT)); |
||||
this.add(initDesensitizationLabel()); |
||||
this.add(initToolBar()); |
||||
this.add(initPreviewButton()); |
||||
} |
||||
|
||||
/** |
||||
* 初始化Label |
||||
* |
||||
* @return |
||||
*/ |
||||
private Component initDesensitizationLabel() { |
||||
// 初始化Label
|
||||
desensitizationLabel = new UILabel(DATA_DESENSITIZATION_CONFIG); |
||||
desensitizationLabel.setForeground(UIConstants.NORMAL_BLUE); |
||||
desensitizationLabel.addMouseListener(new MouseAdapter() { |
||||
@Override |
||||
public void mouseClicked(MouseEvent e) { |
||||
previewTablePane.clickDesensitizationLabel(); |
||||
} |
||||
}); |
||||
return desensitizationLabel; |
||||
} |
||||
|
||||
/** |
||||
* 初始化分隔符 |
||||
* |
||||
* @return |
||||
*/ |
||||
private UIToolbar initToolBar() { |
||||
ToolBarDef toolbarDef = new ToolBarDef(); |
||||
toolbarDef.addShortCut(SeparatorDef.DEFAULT); |
||||
UIToolbar toolBar = ToolBarDef.createJToolBar(); |
||||
toolBar.setBorderPainted(false); |
||||
toolbarDef.updateToolBar(toolBar); |
||||
return toolBar; |
||||
} |
||||
|
||||
/** |
||||
* 初始化脱敏效果预览按钮 |
||||
* |
||||
* @return |
||||
*/ |
||||
private UIToggleButton initPreviewButton() { |
||||
previewToggle = new UIToggleButton(new Icon[]{IconUtils.readIcon("/com/fr/design/images/m_file/preview"), IconUtils.readIcon("/com/fr/design/images/m_file/preview")}, true); |
||||
previewToggle.setToolTipText(Toolkit.i18nText("Fine-Design_Report_Desensitization_Preview")); |
||||
previewToggle.setSelected(false); |
||||
previewToggle.addActionListener(e -> { |
||||
// 切换TableModel的脱敏状态
|
||||
previewTablePane.togglePreviewTableModelDesensitizeStatus(); |
||||
// 刷新预览页面,展示
|
||||
previewTablePane.refreshTable(); |
||||
}); |
||||
return previewToggle; |
||||
} |
||||
|
||||
public void setDesensitizationCount(boolean desensitizeOpen, int count) { |
||||
desensitizationLabel.setText(desensitizeOpen ? |
||||
DATA_DESENSITIZATION_CONFIG + LEFT_BRACKET + count + RIGHT_BRACKET + COUNT : |
||||
DATA_DESENSITIZATION_CONFIG); |
||||
} |
||||
} |
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,118 @@
|
||||
package com.fr.startup.ui; |
||||
|
||||
import com.fr.concurrent.FineExecutors; |
||||
import com.fr.concurrent.NamedThreadFactory; |
||||
import com.fr.design.gui.iprogressbar.ProgressDialog; |
||||
import com.fr.design.i18n.Toolkit; |
||||
import com.fr.design.ui.util.UIUtil; |
||||
import com.fr.event.Event; |
||||
import com.fr.event.EventDispatcher; |
||||
import com.fr.event.Listener; |
||||
import com.fr.module.ModuleEvent; |
||||
|
||||
import java.awt.Frame; |
||||
import java.util.concurrent.ScheduledExecutorService; |
||||
import java.util.concurrent.TimeUnit; |
||||
|
||||
/** |
||||
* 启动加载面板 |
||||
* |
||||
* @author Harrison |
||||
* @version 11.0 |
||||
* created by Harrison on 2022/11/08 |
||||
**/ |
||||
public class StartupLoadingPanel { |
||||
|
||||
/** |
||||
* 每次更新的步伐 |
||||
*/ |
||||
private static final int STEP = 1; |
||||
|
||||
/** |
||||
* 40ms更新进度 |
||||
*/ |
||||
private static final int STEP_HEARTBEAT = 40; |
||||
|
||||
private final Listener<String> MODULE_LISTENER = new Listener<String>() { |
||||
@Override |
||||
public void on(Event event, String param) { |
||||
moduleId = param; |
||||
} |
||||
}; |
||||
|
||||
private ProgressDialog progressDialog; |
||||
private String moduleId; |
||||
private int progress; |
||||
|
||||
public StartupLoadingPanel(Frame frame) { |
||||
this.progressDialog = new ProgressDialog(frame); |
||||
this.moduleId = Toolkit.i18nText("Fine-Design_Basic_Initializing"); |
||||
|
||||
initListeners(); |
||||
} |
||||
|
||||
/** |
||||
* 隐藏 |
||||
*/ |
||||
public void hide() { |
||||
this.progress = progressDialog.getProgressMaximum(); |
||||
} |
||||
|
||||
/** |
||||
* 展示 |
||||
*/ |
||||
public void show() { |
||||
|
||||
final ScheduledExecutorService scheduler = FineExecutors.newScheduledThreadPool(1, |
||||
new NamedThreadFactory("StartupLoadingPanel")); |
||||
scheduler.scheduleAtFixedRate(new Runnable() { |
||||
@Override |
||||
public void run() { |
||||
UIUtil.invokeAndWaitIfNeeded(() -> { |
||||
if (isComplete()) { |
||||
scheduler.shutdown(); |
||||
progressDialog.dispose(); |
||||
resetListeners(); |
||||
return; |
||||
} |
||||
if (!progressDialog.isVisible()) { |
||||
progressDialog.setVisible(true); |
||||
String moduleId = getModuleId(); |
||||
progressDialog.updateLoadingText(moduleId); |
||||
} |
||||
progressDialog.setProgressValue(incrementProgress()); |
||||
}); |
||||
} |
||||
}, 0, STEP_HEARTBEAT, TimeUnit.MILLISECONDS); |
||||
|
||||
} |
||||
|
||||
private void initListeners() { |
||||
|
||||
EventDispatcher.listen(ModuleEvent.MajorModuleStarting, MODULE_LISTENER); |
||||
} |
||||
|
||||
private void resetListeners() { |
||||
|
||||
EventDispatcher.stopListen(MODULE_LISTENER); |
||||
} |
||||
|
||||
private boolean isComplete() { |
||||
return this.progress >= progressDialog.getProgressMaximum(); |
||||
} |
||||
|
||||
private String getModuleId() { |
||||
|
||||
return this.moduleId; |
||||
} |
||||
|
||||
private int incrementProgress() { |
||||
|
||||
if (progress != progressDialog.getProgressMaximum()) { |
||||
progress += STEP; |
||||
} |
||||
return progress; |
||||
} |
||||
|
||||
|
||||
} |
@ -0,0 +1,55 @@
|
||||
package com.fr.design.gui.iprogressbar; |
||||
|
||||
import com.fr.design.utils.DevUtils; |
||||
|
||||
import java.awt.Dimension; |
||||
import java.awt.Frame; |
||||
import java.util.function.Consumer; |
||||
|
||||
/** |
||||
* @author Harrison |
||||
* @version 11.0 |
||||
* Created by Harrison on 2022/11/23 |
||||
*/ |
||||
public class ProgressDialogTest { |
||||
|
||||
public static void main(String[] args) { |
||||
|
||||
mockInitSize(); |
||||
} |
||||
|
||||
/** |
||||
* 模拟 frame 的大小未初始化好的情况 |
||||
*/ |
||||
private static void mockNotInitSize() { |
||||
|
||||
DevUtils.show(new Consumer<Frame>() { |
||||
@Override |
||||
public void accept(Frame frame) { |
||||
|
||||
Dimension origin = frame.getSize(); |
||||
frame.setSize(0, 0); |
||||
ProgressDialog progressDialog = new ProgressDialog(frame); |
||||
progressDialog.setVisible(true); |
||||
progressDialog.updateLoadingText("test"); |
||||
frame.setSize(origin); |
||||
} |
||||
}); |
||||
} |
||||
|
||||
/** |
||||
* 模拟 frame 的大小初始化好的情况 |
||||
*/ |
||||
private static void mockInitSize() { |
||||
|
||||
DevUtils.show(new Consumer<Frame>() { |
||||
@Override |
||||
public void accept(Frame frame) { |
||||
|
||||
ProgressDialog progressDialog = new ProgressDialog(frame); |
||||
progressDialog.setVisible(true); |
||||
progressDialog.updateLoadingText("test"); |
||||
} |
||||
}); |
||||
} |
||||
} |
Loading…
Reference in new issue