Ignition SDK Programmer's Guide
How-to Articles
Strategic Partner Links
Sepasoft - MES Modules
Cirrus Link - MQTT Modules
Resources
Inductive University
Ignition Demo Project
Knowledge Base Articles
Forum
IA Support
SDK Examples
The designer hook class of a module that adds Vision module properties has two main functions: add
...
...
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 { context.addBeanInfoSearchPath("com.example.mymodule.beaninfos"); 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)); } } } |