sources
Class DensityEstimator

java.lang.Object
  extended bysources.DensityEstimator
Direct Known Subclasses:
HexBinner, MarronDens, RectBinner

public abstract class DensityEstimator
extends java.lang.Object

An abstract superclass for Density Estimation


Field Summary
protected  int binmod
          the binmode:EASY_BINNING, LINEAR_BINNING
static int COLORED
          Colored bins
protected  LDataSet dat
          the parental LDataSet
static int EASY_BINNING
          Easy Binning algorithm
static int GROWING
          Growing bins
static int LINEAR_BINNING
          Linear binning algorithm
protected  int maxalpha
          the maximum alpha value
protected  int modus
          the mode: COLORED,GROWING,SUNFLOWERS
protected  int punktgr
          the point size/ binning size
protected  int sizex
          the size of bins in x direction
protected  int sizey
          the size of bins in y direction
static int SUNFLOWERS
          Sunflowers as bins
 
Constructor Summary
DensityEstimator()
           
 
Method Summary
abstract  void createRects(int width, int height, boolean onlySelected, int[] xval, int[] yval)
          prepare the Binning
 int getBinning()
          gets the binning algorithm
 int getPointPainter()
          gets the mod
abstract  void paintDensity(java.awt.Graphics g, java.awt.Rectangle vsRect)
          paint the density
protected static void paintFlower(java.awt.Graphics g, int x, int y, int b, int h, int alpha, java.awt.Color frgCol)
          paints a sunflower
 void setAlpha(int x)
          sets the maximal alpha value
 void setBinning(int bin)
          sets the binning algorithm
 void setPointPainter(int mod)
          set the mod
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COLORED

public static final int COLORED
Colored bins

See Also:
Constant Field Values

GROWING

public static final int GROWING
Growing bins

See Also:
Constant Field Values

SUNFLOWERS

public static final int SUNFLOWERS
Sunflowers as bins

See Also:
Constant Field Values

EASY_BINNING

public static final int EASY_BINNING
Easy Binning algorithm

See Also:
Constant Field Values

LINEAR_BINNING

public static final int LINEAR_BINNING
Linear binning algorithm

See Also:
Constant Field Values

modus

protected int modus
the mode: COLORED,GROWING,SUNFLOWERS


binmod

protected int binmod
the binmode:EASY_BINNING, LINEAR_BINNING


punktgr

protected int punktgr
the point size/ binning size


maxalpha

protected int maxalpha
the maximum alpha value


sizex

protected int sizex
the size of bins in x direction


sizey

protected int sizey
the size of bins in y direction


dat

protected LDataSet dat
the parental LDataSet

Constructor Detail

DensityEstimator

public DensityEstimator()
Method Detail

paintDensity

public abstract void paintDensity(java.awt.Graphics g,
                                  java.awt.Rectangle vsRect)
paint the density

Parameters:
g - the Graphics to paint on
vsRect - the visible Rectangle

createRects

public abstract void createRects(int width,
                                 int height,
                                 boolean onlySelected,
                                 int[] xval,
                                 int[] yval)
prepare the Binning

Parameters:
width - the width of the picture
height - the height of the picture
onlySelected - true, if only the selected values has changed
xval - x values
yval - y values

setPointPainter

public void setPointPainter(int mod)
set the mod

Parameters:
mod - the modus COLORED, GROWING, SUNFLOWERS

getPointPainter

public int getPointPainter()
gets the mod

Returns:
COLORED, GROWING, SUNFLOWERS

setBinning

public void setBinning(int bin)
sets the binning algorithm

Parameters:
bin - the mod: EASY_BINNING, LINEAR_BINNING

getBinning

public int getBinning()
gets the binning algorithm

Returns:
the mod: EASY_BINNING, LINEAR_BINNING

setAlpha

public void setAlpha(int x)
sets the maximal alpha value

Parameters:
x - the alpha value

paintFlower

protected static void paintFlower(java.awt.Graphics g,
                                  int x,
                                  int y,
                                  int b,
                                  int h,
                                  int alpha,
                                  java.awt.Color frgCol)
paints a sunflower

Parameters:
g - the graphics to paint on
x - the x coordinate
y - the y coordinate
b - the width
h - the height
alpha - the alpha value
frgCol - the foreground color