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