www.gusucode.com > mbcguitools 工具箱 matlab 源码程序 > mbcguitools/@mbcwidgets/@javacomponent/initJavaProperties.m

    function initJavaProperties(obj)
%initJavaProperties Initialize java properties after creation
%
%  initJavaProperties(obj, border, enable) is called during construction of
%  the javacomponent in order to set initial values in the Peer object.

%  Copyright 2010-2013 The MathWorks, Inc. and Ford Global Technologies, Inc.

if strcmp(obj.Enable, 'off')
    obj.Peer.setEnabled(false);
end

% The BorderType property is captured during construction to avoid the
% property value being hidden by the Peer's default value.
if ~isempty(obj.InitialBorderType)
    obj.Peer.installBorderType(obj.InitialBorderType);
end