Interface ComponentDescriptor
-
- All Known Implementing Classes:
ComponentDescriptorImpl
public interface ComponentDescriptor
This interface represents the component model that is registered withComponentRegistry
. TheComponentDescriptorImpl
provides a baseline implementation for most of the functionality needed.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description java.util.Set<BrowserResource>
browserResources()
Returns a set ofBrowserResource
s, which are provided to the designer and perspective client at runtime to insure the needed items are provided in the web environment to support the component.java.util.Optional<com.inductiveautomation.ignition.common.gson.JsonObject>
childPositionDefaults()
Defined default position property structure and values for children of new instances of this component.default JsonSchema
childPositionSchema()
Used for components that are containers in order to provide a schema for the position objects of their children.java.lang.String
defaultMetaName()
The default meta.name value for this component.com.inductiveautomation.ignition.common.gson.JsonObject
defaultProperties()
Defines default property structure and values for new instances of this component.boolean
deprecated()
default java.util.Collection<ComponentEventDescriptor>
events()
default java.util.Collection<ExtensionFunctionDescriptor>
extensionFunctions()
java.util.Optional<com.inductiveautomation.ignition.common.gson.JsonObject>
getExampleChildPositionDefaults()
java.util.Optional<javax.swing.Icon>
getIcon()
Return the icon that is registered along with the descriptor.default com.inductiveautomation.ignition.common.gson.JsonObject
getInitialProps(java.lang.String variantId)
java.lang.String
id()
The unique string that identifies this componentjava.lang.String
moduleId()
The moduleId should be a String id that matches the module that is contributing this component to the Ignition Perspective module system.java.lang.String
name()
java.lang.String
paletteCategory()
Which category this component should be listed under in the Designer's component palette.java.util.Collection<PaletteEntry>
paletteEntries()
JsonSchema
schema()
Defines the shape of the component's properties structure.
-
-
-
Method Detail
-
id
@Nonnull java.lang.String id()
The unique string that identifies this component
-
name
java.lang.String name()
- Returns:
- a human-readable name to briefly describe the component
-
deprecated
boolean deprecated()
- Returns:
- true if this component is no longer in active use. This will hide it from the palette and other UI that allows users to pick components (e.g. tag drop config)
-
paletteEntries
@Nonnull java.util.Collection<PaletteEntry> paletteEntries()
-
paletteCategory
@Nonnull java.lang.String paletteCategory()
Which category this component should be listed under in the Designer's component palette.
-
defaultMetaName
@Nonnull java.lang.String defaultMetaName()
The default meta.name value for this component.
-
moduleId
@Nonnull java.lang.String moduleId()
The moduleId should be a String id that matches the module that is contributing this component to the Ignition Perspective module system.- Returns:
- the Ignition module ID of the module providing the component.
-
defaultProperties
com.inductiveautomation.ignition.common.gson.JsonObject defaultProperties()
Defines default property structure and values for new instances of this component.
-
childPositionDefaults
java.util.Optional<com.inductiveautomation.ignition.common.gson.JsonObject> childPositionDefaults()
Defined default position property structure and values for children of new instances of this component.
-
browserResources
@Nonnull java.util.Set<BrowserResource> browserResources()
Returns a set ofBrowserResource
s, which are provided to the designer and perspective client at runtime to insure the needed items are provided in the web environment to support the component. Common use cases are css files and js libraries. These resources are collected at runtime and added to the DOM prior to starting the project/view.- Returns:
- a set of resources that the component requires.
-
schema
@Nullable JsonSchema schema()
Defines the shape of the component's properties structure.
-
childPositionSchema
@Nullable default JsonSchema childPositionSchema()
Used for components that are containers in order to provide a schema for the position objects of their children.
-
events
@Nonnull default java.util.Collection<ComponentEventDescriptor> events()
- Returns:
- a collection of the events that this component might fire.
-
extensionFunctions
@Nonnull default java.util.Collection<ExtensionFunctionDescriptor> extensionFunctions()
- Returns:
- a collection of the extension functions that this component declares
-
getInitialProps
@Nullable default com.inductiveautomation.ignition.common.gson.JsonObject getInitialProps(java.lang.String variantId)
-
getExampleChildPositionDefaults
java.util.Optional<com.inductiveautomation.ignition.common.gson.JsonObject> getExampleChildPositionDefaults()
-
getIcon
@Nonnull java.util.Optional<javax.swing.Icon> getIcon()
Return the icon that is registered along with the descriptor. If an icon is not set, the default icon will be used instead.
Pro-tip: use
InteractiveSvgIcon
to create an icon that works well in the nav-tree- Returns:
- icon used for the nav tree and component palette
-
-