Package com._1c.g5.v8.dt.ui
Class MultiSelection
- java.lang.Object
-
- com._1c.g5.v8.dt.ui.MultiSelection
-
- All Implemented Interfaces:
IMultiSelection
,Iterable
,ISelection
,IStructuredSelection
public class MultiSelection extends Object implements IMultiSelection
- See Also:
IMultiSelection
-
-
Constructor Summary
Constructors Constructor Description MultiSelection(IStructuredSelection defaultSelection, String defaultSelectionLabel)
Instantiates a new multi selection.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IMultiSelection
addSelection(ISelection selection, String selectionLabel)
Adds named selection to this multiple selection.boolean
equals(Object obj)
Object
getFirstElement()
String
getSelectionLabel(ISelection selection)
Obtains label for a givenISelection
.ISelection[]
getSelections()
int
hashCode()
boolean
isEmpty()
Iterator<?>
iterator()
int
size()
Object[]
toArray()
List<?>
toList()
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Constructor Detail
-
MultiSelection
public MultiSelection(IStructuredSelection defaultSelection, String defaultSelectionLabel)
Instantiates a new multi selection.- Parameters:
defaultSelection
- the default selection the will provide the defaultIStructuredSelection
.defaultSelectionLabel
- the default selection label.
-
-
Method Detail
-
addSelection
public IMultiSelection addSelection(ISelection selection, String selectionLabel)
Description copied from interface:IMultiSelection
Adds named selection to this multiple selection.- Specified by:
addSelection
in interfaceIMultiSelection
- Parameters:
selection
- the selection to add.selectionLabel
- the selection label.- Returns:
-
getSelections
public ISelection[] getSelections()
- Specified by:
getSelections
in interfaceIMultiSelection
- Returns:
ISelection
's available.
-
getSelectionLabel
public String getSelectionLabel(ISelection selection)
Description copied from interface:IMultiSelection
Obtains label for a givenISelection
.- Specified by:
getSelectionLabel
in interfaceIMultiSelection
- Parameters:
selection
- the selection to get label of.- Returns:
- selection label or
null
if no label available.
-
getFirstElement
public Object getFirstElement()
- Specified by:
getFirstElement
in interfaceIStructuredSelection
-
iterator
public Iterator<?> iterator()
- Specified by:
iterator
in interfaceIStructuredSelection
- Specified by:
iterator
in interfaceIterable
-
size
public int size()
- Specified by:
size
in interfaceIStructuredSelection
-
toArray
public Object[] toArray()
- Specified by:
toArray
in interfaceIStructuredSelection
-
toList
public List<?> toList()
- Specified by:
toList
in interfaceIStructuredSelection
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interfaceISelection
-
-