Browse Source
* commit '4c7acb3b1084a70efef309d045a2cf8a89376cb2': REPORT-73802 【设计器环境监测】windows下没有finedb权限,首次启动设计器能起来,第二次就启动失败了 单独写一个 DefaultLoginKeys REPORT-72595 FR源码中存在加密密钥硬编码,建议放到配置文件中 REPORT-73833【设计器环境检测】本地目录,只有finedb异常,自动弹窗没弹 需要对使用后埋点。之前是使用的 Stream. 埋点后 Stream 流就不能用了。 这边换成 Collection 适配一下。 REPORT-73811 图表条件属性汇总字段值,汇总方式下拉内容显示了两遍 REPORT-72819 弹窗显示不全 KERNEL-11517 实现主题色时ClassHelper中遍历搜索对象存在性能问题bugfix/11.0
superman
3 years ago
19 changed files with 119 additions and 183 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; |
||||
} |
||||
} |
@ -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