Class SelectionVisibility
- java.lang.Object
-
- org.openscience.cdk.renderer.SymbolVisibility
-
- org.openscience.cdk.renderer.generators.standard.SelectionVisibility
-
public final class SelectionVisibility extends SymbolVisibility
Extended existing symbol visibility options to account for selection of atoms in the standard generator. The selection viability displays an atom symbol regardless as to whether it is normally 'shown'. By default, the symbol is shown if the atom is selected an not next to any selected bonds (disconnected). Alternatively, all select atoms can be displayed. An atom or bond is selected if theStandardGenerator.HIGHLIGHT_COLOR
is non-null.- Author:
- John May
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static SymbolVisibility
all(SymbolVisibility visibility)
Display the atom symbol if is selected, otherwise use the provided visibility.static SymbolVisibility
disconnected(SymbolVisibility visibility)
Display the atom symbol if is disconnected from any other selected atoms or bonds.boolean
visible(IAtom atom, List<IBond> neighbors, RendererModel model)
Determine if an atom with the specified bonds is visible.-
Methods inherited from class org.openscience.cdk.renderer.SymbolVisibility
all, iupacRecommendations, iupacRecommendationsWithoutTerminalCarbon
-
-
-
-
Method Detail
-
disconnected
public static SymbolVisibility disconnected(SymbolVisibility visibility)
Display the atom symbol if is disconnected from any other selected atoms or bonds. The provided visibility is used when the atom is not selected.- Parameters:
visibility
- visibility when not selected- Returns:
- visibility instance
-
all
public static SymbolVisibility all(SymbolVisibility visibility)
Display the atom symbol if is selected, otherwise use the provided visibility.- Parameters:
visibility
- visibility when not selected- Returns:
- visibility instance
-
visible
public boolean visible(IAtom atom, List<IBond> neighbors, RendererModel model)
Determine if an atom with the specified bonds is visible.- Specified by:
visible
in classSymbolVisibility
- Parameters:
atom
- an atomneighbors
- neighboring bonds- Returns:
- whether the atom symbol is visible
-
-