Interface IChemObjectSelection
- All Known Implementing Classes:
AbstractSelection,AtomBondSelection
public interface IChemObjectSelection
A selection of some atoms and bonds from an
IAtomContainer or
IChemModel.- Author:
- maclean
-
Method Summary
Modifier and TypeMethodDescriptionbooleancontains(IChemObject obj) Determines if theIChemObjectis part of the current selection.<E extends IChemObject>
Collection<E>Returns aCollectionof all selectedIChemObjects of the given type.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 Details
-
select
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
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
Returns aCollectionof all selectedIChemObjects of the given type.- Parameters:
clazz- type ofIChemObjects that should be returned.- Returns:
- a
CollectionofIChemObjectof the given type
-