#
# Provides chess figure icon for EInterface on the diagram &
# colored labels for ESpeakClient & ESpeakServiceProvider classes (ones that were created by pattern),
# coloring depends on stereoptype value.
#

resource.element.Class.icon.small =
\      if ( hasPropertyValue( "$extends" , "net.espeak.jesi.ESService" )||
\           hasPropertyValue( "$extends" , "ESService" ),
\          "ESpeak/tv-e-interface.gif",
\          if(!hasProperty("$interface"), "Treeviews/tv-class.gif", "Treeviews/tv-interface.gif")
\         )

view.map.*.Class.isTopLevel() && true=
\      if( hasPropertyValue( "$extends" , "net.espeak.jesi.ESService")||
\          hasPropertyValue( "$extends" , "ESService" ),
\               (
\               setGraphicObject("HPComponent");
\               icons = addCompartment("RectangleInvisible", "$icons");
\               icons->setLayout("Move");
\               eSpeakMark = icons->addCompartment(label("",getIcon()), "eSpeakMark");
\               eSpeakMark->setLayoutConstraints(minWidth(6), maxWidth(6), minHeight(6), maxHeight(6),
\                                                verticalAlign("center"), horizontalAlign("center"))
\               )
\       )

view.map.*.Class.isTopLevel() && hasPropertyValue("stereotype", "ES Client")=
\      nameLabel = findElementByName("nameLabel");
\      nameLabel->setForeground(RGB(0,128,128))

view.map.*.Class.isTopLevel() && hasPropertyValue("stereotype", "ES Service Provider")=
\      nameLabel = findElementByName("nameLabel");
\      nameLabel->setForeground(RGB(255,0,0))
