Interface MTVertexHeader

All Known Subinterfaces:
MTCompleteVertex, MTVertex

public interface MTVertexHeader
Header interface for vertices. The vertex is the graphical representation of a symbol. The vertex/symbol relationship is best explained with an example. A symbol could be for example a role within the organization. This role will probably be involved in a number of models within a repository, and we wish to use the same role everywhere to make sure that changes to the roles data is reflected in all models. On the other hand, the appearance of the role might differ between the models and this is where the vertex comes in. The vertex defines the position, size, color (if overridden) and so on of the role in a specific model.
Since:
3.0
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns a MTVertex for this vertex.
    Returns the border color for the vertex.
    Returns the border stroke for the vertex.
    Returns the bounds (size and location) of the vertex.
    long
    Returns the ID of the vertex.
    Returns The vertex image url or null if no image has been set.
    Returns the bounds (size and location) of the vertex's label in the current language.
    Returns the bounds (size and location) of the vertex's label in the given language.
    Returns the label text color.
    Returns the label text font.
    Returns the currently available languages.
    long
    Returns the ID of the model that this vertex is placed in.
    float
    Returns the ratio of height to width of a vertex with locked proportions.
    long
    Returns the ID of the symbol displayed by this vertex.
    Returns the symbol type inferred from the symbol, or null if no suitable type is found.
    Returns the Universally Unique Identifier (UUID) that identifies the vertex.
    Returns the symbol variant inferred from the symbol, or null if no suitable variant is found.
    int
    Returns the z-order of the vertex.
    boolean
    Returns true if the vertex is used to display the symbol breaking down to the current model.
    boolean
    Returns true if the label is centered over the vertex.
    boolean
    Returns true if this vertex is frozen.
    boolean
    Returns true if this vertex is a holder.
    boolean
    Checks if the vertex has locked proportions.
    boolean
    Returns true if the color of the label has been manually overridden for this vertex.
    boolean
    Returns true if the vertex is the "owner" of the symbol.
    boolean
    Returns true if the vertex's label is shown.
  • Method Details

    • getType

      SymbolType getType()
      Returns the symbol type inferred from the symbol, or null if no suitable type is found.
      Returns:
      the symbol type inferred from the symbol, or null if no suitable type is found.
    • getVariant

      SymbolVariant getVariant()
      Returns the symbol variant inferred from the symbol, or null if no suitable variant is found.
      Returns:
      the symbol variant inferred from the symbol, or null if no suitable variant is found.
    • getID

      long getID()
      Returns the ID of the vertex.
      Returns:
      The ID of the vertex.
      Since:
      3.0
    • getUUID

      String getUUID()
      Returns the Universally Unique Identifier (UUID) that identifies the vertex.
      Returns:
      A string representation of the UUID.
      Since:
      3.0
    • getSymbolID

      long getSymbolID()
      Returns the ID of the symbol displayed by this vertex.
      Returns:
      The symbol ID.
      Since:
      3.0
    • getBounds

      Rectangle getBounds()
      Returns the bounds (size and location) of the vertex. This does not include the label.
      Returns:
      Vertex's bounds.
      Since:
      3.0
    • getLabelBounds

      Rectangle getLabelBounds()
      Returns the bounds (size and location) of the vertex's label in the current language.
      Returns:
      Vertex's label bounds.
      Since:
      3.0
    • getLabelBounds

      Rectangle getLabelBounds(MTLanguageHeader language)
      Returns the bounds (size and location) of the vertex's label in the given language.
      Returns:
      Vertex's label bounds.
      Since:
      3.0
    • getLanguages

      Collection<MTLanguage> getLanguages()
      Returns the currently available languages. This is a convenience method so that users of this object should not have to use a store to get the languages.
      Returns:
      the currently available languages.
    • getLabelColor

      Color getLabelColor()
      Returns the label text color.
      Returns:
      Color of text in the label.
      Since:
      3.0
    • isManualLabelColor

      boolean isManualLabelColor()
      Returns true if the color of the label has been manually overridden for this vertex. If so, the vertex label color should always be used even if a color scheme has a different color value for the vertex type.
      Returns:
      true if the color of the label has been manually overridden for this vertex.
      Since:
      3.1
    • getLabelFont

      Font getLabelFont()
      Returns the label text font.
      Returns:
      Font of text in the label.
      Since:
      3.0
    • isCenterLabel

      boolean isCenterLabel()
      Returns true if the label is centered over the vertex.
      Returns:
      true if the label is centered.
      Since:
      3.0
    • isHolder

      boolean isHolder()
      Returns true if this vertex is a holder. When a holder vertex is moved vertices on top of it will also be moved. Edges can not be connected to holder vertices.
      Returns:
      true if this vertex is a holder.
      Since:
      3.0
    • isFrozen

      boolean isFrozen()
      Returns true if this vertex is frozen. A frozen vertex can not be selected or moved.
      Returns:
      true if this vertex is frozen.
      Since:
      3.0
    • isLockedProportions

      boolean isLockedProportions()
      Checks if the vertex has locked proportions. A vertex with locked proportions will keep the same shape when it is resized.
      Returns:
      true if the vertex has locked proportions.
      Since:
      3.0
    • getSizeRatio

      float getSizeRatio()
      Returns the ratio of height to width of a vertex with locked proportions. This ratio should only be taken into account when isLockedProportions returns true.
      Returns:
      The size ratio (height/width) of a vertex with locked proportions.
    • isShowLabel

      boolean isShowLabel()
      Returns true if the vertex's label is shown.
      Returns:
      true if the label is visible.
      Since:
      3.0
    • getZOrder

      int getZOrder()
      Returns the z-order of the vertex. The z-order specifies the "depth" of the vertex; if it should be painted above or below other vertices at the same location.
      Returns:
      the z-order of the vertex
      Since:
      3.0
    • getImageURL

      URL getImageURL()
      Returns The vertex image url or null if no image has been set.
      Returns:
      The vertex image url.
    • isBreakdownSymbol

      boolean isBreakdownSymbol()
      Returns true if the vertex is used to display the symbol breaking down to the current model. The options to create new break-downs are disabled on a break-down symbol and the breakdown arrow is not displayed.
      Returns:
      true if break-down symbol
      Since:
      3.0
    • getBorderColor

      Color getBorderColor()
      Returns the border color for the vertex. This will only be used if the vertex has a border stroke.
      Returns:
      The border color for the vertex.
    • getBorderStroke

      BasicStroke getBorderStroke()
      Returns the border stroke for the vertex.
      Returns:
      The border stroke for the vertex or null if the vertex has no border.
    • isOwningSymbol

      boolean isOwningSymbol()
      Returns true if the vertex is the "owner" of the symbol. The ownership shows that this is the model where the symbol "belongs". Other places where the same symbol is used it is "borrowed". This has few implications, one being that when opening a symbol in published HTML it will be shown in the model where it is owned, if possible.
    • getModelID

      long getModelID()
      Returns the ID of the model that this vertex is placed in.
      Returns:
      The ID of the model that this vertex is placed in.
      Since:
      3.x
    • expand

      MTVertex expand() throws MTAccessException
      Returns a MTVertex for this vertex. Beware that this might require querying the storage layer for more data.
      Returns:
      A MTVertex representing this vertex.
      Throws:
      MTAccessException
      Since:
      3.0