This is a static copy of a profile report

Home

legendcolorbarlayout>createListeners (14 calls, 0.022 sec)
Generated 05-Aug-2011 13:01:33 using cpu time.
subfunction in file /usr/local/MATLAB/R2011a/toolbox/matlab/scribe/legendcolorbarlayout.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
legendcolorbarlayoutfunction14
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
231
list(end+1) = handle.listener(...
140.011 s50.0%
196
t = findobj(allchild(ax),'flat...
140.011 s50.0%
258
set(hax,'LegendColorbarListene...
140 s0%
257
end
80 s0%
256
prop.Visible = 'off';
80 s0%
All other lines  0 s0%
Totals  0.022 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
findobjfunction140.011 s50.0%
...layout>create@(obj,evd)(doLayout(ax))anonymous function140 s0%
legendcolorbarlayout>initPropertiessubfunction140 s0%
allchildfunction140 s0%
Self time (built-ins, overhead, etc.)  0.011 s50.0%
Totals  0.022 s100% 
Code Analyzer results
No Code Analyzer messages.
Coverage results
[ Show coverage for parent directory ]
Total lines in function64
Non-code lines (comments, blank lines)28
Code lines (lines that can run)36
Code lines that did run29
Code lines that did not run7
Coverage (did run/can run)80.56 %
Function listing
   time   calls  line
195 function list = createListeners(ax)
0.01 14 196 t = findobj(allchild(ax),'flat','Tag','LegendColorbarLayout');
14 197 if length(t) ~= 2
14 198 t1 = text(0,0,' ','Parent',ax,'Units','normalized',...
199 'HorizontalAlignment','center',...
200 'VerticalAlignment','middle',...
201 'HandleVisibility','off','Visible','on','HitTest','off',...
202 'Tag','LegendColorbarLayout',...
203 'DeleteFcn','legendcolorbarlayout(get(gcbo,''Parent''),''remove'')',...
204 'BackgroundColor','none');
14 205 t2 = text(1,1,' ','Parent',ax,'Units','normalized',...
206 'HorizontalAlignment','center',...
207 'VerticalAlignment','middle',...
208 'Tag','LegendColorbarLayout',...
209 'HandleVisibility','off','Visible','on','HitTest','off',...
210 'BackgroundColor','none');
211 else
212 t1 = t(1);
213 t2 = t(2);
214 if any(get(t1,'Position') > .1)
215 [t1,t2] = deal(t2,t1);
216 end
217 end
14 218 t = [t1 t2];
14 219 setappdata(ax,'LegendColorbarText',t);
14 220 hax = handle(ax);
221
14 222 parent = get(ax,'Parent');
14 223 initProperties(hax);
14 224 ht1 = handle(t1);
14 225 ht2 = handle(t2);
226
14 227 list = handle.listener([ht1 ht2],findprop(ht1,'PixelBounds'),...
228 'PropertyPostSet',@doPixelBoundsCB);
14 229 list(end+1) = handle.listener([ht1 ht2],findprop(ht1,'Visible'),...
230 'PropertyPostSet',@doTextVisibleCB);
0.01 14 231 list(end+1) = handle.listener(handle(parent),'ResizeEvent',...
232 @doParentResize);
233
234 % Listen to the "String" properties of the Title, XLabel and YLabel:
14 235 xLab = handle(get(hax,'XLabel'));
14 236 yLab = handle(get(hax,'YLabel'));
14 237 titleLab = handle(get(hax,'Title'));
14 238 hProps = [findprop(xLab,'String');findprop(xLab,'FontSize');...
239 findprop(xLab,'FontName');findprop(xLab,'Position')];
14 240 list(end+1) = handle.listener([xLab yLab titleLab],hProps,...
241 'PropertyPostSet',{@doLayoutCB,hax});
242
243 % We should also listen to the "XAxisLocation" and "YAxisLocation"
244 % properties of the axes:
14 245 hProps = [findprop(hax,'XAxisLocation');findprop(hax,'YAxisLocation')];
14 246 list(end+1) = handle.listener(hax,hProps,'PropertyPostSet',@(obj,evd)(doLayout(ax)));
247
248 % Also need to listen to the "Position" property of the axes
14 249 list(end+1) = handle.listener(hax,findprop(hax,'Position'),'PropertyPostSet','');
14 250 set(list(end),'Callback',{@localChangePosition,list(end)});
251
252 % listeners are stored on the axis as non-serializable instance property
14 253 if isempty(findprop(hax,'LegendColorbarListeners'))
8 254 prop = schema.prop(hax,'LegendColorbarListeners','handle vector');
8 255 prop.AccessFlags.Serialize = 'off';
8 256 prop.Visible = 'off';
8 257 end
14 258 set(hax,'LegendColorbarListeners',list)

Other subfunctions in this file are not included in this listing.