Interface IChemObjectSelection
-
- All Known Implementing Classes:
AbstractSelection
public interface IChemObjectSelectionA selection of some atoms and bonds from anIAtomContainerorIChemModel.- Author:
- maclean
- Source code:
- main
- Belongs to CDK module:
- render
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleancontains(IChemObject obj)Determines if theIChemObjectis part of the current selection.<E extends IChemObject>
Collection<E>elements(Class<E> clazz)Returns aCollectionof all selectedIChemObjects of the given type.IAtomContainergetConnectedAtomContainer()Make an IAtomContainer where all the bonds only have atoms that are in the selection.booleanisFilled()The opposite of a method like "isEmpty".voidselect(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 theIChemObjectis part of the current selection.- Parameters:
obj-IChemObjectwhich might be part of the selection- Returns:
- true, if the given
objis part of the selection
-
elements
<E extends IChemObject> Collection<E> elements(Class<E> clazz)
Returns aCollectionof all selectedIChemObjects of the given type.- Parameters:
clazz- type ofIChemObjects that should be returned.- Returns:
- a
CollectionofIChemObjectof the given type
-
-