Class SelectedVarManagerImpl
- java.lang.Object
-
- cern.accsoft.steering.jmad.gui.panels.var.SelectedVarManagerImpl
-
- All Implemented Interfaces:
MadxVarSelector,SelectedVarManager
public class SelectedVarManagerImpl extends java.lang.Object implements SelectedVarManager
the simplest implementation of a class collecting variables.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface cern.accsoft.steering.jmad.gui.panels.var.SelectedVarManager
SelectedVarManager.VarSelectionMode
-
-
Constructor Summary
Constructors Constructor Description SelectedVarManagerImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(cern.accsoft.steering.jmad.domain.var.TwissVariable twissVariable)adds a new variablevoidclear()clears the variablescern.accsoft.steering.jmad.domain.var.TwissVariablegetSelectedVariable()This is a convenient method to get the selected variable when in single-variable selection mode.java.util.Collection<cern.accsoft.steering.jmad.domain.var.TwissVariable>getSelectedVariables()This method has to return all the selected variablesSelectedVarManager.VarSelectionModegetVarSelectionMode()voidremove(cern.accsoft.steering.jmad.domain.var.TwissVariable twissVariable)remove the given variablevoidsetVarSelectionMode(SelectedVarManager.VarSelectionMode varSelectionMode)defines, if one or more variables may be selected.
-
-
-
Method Detail
-
add
public void add(cern.accsoft.steering.jmad.domain.var.TwissVariable twissVariable)
Description copied from interface:SelectedVarManageradds a new variable- Specified by:
addin interfaceSelectedVarManager- Parameters:
twissVariable- the variable to add
-
clear
public void clear()
Description copied from interface:SelectedVarManagerclears the variables- Specified by:
clearin interfaceSelectedVarManager
-
getSelectedVariables
public java.util.Collection<cern.accsoft.steering.jmad.domain.var.TwissVariable> getSelectedVariables()
Description copied from interface:MadxVarSelectorThis method has to return all the selected variables- Specified by:
getSelectedVariablesin interfaceMadxVarSelector- Returns:
- all the selected variables.
-
remove
public void remove(cern.accsoft.steering.jmad.domain.var.TwissVariable twissVariable)
Description copied from interface:SelectedVarManagerremove the given variable- Specified by:
removein interfaceSelectedVarManager- Parameters:
twissVariable- the variable to remove
-
setVarSelectionMode
public void setVarSelectionMode(SelectedVarManager.VarSelectionMode varSelectionMode)
Description copied from interface:SelectedVarManagerdefines, if one or more variables may be selected.- Specified by:
setVarSelectionModein interfaceSelectedVarManager
-
getSelectedVariable
public cern.accsoft.steering.jmad.domain.var.TwissVariable getSelectedVariable()
Description copied from interface:MadxVarSelectorThis is a convenient method to get the selected variable when in single-variable selection mode.- Specified by:
getSelectedVariablein interfaceMadxVarSelector- Returns:
- returns the selected variable.
-
getVarSelectionMode
public SelectedVarManager.VarSelectionMode getVarSelectionMode()
- Specified by:
getVarSelectionModein interfaceSelectedVarManager- Returns:
- the actual selection mode
-
-