Browse Source
* commit '8385012f63471e90701b852d629b3df79d07d682': REPORT-74100【冒烟】远程BI环境,13个jar全部提示缺失 BI 集成的 JAR 或者之前的环境, 这里需要进行判断是否需要进行检查。 REPORT-73970 手动修改参数面板宽度未生效 1、REPORT-66771改动导致,在dolayout的时候修改了组件宽度 2、改为,在form宽度修改事件中修改组件宽度 REPORT-73996-新建frm预览空白 KERNEL-11531 修改下设计,ColoneCollector中触发clone() REPORT-73802 【设计器环境监测】windows下没有finedb权限,首次启动设计器能起来,第二次就启动失败了 KERNEL-11531 数据链接越权漏洞调用com.fr.invoke.ClassHelper中遍历搜索对象存在空间时间效率问题导致宕机 单独写一个 DefaultLoginKeys REPORT-72595 FR源码中存在加密密钥硬编码,建议放到配置文件中 REPORT-73833【设计器环境检测】本地目录,只有finedb异常,自动弹窗没弹 需要对使用后埋点。之前是使用的 Stream. 埋点后 Stream 流就不能用了。 这边换成 Collection 适配一下。 REPORT-73811 图表条件属性汇总字段值,汇总方式下拉内容显示了两遍 REPORT-72819 弹窗显示不全 KERNEL-11517 实现主题色时ClassHelper中遍历搜索对象存在性能问题feature/x
superman
2 years ago
24 changed files with 202 additions and 249 deletions
@ -0,0 +1,48 @@
|
||||
package com.fr.design.login.config; |
||||
|
||||
import com.fr.log.FineLoggerFactory; |
||||
import java.io.IOException; |
||||
import java.io.InputStream; |
||||
import java.util.HashMap; |
||||
import java.util.Map; |
||||
import java.util.Properties; |
||||
|
||||
/** |
||||
* @author Lanlan |
||||
* @version 10.0 |
||||
* Created by Lanlan on 2022/6/20 |
||||
*/ |
||||
public class DefaultLoginKeys { |
||||
|
||||
private static final String FILENAME = "com/fr/design/config/default"; |
||||
|
||||
private static final DefaultLoginKeys INSTANCE = new DefaultLoginKeys(); |
||||
|
||||
public static DefaultLoginKeys getInstance() { |
||||
return INSTANCE; |
||||
} |
||||
|
||||
private final Map<String, String> keys = new HashMap<>(); |
||||
|
||||
private DefaultLoginKeys() { |
||||
Properties properties = load(); |
||||
for (Map.Entry<Object, Object> entry : properties.entrySet()) { |
||||
String name = entry.getKey().toString(); |
||||
keys.put(name, entry.getValue().toString()); |
||||
} |
||||
} |
||||
|
||||
public String getKey(String name) { |
||||
return keys.get(name); |
||||
} |
||||
|
||||
private Properties load() { |
||||
Properties properties = new Properties(); |
||||
try (InputStream inputStream = DefaultLoginKeys.class.getClassLoader().getResourceAsStream(FILENAME)) { |
||||
properties.load(inputStream); |
||||
} catch (IOException e) { |
||||
FineLoggerFactory.getLogger().error(e.getMessage(), e); |
||||
} |
||||
return properties; |
||||
} |
||||
} |
@ -0,0 +1,37 @@
|
||||
package com.fr.design.mainframe.authority; |
||||
|
||||
import com.fr.base.CloneCollector; |
||||
import com.fr.base.Formula; |
||||
import com.fr.data.impl.NameDatabaseConnection; |
||||
import com.fr.data.impl.NameTableData; |
||||
import com.fr.report.cell.cellattr.core.group.DSColumn; |
||||
import com.fr.stable.FCloneable; |
||||
|
||||
|
||||
import java.util.ArrayList; |
||||
import java.util.List; |
||||
|
||||
public class AuthorityTargetObjectCollector extends CloneCollector { |
||||
List<Object> targetObject = new ArrayList<>(); |
||||
|
||||
public AuthorityTargetObjectCollector(FCloneable rootObject) { |
||||
super(rootObject); |
||||
} |
||||
|
||||
@Override |
||||
public void collect(Object object) { |
||||
if (object instanceof DSColumn || object instanceof Formula |
||||
|| object instanceof NameDatabaseConnection || object instanceof NameTableData) { |
||||
targetObject.add(object); |
||||
} |
||||
} |
||||
|
||||
public List<Object> collectTargetObject() { |
||||
CloneCollector.setCollector(this); |
||||
this.targetObject = new ArrayList<>(); |
||||
this.collect(); |
||||
CloneCollector.clearCollector(); |
||||
return targetObject; |
||||
} |
||||
|
||||
} |
@ -1,144 +0,0 @@
|
||||
package com.fr.design.mainframe.theme.edit.ui; |
||||
|
||||
import com.fr.base.theme.FineColorManager; |
||||
import com.fr.design.layout.FRGUIPaneFactory; |
||||
|
||||
import javax.swing.JPanel; |
||||
import java.awt.Color; |
||||
import java.awt.Dimension; |
||||
import java.awt.Graphics; |
||||
import java.awt.event.MouseEvent; |
||||
import java.awt.event.MouseListener; |
||||
import java.util.ArrayList; |
||||
import java.util.List; |
||||
|
||||
/** |
||||
* @author Starryi |
||||
* @version 1.0 |
||||
* Created by Starryi on 2021/8/7 |
||||
*/ |
||||
public class ColorListExtendedPane extends JPanel implements MouseListener { |
||||
public static final int DEFAULT_COLOR_COUNT = 8; |
||||
public static final int DEFAULT_EXTENDED_COUNT = 5; |
||||
public static final int DEFAULT_COLOR_SIZE = 16; |
||||
public static final int DEFAULT_COLOR_GAP = 3; |
||||
|
||||
public static final ExtendedColorComputer DEFAULT_EXTENDED_COMPUTER = new ExtendedColorComputer() { |
||||
@Override |
||||
public Color computeExtendedColor(Color color, int index, int count) { |
||||
return FineColorManager.computeExtendedColor(color, index, count); |
||||
} |
||||
}; |
||||
|
||||
private final boolean selectable; |
||||
private final int colorCount; |
||||
private final int extendedCount; |
||||
private final int boxSize; |
||||
private final int boxGap; |
||||
|
||||
private final List<Color> colorList = new ArrayList<>(); |
||||
private ExtendedColorComputer extendedColorComputer = DEFAULT_EXTENDED_COMPUTER; |
||||
|
||||
private int selectedColorIndex = -1; |
||||
private int selectedExtendedIndex = -1; |
||||
|
||||
public ColorListExtendedPane() { |
||||
this(false, DEFAULT_COLOR_COUNT, DEFAULT_EXTENDED_COUNT, DEFAULT_COLOR_SIZE, DEFAULT_COLOR_GAP); |
||||
} |
||||
|
||||
public ColorListExtendedPane(boolean selectable, int colorCount, int extendedCount, int boxSize, int boxGap) { |
||||
setLayout(FRGUIPaneFactory.createBorderLayout()); |
||||
this.selectable = selectable; |
||||
this.colorCount = Math.max(1, colorCount); |
||||
this.extendedCount = extendedCount; |
||||
this.boxSize = boxSize; |
||||
this.boxGap = boxGap; |
||||
|
||||
for (int i = 0; i < colorCount; i++) { |
||||
colorList.add(Color.WHITE); |
||||
} |
||||
|
||||
int width = colorCount * boxSize + (colorCount - 1) * boxGap; |
||||
int height = extendedCount * boxSize + (extendedCount - 1) * boxGap; |
||||
setPreferredSize(new Dimension(width, height)); |
||||
} |
||||
|
||||
public void populate(List<Color> colors) { |
||||
if (colors.size() > 0) { |
||||
colorList.clear(); |
||||
colorList.addAll(colors); |
||||
repaint(); |
||||
} |
||||
} |
||||
|
||||
public List<Color> update() { |
||||
return new ArrayList<>(colorList); |
||||
} |
||||
|
||||
public void setExtendedColorComputer(ExtendedColorComputer extendedColorComputer) { |
||||
this.extendedColorComputer = extendedColorComputer; |
||||
} |
||||
|
||||
@Override |
||||
public void mouseClicked(MouseEvent e) { |
||||
int x = e.getX(); |
||||
int y = e.getY(); |
||||
|
||||
int colorIndex = x / (boxSize + boxGap); |
||||
int colorX = colorIndex * (boxSize + boxGap); |
||||
|
||||
int extendedIndex = y / boxSize; |
||||
int extendedY = extendedIndex * boxSize; |
||||
|
||||
if (colorX <= x && x <= colorX + boxSize && extendedY <= y && y <= extendedY + boxSize) { |
||||
selectedColorIndex = colorIndex; |
||||
selectedExtendedIndex = extendedIndex; |
||||
} else { |
||||
selectedColorIndex = -1; |
||||
selectedExtendedIndex = -1; |
||||
} |
||||
repaint(); |
||||
} |
||||
|
||||
@Override |
||||
public void mousePressed(MouseEvent e) { |
||||
|
||||
} |
||||
|
||||
@Override |
||||
public void mouseReleased(MouseEvent e) { |
||||
|
||||
} |
||||
|
||||
@Override |
||||
public void mouseEntered(MouseEvent e) { |
||||
|
||||
} |
||||
|
||||
@Override |
||||
public void mouseExited(MouseEvent e) { |
||||
|
||||
} |
||||
|
||||
public interface ExtendedColorComputer { |
||||
Color computeExtendedColor(Color color, int index, int count); |
||||
} |
||||
|
||||
@Override |
||||
public void paint(Graphics g) { |
||||
super.paint(g); |
||||
Color oldColor = g.getColor(); |
||||
|
||||
for (int i = 0; i < colorCount; i++) { |
||||
int x = i * (boxSize + boxGap); |
||||
for (int j = 0; j < extendedCount; j++) { |
||||
Color color = extendedColorComputer.computeExtendedColor(colorList.get(i), j, extendedCount); |
||||
g.setColor(color); |
||||
int y = j * (boxSize + boxGap); |
||||
g.fillRect(x, y, boxSize, boxSize); |
||||
} |
||||
} |
||||
|
||||
g.setColor(oldColor); |
||||
} |
||||
} |
@ -0,0 +1 @@
|
||||
Fine-Designer_Login=i7hP48WAcuTrmxfN |
Loading…
Reference in new issue