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, removeChangeListener
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addChangeListener, removeChangeListener
public static final Property<java.awt.Dimension> SIZE
public PipelineBlockModel(DesignerContext context, long resourceId) throws SerializationException
SerializationException
public PipelineBlockModel(DesignerContext context, ProjectResource resource) throws SerializationException
SerializationException
public PipelineDescriptor getPipeline()
public long getResourceId()
BlockDiagramModel
getResourceId
in interface BlockDiagramModel
public java.lang.String getDiagramName()
BlockDiagramModel
getDiagramName
in interface BlockDiagramModel
public java.awt.Dimension getDiagramSize()
BlockDiagramModel
getDiagramSize
in interface BlockDiagramModel
public void setDiagramSize(java.awt.Dimension dim)
setDiagramSize
in interface BlockDiagramModel
public Block getBlock(java.util.UUID id)
BlockDiagramModel
getBlock
in interface BlockDiagramModel
public java.util.UUID getConnectedSetRoot()
BlockDiagramModel
getConnectedSetRoot
in interface BlockDiagramModel
public boolean isConnectionValid(AnchorPoint addingStartAnchor, AnchorPoint addingEndAnchor)
BlockDiagramModel
isConnectionValid
in interface BlockDiagramModel
public void addBlock(Block block)
BlockDiagramModel
addBlock
in interface BlockDiagramModel
public void deleteBlock(Block block)
BlockDiagramModel
deleteBlock
in interface BlockDiagramModel
public java.lang.Iterable<? extends Block> getBlocks()
BlockDiagramModel
getBlocks
in interface BlockDiagramModel
public PipelineBlockPrototype findPrototype(java.lang.String factoryId)
public void addConnection(AnchorPoint origin, AnchorPoint terminus)
BlockDiagramModel
addConnection
in interface BlockDiagramModel
public void addConnection(AnchorPoint origin, java.util.UUID destinationBlockId)
public void deleteConnection(AnchorPoint origin, AnchorPoint terminus)
BlockDiagramModel
deleteConnection
in interface BlockDiagramModel
public java.util.Collection<Connection> getConnections()
getConnections
in interface BlockDiagramModel