[kepler-dev] Icons within Kepler

Michal Owsiak michal.owsiak at man.poznan.pl
Thu Sep 23 02:32:57 PDT 2010


Hello all,

I have few questions related to icons management within Kepler.

I am trying to set actor's Icon and I am using following way to set it:

_attachText("_iconDescription", "<svg>\n"
                 + "<rect x=\"-20\" y=\"-15\" " + "width=\"40\" 
height=\"30\" "
                 + "style=\"fill:lightGrey\"/>\n" + "<rect x=\"-15\" 
y=\"-10\" "
                 + "width=\"30\" height=\"20\" " + 
"style=\"fill:white\"/>\n"
                 + "<line x1=\"-13\" y1=\"-6\" x2=\"-4\" y2=\"-6\" "
                 + "style=\"stroke:grey\"/>\n"
                 + "<line x1=\"-13\" y1=\"-2\" x2=\"0\" y2=\"-2\" "
                 + "style=\"stroke:grey\"/>\n"
                 + "<line x1=\"-13\" y1=\"2\" x2=\"-8\" y2=\"2\" "
                 + "style=\"stroke:grey\"/>\n"
                 + "<line x1=\"-13\" y1=\"6\" x2=\"4\" y2=\"6\" "
                 + "style=\"stroke:grey\"/>\n" + "</svg>\n");

I'd like to have the same icon as Display actor has.

Is it mandatory to subclass from certain class in order to use this 
method for setting actor's icon?

Another question is:

How can I refer to icons that are contained within kepler-icons.jar? Is 
it possible to retrieve them through the Kepler engine? Are they stored 
somewhere and are accessible via class/icon name?

Another question is. I'd like to set JFrame icon to the icon that is 
used by Kepler itself using setIconImage. However, I don't know how to 
refer to this icon.

How can I retrieve Image object for the icon that is used for main 
Kepler windows? How can I find it's (icon's) package name?

And the last question. If I want to add new icon into Kepler how should 
I proceed if I don't want to put the icon into kepler-icons.jar? Is 
there any way to do that?

Thanks in advance

Cheers

Michal

-- 
Michal Owsiak <michal.owsiak at man.poznan.pl>

Institute of Bioorganic Chemistry PAS
Poznan Supercomputing and Networking Center
Noskowskiego 12/14, 61-704 Poznan, POLAND

http://www.man.poznan.pl


More information about the Kepler-dev mailing list