Artikel Navigation

Simple Palette for Custom FileTypes

On NetBeans.org there’s a nice tutorials that shows how to create a palette for your Editor. If you follow the steps in that tutorial, it will give you a palette that is active when your file is opened. That’s nice, but in my custom FileType Editor I want a palette that should be only activated, when the Visual Editor is activated.

You can achieve that by creating a PaletteController factory class like in the example, but without the annotation for registering it. Here’s my class: