48 |
protected EventListenerList listenerList = new EventListenerList(); |
protected EventListenerList listenerList = new EventListenerList(); |
49 |
|
|
50 |
/** Holds the current selection (e.g. {@link Feature Features}). */ |
/** Holds the current selection (e.g. {@link Feature Features}). */ |
51 |
protected final Set<E> selectionObjects; |
protected final HashSet<E> selectionObjects; |
52 |
|
|
53 |
/** Holds the styled map whose selection is managed by this class. */ |
/** Holds the styled map whose selection is managed by this class. */ |
54 |
protected final StyledMapInterface<?> styledMap; |
protected final StyledMapInterface<?> styledMap; |
142 |
* @return {@code true} if selection has changed by calling this method |
* @return {@code true} if selection has changed by calling this method |
143 |
*/ |
*/ |
144 |
public boolean addSelection(E selectedObject) { |
public boolean addSelection(E selectedObject) { |
145 |
|
|
146 |
if ( selectionObjects.add(selectedObject) ) { |
if ( selectionObjects.add(selectedObject) ) { |
147 |
refreshSelection(); |
refreshSelection(); |
148 |
return true; |
return true; |