Harris has posted 16 posts at DZone. View Full User Profile

Icon Tip for NetBeans Platform

02.16.2009
| 12633 views |
  • submit to reddit
If you have icons with names like this:

Then set the default icon as the "iconBase" in the action registration in the layer, the line is line 7 here:

<folder name="Actions">
<folder name="Tools">
<file name="org-demo-mod4-SomeAction.instance">
<attr name="SystemFileSystem.localizingBundle" stringvalue="org.demo.mod4.Bundle"/>
<attr name="delegate" newvalue="org.demo.mod4.SomeAction"/>
<attr name="displayName" bundlevalue="org.demo.mod4.Bundle#CTL_SomeAction"/>
<attr name="iconBase" stringvalue="org/demo/mod4/demoIcon.png"/>
<attr name="instanceCreate" methodvalue="org.openide.awt.Actions.alwaysEnabled"/>
<attr name="noIconInMenu" boolvalue="false"/>
</file>
</folder>
</folder>

Now, when the action is large/disabled/pressed/rolled-over, the relevant icon is shown. The important factor is that the "iconBase" is really the "base", with the others ("24", "_disabled", "_pressed", and "_rollover") being added on to the name of the base icon.

 

AttachmentSize
icon-tip-1.png21.65 KB
0
Your rating: None
Published at DZone with permission of its author, Harris Goldstone.

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)

Comments

Toni Epple replied on Tue, 2009/02/17 - 11:55am

Hi Harris, reading your tip I had an idea how you can utilize the iconBase approach for some advanced branding :-) Cheers

Toni

Harris Goldstone replied on Thu, 2009/02/19 - 6:40pm

found this info ina German book by Heicko Buck. Don't understand German, only Java. Wish it was in English too. But learnt so much from the code!

Larry Wales replied on Sat, 2009/03/07 - 6:21am in response to: Harris Goldstone

YA I GOT THAT SAME BOOK AND DONT SPEAK GERMAN EITHER SO WHAT I BEEN DOING IS USING THE GOOGLE TRANSLATOR FOR PASSAGES I WANT TO UNDERSTAND.

Matt Coleman replied on Thu, 2012/11/22 - 12:26am in response to: Toni Epple

 thanks Toni..i will surely check your advanced branding

buffalo freelance website designer

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.