public void setQuality(int quality)
    {
        if (this.quality != quality)
        {
            if (quality != OPAQUE && quality != BITMASK && quality != TRANSLUCENT)
            {
                throw new IllegalArgumentException("Illegal quality: " + quality);
            }
            
            this.quality = quality;
            vi = null;
        }
    }