Interface Selection


public interface Selection
Describes a selection in a model.
Author:
Per-Erik
  • Method Details

    • getModel

      MTCompleteModel getModel()
      Returns the MTCompleteModel in which the selection "resides". The model itself is thus not part of the selection.
      Returns:
      the MTCompleteModel in which the selection "resides".
    • getLeadSelection

      MTCompleteVertex getLeadSelection()
      Returns the lead selection.
      Returns:
      The first selected vertex or null if no vertices are selected.
    • getVertices

      Returns the list of MTCompleteVertexes contained in the selection. (MTCompleteVertices is correct language but not correct type!)
      Returns:
      the list of MTCompleteVertexes contained in the selection.
    • getEdges

      Returns the list of MTCompleteEdges contained in the selection.
      Returns:
      the list of MTCompleteEdges contained in the selection.
    • getEdgeControlPoint

      Point getEdgeControlPoint()
      Returns the selected control point on a single edge selection.
      Returns:
    • refreshEdgeControlPoint

      void refreshEdgeControlPoint(Point p)
      Notify the selection that the point that is selected has moved. The selection is imutable and point to a specific point in time, but when a point is moved the selection changes and this must be tracked. When this method is called the selection is not changed but the change is forwarded to the selection model that keeps track of it.
      Parameters:
      p - the new point as returned by the edge router
    • getEdgeSegment

      Point[] getEdgeSegment()
      Returns the selected segment of a single edge selection.
      Returns:
    • refreshEdgeSegment

      void refreshEdgeSegment(Point[] segment)
      Notify the selection that the segment that is selected has moved. The selection is imutable and point to a specific point in time, but when a selection is moved the segment in the selection changes and this must be tracked. When this method is called the selection is not changed but the change is forwarded to the selection model that keeps track of it.
      Parameters:
      segment - the new segment as returned by the edge router
    • isLabelSelection

      boolean isLabelSelection()
      Returns true if this is a label selection.
      Returns:
      true for label selections.
    • isEmpty

      boolean isEmpty()
      Checks if the current selection is empty.
      Returns:
      true if no vertices or edges are selected
    • isSingleVertexSelection

      boolean isSingleVertexSelection()
      Checks if the current selection is a single vertex selection.
      Returns:
      true if a single vertex is selected.
    • isSingleEdgeSelection

      boolean isSingleEdgeSelection()
      Checks if the current selection is a single edge selection.
      Returns:
      true if a single edge is selected.
    • isEdgeControlPointSelection

      boolean isEdgeControlPointSelection()
      Returns true if this selection is an edge control point selection, false otherwise.
      Returns:
      true if this selection is an edge control point selection, false otherwise.
    • isEdgeSegmentSelection

      boolean isEdgeSegmentSelection()
    • isMultipleSelection

      boolean isMultipleSelection()
      Checks if the current selection is a multiple selection.
      Returns:
      true if multiple vertices and/or edges are selected.
    • isValueAdjusting

      boolean isValueAdjusting()
      Returns true if the selection is still changing (for example because the user is still dragging over more objects/has not yet released the mouse button), false otherwise.
      Returns: