This is a static copy of a profile reportHome
scribe.legend.methods>create_plotchild_listeners (14 calls, 0.098 sec)
Generated 05-Aug-2011 13:01:51 using cpu time.
subfunction in file /usr/local/MATLAB/R2011a/toolbox/matlab/scribe/@scribe/@legend/methods.m
Copy to new window for comparing multiple runs
Parents (calling functions)
Lines where the most time was spent
Line Number | Code | Calls | Total Time | % Time | Time Plot |
1280 | if isprop(currHandle,'DisplayN... | 55 | 0.022 s | 22.2% |  |
1288 | set(h,'ScribePLegendListeners'... | 14 | 0.011 s | 11.1% |  |
1278 | lis.markeredgecolor = handle.l... | 55 | 0.011 s | 11.1% |  |
1277 | lis.markersize = handle.listen... | 55 | 0.011 s | 11.1% |  |
1276 | lis.marker = handle.listener(c... | 55 | 0.011 s | 11.1% |  |
All other lines | | | 0.033 s | 33.3% |  |
Totals | | | 0.098 s | 100% | |
Children (called functions)
Code Analyzer results
Coverage results
[ Show coverage for parent directory ]
Total lines in function | 40 |
Non-code lines (comments, blank lines) | 4 |
Code lines (lines that can run) | 36 |
Code lines that did run | 27 |
Code lines that did not run | 9 |
Coverage (did run/can run) | 75.00 % |
Function listing
time calls line
1249 function create_plotchild_listeners(h,hch,ch,forceDeleteListener) %#ok
1250
14 1251 if ~isprop(h,'ScribePLegendListeners')
14 1252 l = schema.prop(h,'ScribePLegendListeners','MATLAB array');
14 1253 l.AccessFlags.Serialize = 'off';
14 1254 l.Visible = 'off';
14 1255 newlis = {};
1256 else
1257 newlis = get(h,'ScribePLegendListeners');
1258 end
14 1259 for i=1:length(hch)
55 1260 currHandle = hch(i);
1261 % Make sure we attach listeners to objects that actually determine the
1262 % tokens.
55 1263 currHandle = handle(localGetTokenItem(currHandle));
55 1264 cls = classhandle(currHandle);
0.01 55 1265 currObj = double(currHandle);
0.01 55 1266 type = get(currObj,'type');
55 1267 switch type
55 1268 case 'line'
55 1269 lis.color = handle.listener(currObj, cls.findprop('Color'), 'PropertyPostSet', {@PlotChildLinePropChanged,h,currHandle});
1270 case {'patch','surface'}
1271 lis.facecolor = handle.listener(currObj, cls.findprop('FaceColor'), 'PropertyPostSet', {@PlotChildPatchPropChanged,h,currHandle});
1272 lis.edgecolor = handle.listener(currObj, cls.findprop('EdgeColor'), 'PropertyPostSet', {@PlotChildPatchPropChanged,h,currHandle});
1273 end
55 1274 lis.linestyle = handle.listener(currObj, cls.findprop('LineStyle'), 'PropertyPostSet', {@PlotChildAllLinePropChanged,h,currHandle});
0.01 55 1275 lis.linewidth = handle.listener(currObj, cls.findprop('LineWidth'), 'PropertyPostSet', {@PlotChildAllLinePropChanged,h,currHandle});
0.01 55 1276 lis.marker = handle.listener(currObj, cls.findprop('Marker'), 'PropertyPostSet', {@PlotChildMarkerPropChanged,h,currHandle});
0.01 55 1277 lis.markersize = handle.listener(currObj, cls.findprop('MarkerSize'), 'PropertyPostSet', {@PlotChildMarkerPropChanged,h,currHandle});
0.01 55 1278 lis.markeredgecolor = handle.listener(currObj, cls.findprop('MarkerEdgeColor'), 'PropertyPostSet', {@PlotChildMarkerPropChanged,h,currHandle});
55 1279 lis.markerfacecolor = handle.listener(currObj, cls.findprop('MarkerFaceColor'), 'PropertyPostSet', {@PlotChildMarkerPropChanged,h,currHandle});
0.02 55 1280 if isprop(currHandle,'DisplayName')
55 1281 lis.dispname = handle.listener(currObj, cls.findprop('DisplayName'),'PropertyPostSet',{@PlotChildDispNameChanged,h,currHandle});
55 1282 end
55 1283 if isequal(h.PlotChildListen,'on')
1284 lis.deleted = handle.listener(currObj, 'ObjectBeingDestroyed', {@PlotChildDeleted,h,currHandle});
1285 end
55 1286 newlis{end+1} = lis; %#ok<AGROW>
55 1287 end
0.01 14 1288 set(h,'ScribePLegendListeners',newlis);
Other subfunctions in this file are not included in this listing.