public class PipelineBlockModel extends AbstractChangeable implements BlockDiagramModel
| Modifier and Type | Field and Description |
|---|---|
static Property<java.awt.Dimension> |
SIZE |
changeEvent, listenerList| Constructor and Description |
|---|
PipelineBlockModel(DesignerContext context,
long resourceId) |
PipelineBlockModel(DesignerContext context,
ProjectResource resource) |
| Modifier and Type | Method and 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 exists
|
java.lang.Iterable<? extends Block> |
getBlocks()
Provide an iterable collection for all the blocks in this model
|
java.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 set
|
java.util.Collection<Connection> |
getConnections() |
java.lang.String |
getDiagramName()
The name of the diagram will be used as the tab name
|
java.awt.Dimension |
getDiagramSize()
The size of the block and connector diagram canvas
|
PipelineDescriptor |
getPipeline() |
long |
getResourceId()
The resource id of the project resource this block model is contained in
|
boolean |
isConnectionValid(AnchorPoint addingStartAnchor,
AnchorPoint addingEndAnchor)
Check whether a connection between the given anchor points is semantically valid or not
|
void |
setDiagramSize(java.awt.Dimension dim) |
addChangeListener, fireStateChanged, getChangeListeners, removeChangeListenerclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddChangeListener, removeChangeListenerpublic static final Property<java.awt.Dimension> SIZE
public PipelineBlockModel(DesignerContext context, long resourceId) throws SerializationException
SerializationExceptionpublic PipelineBlockModel(DesignerContext context, ProjectResource resource) throws SerializationException
SerializationExceptionpublic PipelineDescriptor getPipeline()
public long getResourceId()
BlockDiagramModelgetResourceId in interface BlockDiagramModelpublic java.lang.String getDiagramName()
BlockDiagramModelgetDiagramName in interface BlockDiagramModelpublic java.awt.Dimension getDiagramSize()
BlockDiagramModelgetDiagramSize in interface BlockDiagramModelpublic void setDiagramSize(java.awt.Dimension dim)
setDiagramSize in interface BlockDiagramModelpublic Block getBlock(java.util.UUID id)
BlockDiagramModelgetBlock in interface BlockDiagramModelpublic java.util.UUID getConnectedSetRoot()
BlockDiagramModelgetConnectedSetRoot in interface BlockDiagramModelpublic boolean isConnectionValid(AnchorPoint addingStartAnchor, AnchorPoint addingEndAnchor)
BlockDiagramModelisConnectionValid in interface BlockDiagramModelpublic void addBlock(Block block)
BlockDiagramModeladdBlock in interface BlockDiagramModelpublic void deleteBlock(Block block)
BlockDiagramModeldeleteBlock in interface BlockDiagramModelpublic java.lang.Iterable<? extends Block> getBlocks()
BlockDiagramModelgetBlocks in interface BlockDiagramModelpublic PipelineBlockPrototype findPrototype(java.lang.String factoryId)
public void addConnection(AnchorPoint origin, AnchorPoint terminus)
BlockDiagramModeladdConnection in interface BlockDiagramModelpublic void addConnection(AnchorPoint origin, java.util.UUID destinationBlockId)
public void deleteConnection(AnchorPoint origin, AnchorPoint terminus)
BlockDiagramModeldeleteConnection in interface BlockDiagramModelpublic java.util.Collection<Connection> getConnections()
getConnections in interface BlockDiagramModel