www.gusucode.com > mbcguitools 工具箱 matlab 源码程序 > mbcguitools/@mbcwidgets/@javacomponent/pSendMotion.m

    function pSendMotion(obj,mm)
%PSENDMOTION Execute a mouse motion update
%
%  PSENDMOTION(OBJ)

%  Copyright 2000-2016 The MathWorks, Inc. and Ford Global Technologies, Inc.


% This method of finding the MotionManager and executing it avoid the
% creation of a MotionManager if one is not currently present for the
% parent
if ~mbcgui.util.isBeingDestroyed(obj.Parent)
    if nargin<2
        fig = ancestor(obj.Parent,'figure');
        mm = mbcgui.motion.MotionManager.FindManager(fig);
    end
    if ~isempty(mm)
        mm.doUpdate;
    end
end