public void onMapSelected(float x, float y) {

        if (x > 255) {
            x = 255;
        }
        if (x < 0) {
            x = 0;
        }
        if (y > 255) {
            y = 255;
        }
        if (y < 0) {
            y = 0;
        }
        switch (m_colorMode) {
            case CmsSliderBar.HUE:
                m_saturation = percentOf(x, 100);
                m_brightness = 100 - percentOf(y, 100);
                m_tbSaturation.setText(Integer.toString(m_saturation));
                m_tbBrightness.setText(Integer.toString(m_brightness));
                onChange(m_tbHue);
                break;
            case CmsSliderBar.SATURATIN:
                m_hue = percentOf(x, 360);
                m_brightness = 100 - percentOf(y, 100);
                m_tbHue.setText(Integer.toString(m_hue));
                m_tbBrightness.setText(Integer.toString(m_brightness));
                onChange(m_tbSaturation);
                break;
            case CmsSliderBar.BRIGHTNESS:
                m_hue = percentOf(x, 360);
                m_saturation = 100 - percentOf(y, 100);
                m_tbHue.setText(Integer.toString(m_hue));
                m_tbSaturation.setText(Integer.toString(m_saturation));
                onChange(m_tbBrightness);
                break;
            case CmsSliderBar.RED:
                m_blue = (int)x;
                m_green = 255 - (int)y;
                m_tbBlue.setText(Integer.toString(m_blue));
                m_tbGreen.setText(Integer.toString(m_green));
                onChange(m_tbRed);
                break;
            case CmsSliderBar.GREEN:
                m_blue = (int)x;
                m_red = 255 - (int)y;
                m_tbBlue.setText(Integer.toString(m_blue));
                m_tbRed.setText(Integer.toString(m_red));
                onChange(m_tbGreen);
                break;
            case CmsSliderBar.BLUE:
                m_red = (int)x;
                m_green = 255 - (int)y;
                m_tbRed.setText(Integer.toString(m_red));
                m_tbGreen.setText(Integer.toString(m_green));
                onChange(m_tbBlue);
                break;
            default:
                break;
        }
    }
public void onMapSelected ( float x , float y ) { if ( x > 255 ) { x = 255 ; } if ( x < 0 ) { x = 0 ; } if ( y > 255 ) { y = 255 ; } if ( y < 0 ) { y = 0 ; } switch ( m_colorMode ) { case CmsSliderBar . HUE : m_saturation = percentOf ( x , 100 ) ; m_brightness = 100 - percentOf ( y , 100 ) ; m_tbSaturation . setText ( Integer . toString ( m_saturation ) ) ; m_tbBrightness . setText ( Integer . toString ( m_brightness ) ) ; onChange ( m_tbHue ) ; break ; case CmsSliderBar . SATURATIN : m_hue = percentOf ( x , 360 ) ; m_brightness = 100 - percentOf ( y , 100 ) ; m_tbHue . setText ( Integer . toString ( m_hue ) ) ; m_tbBrightness . setText ( Integer . toString ( m_brightness ) ) ; onChange ( m_tbSaturation ) ; break ; case CmsSliderBar . BRIGHTNESS : m_hue = percentOf ( x , 360 ) ; m_saturation = 100 - percentOf ( y , 100 ) ; m_tbHue . setText ( Integer . toString ( m_hue ) ) ; m_tbSaturation . setText ( Integer . toString ( m_saturation ) ) ; onChange ( m_tbBrightness ) ; break ; case CmsSliderBar . RED : m_blue = ( int ) x ; m_green = 255 - ( int ) y ; m_tbBlue . setText ( Integer . toString ( m_blue ) ) ; m_tbGreen . setText ( Integer . toString ( m_green ) ) ; onChange ( m_tbRed ) ; break ; case CmsSliderBar . GREEN : m_blue = ( int ) x ; m_red = 255 - ( int ) y ; m_tbBlue . setText ( Integer . toString ( m_blue ) ) ; m_tbRed . setText ( Integer . toString ( m_red ) ) ; onChange ( m_tbGreen ) ; break ; case CmsSliderBar . BLUE : m_red = ( int ) x ; m_green = 255 - ( int ) y ; m_tbRed . setText ( Integer . toString ( m_red ) ) ; m_tbGreen . setText ( Integer . toString ( m_green ) ) ; onChange ( m_tbBlue ) ; break ; default : break ; } }
Fires whenever the user generates picking events on the color picker map.<p>

@param x the distance along the x-axis, between 0 and 255
@param y the distance along the y-axis, between 0 and 255