Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.

The designer hook class of a module that adds Vision module properties has two main functions: add

  1. Add the


  1. beaninfo search path


  1. Add the components themselves into the Vision Palette.

To get the Palette, you'll need to grab the Vision module's VisionDesignerInterface. You can do this through the DesignerContext. Once you have the VisionDesignerInterface, you can get the palette and make your own PaletteItemGroup. You'll add all of your components to this item group.

An example should make this clear: 



Code Block
public class MyModuleDesignerHook extends AbstractDesignerModuleHook { 
	public void startup(DesignerContext context, LicenseState activationState) throws Exception {
		VisionDesignerInterface sdk = (VisionDesignerInterface) context.getModule(VisionDesignerInterface.VISION_MODULE_ID);
		if (sdk != null) {
			Palette palette = sdk.getPalette(); 
			PaletteItemGroup group = palette.addGroup("MyModule");
			group.addPaletteItem(new JavaBeanPaletteItem(MyGreatChart.class));
			group.addPaletteItem(new JavaBeanPaletteItem(SomeOtherComponent.class));