@Override
    public void mouseClick(int X, int Y) {
        for(int i = 0; i < this.Matrix.size(); i++)
        {
            Rectangle rect = this.Matrix.get(i);
            if(rect.contains(X,Y))
            {
                this.SelectedIndex = i;
                break;
            }
        }
        if(this.getMouseListener() != null)
        {
            this.getMouseListener().MouseClick(this);
        }
    }