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.Element
getSelectedElement()
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.void
setSelectedElements(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:ElementSelectionManager
Returns the element which was last selected.- Specified by:
getSelectedElement
in interfaceElementSelectionManager
- Returns:
- the most recently selected element
-
getSelectedElements
public java.util.List<cern.accsoft.steering.jmad.domain.elem.Element> getSelectedElements()
Description copied from interface:ElementSelectionManager
returns 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:
getSelectedElements
in 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:ElementSelectionManager
Sets the given elements as the actually selected ones- Specified by:
setSelectedElements
in interfaceElementSelectionManager
- Parameters:
selectedElements
- all the selected elements (migth be an empty list)selectedElement
- the element which was most recently selected. might benull
-
-