public class SelectionChangeEvent extends EventObject
Spot
selection and DefaultWeightedEdge
selection are dealt with separately,
to keep the use of this class general.Modifier and Type | Field and Description |
---|---|
protected Map<Spot,Boolean> |
spots
Changes in
Spot selection this event represents. |
source
Constructor and Description |
---|
SelectionChangeEvent(Object source,
Map<Spot,Boolean> spots,
Map<org.jgrapht.graph.DefaultWeightedEdge,Boolean> edges)
Represents a change in the selection of a displayed TM model.
|
Modifier and Type | Method and Description |
---|---|
Map<org.jgrapht.graph.DefaultWeightedEdge,Boolean> |
getEdges()
Returns the edges that have been added or removed from the selection.
|
Map<Spot,Boolean> |
getSpots()
Returns the spots that have been added or removed from the selection.
|
getSource, toString
public SelectionChangeEvent(Object source, Map<Spot,Boolean> spots, Map<org.jgrapht.graph.DefaultWeightedEdge,Boolean> edges)
Two maps are given. The first one represent changes in the spot
selection. The Boolean
mapped to a Spot
key specifies if
the spot was added to the selection (true
) or removed from
it (false
). The same goes for the
DefaultWeightedEdge
map. null
s are accepted for the
two maps, to specify that no changes happened for the corresponding type.
source
- the source object that fires this event.spots
- the spots that are added or removed from the selection by this
event.edges
- the edges that are added or removed from the selection by this
event.public Map<Spot,Boolean> getSpots()
Boolean
mapped to a Spot
key specifies if the spot was added to the selection (true
)
or removed from it (false
).null
if no changes on spot selection happened.public Map<org.jgrapht.graph.DefaultWeightedEdge,Boolean> getEdges()
Boolean
mapped to a DefaultWeightedEdge
key specifies
if the edge was added to the selection (true
)
or removed from it (false
).null
if no changes on edge selection happened.Copyright © 2015–2021 Fiji. All rights reserved.