Interface Selection
public interface Selection
Describes a selection in a model.
- Author:
- Per-Erik
-
Method Summary
Modifier and TypeMethodDescriptionReturns the selected control point on a single edge selection.getEdges()Returns the list ofMTCompleteEdges contained in the selection.Point[]Returns the selected segment of a single edge selection.Returns the lead selection.getModel()Returns theMTCompleteModelin which the selection "resides".Returns the list ofMTCompleteVertexes contained in the selection.booleanReturns true if this selection is an edge control point selection, false otherwise.booleanbooleanisEmpty()Checks if the current selection is empty.booleanReturnstrueif this is a label selection.booleanChecks if the current selection is a multiple selection.booleanChecks if the current selection is a single edge selection.booleanChecks if the current selection is a single vertex selection.booleanReturns 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.voidNotify the selection that the point that is selected has moved.voidrefreshEdgeSegment(Point[] segment) Notify the selection that the segment that is selected has moved.
-
Method Details
-
getModel
MTCompleteModel getModel()Returns theMTCompleteModelin which the selection "resides". The model itself is thus not part of the selection.- Returns:
- the
MTCompleteModelin which the selection "resides".
-
getLeadSelection
MTCompleteVertex getLeadSelection()Returns the lead selection.- Returns:
- The first selected vertex or
nullif no vertices are selected.
-
getVertices
Collection<MTCompleteVertex> getVertices()Returns the list ofMTCompleteVertexes contained in the selection. (MTCompleteVertices is correct language but not correct type!)- Returns:
- the list of
MTCompleteVertexes contained in the selection.
-
getEdges
Collection<MTCompleteEdge> getEdges()Returns the list ofMTCompleteEdges 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
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
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()Returnstrueif this is a label selection.- Returns:
truefor label selections.
-
isEmpty
boolean isEmpty()Checks if the current selection is empty.- Returns:
trueif no vertices or edges are selected
-
isSingleVertexSelection
boolean isSingleVertexSelection()Checks if the current selection is a single vertex selection.- Returns:
trueif a single vertex is selected.
-
isSingleEdgeSelection
boolean isSingleEdgeSelection()Checks if the current selection is a single edge selection.- Returns:
trueif 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:
trueif 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:
-