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.default java.util.Collection<ComponentEventDescriptor>
events()
java.util.Optional<com.inductiveautomation.ignition.common.gson.JsonObject>
getExampleChildPositionDefaults()
com.inductiveautomation.ignition.common.gson.JsonObject
getExampleDefaultProps()
javax.swing.Icon
getIcon()
Return the icon that is registered along with the descriptor.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
paletteCategory()
Which category this component should be listed under in the Designer's component palette.java.lang.String
paletteDescription()
The description should return a short description of the component, generally as a short sentence.java.lang.String
paletteName()
The name for this component as it will be presented in the Designer palette, stored as aLocalizedString
.JsonSchema
schema()
Defines the shape of the component's properties structure.boolean
showOnPalette()
-
-
-
Method Detail
-
id
@Nonnull java.lang.String id()
The unique string that identifies this component
-
paletteName
@Nonnull java.lang.String paletteName()
The name for this component as it will be presented in the Designer palette, stored as aLocalizedString
.
-
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.
-
paletteDescription
@Nonnull java.lang.String paletteDescription()
The description should return a short description of the component, generally as a short sentence.- Returns:
- a short sentence about what this component does
-
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.
-
showOnPalette
boolean showOnPalette()
- Returns:
- true if the component should be displayed in the Ignition Designer's Perspective Component palette. True by default, but may be implemented to return false to remove a component from the designer palette. Useful as a means to 'soft deprecate' a component without removing it from the system entirely, insuring that projects that already use said component will continue to function, but new instances of these components will not easily be created in the designer.
-
events
@Nonnull default java.util.Collection<ComponentEventDescriptor> events()
- Returns:
- a collection of the events that this component might fire.
-
getExampleDefaultProps
@Nullable com.inductiveautomation.ignition.common.gson.JsonObject getExampleDefaultProps()
-
getExampleChildPositionDefaults
java.util.Optional<com.inductiveautomation.ignition.common.gson.JsonObject> getExampleChildPositionDefaults()
-
getIcon
@Nullable 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.- Returns:
- icon used for the nav tree and component palette
-
-