|
|
@ -1,13 +1,11 @@ |
|
|
|
package com.fr.design.designer.treeview; |
|
|
|
package com.fr.design.designer.treeview; |
|
|
|
|
|
|
|
|
|
|
|
import com.fr.base.BaseUtils; |
|
|
|
import com.fr.base.BaseUtils; |
|
|
|
import com.fr.base.iofile.attr.ExtendSharableAttrMark; |
|
|
|
|
|
|
|
import com.fr.design.constants.UIConstants; |
|
|
|
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.form.ui.AbstractBorderStyleWidget; |
|
|
|
import com.fr.design.mainframe.share.util.ShareComponentUtils; |
|
|
|
import com.fr.log.FineLoggerFactory; |
|
|
|
import com.fr.log.FineLoggerFactory; |
|
|
|
import com.fr.stable.StringUtils; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import javax.swing.BorderFactory; |
|
|
|
import javax.swing.BorderFactory; |
|
|
|
import javax.swing.Icon; |
|
|
|
import javax.swing.Icon; |
|
|
@ -38,7 +36,7 @@ public class ComponentTreeCellRenderer extends DefaultTreeCellRenderer { |
|
|
|
} |
|
|
|
} |
|
|
|
if (icon != null) { |
|
|
|
if (icon != null) { |
|
|
|
setIcon(icon); |
|
|
|
setIcon(icon); |
|
|
|
this.needAddShareIcon = isShareWidget((XCreator) value); |
|
|
|
this.needAddShareIcon = ShareComponentUtils.isShareWidgetWithChild((XCreator) value); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
@ -47,14 +45,6 @@ public class ComponentTreeCellRenderer extends DefaultTreeCellRenderer { |
|
|
|
return this; |
|
|
|
return this; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private boolean isShareWidget(XCreator xCreator) { |
|
|
|
|
|
|
|
if (!xCreator.toData().acceptType(AbstractBorderStyleWidget.class)) { |
|
|
|
|
|
|
|
return false; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
ExtendSharableAttrMark attrMark = ((AbstractBorderStyleWidget) xCreator.toData()).getWidgetAttrMark(ExtendSharableAttrMark.XML_TAG); |
|
|
|
|
|
|
|
return attrMark != null && StringUtils.isNotEmpty(attrMark.getShareId()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void paint(Graphics g) { |
|
|
|
public void paint(Graphics g) { |
|
|
|
super.paint(g); |
|
|
|
super.paint(g); |
|
|
|