Download this file

45 lines (31 with data), 1.3 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
classdef Box < uix.Container & uix.mixin.Container
%uix.Box Box and grid base class
%
% uix.Box is a base class for containers with spacing between
% contents.
% Copyright 2009-2015 The MathWorks, Inc.
% $Revision: 1594 $ $Date: 2018-03-28 02:27:52 +1100 (Wed, 28 Mar 2018) $
properties( Access = public, Dependent, AbortSet )
Spacing = 0 % space between contents, in pixels
end
properties( Access = protected )
Spacing_ = 0 % backing for Spacing
end
methods
function value = get.Spacing( obj )
value = obj.Spacing_;
end % get.Spacing
function set.Spacing( obj, value )
% Check
assert( isa( value, 'double' ) && isscalar( value ) && ...
isreal( value ) && ~isinf( value ) && ...
~isnan( value ) && value >= 0, ...
'uix:InvalidPropertyValue', ...
'Property ''Spacing'' must be a non-negative scalar.' )
% Set
obj.Spacing_ = value;
% Mark as dirty
obj.Dirty = true;
end % set.Spacing
end % accessors
end % classdef