|
|
@ -4,6 +4,7 @@ import com.fr.design.constants.UIConstants; |
|
|
|
import com.fr.design.designer.creator.XCreator; |
|
|
|
import com.fr.design.designer.creator.XCreator; |
|
|
|
import com.fr.design.designer.creator.XCreatorUtils; |
|
|
|
import com.fr.design.designer.creator.XCreatorUtils; |
|
|
|
import com.fr.design.gui.ilable.UILabel; |
|
|
|
import com.fr.design.gui.ilable.UILabel; |
|
|
|
|
|
|
|
import com.fr.log.FineLoggerFactory; |
|
|
|
|
|
|
|
|
|
|
|
import javax.swing.Icon; |
|
|
|
import javax.swing.Icon; |
|
|
|
import javax.swing.JTree; |
|
|
|
import javax.swing.JTree; |
|
|
@ -23,7 +24,12 @@ public class ComponentTreeCellRenderer extends DefaultTreeCellRenderer { |
|
|
|
if (value instanceof XCreator) { |
|
|
|
if (value instanceof XCreator) { |
|
|
|
String name = ((XCreator) value).toData().getWidgetName(); |
|
|
|
String name = ((XCreator) value).toData().getWidgetName(); |
|
|
|
setText(name); |
|
|
|
setText(name); |
|
|
|
Icon icon = XCreatorUtils.getCreatorIcon((XCreator) value); |
|
|
|
Icon icon = null; |
|
|
|
|
|
|
|
try { |
|
|
|
|
|
|
|
icon = XCreatorUtils.getCreatorIcon((XCreator) value); |
|
|
|
|
|
|
|
} catch (Exception e) { |
|
|
|
|
|
|
|
FineLoggerFactory.getLogger().info("{} has not icon or has been deleted", name); |
|
|
|
|
|
|
|
} |
|
|
|
if (icon != null) { |
|
|
|
if (icon != null) { |
|
|
|
setIcon(icon); |
|
|
|
setIcon(icon); |
|
|
|
} |
|
|
|
} |
|
|
|