Loading Ideas icons

Hi,

Im attempting to use one of ideas icons from a plugin. I think i need to use IconLoader.getIcon(), but am unsure of what I need to supply as the argument.

I have tried

back.png
/icons/actions/back.png

Can anyone help me out?

Regards

Ben

6 comments
Comment actions Permalink

/actions/back.png is only valid URL.

Try to look also on IdeIcons interface - it collected common icons.

0
Comment actions Permalink

Hello ben,

The correct path is "/actions/back.png".

b> Im attempting to use one of ideas icons from a plugin. I think i need
b> to use IconLoader.getIcon(), but am unsure of what I need to supply
b> as the argument.
b>
b> I have tried
b>
b> back.png
b> /icons/actions/back.png
b> Can anyone help me out?

--
Dmitry Jemerov
Software Developer
JetBrains, Inc.
http://www.jetbrains.com
"Develop with pleasure!"


0
Comment actions Permalink

Thank you Dmitry and Alexey, that worked for me.

0
Comment actions Permalink

Dmitry,

On the ModuleType class what does the boolean mean for the following method?

public Icon getNodeIcon(boolean b)
{
return null;
}

Ben

0
Comment actions Permalink

The boolean is named 'isOpened' and may be used to show a different icon if the node is open, i.e. if the children are showing or not.

Dmitry,

On the ModuleType class what does the boolean mean
for the following method?

public Icon getNodeIcon(boolean b)
{
return null;
}

0
Comment actions Permalink

Hello ben,

b> On the ModuleType class what does the boolean mean for the following
b> method?
b>
b> public Icon getNodeIcon(boolean b)
b> {
b> return null;
b> }

The source code to OpenAPI classes, including the ModuleType class, is available
in lib\src\src_openapi.zip in the Plugin Development Package. If you look
at the code, you'll see that the name of the parameter is "isOpened".

--
Dmitry Jemerov
Software Developer
JetBrains, Inc.
http://www.jetbrains.com
"Develop with pleasure!"


0

Please sign in to leave a comment.