Interface BlockDiagramModel

  • All Known Implementing Classes:
    PipelineBlockModel

    public interface BlockDiagramModel
    A model of a block diagram. This model is what drives each tab of a block and connector workspace.
    • Method Detail

      • getResourcePath

        ResourcePath getResourcePath()
        The resource path of the project resource this block model is contained in
      • getDiagramName

        java.lang.String getDiagramName()
        The name of the diagram will be used as the tab name
      • getDiagramSize

        java.awt.Dimension getDiagramSize()
        The size of the block and connector diagram canvas
      • setDiagramSize

        void setDiagramSize​(java.awt.Dimension dim)
      • getConnectedSetRoot

        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
      • getBlock

        Block getBlock​(java.util.UUID id)
        Find the block with the given id, or null if no such block exists
      • addBlock

        void addBlock​(Block block)
        Add a new block to this model. You must fire a change after this
      • deleteBlock

        void deleteBlock​(Block block)
        Delete the given block from the model. You must fire a change after this
      • getBlocks

        java.lang.Iterable<? extends Block> getBlocks()
        Provide an iterable collection for all the blocks in this model
      • isConnectionValid

        boolean isConnectionValid​(AnchorPoint addingStartAnchor,
                                  AnchorPoint addingEndAnchor)
        Check whether a connection between the given anchor points is semantically valid or not
      • addChangeListener

        void addChangeListener​(javax.swing.event.ChangeListener listener)
      • removeChangeListener

        void removeChangeListener​(javax.swing.event.ChangeListener listener)
      • addConnection

        void addConnection​(AnchorPoint origin,
                           AnchorPoint terminus)
        Add a connection between two blocks. You must fire a change after this
      • deleteConnection

        void deleteConnection​(AnchorPoint origin,
                              AnchorPoint terminus)
        Remove a connection. You must fire a change after this.
      • getConnections

        java.util.Collection<Connection> getConnections()