8.7.4 Adding Beans to Palette
The Bean Builder does not restrict you to use its components alone. If you feel the need to load other jars and use the beans in them to create applications and applets, the Bean Builder lets you do that. Beans can be loaded or unloaded by using the "Load Jar" and "Unload Jar" option of the 'File' Menu.
The Component Palette is the visual interface for the user to select and use a bean, be it user defined or pre-defined. Click here to view the Component Palette and its details.
Different file formats (*.jar, *.list,*.bxml) are allowed for loading. Once a file has been loaded, it is visible in the Component Palette. The below picture shows the dialog invoked, when "File-->Load Jar" option is chosen.
If the file needs to be auto loaded every time in the start up, then the "Load it every time" option needs to be selected. Among the list of files loaded, a file can be removed by selecting it and using the delete key.
The "Override old class" option is used to specify whether the newer version of the classes present in the jars loaded need to take effect, if there are same classes in the already loaded jars.
Note: Even though the "Override old class" option is selected by default , it is preferable to uncheck it. It is mostly useful when the user wants to see the difference between the different versions of the same bean or when developing/testing a bean.
You can also unload the jars which are loaded by default, by using the "Unload Jar" option in the "File" menu.
Note: The jar files loaded automatically by default will be present in <Web NMS Home>/classes directory.
A Short Description of the different file formats
This is the Java archive format. More information about jar files can be found in any JDK documentation. One important feature of the Bean Builder is that for a jar named abc.jar, another jar named abcBeanInfo.jar is also present in the same directory. On loading the jar abc.jar, the abcBeanInfo.jar is also loaded. This feature is to allow packaging of the classes necessary for design time such as BeanInfo classes, its icons,property editors etc. as a separate jar. This helps in reducing to a great extent the size of the jar needed for runtime.
This file provides an easy way of adding beans to the Component Palette. The beans can be specified as <bean names> in separate lines. If needed, the corresponding image icons for the beans can be specified using the construct <bean names>= <icon file name>. Note that the class files and icon files should be present in the already loaded jars or needs to be in the ClassPath. (e.g. SwingBeans.list present in the <Web NMS Home>/classes directory).
This file provides an easy way of saving modified properties of beans (ie, customizing the beans to have some properties set to some default values without the need to create a new bean). Any Screen file <ScreenName>.config can be converted into a .bxml file by just renaming the file to <ScreenName>.bxml. Now load the bxml file using 'Load Jar' option and use the file.