Class AbstractBlockPrototype
- java.lang.Object
-
- com.inductiveautomation.ignition.alarming.designer.api.AbstractBlockPrototype
-
- All Implemented Interfaces:
PipelineBlockPrototype
- Direct Known Subclasses:
DelayBlockPrototype
,ExpressionBlockPrototype
,JumpBlockPrototype
,LegacyNotificationPrototype
,NotificationBlockPrototype
,PropertySetterBlockPrototype
,ScriptableBlockPrototype
,SplitterBlockPrototype
,SwitchBlockPrototype
public abstract class AbstractBlockPrototype extends java.lang.Object implements PipelineBlockPrototype
Base class for most block prototype implementations.
-
-
Field Summary
Fields Modifier and Type Field Description protected LocalizedString
blockTitle
static OutputDescriptor
COMMON_OUTPUT_DESCRIPTOR
An output descriptor to use for most blocks with a single output.protected java.lang.String
factoryId
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractBlockPrototype(java.lang.String factoryId, java.lang.String titleKey)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ObservablePropertySet
createNewBlock()
Creates a new BasicPropertySet, setting theCommonBlockProperties.FACTORY_ID
on it.java.util.Collection<Property<?>>
getBlockMutatingProperties()
Which properties (if any) are able to alter the structure of the block (number/names of outputs)java.lang.String
getFactoryId()
Return the factory id of blocks created with this prototype.javax.swing.Icon
getIcon()
java.util.List<OutputDescriptor>
getOutputs(ObservablePropertySet block)
javax.swing.Icon
getRolloverIcon()
java.util.Collection<Property<?>>
getSearchableProperties(PropertySet block)
Which properties (if any) are eligible for the search and replace system.javax.swing.Icon
getSmallIcon()
LocalizedString
getTitle()
void
initPreviewPanel(ObservablePropertySet block, javax.swing.JPanel panel)
Used to initialize a small preview of the block's properties, which is displayed beneath the block.boolean
isPreviewPanelSupported()
Return true here if you want to add extra information to the block display on a preview panel beneath the input/output pins.boolean
isSystemOnly()
Returns whether only the system can programmatically create these types of blocks.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.inductiveautomation.ignition.alarming.designer.api.PipelineBlockPrototype
createEditingUI
-
-
-
-
Field Detail
-
COMMON_OUTPUT_DESCRIPTOR
public static final OutputDescriptor COMMON_OUTPUT_DESCRIPTOR
An output descriptor to use for most blocks with a single output. UsesCommonBlockProperties.OUTPUT_ID
for the output property.
-
blockTitle
protected LocalizedString blockTitle
-
factoryId
protected java.lang.String factoryId
-
-
Method Detail
-
createNewBlock
public ObservablePropertySet createNewBlock()
Creates a new BasicPropertySet, setting theCommonBlockProperties.FACTORY_ID
on it.- Specified by:
createNewBlock
in interfacePipelineBlockPrototype
-
getTitle
public LocalizedString getTitle()
- Specified by:
getTitle
in interfacePipelineBlockPrototype
- Returns:
- the title for the block
-
getIcon
public javax.swing.Icon getIcon()
- Specified by:
getIcon
in interfacePipelineBlockPrototype
- Returns:
- A 32x32 icon for the palette
-
getRolloverIcon
public javax.swing.Icon getRolloverIcon()
- Specified by:
getRolloverIcon
in interfacePipelineBlockPrototype
- Returns:
- Rollover version of the palette icon.
-
getSmallIcon
public javax.swing.Icon getSmallIcon()
- Specified by:
getSmallIcon
in interfacePipelineBlockPrototype
- Returns:
- Small 16x16 icon for the title of the block
-
getFactoryId
public java.lang.String getFactoryId()
Description copied from interface:PipelineBlockPrototype
Return the factory id of blocks created with this prototype.- Specified by:
getFactoryId
in interfacePipelineBlockPrototype
-
getOutputs
public java.util.List<OutputDescriptor> getOutputs(ObservablePropertySet block)
- Specified by:
getOutputs
in interfacePipelineBlockPrototype
-
getBlockMutatingProperties
public java.util.Collection<Property<?>> getBlockMutatingProperties()
Description copied from interface:PipelineBlockPrototype
Which properties (if any) are able to alter the structure of the block (number/names of outputs)- Specified by:
getBlockMutatingProperties
in interfacePipelineBlockPrototype
-
getSearchableProperties
public java.util.Collection<Property<?>> getSearchableProperties(PropertySet block)
Description copied from interface:PipelineBlockPrototype
Which properties (if any) are eligible for the search and replace system.- Specified by:
getSearchableProperties
in interfacePipelineBlockPrototype
- Parameters:
block
- The block in question
-
isPreviewPanelSupported
public boolean isPreviewPanelSupported()
Description copied from interface:PipelineBlockPrototype
Return true here if you want to add extra information to the block display on a preview panel beneath the input/output pins.- Specified by:
isPreviewPanelSupported
in interfacePipelineBlockPrototype
-
initPreviewPanel
public void initPreviewPanel(ObservablePropertySet block, javax.swing.JPanel panel)
Description copied from interface:PipelineBlockPrototype
Used to initialize a small preview of the block's properties, which is displayed beneath the block.- Specified by:
initPreviewPanel
in interfacePipelineBlockPrototype
-
isSystemOnly
public boolean isSystemOnly()
Description copied from interface:PipelineBlockPrototype
Returns whether only the system can programmatically create these types of blocks. If false, the user will be able to create them from the palette.- Specified by:
isSystemOnly
in interfacePipelineBlockPrototype
-
-