Class AtomBondSelection
java.lang.Object
org.openscience.cdk.renderer.selection.AtomBondSelection
- All Implemented Interfaces:
IChemObjectSelection
A simple implementation of an
IChemObjectSelection which wraps
a HashSet. This selection only allows select-
Constructor Summary
Constructors -
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".voidremove(IChemObject obj) Deselect the chemobject in this selection.voidselect(IChemModel chemModel) Perform a selection by some method.voidselect(IChemObject obj) Select the chemobject in this selection.
-
Constructor Details
-
AtomBondSelection
public AtomBondSelection()
-
-
Method Details
-
select
Select the chemobject in this selection.- Parameters:
obj- the chemobject
-
remove
Deselect the chemobject in this selection.- Parameters:
obj- the chemobject
-
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);- Specified by:
selectin interfaceIChemObjectSelection- Parameters:
chemModel- an IChemModel to select from.
-
getConnectedAtomContainer
Make an IAtomContainer where all the bonds only have atoms that are in the selection.- Specified by:
getConnectedAtomContainerin interfaceIChemObjectSelection- Returns:
- a well defined atom container.
-
isFilled
public boolean isFilled()The opposite of a method like "isEmpty".- Specified by:
isFilledin interfaceIChemObjectSelection- Returns:
- true if there is anything in the selection
-
contains
Determines if theIChemObjectis part of the current selection.- Specified by:
containsin interfaceIChemObjectSelection- 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.- Specified by:
elementsin interfaceIChemObjectSelection- Parameters:
cls- type ofIChemObjects that should be returned.- Returns:
- a
CollectionofIChemObjectof the given type
-