time | Calls | line |
---|
| | 1 | function [ax,args,nargs] = labelcheck(propname,varargin)
|
| | 2 | % Determines if object has text property named propname
|
| | 3 | %
|
| | 4 |
|
| | 5 | % Copyright 2013-2019 The MathWorks, Inc.
|
| | 6 |
|
< 0.001 | 36 | 7 | args = varargin{:};
|
< 0.001 | 36 | 8 | nargs = length(varargin{:});
|
< 0.001 | 36 | 9 | ax=[];
|
< 0.001 | 36 | 10 | if (nargs > 0) && (numel(args{1}) == 1) && local_validlabelobj(args{1},propname)
|
| | 11 | ax = args{1};
|
| | 12 | args = args(2:end);
|
| | 13 | nargs = nargs-1;
|
< 0.001 | 36 | 14 | end
|
< 0.001 | 36 | 15 | if nargs > 0
|
< 0.001 | 36 | 16 | inds = find(strcmpi('parent',args));
|
< 0.001 | 36 | 17 | if ~isempty(inds)
|
| | 18 | inds = unique([inds inds+1]);
|
| | 19 | pind = inds(end);
|
| | 20 | if nargs >= pind && local_validlabelobj(args{pind},propname)
|
| | 21 | ax = args{pind};
|
| | 22 | args(inds) = [];
|
| | 23 | nargs = length(args);
|
| | 24 | end
|
< 0.001 | 36 | 25 | end
|
< 0.001 | 36 | 26 | end
|
| | 27 |
|
< 0.001 | 36 | 28 | if isempty(ax) && nargs>0 && isscalar(args{1}) && ...
|
| | 29 | isa(args{1},'matlab.graphics.axis.AbstractAxes') && ~isvalid(args{1})
|
| | 30 | throwAsCaller(MException(message('MATLAB:class:InvalidHandle')));
|
< 0.001 | 36 | 31 | end
|
Other subfunctions in this file are not included in this listing.