Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Icon Tip for NetBeans Platform

DZone's Guide to

Icon Tip for NetBeans Platform

· Java Zone
Free Resource

Learn how our document data model can map directly to how you program your app, and native database features like secondary indexes, geospatial and text search give you full access to your data. Brought to you in partnership with MongoDB.

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.

 

Discover when your data grows or your application performance demands increase, MongoDB Atlas allows you to scale out your deployment with an automated sharding process that ensures zero application downtime. Brought to you in partnership with MongoDB.

Topics:

Opinions expressed by DZone contributors are their own.

THE DZONE NEWSLETTER

Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

X

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}