Browse Source

CHART-19834 svg地图报错

final/10.0
白岳 3 years ago
parent
commit
dfb56cb2ec
  1. 4
      designer-base/src/main/java/com/fr/design/editor/editor/Editor.java

4
designer-base/src/main/java/com/fr/design/editor/editor/Editor.java

@ -4,6 +4,7 @@
package com.fr.design.editor.editor;
import com.fr.base.BaseUtils;
import com.fr.stable.StringUtils;
import javax.swing.*;
import javax.swing.event.ChangeEvent;
@ -34,6 +35,9 @@ public abstract class Editor<T> extends JComponent {
// 约定图片的文件名为this.getName(),处理起来方便些
// b:这里国际化没有考虑
public Icon getIcon() {
if (StringUtils.isEmpty(this.getIconName())) {
return null;
}
String iconName = "com/fr/design/images/buttonicon/" + this.getIconName() + ".png";
try {
return BaseUtils.readIcon(iconName);

Loading…
Cancel
Save