time | Calls | line |
---|
| | 1 | function [b] = hgbehaviorfactory(behavior_name,hObj)
|
| | 2 | % This internal helper function may be removed in a future release.
|
| | 3 |
|
| | 4 | %HGBEHAVIORFACTORY Convenience for creating behavior objects
|
| | 5 | %
|
| | 6 | % HGGETBEHAVIOR
|
| | 7 | % With no arguments, a list of all registered behavior
|
| | 8 | % objects is generated to the command window.
|
| | 9 | %
|
| | 10 | % BH = HGBEHAVIORFACTORY(NAME)
|
| | 11 | % Specify NAME (string or cell array of strings) to create
|
| | 12 | % behavior objects.
|
| | 13 | %
|
| | 14 | % Example 1:
|
| | 15 | % bh = hgbehaviorfactory('Zoom');
|
| | 16 | %
|
| | 17 | % Example 2:
|
| | 18 | % h = line;
|
| | 19 | % bh = hgbehaviorfactory({'Zoom','DataCursor','Rotate3d'});
|
| | 20 | % h.Behavior = bh;
|
| | 21 | %
|
| | 22 | % See also hgaddbehavior, hggetbehavior.
|
| | 23 |
|
| | 24 | % Copyright 2003-2017 The MathWorks, Inc.
|
| | 25 |
|
< 0.001 | 32 | 26 | if nargin==0
|
| | 27 | % Pretty print output
|
| | 28 | info = localGetBehaviorInfo;
|
| | 29 | localPrettyPrint(info);
|
< 0.001 | 32 | 30 | else
|
| | 31 | % if the axes is passed as the second argument, behavior object is
|
| | 32 | % constructed based on the axes or figure version.
|
< 0.001 | 32 | 33 | if nargin == 1
|
| | 34 | hObj = [];
|
< 0.001 | 32 | 35 | end
|
0.024 | 32 | 36 | b = localCreate(behavior_name, hObj);
|
< 0.001 | 32 | 37 | end
|
Other subfunctions in this file are not included in this listing.