示例代码
Windchill 代码中的使用示例
在由 TypedAttrLayOutFactory 创建的 AttributePanelConfig 中修改 AttributeConfig 的特性
这会显示如何在由 TypedAttrLayOutFactory 创建的 AttributePanelConfig 中修改 AttributeConfig
List<ComponentConfig> components = attributePanelConfig.getComponents();
for (ComponentConfig componentConfig : components) {
if( componentConfig instanceof JcaGroupConfig){
List<ComponentConfig> attributeConfigs = ((JcaGroupConfig)
componentConfig).getComponents();
for (ComponentConfig attributeConfig : attributeConfigs) {
String attributeName =((AttributeConfig)attributeConfig).getId();
if(attributeName.equals("name")){
attributeConfig.setComponentMode(ComponentMode.EDIT);
}
if(attributeName.equals("folder.id")){
((JcaAttributeConfig)attributeConfig).setDataUtilityId
("saveAsVariantSpecLocationDataUtility");
}
}
}
}
这对您有帮助吗?