* commit '05c4d0a98077be88529cc0d558579eab57183360': (25 commits) REPORT-137543 【fr-fbp冒烟】【数据源】设计器数据连接 重命名判断异常 修改注释 REPORT-137695【fr-fbp回归】填报入库设置智能设置单元格组交互效果不对 REPORT-137586 fix: 控件背景交互逻辑修复 REPORT-137786 fix: comboBox提供最大尺寸及下拉框大小计算逻辑优化 REPORT-135889 fix: 去除西区折叠面板点击事件 REPORT-137712 fix: 控件对齐面板翻新 REPORT-137896 fix:checkBoxList边框问题修复 REPORT-137930【fr-fbp回归】填报属性中,未修改不更新的设置项效果不对 REPORT-137698 fix修复数据字典数据查询无法展开数据列选择问题 REPORT-137781 设计器设置文件数据集选择文件npe REPORT-137781 设计器设置文件数据集选择文件npe 控件显示增强不透明度组件替换 REPORT-137866 【fr-fbp冒烟】【数据源】数据连接-ssh设置-公钥认证,读不到私钥文件 REPORT-137327 - 远程设计下切换目录卡顿优化 自动启动 无jira任务 增加复用性 无jira任务 优化使用 REPORT-137327 - 远程设计下切换目录卡顿优化 修改缓存机制 Revert "REPORT-135888 fix:高分屏启动页缩放适配" REPORT-137327 - 远程设计下切换目录卡顿优化 ...fbp/master
@ -1,62 +0,0 @@
|
||||
package com.fr.design.cache; |
||||
|
||||
import com.fr.base.TableData; |
||||
import com.fr.design.data.tabledata.wrapper.TableDataFactory; |
||||
|
||||
import java.util.Map; |
||||
|
||||
/** |
||||
* 设计器缓存管理 |
||||
* |
||||
* @author Destiny.Lin |
||||
* @since 11.0 |
||||
* Created on 2024/8/11 |
||||
*/ |
||||
public class DesignCacheManager { |
||||
|
||||
public static ThreadLocal<Map<String, TableData>> cacheTableData = new ThreadLocal<>(); |
||||
|
||||
/** |
||||
* 处理任务(使用数据集缓存) |
||||
*/ |
||||
public static void processByCacheTableData(Task task) { |
||||
try { |
||||
cacheTableData.set(TableDataFactory.getTableDatas()); |
||||
task.process(); |
||||
} finally { |
||||
cacheTableData.remove(); |
||||
} |
||||
} |
||||
|
||||
|
||||
/** |
||||
* 是否使用数据集的缓存 |
||||
*/ |
||||
public static boolean useDataCache() { |
||||
return cacheTableData.get() != null; |
||||
} |
||||
|
||||
/** |
||||
* 获取数据集缓存 |
||||
*/ |
||||
public static ThreadLocal<Map<String, TableData>> getCacheTableData() { |
||||
return cacheTableData; |
||||
} |
||||
|
||||
/** |
||||
* 设置数据集缓存 |
||||
*/ |
||||
public static void setCacheTableData(ThreadLocal<Map<String, TableData>> cacheTableData) { |
||||
DesignCacheManager.cacheTableData = cacheTableData; |
||||
} |
||||
|
||||
/** |
||||
* 任务 |
||||
*/ |
||||
public interface Task { |
||||
/** |
||||
* 处理 |
||||
*/ |
||||
void process(); |
||||
} |
||||
} |
@ -0,0 +1,52 @@
|
||||
package com.fr.design.remote.ui.debug; |
||||
|
||||
import com.fine.theme.icon.LazyIcon; |
||||
import com.fine.theme.light.ui.FineTableHeaderUI; |
||||
|
||||
import javax.swing.Icon; |
||||
import javax.swing.JTable; |
||||
import javax.swing.RowSorter; |
||||
import javax.swing.SortOrder; |
||||
import java.awt.Component; |
||||
|
||||
/** |
||||
* 远程调试界面表头 |
||||
* |
||||
* @author vito |
||||
* @since 11.0 |
||||
* Created on 2024/10/17 |
||||
*/ |
||||
public class HeaderRenderer extends FineTableHeaderUI.TableHeaderRenderer { |
||||
private final Icon ascendingIcon = new LazyIcon("sort_asc"); |
||||
private final Icon descendingIcon = new LazyIcon("sort_desc"); |
||||
private final Icon nosortIcon = new LazyIcon("nosort"); |
||||
|
||||
|
||||
@Override |
||||
public Component getTableCellRendererComponent(JTable table, Object value, |
||||
boolean isSelected, boolean hasFocus, |
||||
int row, int col) { |
||||
super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, col); |
||||
|
||||
int modelColumn = table.convertColumnIndexToModel(col); |
||||
setIcon(null); |
||||
RemoteDesignNetWorkTableRowSorter sorter = (RemoteDesignNetWorkTableRowSorter) table.getRowSorter(); |
||||
|
||||
if (!sorter.isSortable(modelColumn)) { |
||||
return this; |
||||
} |
||||
SortOrder sortOrder = sorter.getSortKeys().stream() |
||||
.filter(key -> key.getColumn() == modelColumn) |
||||
.map(RowSorter.SortKey::getSortOrder) |
||||
.findFirst() |
||||
.orElse(null); |
||||
if (sortOrder == SortOrder.ASCENDING) { |
||||
setIcon(ascendingIcon); |
||||
} else if (sortOrder == SortOrder.DESCENDING) { |
||||
setIcon(descendingIcon); |
||||
} else { |
||||
setIcon(nosortIcon); |
||||
} |
||||
return this; |
||||
} |
||||
} |
@ -0,0 +1,37 @@
|
||||
package com.fr.design.remote.ui.debug; |
||||
|
||||
import com.fine.theme.light.ui.FineTableHeaderUI; |
||||
|
||||
import java.awt.Color; |
||||
|
||||
import static com.fr.design.remote.ui.debug.RemoteDesignNetWorkHelper.DEFAULT_COLOR; |
||||
|
||||
/** |
||||
* 大小多颜色渲染 |
||||
* |
||||
* @author vito |
||||
* @since 11.0 |
||||
* Created on 2024/10/16 |
||||
*/ |
||||
public class SizeColorCellRenderer extends FineTableHeaderUI.TableRenderer { |
||||
private static final int UNIT_BYTES = 1024; |
||||
private static final int SIZE_MIDDLE = UNIT_BYTES * 100; |
||||
private static final int SIZE_LARGE = UNIT_BYTES * 200; |
||||
|
||||
|
||||
@Override |
||||
protected void setValue(Object value) { |
||||
|
||||
if (value instanceof String) { |
||||
long parsed = RemoteDesignNetWorkHelper.parseSizeToBytes((String) value); |
||||
if (parsed > SIZE_LARGE) { |
||||
setForeground(Color.RED); |
||||
} else if (parsed > SIZE_MIDDLE) { |
||||
setForeground(Color.ORANGE); |
||||
} else { |
||||
setForeground(DEFAULT_COLOR); |
||||
} |
||||
} |
||||
setText((value == null) ? "" : value.toString()); |
||||
} |
||||
} |
@ -0,0 +1,38 @@
|
||||
package com.fr.design.remote.ui.debug; |
||||
|
||||
import com.fine.theme.light.ui.FineTableHeaderUI; |
||||
|
||||
import java.awt.Color; |
||||
|
||||
import static com.fr.design.remote.ui.debug.RemoteDesignNetWorkHelper.DEFAULT_COLOR; |
||||
|
||||
/** |
||||
* 时间多颜色渲染 |
||||
* |
||||
* @author vito |
||||
* @since 11.0 |
||||
* Created on 2024/10/16 |
||||
*/ |
||||
public class TimeColorCellRenderer extends FineTableHeaderUI.TableRenderer { |
||||
|
||||
private static final int SIZE_MIDDLE = 1000; |
||||
private static final int SIZE_LARGE = 5000; |
||||
|
||||
|
||||
|
||||
@Override |
||||
protected void setValue(Object value) { |
||||
|
||||
if (value instanceof String) { |
||||
long parsed = RemoteDesignNetWorkHelper.parseCostToMS((String) value); |
||||
if (parsed > SIZE_LARGE) { |
||||
setForeground(Color.RED); |
||||
} else if (parsed > SIZE_MIDDLE) { |
||||
setForeground(Color.ORANGE); |
||||
} else { |
||||
setForeground(DEFAULT_COLOR); |
||||
} |
||||
} |
||||
setText((value == null) ? "" : value.toString()); |
||||
} |
||||
} |
After Width: | Height: | Size: 437 B |
After Width: | Height: | Size: 418 B |
After Width: | Height: | Size: 426 B |
After Width: | Height: | Size: 426 B |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 574 B |
After Width: | Height: | Size: 417 B |
After Width: | Height: | Size: 398 B |
After Width: | Height: | Size: 428 B |
After Width: | Height: | Size: 409 B |
After Width: | Height: | Size: 422 B |
After Width: | Height: | Size: 400 B |
After Width: | Height: | Size: 417 B |
After Width: | Height: | Size: 417 B |
After Width: | Height: | Size: 619 B |
After Width: | Height: | Size: 567 B |