Class PipelineBlockModel
- java.lang.Object
-
- com.inductiveautomation.ignition.common.util.AbstractChangeable
-
- com.inductiveautomation.ignition.alarming.designer.workspace.PipelineBlockModel
-
- All Implemented Interfaces:
Changeable
,BlockDiagramModel
public class PipelineBlockModel extends AbstractChangeable implements BlockDiagramModel
-
-
Field Summary
Fields Modifier and Type Field Description static Property<java.awt.Dimension>
SIZE
-
Fields inherited from class com.inductiveautomation.ignition.common.util.AbstractChangeable
changeEvent, listenerList
-
-
Constructor Summary
Constructors Constructor Description PipelineBlockModel(DesignerContext context, ProjectResource resource)
PipelineBlockModel(DesignerContext context, ResourcePath resourcePath)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addBlock(Block block)
Add a new block to this model.void
addConnection(AnchorPoint origin, AnchorPoint terminus)
Add a connection between two blocks.void
addConnection(AnchorPoint origin, java.util.UUID destinationBlockId)
void
deleteBlock(Block block)
Delete the given block from the model.void
deleteConnection(AnchorPoint origin, AnchorPoint terminus)
Remove a connection.PipelineBlockPrototype
findPrototype(java.lang.String factoryId)
Block
getBlock(java.util.UUID id)
Find the block with the given id, or null if no such block existsjava.lang.Iterable<? extends Block>
getBlocks()
Provide an iterable collection for all the blocks in this modeljava.util.UUID
getConnectedSetRoot()
If this diagram logically supports the idea of a "connected set" of vertices, this is the ID of the block that is the root of the connected setjava.util.Collection<Connection>
getConnections()
java.lang.String
getDiagramName()
The name of the diagram will be used as the tab namejava.awt.Dimension
getDiagramSize()
The size of the block and connector diagram canvasPipelineDescriptor
getPipeline()
ResourcePath
getResourcePath()
The resource path of the project resource this block model is contained inboolean
isConnectionValid(AnchorPoint addingStartAnchor, AnchorPoint addingEndAnchor)
Check whether a connection between the given anchor points is semantically valid or notvoid
setDiagramSize(java.awt.Dimension dim)
-
Methods inherited from class com.inductiveautomation.ignition.common.util.AbstractChangeable
addChangeListener, fireStateChanged, getChangeListeners, removeChangeListener
-
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.designer.blockandconnector.model.BlockDiagramModel
addChangeListener, removeChangeListener
-
-
-
-
Field Detail
-
SIZE
public static final Property<java.awt.Dimension> SIZE
-
-
Constructor Detail
-
PipelineBlockModel
public PipelineBlockModel(DesignerContext context, ResourcePath resourcePath) throws SerializationException
- Throws:
SerializationException
-
PipelineBlockModel
public PipelineBlockModel(DesignerContext context, ProjectResource resource) throws SerializationException
- Throws:
SerializationException
-
-
Method Detail
-
getPipeline
public PipelineDescriptor getPipeline()
-
getResourcePath
public ResourcePath getResourcePath()
Description copied from interface:BlockDiagramModel
The resource path of the project resource this block model is contained in- Specified by:
getResourcePath
in interfaceBlockDiagramModel
-
getDiagramName
public java.lang.String getDiagramName()
Description copied from interface:BlockDiagramModel
The name of the diagram will be used as the tab name- Specified by:
getDiagramName
in interfaceBlockDiagramModel
-
getDiagramSize
public java.awt.Dimension getDiagramSize()
Description copied from interface:BlockDiagramModel
The size of the block and connector diagram canvas- Specified by:
getDiagramSize
in interfaceBlockDiagramModel
-
setDiagramSize
public void setDiagramSize(java.awt.Dimension dim)
- Specified by:
setDiagramSize
in interfaceBlockDiagramModel
-
getBlock
public Block getBlock(java.util.UUID id)
Description copied from interface:BlockDiagramModel
Find the block with the given id, or null if no such block exists- Specified by:
getBlock
in interfaceBlockDiagramModel
-
getConnectedSetRoot
public java.util.UUID getConnectedSetRoot()
Description copied from interface:BlockDiagramModel
If this diagram logically supports the idea of a "connected set" of vertices, this is the ID of the block that is the root of the connected set- Specified by:
getConnectedSetRoot
in interfaceBlockDiagramModel
-
isConnectionValid
public boolean isConnectionValid(AnchorPoint addingStartAnchor, AnchorPoint addingEndAnchor)
Description copied from interface:BlockDiagramModel
Check whether a connection between the given anchor points is semantically valid or not- Specified by:
isConnectionValid
in interfaceBlockDiagramModel
-
addBlock
public void addBlock(Block block)
Description copied from interface:BlockDiagramModel
Add a new block to this model. You must fire a change after this- Specified by:
addBlock
in interfaceBlockDiagramModel
-
deleteBlock
public void deleteBlock(Block block)
Description copied from interface:BlockDiagramModel
Delete the given block from the model. You must fire a change after this- Specified by:
deleteBlock
in interfaceBlockDiagramModel
-
getBlocks
public java.lang.Iterable<? extends Block> getBlocks()
Description copied from interface:BlockDiagramModel
Provide an iterable collection for all the blocks in this model- Specified by:
getBlocks
in interfaceBlockDiagramModel
-
findPrototype
public PipelineBlockPrototype findPrototype(java.lang.String factoryId)
-
addConnection
public void addConnection(AnchorPoint origin, AnchorPoint terminus)
Description copied from interface:BlockDiagramModel
Add a connection between two blocks. You must fire a change after this- Specified by:
addConnection
in interfaceBlockDiagramModel
-
addConnection
public void addConnection(AnchorPoint origin, java.util.UUID destinationBlockId)
-
deleteConnection
public void deleteConnection(AnchorPoint origin, AnchorPoint terminus)
Description copied from interface:BlockDiagramModel
Remove a connection. You must fire a change after this.- Specified by:
deleteConnection
in interfaceBlockDiagramModel
-
getConnections
public java.util.Collection<Connection> getConnections()
- Specified by:
getConnections
in interfaceBlockDiagramModel
-
-