Package com.metsci.glimpse.dnc
Class DncPainter
- java.lang.Object
-
- com.metsci.glimpse.dnc.DncPainter
-
- All Implemented Interfaces:
GlimpsePainter
- Direct Known Subclasses:
DncPainterSync
public class DncPainter extends Object implements GlimpsePainter
-
-
Field Summary
Fields Modifier and Type Field Description Function<DncChunks.DncChunkKey,Flat2Render.DncChunkPriority>chunkPriorityFunc
-
Constructor Summary
Constructors Constructor Description DncPainter(Flat2Render.RenderCache cache, DncPainterSettings settings)DncPainter(Flat2Render.RenderCache cache, DncPainterSettings settings, DncGeosymTheme theme)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidactivateCoverage(DncCoverage coverage)voidactivateCoverages(String... coverageNames)voidactivateCoverages(Collection<DncCoverage> coverages)Collection<DncChunks.DncChunkKey>activeChunkKeys()voidaddActiveChunksListener(Runnable listener)voidaddAxis(Axis2D axis)voiddeactivateCoverage(DncCoverage coverage)voiddeactivateCoverages(Collection<DncCoverage> coverages)voiddispose(GlimpseContext context)Free GPU and CPU memory associated with this this GlimpsePainter.voidhighlightFeatures(DncChunks.DncChunkKey chunkKey, it.unimi.dsi.fastutil.ints.IntCollection featureNums)booleanisChunkActive(DncChunks.DncChunkKey chunkKey)booleanisDisposed()booleanisVisible()voidpaintTo(GlimpseContext context)Renders this GlimpsePainter to the provided GlimpseContext.voidremoveActiveChunksListener(Runnable listener)voidremoveAxis(Axis2D axis)voidsetCoverageActive(DncCoverage coverage, boolean active)voidsetCoveragesActive(Collection<DncCoverage> coverages, boolean active)voidsetLookAndFeel(LookAndFeel laf)Sets display options for the painter based on the provided LookAndFeel.voidsetTheme(DncGeosymTheme newTheme)voidsetVisible(boolean visible)A painter which is set to non-visible should make no OpenGL calls when its paintTo method is called.
-
-
-
Field Detail
-
chunkPriorityFunc
public final Function<DncChunks.DncChunkKey,Flat2Render.DncChunkPriority> chunkPriorityFunc
-
-
Constructor Detail
-
DncPainter
public DncPainter(Flat2Render.RenderCache cache, DncPainterSettings settings)
-
DncPainter
public DncPainter(Flat2Render.RenderCache cache, DncPainterSettings settings, DncGeosymTheme theme)
-
-
Method Detail
-
addAxis
public void addAxis(Axis2D axis)
-
removeAxis
public void removeAxis(Axis2D axis)
-
addActiveChunksListener
public void addActiveChunksListener(Runnable listener)
-
removeActiveChunksListener
public void removeActiveChunksListener(Runnable listener)
-
isChunkActive
public boolean isChunkActive(DncChunks.DncChunkKey chunkKey)
-
activeChunkKeys
public Collection<DncChunks.DncChunkKey> activeChunkKeys()
-
setTheme
public void setTheme(DncGeosymTheme newTheme)
-
highlightFeatures
public void highlightFeatures(DncChunks.DncChunkKey chunkKey, it.unimi.dsi.fastutil.ints.IntCollection featureNums)
-
setCoverageActive
public void setCoverageActive(DncCoverage coverage, boolean active)
-
setCoveragesActive
public void setCoveragesActive(Collection<DncCoverage> coverages, boolean active)
-
activateCoverages
public void activateCoverages(String... coverageNames)
-
activateCoverage
public void activateCoverage(DncCoverage coverage)
-
activateCoverages
public void activateCoverages(Collection<DncCoverage> coverages)
-
deactivateCoverage
public void deactivateCoverage(DncCoverage coverage)
-
deactivateCoverages
public void deactivateCoverages(Collection<DncCoverage> coverages)
-
dispose
public void dispose(GlimpseContext context)
Description copied from interface:GlimpsePainterFree GPU and CPU memory associated with this this GlimpsePainter. After this call returns, the results of calling other GlimpsePainter methods besides isDisposed( ) are undefined.- Specified by:
disposein interfaceGlimpsePainter
-
isDisposed
public boolean isDisposed()
- Specified by:
isDisposedin interfaceGlimpsePainter
-
setLookAndFeel
public void setLookAndFeel(LookAndFeel laf)
Description copied from interface:GlimpsePainterSets display options for the painter based on the provided LookAndFeel.- Specified by:
setLookAndFeelin interfaceGlimpsePainter
-
isVisible
public boolean isVisible()
- Specified by:
isVisiblein interfaceGlimpsePainter
-
setVisible
public void setVisible(boolean visible)
Description copied from interface:GlimpsePainterA painter which is set to non-visible should make no OpenGL calls when its paintTo method is called.- Specified by:
setVisiblein interfaceGlimpsePainter
-
paintTo
public void paintTo(GlimpseContext context)
Description copied from interface:GlimpsePainterRenders this GlimpsePainter to the provided GlimpseContext. The context defines the GLContext to use. The GlimpseContext also specifies where this GlimpsePainter should be rendered via the RenderTarget contained in the GlimpseContext.- Specified by:
paintToin interfaceGlimpsePainter
-
-