public void setFocusDistance(float f) {

        this.focusDistance = f;
        if (material != null) {
            material.setFloat("FocusDistance", focusDistance);
        }

    }
Sets the distance at which objects are purely in focus.

@param f the desired distance (in world units, default=50)
jme3-effects/src/main/java/com/jme3/post/filters/DepthOfFieldFilter.java