cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X

Get standard icon for windchill object

VasiliyRepecki
1-Newbie

Get standard icon for windchill object

Hi.

I am using wrapper class for object in wizard table.

But i need to show standard icon in column if windchill object is wrapped by my class.

I defined data utility for icon column which returns com.ptc.core.components.rendering.guicomponents.IconComponent

How can i specify standard IconComponent?

1 ACCEPTED SOLUTION

Accepted Solutions

IconDelegate icondelegate = IconDelegateFactory.getInstance().getIconDelegate(wtObject);

IconSelector iconselector;

for(iconselector = icondelegate.getStandardIconSelector(); !iconselector.isResourceKey(); iconselector = icondelegate.getStandardIconSelector())

{

icondelegate = icondelegate.resolveSelector(iconselector);

}

URLFactory urlfactory = new URLFactory();

String iconUrl = urlfactory.getHREF(iconselector.getIconKey());

IconComponent iconComponent = new IconComponent(iconUrl);

View solution in original post

1 REPLY 1

IconDelegate icondelegate = IconDelegateFactory.getInstance().getIconDelegate(wtObject);

IconSelector iconselector;

for(iconselector = icondelegate.getStandardIconSelector(); !iconselector.isResourceKey(); iconselector = icondelegate.getStandardIconSelector())

{

icondelegate = icondelegate.resolveSelector(iconselector);

}

URLFactory urlfactory = new URLFactory();

String iconUrl = urlfactory.getHREF(iconselector.getIconKey());

IconComponent iconComponent = new IconComponent(iconUrl);

Top Tags