[kepler-dev] Changing icons for composite actors

Norbert Podhorszki pnorbert at cs.ucdavis.edu
Mon Jun 18 11:56:43 PDT 2007

Hi Chad,

I have already tried to add an _svgIcon parameter to a composite in the 
moml manually, but Kepler at loading it throws an exception saying that I 
am trying to add an attribute which already exists. This should be because 
Kepler is adding this attribute to each actor at loading the moml.


On Mon, 18 Jun 2007, Chad Berkley wrote:

> Hi Norbert,
> I'm not really sure.  You can always add those attributes programatically or 
> by editing the moml by hand.  I'm not sure what the effect will be though.  I 
> think you'll just have to play around with it to see.  The only person that 
> has a lot of experience with this is Matthew and he no longer works for us. 
> Personally, I've never messed with it.  Sorry I'm not more help.
> chad
> Norbert Podhorszki wrote:
>> Hi Chad,
>> I may have not described my question fully. I know how to define icons for 
>> Kepler actors that either have lsids (saved in kar) or are java classes. 
>> The composite actors in the CPES workflows are neither "actors saved in 
>> kar" nor classes. They are simply ad-hoc subworkflows. That is, they have 
>> no lsids either.
>> For example, in the workflow there are unique (not too complex) composites 
>> to hide some specific, control related operations. They have the default 
>> green box representation of the TypedCompositeActor. I would like to show 
>> them as control actors (there is such an existing icon).
>> However, if this requires to save them as kars and 
>> define/register/cvs-commit them, I may quickly decide it is not worth to do 
>> it.
>> I can see in the Tree view of the workflow, that each component has an 
>> _svgIcon and _iconDescription parameters, obviously created and filled by 
>> Kepler when loading the moml file. Is there any way to influence this 
>> process to insert that icon name what I want, not the one which is assigned 
>> to TypedCompositeActor? Through a special _... parameter inserted by hand 
>> in the moml for example :-) ?
>> Thanks
>> Norbert
>> On Mon, 18 Jun 2007, Chad Berkley wrote:
>>> Yes, I think you can.  You can actually assign the icon by LSID.  See the 
>>> file configs/ptolemy/configs/kepler/uiSVGIconMappingsByLSID.properties
>>> You can also assign them by class:
>>> configs/ptolemy/configs/kepler/uiSVGIconMappingsByClass.properties
>>> Note the config file format is something like this:
>>> urn\:lsid\:kepler-project.org\:actor\:417\:1=data_process-c
>>> where the icon name (on the right side of the '=' sign is a filename from 
>>> the kepler/lib/images/svg directory with the ".svg" removed.
>>> chad

More information about the Kepler-dev mailing list