com.metsci.glimpse.painter.treemap
Class AbstractTreeMapPainter

java.lang.Object
  extended by com.metsci.glimpse.painter.base.GlimpsePainterImpl
      extended by com.metsci.glimpse.painter.base.GlimpsePainter2D
          extended by com.metsci.glimpse.painter.base.GlimpseDataPainter2D
              extended by com.metsci.glimpse.painter.treemap.AbstractTreeMapPainter
All Implemented Interfaces:
GlimpsePainter
Direct Known Subclasses:
SimpleTreeMapPainter

public abstract class AbstractTreeMapPainter
extends GlimpseDataPainter2D

Draws a TreeMap, useful for hierarchical data. There are 4 dimensions of information to a treemap: the level in the hierarchy, the size, the color and title/text. The structure, size and text is contained in the NestedTreeMap datastructure. The colors and layout are determined by this painter and implemented in a way that allows switching on information within a TreeMap node (see SimpleTreeMapPainter.getLeafColor(int, boolean)).

Author:
borkholder

Field Summary
 
Fields inherited from class com.metsci.glimpse.painter.base.GlimpsePainterImpl
BYTES_PER_FLOAT, logger
 
Constructor Summary
AbstractTreeMapPainter()
           
 
Method Summary
 void dispose(javax.media.opengl.GLContext context)
           
 java.lang.Integer getLeafAt(Axis2D axis, double x, double y)
           
 NestedTreeMap getTreeMapData()
           
 TreeMapLayout getTreeMapLayout()
           
 void paintTo(javax.media.opengl.GL gl, GlimpseBounds layoutBounds, Axis2D axis)
           
 void setLayout(TreeMapLayout layout)
           
 void setTreeMapData(NestedTreeMap tree)
           
 
Methods inherited from class com.metsci.glimpse.painter.base.GlimpseDataPainter2D
paintTo
 
Methods inherited from class com.metsci.glimpse.painter.base.GlimpsePainter2D
paintTo
 
Methods inherited from class com.metsci.glimpse.painter.base.GlimpsePainterImpl
dispose, isDisposed, isVisible, paintTo, setErrorHandling, setLookAndFeel, setVisible
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractTreeMapPainter

public AbstractTreeMapPainter()
Method Detail

setLayout

public void setLayout(TreeMapLayout layout)

getTreeMapLayout

public TreeMapLayout getTreeMapLayout()

setTreeMapData

public void setTreeMapData(NestedTreeMap tree)

getTreeMapData

public NestedTreeMap getTreeMapData()

getLeafAt

public java.lang.Integer getLeafAt(Axis2D axis,
                                   double x,
                                   double y)

paintTo

public void paintTo(javax.media.opengl.GL gl,
                    GlimpseBounds layoutBounds,
                    Axis2D axis)
Specified by:
paintTo in class GlimpseDataPainter2D

dispose

public void dispose(javax.media.opengl.GLContext context)


Copyright © 2012 Metron, Inc.. All Rights Reserved.