private int getIndexFromData(ListModel<? extends T> model, T data)
        {
            for (int i = 0; i < model.getSize(); i++)
            {
                if (model.getElementAt(i) == data)
                {
                    return i;
                }
            }
            
            return -1;
        }