public class MeshSelectionManager
extends java.lang.Object
Constructor and Description |
---|
MeshSelectionManager()
The default constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addMeshApplicationListener(IMeshSelectionListener listener)
Adds an IMeshApplicationListener to listen for changes to the
MeshApplication's current selection of vertices and edges.
|
void |
clearSelection()
Clears all of the currently selected vertices, edges, and polygons.
|
void |
deleteSelection()
Removes all selected polygons from the MeshComponent.
|
void |
deselectEdge(int id)
De-selects an edge with the specified ID.
|
void |
deselectEdges(java.util.List<java.lang.Integer> ids)
De-selects multiple edges with the specified list of IDs.
|
void |
deselectPolygon(int id)
De-selects a polygon with the specified ID.
|
void |
deselectPolygons(java.util.List<java.lang.Integer> ids)
De-selects multiple polygons with the specified list of IDs.
|
void |
deselectVertex(int id)
De-selects a vertex with the specified ID.
|
void |
deselectVertices(java.util.List<java.lang.Integer> ids)
De-selects multiple vertices with the specified list of IDs.
|
java.util.List<java.lang.Integer> |
getSelectedEdgeIds()
Gets the IDs of the currently-selected edges in the MeshApplication.
|
java.util.List<Edge> |
getSelectedEdges()
Gets the currently-selected edges in the MeshApplication.
|
java.util.List<java.lang.Integer> |
getSelectedPolygonIds()
Gets the IDs of the currently-selected polygons in the MeshApplication.
|
java.util.List<Polygon> |
getSelectedPolygons()
Gets the currently-selected polygons in the MeshApplication.
|
java.util.List<java.lang.Integer> |
getSelectedVertexIds()
Gets the IDs of the currently-selected vertices in the MeshApplication.
|
java.util.List<Vertex> |
getSelectedVertices()
Gets the currently-selected vertices in the MeshApplication.
|
void |
removeMeshApplicationListener(IMeshSelectionListener listener)
Removes an IMeshApplicationListener from this MeshApplication.
|
void |
selectEdge(int id)
Selects an edge with the specified ID.
|
void |
selectEdges(java.util.List<java.lang.Integer> ids)
Selects multiple edges with the specified list of IDs.
|
void |
selectPolygon(int id)
Selects a polygon with the specified ID.
|
void |
selectPolygons(java.util.List<java.lang.Integer> ids)
Selects multiple polygons with the specified list of IDs.
|
void |
selectVertex(int id)
Selects a vertex with the specified ID.
|
void |
selectVertices(java.util.List<java.lang.Integer> ids)
Selects multiple vertices with the specified list of IDs.
|
void |
setMesh(MeshComponent mesh)
Sets the MeshComponent whose selection is managed by this handler.
|
public void setMesh(MeshComponent mesh)
mesh
- The new MeshComponent.public void addMeshApplicationListener(IMeshSelectionListener listener)
listener
- The new IMeshApplicationListener.public void removeMeshApplicationListener(IMeshSelectionListener listener)
listener
- The listener to remove. Must not be null.public java.util.List<Vertex> getSelectedVertices()
public java.util.List<java.lang.Integer> getSelectedVertexIds()
public java.util.List<Edge> getSelectedEdges()
public java.util.List<java.lang.Integer> getSelectedEdgeIds()
public java.util.List<Polygon> getSelectedPolygons()
public java.util.List<java.lang.Integer> getSelectedPolygonIds()
public void clearSelection()
public void deleteSelection()
public void selectVertex(int id)
IMeshSelectionListener
s will be notified.id
- The ID of the newly-selected vertex.public void selectVertices(java.util.List<java.lang.Integer> ids)
IMeshSelectionListener
s will be notified.ids
- A collection of IDs for vertices to select.public void deselectVertex(int id)
IMeshSelectionListener
s will be notified.id
- The ID of the vertex to de-select.public void deselectVertices(java.util.List<java.lang.Integer> ids)
IMeshSelectionListener
s will be notified.ids
- A collection of IDs for vertices to de-select.public void selectEdge(int id)
IMeshSelectionListener
s will be notified.id
- The ID of the newly-selected edge.public void selectEdges(java.util.List<java.lang.Integer> ids)
IMeshSelectionListener
s will be notified.ids
- A collection of IDs for edges to select.public void deselectEdge(int id)
IMeshSelectionListener
s will be notified.id
- The ID of the edge to de-select.public void deselectEdges(java.util.List<java.lang.Integer> ids)
IMeshSelectionListener
s will be notified.ids
- A collection of IDs for edges to de-select.public void selectPolygon(int id)
IMeshSelectionListener
s will be notified.id
- The ID of the newly-selected polygon.public void selectPolygons(java.util.List<java.lang.Integer> ids)
IMeshSelectionListener
s will be notified.ids
- A collection of IDs for polygons to select.public void deselectPolygon(int id)
IMeshSelectionListener
s will be notified.id
- The ID of the polygon to de-select.public void deselectPolygons(java.util.List<java.lang.Integer> ids)
IMeshSelectionListener
s will be notified.ids
- A collection of IDs for polygons to de-select.