Re: Can't set icon for PasteAction
Boris Heithecker <[email protected]>
| Newsgroups | gmane.comp.java.netbeans.modules.openide.devel |
|---|---|
| Message-ID | <CAL465REyaHeMK4OOyit4t5HYXECft_4acM+sRswbw3ZwdsS7HQ@mail.gmail.com> |
Hi, I understand that you want to change the icon dynamically, so branding is no option. Instead of subclassing PasteAction, why don't you subclass org.openide.util.actions.CallbackSystemAction (PasteAction is derived from it) and implement your own custom PasteAction. Look at the sources of PasteAction how they do it. Best wishes! Boris 2016-09-02 11:25 GMT+02:00 Neil C Smith <[email protected]>: > On 1 September 2016 at 09:54, mdaley <[email protected]> wrote: > > Yes, that's a work around that I can use. Thanks. However, it doesn't > solve the problem when I want to be able to swap icons in and out on the > fly when a user chooses to swap to a different icon set. That's the > problem that I'm really trying to solve. Still, the "put the icon in that > place" idea does solve the problem for the moment. > > That situation gets more interesting. You might be able to work > around that by having a small module for each icon set and selectively > enabling? > > There's also this blog post from Geertjan that might be relevant and > offer a different approach - > https://blogs.oracle.com/geertjan/entry/icon_sets_for_netbeans_ide > > As per my comment there, I would love to see something that mixed this > with the ability to define icons that aren't bitmap images - eg. using > SVG or fonts (FontAwesome, icomoon etc.) so that we could better > support high-res screens. > > Best wishes, > > Neil > > > -- > Neil C Smith > Artist : Technologist : Adviser > http://neilcsmith.net > > Praxis LIVE - hybrid visual IDE for creative coding - www.praxislive.org > Digital Prisoners - interactive spaces and projections - > www.digitalprisoners.co.uk >