This is a static copy of a profile reportHome
legendcolorbarlayout>createListeners (2 calls, 0.021 sec)
Generated 18-Mar-2011 23:32:19 using cpu time.
M-subfunction in file /Applications/MATLAB_R2010a.app/toolbox/matlab/scribe/legendcolorbarlayout.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 |
248 | prop.AccessFlags.Serialize = '... | 2 | 0.010 s | 50.0% |  |
247 | prop = schema.prop(hax,'Legend... | 2 | 0.010 s | 50.0% |  |
251 | set(hax,'LegendColorbarListene... | 2 | 0 s | 0% |  |
250 | end | 2 | 0 s | 0% |  |
249 | prop.Visible = 'off'; | 2 | 0 s | 0% |  |
All other lines | | | 0 s | 0% |  |
Totals | | | 0.021 s | 100% | |
Children (called functions)
M-Lint results
No M-Lint messages.Coverage results
[ Show coverage for parent directory ]
Total lines in function | 64 |
Non-code lines (comments, blank lines) | 28 |
Code lines (lines that can run) | 36 |
Code lines that did run | 29 |
Code lines that did not run | 7 |
Coverage (did run/can run) | 80.56 % |
Function listing
time calls line
188 function list = createListeners(ax)
2 189 t = findobj(allchild(ax),'flat','Tag','LegendColorbarLayout');
2 190 if length(t) ~= 2
2 191 t1 = text(0,0,' ','Parent',ax,'Units','normalized',...
192 'HorizontalAlignment','center',...
193 'VerticalAlignment','middle',...
194 'HandleVisibility','off','Visible','on','HitTest','off',...
195 'Tag','LegendColorbarLayout',...
196 'DeleteFcn','legendcolorbarlayout(get(gcbo,''Parent''),''remove'')',...
197 'BackgroundColor','none');
2 198 t2 = text(1,1,' ','Parent',ax,'Units','normalized',...
199 'HorizontalAlignment','center',...
200 'VerticalAlignment','middle',...
201 'Tag','LegendColorbarLayout',...
202 'HandleVisibility','off','Visible','on','HitTest','off',...
203 'BackgroundColor','none');
204 else
205 t1 = t(1);
206 t2 = t(2);
207 if any(get(t1,'Position') > .1)
208 [t1,t2] = deal(t2,t1);
209 end
210 end
2 211 t = [t1 t2];
2 212 setappdata(ax,'LegendColorbarText',t);
2 213 hax = handle(ax);
214
2 215 parent = get(ax,'Parent');
2 216 initProperties(hax);
2 217 ht1 = handle(t1);
2 218 ht2 = handle(t2);
219
2 220 list = handle.listener([ht1 ht2],findprop(ht1,'PixelBounds'),...
221 'PropertyPostSet',@doPixelBoundsCB);
2 222 list(end+1) = handle.listener([ht1 ht2],findprop(ht1,'Visible'),...
223 'PropertyPostSet',@doTextVisibleCB);
2 224 list(end+1) = handle.listener(handle(parent),'ResizeEvent',...
225 @doParentResize);
226
227 % Listen to the "String" properties of the Title, XLabel and YLabel:
2 228 xLab = handle(get(hax,'XLabel'));
2 229 yLab = handle(get(hax,'YLabel'));
2 230 titleLab = handle(get(hax,'Title'));
2 231 hProps = [findprop(xLab,'String');findprop(xLab,'FontSize');...
232 findprop(xLab,'FontName');findprop(xLab,'Position')];
2 233 list(end+1) = handle.listener([xLab yLab titleLab],hProps,...
234 'PropertyPostSet',{@doLayoutCB,hax});
235
236 % We should also listen to the "XAxisLocation" and "YAxisLocation"
237 % properties of the axes:
2 238 hProps = [findprop(hax,'XAxisLocation');findprop(hax,'YAxisLocation')];
2 239 list(end+1) = handle.listener(hax,hProps,'PropertyPostSet',@(obj,evd)(doLayout(ax)));
240
241 % Also need to listen to the "Position" property of the axes
2 242 list(end+1) = handle.listener(hax,findprop(hax,'Position'),'PropertyPostSet','');
2 243 set(list(end),'Callback',{@localChangePosition,list(end)});
244
245 % listeners are stored on the axis as non-serializable instance property
2 246 if isempty(findprop(hax,'LegendColorbarListeners'))
0.01 2 247 prop = schema.prop(hax,'LegendColorbarListeners','handle vector');
0.01 2 248 prop.AccessFlags.Serialize = 'off';
2 249 prop.Visible = 'off';
2 250 end
2 251 set(hax,'LegendColorbarListeners',list)
Other subfunctions in this file are not included in this listing.