int dim0 = parent.dim0Bar.getValue();
int dim1 = parent.dim1Bar.getValue();
int timeLimit = parent.timeBar.getValue();
double colorFactor = (10 - parent.colorFactorBar.getValue()) / 5.0;
ColorScale colorScale = parent.getColorScale();
int gridSize = GridVisualizer.GRIDSIZE;
synchronized (parent.statusGrid) {
for (int i = 0; i < gridSize; i++) {
Arrays.fill(parent.statusGrid[i], null);
}
}
for (int i = 0; i < gridSize; i++) {
for (int j = 0; j < gridSize; j++) {
if (dim0 != dim1 || i == j) {
Index index = new FastIndex();
index = index.set(dim0, i);
index = index.set(dim1, j);
List<StatusData> indexList;
synchronized (lock) {
indexList = statusMap.get(index);
if (indexList != null) {
DecimalFormat df = new DecimalFormat("0.###E0");
int[] pos = new int[] { index.get(dim0), index.get(dim1) };
int[] pixel = positionToPixel(pos);
StringBuffer statusText = new StringBuffer();
int statusCount = 0;
for (StatusData statusData : indexList) {
if (statusData.time <= timeLimit) {
IndexVisualizerData data = statusData.data;
if (data instanceof IndexContribution || data instanceof IndexContributionEstimate) {
double contribution;
if (data instanceof IndexContribution) {
contribution = ((IndexContribution) data).contribution;
} else {
contribution = ((IndexContributionEstimate) data).estimate;
statusText.append(" Estimate: " + df.format(((IndexContributionEstimate) data).estimate));
}
double r = Math.abs(contribution);
double b = 0.7 - 0.7 * MathTN.log10(r) / MathTN.log10(MathTN.FUDGE);
g.setColor(colorScale.getColor(b * colorFactor));
if (data instanceof IndexContribution) {
g.fillRect(pixel[0], pixel[1], getBoxSize(), getBoxSize());
} else {
int size = getBoxSize();
g.fillRect(pixel[0] + size / 4, pixel[1] + size / 4, size / 2, size / 2);