public abstract class AbstractBlockPrototype extends java.lang.Object implements PipelineBlockPrototype
Modifier and Type | Field and 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 |
Modifier | Constructor and Description |
---|---|
protected |
AbstractBlockPrototype(java.lang.String factoryId,
java.lang.String titleKey) |
Modifier and Type | Method and Description |
---|---|
ObservablePropertySet |
createNewBlock()
Creates a new BasicPropertySet, setting the
CommonBlockProperties.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.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
createEditingUI
public static final OutputDescriptor COMMON_OUTPUT_DESCRIPTOR
CommonBlockProperties.OUTPUT_ID
for the output property.protected LocalizedString blockTitle
protected java.lang.String factoryId
protected AbstractBlockPrototype(java.lang.String factoryId, java.lang.String titleKey)
factoryId
- The ID of the factory in the gateway who is in charge of creating working instances of this block
type.titleKey
- The title for this blockpublic ObservablePropertySet createNewBlock()
CommonBlockProperties.FACTORY_ID
on it.createNewBlock
in interface PipelineBlockPrototype
public LocalizedString getTitle()
getTitle
in interface PipelineBlockPrototype
public javax.swing.Icon getIcon()
getIcon
in interface PipelineBlockPrototype
public javax.swing.Icon getRolloverIcon()
getRolloverIcon
in interface PipelineBlockPrototype
public javax.swing.Icon getSmallIcon()
getSmallIcon
in interface PipelineBlockPrototype
public java.lang.String getFactoryId()
PipelineBlockPrototype
getFactoryId
in interface PipelineBlockPrototype
public java.util.List<OutputDescriptor> getOutputs(ObservablePropertySet block)
getOutputs
in interface PipelineBlockPrototype
public java.util.Collection<Property<?>> getBlockMutatingProperties()
PipelineBlockPrototype
getBlockMutatingProperties
in interface PipelineBlockPrototype
public java.util.Collection<Property<?>> getSearchableProperties(PropertySet block)
PipelineBlockPrototype
getSearchableProperties
in interface PipelineBlockPrototype
block
- The block in questionpublic boolean isPreviewPanelSupported()
PipelineBlockPrototype
isPreviewPanelSupported
in interface PipelineBlockPrototype
public void initPreviewPanel(ObservablePropertySet block, javax.swing.JPanel panel)
PipelineBlockPrototype
initPreviewPanel
in interface PipelineBlockPrototype
public boolean isSystemOnly()
PipelineBlockPrototype
isSystemOnly
in interface PipelineBlockPrototype