[kepler-dev] Adding actors to the library

Matt Jones jones at nceas.ucsb.edu
Tue Mar 15 11:57:58 PDT 2011


Sven --

You should be able to store icon images in your own module -- the key is
that they need to be on the classpath at the right location.  So, for the
gif thumbnails, they need to be in '/actorthumbs', and for SVG images, they
need to be in '/svg'.  In the common module, these are in:

./common/lib/images/actorthumbs/arrayaverage-c-sm.gif
./common/lib/images/actorthumbs/arrayaverage-c.gif
./common/lib/images/svg/arrayaverage-c.svg

So, if you have a module called 'mod1', then you should be able to use, for
example:

./mod1/lib/images/actorthumbs/mod1-actor1-sm.gif
./mod1/lib/images/actorthumbs/mod1-actor1.gif
./mod1/lib/images/svg/mod1-actor1.svg

Note that the order of modules in your suite will determine the classpath
order, so your icons will only be used if your module is above other modules
that provide icons with the same name.  This should be fine though for most
suites, especially as you're adding new icons presumably with new and unique
filenames.

In addition, you will need to add configuration pairs to describe which icon
files to use for these actors to the configuration.  You can do this by
using the configuration manager to add pairs to the uiSVGIconMappingsByClass
and uiSVGIconMappingsByLSID configuration namespaces under the gui module.
 How to add to other modules' configuration from within your own module is
described here:

https://kepler-project.org/developers/teams/framework/configuration-system-documentation/

Take a look at gui/resources/configurations/uiSVGIconMappingsByClass.xml
and gui/resources/configurations/uiSVGIconMappingsByClass.xml for examples
of the config properties you'll need to provide.

I haven't done all of this myself, so can't attest to all of the details or
provide more detail than I have here.  I'm sure you'll run into some issues.
 Its clear we need to put together a guide specifically for how to add and
change actor icons.  If you are successful and would be willing to document
the procedure that you used, we'd be willing to help clean it up and put it
on the Kepler wiki to benefit others.

Thanks, and good luck! Let us know how it goes...

Matt

On Tue, Mar 15, 2011 at 10:03 AM, Sven Koehler <skoehler80 at gmail.com> wrote:

> Hello,
>
> On Tue, Mar 15, 2011 at 3:45 AM, Tomasz Żok <tzok at man.poznan.pl> wrote:
> >>what is the official way to add actors to the library in my own Kepler
> >>module? How do I create a new folder in the library for my actors?
> >
> > First, you write code for this actor and make sure that
> > generated .class or .jar files are in Kepler's classpath. Then you
> > run Kepler and choose "Instantiate Component" from menu "Tools". You
> > need to provide it with full class name of your actor. The actor will
> > appear on workflow canvas. You can now right-click on it and choose
> > "Semantic Type Annotation" where you select categories to which this
> > actor belong (categories are those in hierarchy in Kepler library). The
> > last step is to right-click the actor and choose "Save as KAR".
>
> This would allow me to create an actor that shows up on my
> installation of Kepler.
> But how do I add actors to my modules that I want to publish? Other
> users, who install my modules should be able to find those actors
> directly in their library. Those actors should also show up in a
> separate folder in the library.
>
> >>And how can I give them customized icons?
> >
> > In the directory kepler/gui/resources/configurations/ there are two
> > files uiSVGIconMappingsByClass.xml and uiSVGIconMappingsByLSID.xml.
> > Please read comments inside them as it is already clearly described on
> > how to specify icons for actors. One note from me however - in Kepler
> > 2.x it seems that icons themselves are placed in
> > kepler/config/lib/images/
>
> Does that mean that I also have to change other modules to add icons
> to actors in my Kepler module?
> Is there no way to declare those icon mappings directly in my module?
>
> Thanks,
>   Sven
> _______________________________________________
> Kepler-dev mailing list
> Kepler-dev at kepler-project.org
> http://lists.nceas.ucsb.edu/kepler/mailman/listinfo/kepler-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nceas.ucsb.edu/kepler/pipermail/kepler-dev/attachments/20110315/d348c298/attachment-0001.html>


More information about the Kepler-dev mailing list