Class ComponentRegistry
java.lang.Object
com.inductiveautomation.perspective.common.api.ComponentRegistry
- Direct Known Subclasses:
- DesignerComponentRegistry
Registry of all perspective components. Module authors should register their components here in both Gateway
 and Designer scopes.
- 
Nested Class SummaryNested Classes
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected ComponentDescriptorbuildDescriptor(com.inductiveautomation.ignition.common.gson.JsonObject componentDef, String versionHash) static BufferedImagefetchImage(URL url) Fetches an image will be used for component palette tile entries in the designer.get()voidRegisters a component with the Perspective ComponentRegistry.voidvoidremoveComponent(String componentId) Removes a component from the registry.void
- 
Constructor Details- 
ComponentRegistrypublic ComponentRegistry()
- 
ComponentRegistry
 
- 
- 
Method Details- 
registerComponentRegisters a component with the Perspective ComponentRegistry.For a component to show up, it must - Not be deprecated
- Have at least one palette varient
- Have a valid name
- Include any appropriate BrowserResourceentries
 Registering a new component will notify any registered ComponentRegistry.ComponentRegistryListeners.- Parameters:
- comp- the descriptor for the component
 
- Not be 
- 
removeComponentRemoves a component from the registry.Removing a component will notify any registered ComponentRegistry.ComponentRegistryListeners.- Parameters:
- componentId- the- ComponentDescriptor.id()value of the component to remove
 
- 
get
- 
find
- 
getCategories
- 
buildDescriptorprotected ComponentDescriptor buildDescriptor(com.inductiveautomation.ignition.common.gson.JsonObject componentDef, @Nullable String versionHash) 
- 
registerListener
- 
removeListener
- 
fetchImageFetches an image will be used for component palette tile entries in the designer. The image will be scaled down to 72x48.- Parameters:
- url- URL for the image
- Returns:
- a buffered image or null if the URL is not valid
 
 
-