// set the color
// new code - show the map with the input colors
if (reason == -1) {
ColorModel currentColorModel = classColors.get(l);
Color currentColor = new Color((int) currentColorModel
.getDimension_1(), (int) currentColorModel
.getDimension_2(), (int) currentColorModel
.getDimension_3());
g.setColor(currentColor);
// Dimension screenSize =
// Toolkit.getDefaultToolkit().getScreenSize();
if (sector == -1)
g.drawRect(x + offsetWidth, y
+ offsetHeight, 1, 1);
else if (l == sector)
g.drawRect(x + offsetWidth, y
+ offsetHeight, 1, 1);
}
// compute saliency
else if (reason == 0) {
currentSaliency = data.getSaliency().get(count);
float current_color_double = (float) (this.clr.size()
* (currentSaliency - data.getMinSaliency()) / (data
.getMaxSaliency() - data.getMinSaliency()));
int current_color = (int) (current_color_double);
if (current_color >= clr.size())
current_color = clr.size() - 1;
g.setColor(clr.get(current_color));
if (sector == -1)
g.drawRect(x + offsetWidth, y
+ offsetHeight, 1, 1);
else if (current_color == sector)
g.drawRect(x + offsetWidth, y
+ offsetHeight, 1, 1);
}
// identify bad visibility
else if (reason == 1) {
// old code
currentSaliency = data.getSaliency().get(count);
if (currentSaliency > threshold) {
ColorModel currentColorModel = classColors.get(l);
Color currentColor = new Color((int) currentColorModel
.getDimension_1(), (int) currentColorModel
.getDimension_2(), (int) currentColorModel
.getDimension_3());
g.setColor(currentColor);
// Dimension screenSize =
// Toolkit.getDefaultToolkit().getScreenSize();