Interface MTCompleteVertex

All Superinterfaces:
Comparable<MTNamedObject>, MTHistoryEnabled, MTNamedObject, MTVertex, MTVertexHeader

public interface MTCompleteVertex extends MTVertex
Part of a MTCompleteModel, which can be obtained by calling loadCompleteModel() on a MTModelHeader. Note that the interface extends MTVertex and that using the "find" methods in this interface will still access the database.
  • Method Details

    • getCachedImage

      BufferedImage getCachedImage()
    • getCachedImage

      BufferedImage getCachedImage(boolean block)
    • getModel

      MTCompleteModel getModel()
    • getSymbol

      MTCompleteSymbol getSymbol()
      Description copied from interface: MTVertex
      Returns the symbol that this vertex represents.
      Specified by:
      getSymbol in interface MTVertex
      Returns:
      Symbol that vertex represents.
    • getLayer

      MTCompleteLayer getLayer()
      Description copied from interface: MTVertex
      Returns the layer that this vertex is in.
      Specified by:
      getLayer in interface MTVertex
      Returns:
      the layer this vertex is in
    • getInEdges

      Collection<MTCompleteEdge> getInEdges()
    • getOutEdges

      Collection<MTCompleteEdge> getOutEdges()
    • copy

      Copies this vertex and returns the result. The copy will have it's model reference set to the model parameter and it's symbol reference set to the symbol parameter. If any layer has a rule concerning this vertex's symbol type, the vertex will be placed in that layer of the supplied model.

      The resulting copy will be added to the model parameter.

      NOTE: This method will not persist the vertex to storage. The returned value must be saved in a separate call. Implementations that create other persistable entities must however make sure that these are persisted asynchronously or persisted by the next call to #save(). Callers must thus always persist the returned value by calling save on the returned value, but should never have to figure out what other possible things that might need a #save(). NOTE: The copy will be a new, unique, copy of this vertex. It will not have the same identity in storage (new id, new uuid). This means that the returned value will NOT be equal to this. It is thus NOT a clone.
      Parameters:
      model - The model that the copy should be a part of. May be the same model as this vertex's model.
      symbol - The symbol
      Returns:
      The new unique copy of this vertex
      Throws:
      IllegalArgumentException - if the symbol's SymbolType is not equals to this vertex's symbol's symbol type. This can be check by calling symbol.getType().equals(vertexToCopy.getSymbol().getType());
      NullPointerException - if any of the arguments are null
    • copy

      Copies this vertex and returns the result. The copy will have it's model reference set to the model parameter. If any layer has a rule concerning this vertex's symbol type, the vertex will be placed in that layer of the supplied model.

      The resulting copy will be added to the model parameter.

      NOTE: This method will not persist the vertex to storage. The returned value must be saved in a separate call. Implementations that create other persistable entities must however make sure that these are persisted asynchronously or persisted by the next call to #save(). Callers must thus always persist the returned value by calling save on the returned value, but should never have to figure out what other possible things that might need a #save(). NOTE: The copy will be a new, unique, copy of this vertex. It will not have the same identity in storage (new id, new uuid). This means that the returned value will NOT be equal to this. It is thus NOT a clone.
      Parameters:
      model - The model that the copy should be a part of. May be the same model as this vertex's model.
      Returns:
      a new unique copy of this vertex.
    • copy

      MTCompleteVertex copy(MTCompleteModel model, boolean keepIdentity)
      Copies the vertex to another model in the same way as copy(model), but keeping the identity (UUID) and history of the vertex. This should generally only be used for revision management where the same vertex exists in different revisions of the model. In all other cases different vertices should have different UUID:s even when referring to the same symbol.
    • copyAttributes

      void copyAttributes(MTVertex vertex)
    • queueRemove

      void queueRemove(MTRemoteChangeHandler exceptionHandler)
      Puts this vertex up for removal at some future point in time, making this call safe to do from the event dispatch thread.
      Parameters:
      exceptionHandler - an exception handler that is called if an exception is raised during remove, or null to let the saving thread's own exception handler deal with an uncaught (wrapping) runtime exception.
      Since:
      3.2
      See Also:
    • remove

      void remove() throws MTRemoteChangeException
      Removes this vertex. This will not remove the symbol that the vertex is showing, nor will it remove any edges connected to the vertex.
      Throws:
      MTAccessException
      MTRemoteChangeException
      Since:
      3.0
    • getDrawable

      Drawable getDrawable()
      Returns a drawable for rendering the vertex.
      Returns:
      A drawable for the vertex.