Class DelegatePainter
- java.lang.Object
-
- com.metsci.glimpse.core.painter.group.DelegatePainter
-
- All Implemented Interfaces:
GlimpsePainter
- Direct Known Subclasses:
SlippyMapPainter
,TilePainter
public class DelegatePainter extends Object implements GlimpsePainter
A painter which delegates its painting to a collection of delegateGlimpsePainters
. This class can be used to enforce a particular ordering on multiple sets of painter (a background set and a foreground set, for example).- Author:
- ulman
-
-
Constructor Summary
Constructors Constructor Description DelegatePainter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addPainter(GlimpsePainter painter)
void
addPainter(GlimpsePainter painter, int index)
void
dispose(GlimpseContext context)
Free GPU and CPU memory associated with this this GlimpsePainter.int
getNumPainters()
int
indexOf(GlimpsePainter painter)
boolean
isDisposed()
boolean
isVisible()
void
paintTo(GlimpseContext context)
Renders this GlimpsePainter to the provided GlimpseContext.void
removeAll()
void
removePainter(GlimpsePainter painter)
void
setLookAndFeel(LookAndFeel laf)
Sets display options for the painter based on the provided LookAndFeel.void
setVisible(boolean visible)
A painter which is set to non-visible should make no OpenGL calls when its paintTo method is called.
-
-
-
Method Detail
-
addPainter
public void addPainter(GlimpsePainter painter)
-
addPainter
public void addPainter(GlimpsePainter painter, int index)
-
removePainter
public void removePainter(GlimpsePainter painter)
-
removeAll
public void removeAll()
-
getNumPainters
public int getNumPainters()
-
indexOf
public int indexOf(GlimpsePainter painter)
-
isVisible
public boolean isVisible()
- Specified by:
isVisible
in interfaceGlimpsePainter
-
setVisible
public void setVisible(boolean visible)
Description copied from interface:GlimpsePainter
A painter which is set to non-visible should make no OpenGL calls when its paintTo method is called.- Specified by:
setVisible
in interfaceGlimpsePainter
-
paintTo
public void paintTo(GlimpseContext context)
Description copied from interface:GlimpsePainter
Renders 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:
paintTo
in interfaceGlimpsePainter
-
dispose
public void dispose(GlimpseContext context)
Description copied from interface:GlimpsePainter
Free 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:
dispose
in interfaceGlimpsePainter
-
isDisposed
public boolean isDisposed()
- Specified by:
isDisposed
in interfaceGlimpsePainter
-
setLookAndFeel
public void setLookAndFeel(LookAndFeel laf)
Description copied from interface:GlimpsePainter
Sets display options for the painter based on the provided LookAndFeel.- Specified by:
setLookAndFeel
in interfaceGlimpsePainter
-
-