public void setSelection(int i, double s, int mode) {
        if (!data.isDB)
            propagate(i, s, mode);
        else
            switch (mode) {
                case Selection.MODE_STANDARD:
                    hilite[i] = s;
                    //System.out.println("REPLACE at: "+i+" with: "+s);
                    break;
                case Selection.MODE_AND:
                    //System.out.print("AND at: "+i+" from: "+selectionArray[i]);
                    hilite[i] *= s;
                    //System.out.println(" to: "+selectionArray[i]);
                    break;
                case Selection.MODE_OR:
                    hilite[i] = Math.max(s, hilite[i]);
                    System.out.println(" ------------> bar: " + i + " = " + hilite[i]);
                    break;
                case Selection.MODE_XOR:
                    if (s > 0)
                        if (hilite[i] > 0)
                            hilite[i] = 0;
                        else
                            hilite[i] = s;
                    break;
                case Selection.MODE_NOT:
                    if (s > 0)
                        hilite[i] = 0;
            }
    }