Demetra 5321 - icon property in UI designer

Hi,

Just fired up Demetra for the first time a few minutes ago. First comment is to do with the UI designer...

In my projects with hand-coded GUIs, I generally have one module, each containing a "src" dir (to contain Java source code) and a "resources/icons" folder (to contain icons, as the name suggests). I build projects with Ant, and after compiling source code, the ".class" files and the contents of the "resources" folder are combined into a JAR file (such that a classloader resource path of "icons/foo_icon.png" will resolve correctly).

If I have say a JButton, it has an "icon" property, which is obviously going to be an image file (say a PNG image). Using the UI designer, I can't choose "foo_icon.png" unless I add "resources" as a source path within the "modules" part of the "project settings". It's going to be in the classpath and I don't consider it to be source code, so I also tried adding it as a project library in the "project settings" > "modules" dialog, which is more realistic but unfortunately didn't seem to work.

I also can't see how to remove an icon from a JButton once I've assigned it: if I go into the property editor and delete the path, the path is restored as soon as the property value editor loses focus.

Furthermore, the "choose icon file" dialog doesn't include any preview of the icon. I've got tons of icons (having bought the complete set from www.iconexperience.com amongst other sources), a lot with similar names, so it'd be very handy to choose.

Are these bugs? Can they be fixed? If I'm approaching this in the wrong way, can you provide some hints or a link as to how I should go about structuring my project in an IDE-independant way that is IDEA-friendly? I'm sure I'm missing something, as I'm usually very productive with IDEA, and so far it all seems counter-intuitive.

Thanks,
Chris

1 comment
Comment actions Permalink

Hello Christopher,

CB> Just fired up Demetra for the first time a few minutes ago. First
CB> comment is to do with the UI designer...

Thanks a lot for your feedback! See answers to specific questions below.

CB> If I have say a JButton, it has an "icon" property, which is
CB> obviously going to be an image file (say a PNG image). Using the UI
CB> designer, I can't choose "foo_icon.png" unless I add "resources" as
CB> a source path within the "modules" part of the "project settings".
CB> It's going to be in the classpath and I don't consider it to be
CB> source code, so I also tried adding it as a project library in the
CB> "project settings" > "modules" dialog, which is more realistic but
CB> unfortunately didn't seem to work.

The inability to choose icons from libraries is a bug, and it will be fixed
in the next EAP.

CB> I also can't see how to remove an icon from a JButton once I've
CB> assigned it: if I go into the property editor and delete the path,
CB> the path is restored as soon as the property value editor loses
CB> focus.

Also a bug, also fixed. In build 5321, you can right-click the property and
select "Restore default value" from the context menu to remove the icon.

CB> Furthermore, the "choose icon file" dialog doesn't include any
CB> preview of the icon. I've got tons of icons (having bought the
CB> complete set from www.iconexperience.com amongst other sources), a
CB> lot with similar names, so it'd be very handy to choose.

Icon preview in the chooser is planned, but I don't currently know when exactly
it will be implemented.

--
Dmitry Jemerov
Software Developer
http://www.jetbrains.com/
"Develop with Pleasure!"


0

Please sign in to leave a comment.