Class ElementSelectionManagerImpl
- java.lang.Object
-
- cern.accsoft.steering.jmad.gui.manage.AbstractObservableManager<ElementSelectionManagerListener>
-
- cern.accsoft.steering.jmad.gui.manage.impl.ElementSelectionManagerImpl
-
- All Implemented Interfaces:
ElementSelectionManager,GenericObservableManager<ElementSelectionManagerListener>
public class ElementSelectionManagerImpl extends AbstractObservableManager<ElementSelectionManagerListener> implements ElementSelectionManager
default implementation of theElementSelectionManager. It keepos track of all the elements that are currently selected.
-
-
Constructor Summary
Constructors Constructor Description ElementSelectionManagerImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description cern.accsoft.steering.jmad.domain.elem.ElementgetSelectedElement()Returns the element which was last selected.java.util.List<cern.accsoft.steering.jmad.domain.elem.Element>getSelectedElements()returns all the selected elements in the order as they appear in the sequence.voidsetSelectedElements(java.util.List<cern.accsoft.steering.jmad.domain.elem.Element> selectedElements, cern.accsoft.steering.jmad.domain.elem.Element selectedElement)Sets the given elements as the actually selected ones-
Methods inherited from class cern.accsoft.steering.jmad.gui.manage.AbstractObservableManager
addListener, getListeners, removeListener
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface cern.accsoft.steering.jmad.gui.manage.GenericObservableManager
addListener, removeListener
-
-
-
-
Method Detail
-
getSelectedElement
public cern.accsoft.steering.jmad.domain.elem.Element getSelectedElement()
Description copied from interface:ElementSelectionManagerReturns the element which was last selected.- Specified by:
getSelectedElementin interfaceElementSelectionManager- Returns:
- the most recently selected element
-
getSelectedElements
public java.util.List<cern.accsoft.steering.jmad.domain.elem.Element> getSelectedElements()
Description copied from interface:ElementSelectionManagerreturns all the selected elements in the order as they appear in the sequence. The order is independent of the time when selecting the individual elements.- Specified by:
getSelectedElementsin interfaceElementSelectionManager- Returns:
- all the actually selected elements
-
setSelectedElements
public void setSelectedElements(java.util.List<cern.accsoft.steering.jmad.domain.elem.Element> selectedElements, cern.accsoft.steering.jmad.domain.elem.Element selectedElement)Description copied from interface:ElementSelectionManagerSets the given elements as the actually selected ones- Specified by:
setSelectedElementsin interfaceElementSelectionManager- Parameters:
selectedElements- all the selected elements (migth be an empty list)selectedElement- the element which was most recently selected. might benull
-
-