Browse Source

KERNEL-7376 优化设计器上一些性能问题

feature/10.0
Henry.Wang 4 years ago
parent
commit
61fee165a4
  1. 4
      designer-base/src/main/java/com/fr/base/svg/SVGIcon.java
  2. 6
      designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java

4
designer-base/src/main/java/com/fr/base/svg/SVGIcon.java

@ -7,8 +7,8 @@ import java.awt.Component;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.image.BufferedImage;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
/**
* SVG转化而来的Icon
@ -30,7 +30,7 @@ public class SVGIcon implements Icon {
this.image = image;
}
private static Map<String, Icon> iconCache = new HashMap<>();
private static Map<String, Icon> iconCache = new ConcurrentHashMap<>();
@Override
public void paintIcon(Component c, Graphics g, int x, int y) {

6
designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java

@ -82,8 +82,10 @@ import javax.swing.JComponent;
import javax.swing.JOptionPane;
import javax.swing.tree.DefaultMutableTreeNode;
import javax.swing.undo.UndoManager;
import java.util.*;
import java.util.regex.Pattern;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Set;
import java.awt.BorderLayout;
/**

Loading…
Cancel
Save