public void mouseWheelMoved(int newValue) {
        int newScrollY = scrollY - (newValue / Math.abs(newValue));

        if (invertedScrolling) {
            int limit = -(getInnerPanel().getCurrentHeight() - getInnerPanel().getInitialHeight())
                    / lineHeight;

            if (newScrollY >= 0) {
                newScrollY = 0;
            } else if (newScrollY <= limit) {
                newScrollY = limit;
            }

            scrollY = newScrollY;
        } else {
            limit = ((getInnerPanel().getCurrentHeight() - getInnerPanel().getInitialHeight()) / lineHeight);

            if (newScrollY < 0)
                newScrollY = 0;
            else if (newScrollY > limit)
                newScrollY = limit;

            scrollY = newScrollY;
        }
    }