Interface IChemObjectSelection
-
- All Known Implementing Classes:
AbstractSelection
public interface IChemObjectSelection
A selection of some atoms and bonds from anIAtomContainer
orIChemModel
.- Author:
- maclean
- Source code:
- main
- Belongs to CDK module:
- render
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
contains(IChemObject obj)
Determines if theIChemObject
is part of the current selection.<E extends IChemObject>
Collection<E>elements(Class<E> clazz)
Returns aCollection
of all selectedIChemObject
s of the given type.IAtomContainer
getConnectedAtomContainer()
Make an IAtomContainer where all the bonds only have atoms that are in the selection.boolean
isFilled()
The opposite of a method like "isEmpty".void
select(IChemModel chemModel)
Perform a selection by some method.
-
-
-
Method Detail
-
select
void select(IChemModel chemModel)
Perform a selection by some method. This is used for selecting outside the hub, for example: IChemModel model = createModelBySomeMethod(); selection.select(model); renderModel.setSelection(selection);- Parameters:
chemModel
- an IChemModel to select from.
-
getConnectedAtomContainer
IAtomContainer getConnectedAtomContainer()
Make an IAtomContainer where all the bonds only have atoms that are in the selection.- Returns:
- a well defined atom container.
-
isFilled
boolean isFilled()
The opposite of a method like "isEmpty".- Returns:
- true if there is anything in the selection
-
contains
boolean contains(IChemObject obj)
Determines if theIChemObject
is part of the current selection.- Parameters:
obj
-IChemObject
which might be part of the selection- Returns:
- true, if the given
obj
is part of the selection
-
elements
<E extends IChemObject> Collection<E> elements(Class<E> clazz)
Returns aCollection
of all selectedIChemObject
s of the given type.- Parameters:
clazz
- type ofIChemObject
s that should be returned.- Returns:
- a
Collection
ofIChemObject
of the given type
-
-