Class FrameProcessingControlImpl

  • All Implemented Interfaces:
    javax.media.Control, javax.media.control.FrameProcessingControl

    public class FrameProcessingControlImpl
    extends Object
    implements javax.media.control.FrameProcessingControl
    Provides a base implementation of FrameProcessingControl which keeps track of the minimalProcessing property, switches its value to true when it's notified that its owner is at least one frame behind and doesn't implement the controlComponent and framesDropped properties.
    Author:
    Lyubomir Marinov
    • Constructor Detail

      • FrameProcessingControlImpl

        public FrameProcessingControlImpl()
    • Method Detail

      • getControlComponent

        public Component getControlComponent()
        Gets the UI Component associated with this Control object.
        Specified by:
        getControlComponent in interface javax.media.Control
        Returns:
        the UI Component associated with this Control object
      • getFramesDropped

        public int getFramesDropped()
        Gets the number of output frames that were dropped during processing since the last call to this method.
        Specified by:
        getFramesDropped in interface javax.media.control.FrameProcessingControl
        Returns:
        the number of output frame that were dropped during processing since the last call to this method
      • isMinimalProcessing

        public boolean isMinimalProcessing()
        Determines whether the owner of this FrameProcessingControl is to perform only the minimum operations necessary to keep it working normally but without producing output.
        Returns:
        true if the owner of this FrameProcessingControl is to perform only the minimum operations necessary to keep it working normally but without producing output; otherwise, false
      • setFramesBehind

        public void setFramesBehind​(float framesBehind)
        Sets the number of frames the owner of this FrameProcessingControl is lagging behind. It is a hint to do minimal processing for the next framesBehind frames in order to catch up.
        Specified by:
        setFramesBehind in interface javax.media.control.FrameProcessingControl
        Parameters:
        framesBehind - the number of frames the owner of this FrameProcessingControl is lagging behind
      • setMinimalProcessing

        public boolean setMinimalProcessing​(boolean minimalProcessing)
        Sets the indicator which determines whether the owner of this FrameProcessingControl is to perform only the minimal operations necessary to keep it working normally but without producing output.
        Specified by:
        setMinimalProcessing in interface javax.media.control.FrameProcessingControl
        Parameters:
        minimalProcessing - true if minimal processing mode is to be turned on or false if minimal processing mode is to be turned off
        Returns:
        the actual minimal processing mode in effect after the set attempt