Class AbstractSelection
java.lang.Object
org.openscience.cdk.renderer.selection.AbstractSelection
- All Implemented Interfaces:
IChemObjectSelection
An abstract selection of
IChemObjects.- Author:
- Arvid
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic IChemObjectSelectionStatic implementation of an empty selection. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddToAtomContainer(IAtomContainer ac, IChemObject item) Utility method to add anIChemObjectto anIAtomContainer.voidselect(IChemModel chemModel) Perform a selection by some method.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface IChemObjectSelection
contains, elements, getConnectedAtomContainer, isFilledModifier 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".
-
Field Details
-
EMPTY_SELECTION
Static implementation of an empty selection.
-
-
Constructor Details
-
AbstractSelection
public AbstractSelection()
-
-
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);- Specified by:
selectin interfaceIChemObjectSelection- Parameters:
chemModel- an IChemModel to select from.
-
addToAtomContainer
Utility method to add anIChemObjectto anIAtomContainer.- Parameters:
ac- theIAtomContainerto add toitem- theIChemObjectto add
-