edu.ucla.stat.SOCR.chart.j3d.gui
Class SOCRBinned2DData

java.lang.Object
  extended by edu.ucla.stat.SOCR.chart.j3d.gui.SOCRBinned2DData
All Implemented Interfaces:
org.freehep.j3d.plot.Binned2DData
Direct Known Subclasses:
SOCRBinnedBinary2DData, SOCRBinnedMatrix2DData, SOCRBinnedTriplet2DData

public class SOCRBinned2DData
extends java.lang.Object
implements org.freehep.j3d.plot.Binned2DData

A trivial implementation of Binned2DData for test purposes

Version:
$Id: SOCRBinned2DData.java,v 1.4 2010/12/09 21:45:26 jiecui Exp $
Author:
Joy Kyriakopulos (joyk@fnal.gov)

Field Summary
protected  float[][] data
           
protected  org.freehep.j3d.plot.Rainbow rainbow
           
protected  boolean rangeZFound
           
protected  int xBins
           
protected  int yBins
           
protected  float zMax
           
protected  float zMin
           
 
Constructor Summary
SOCRBinned2DData()
           
SOCRBinned2DData(java.net.URL fileUrl)
           
SOCRBinned2DData(java.net.URL base, java.lang.String fileName)
           
 
Method Summary
 javax.vecmath.Color3b colorAt(int xIndex, int yIndex)
          Get the Color at the specified bin
protected  void findZRange()
           
 void getDataFromJTable(javax.swing.JTable dataTable)
           
protected  void loadBinSizes()
           
protected  void loadBinSizes(java.io.BufferedReader in)
           
protected  void loadBinSizes(int xDefault, int yDefault)
           
 void loadDataFloat(java.io.BufferedReader in)
           
 void loadDataFloat(java.io.FileInputStream fin)
           
 void loadDataFloat(java.net.URL fileUrl)
           
 void loadDataFloat(java.net.URL base, java.lang.String fileName)
           
 void setDataAt(float value, int xIndex, int yIndex)
           
 int xBins()
          Number of bins on the X axis
 float xMax()
          Axis maximum on the X Axis
 float xMin()
          Axis minimum on the X Axis
 int yBins()
          Number of bins on the Y axis
 float yMax()
          Axis maximum on the Y Axis
 float yMin()
          Axis minimum on the Y Axis
 float zAt(int xIndex, int yIndex)
          Get Z value at the specified bin
 float zMax()
          Maximum data value on the Z Axis
 float zMin()
          Minimum data value on the Z Axis
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

xBins

protected int xBins

yBins

protected int yBins

rainbow

protected org.freehep.j3d.plot.Rainbow rainbow

data

protected float[][] data

zMin

protected float zMin

zMax

protected float zMax

rangeZFound

protected boolean rangeZFound
Constructor Detail

SOCRBinned2DData

public SOCRBinned2DData()
                 throws java.io.IOException
Throws:
java.io.IOException

SOCRBinned2DData

public SOCRBinned2DData(java.net.URL base,
                        java.lang.String fileName)
                 throws java.io.IOException
Throws:
java.io.IOException

SOCRBinned2DData

public SOCRBinned2DData(java.net.URL fileUrl)
                 throws java.io.IOException
Throws:
java.io.IOException
Method Detail

loadDataFloat

public void loadDataFloat(java.net.URL base,
                          java.lang.String fileName)
                   throws java.io.IOException
Throws:
java.io.IOException

loadDataFloat

public void loadDataFloat(java.net.URL fileUrl)
                   throws java.io.IOException
Throws:
java.io.IOException

loadDataFloat

public void loadDataFloat(java.io.FileInputStream fin)
                   throws java.io.IOException
Throws:
java.io.IOException

loadBinSizes

protected void loadBinSizes(java.io.BufferedReader in)
                     throws java.io.IOException
Throws:
java.io.IOException

loadBinSizes

protected void loadBinSizes()

loadBinSizes

protected void loadBinSizes(int xDefault,
                            int yDefault)

loadDataFloat

public void loadDataFloat(java.io.BufferedReader in)
                   throws java.io.IOException
Throws:
java.io.IOException

findZRange

protected void findZRange()

xBins

public int xBins()
Description copied from interface: org.freehep.j3d.plot.Binned2DData
Number of bins on the X axis

Specified by:
xBins in interface org.freehep.j3d.plot.Binned2DData

yBins

public int yBins()
Description copied from interface: org.freehep.j3d.plot.Binned2DData
Number of bins on the Y axis

Specified by:
yBins in interface org.freehep.j3d.plot.Binned2DData

xMin

public float xMin()
Description copied from interface: org.freehep.j3d.plot.Binned2DData
Axis minimum on the X Axis

Specified by:
xMin in interface org.freehep.j3d.plot.Binned2DData

xMax

public float xMax()
Description copied from interface: org.freehep.j3d.plot.Binned2DData
Axis maximum on the X Axis

Specified by:
xMax in interface org.freehep.j3d.plot.Binned2DData

yMin

public float yMin()
Description copied from interface: org.freehep.j3d.plot.Binned2DData
Axis minimum on the Y Axis

Specified by:
yMin in interface org.freehep.j3d.plot.Binned2DData

yMax

public float yMax()
Description copied from interface: org.freehep.j3d.plot.Binned2DData
Axis maximum on the Y Axis

Specified by:
yMax in interface org.freehep.j3d.plot.Binned2DData

zMin

public float zMin()
Description copied from interface: org.freehep.j3d.plot.Binned2DData
Minimum data value on the Z Axis

Specified by:
zMin in interface org.freehep.j3d.plot.Binned2DData

zMax

public float zMax()
Description copied from interface: org.freehep.j3d.plot.Binned2DData
Maximum data value on the Z Axis

Specified by:
zMax in interface org.freehep.j3d.plot.Binned2DData

zAt

public float zAt(int xIndex,
                 int yIndex)
Description copied from interface: org.freehep.j3d.plot.Binned2DData
Get Z value at the specified bin

Specified by:
zAt in interface org.freehep.j3d.plot.Binned2DData

colorAt

public javax.vecmath.Color3b colorAt(int xIndex,
                                     int yIndex)
Description copied from interface: org.freehep.j3d.plot.Binned2DData
Get the Color at the specified bin

Specified by:
colorAt in interface org.freehep.j3d.plot.Binned2DData

getDataFromJTable

public void getDataFromJTable(javax.swing.JTable dataTable)

setDataAt

public void setDataAt(float value,
                      int xIndex,
                      int yIndex)