September 20th, 2007
If you are building application on top of Netbeans Platform sooner or later you will deal with layer.xml. Layer.xml (Netbeans FAQ) is
Layer files are small XML files provided by modules, which define a virtual filesystem . The layer file defines folders and files that will be merged into the system filesystem that makes up the runtime configuration information NetBeans and its modules use.
Layer files help to make it possible for modules to be dynamically installed. If you’ve read about FileObjects and FileSystems , you know that you can listen for changes in folders and files in a filesystem. That’s exactly what the components of NetBeans whose content is composed from folders in the system filesystem do. So if a module is added at runtime, the system filesystem fires changes; the UI notices that the contents of the folder has changed and updates the UI to reflect the changes.
On the Citra FX Photo Filter, if you look at the Effects TopComponent there is a button filter, if you click that button it will display popup menu which have the same menu item as the usual Menu – Filter at the top. In that particular case, we are parsing the layer.xml and build the popup menu. Below is the java code to parse the Netbeans layer.xml
Read the rest of this entry »
Tags: Java, Netbeans Platform, Trick
Posted in Citra FX, Java, Netbeans | 1 Comment »