www.gusucode.com > mbcguitools 工具箱 matlab 源码程序 > mbcguitools/+mbcgui/+multiview/EtchedViewContainer.m
classdef EtchedViewContainer < mbcgui.multiview.ViewContainer %mbcgui.multiview.EtchedViewContainer class % mbcgui.multiview.EtchedViewContainer extends mbcgui.multiview.ViewContainer. % % mbcgui.multiview.EtchedViewContainer properties: % Parent - Property is of type 'MATLAB array' % Position - Property is of type 'rect' % Enable - Property is of type 'on/off' % Visible - Property is of type 'on/off' % Userdata - Property is of type 'MATLAB array' % Tag - Property is of type 'string' % BackgroundColor - Property is of type 'color' % Closeable - Property is of type 'bool' % Selected - Property is of type 'bool' % View - Property is of type 'handle' % UIContextMenu - Property is of type 'MATLAB array' % PanelHandle - Property is of type 'MATLAB array' % ShowTitle - Property is of type 'bool' % % mbcgui.multiview.EtchedViewContainer methods: % pPostSetView - Notify method called after the view is set % Copyright 2005-2014 The MathWorks, Inc. and Ford Global Technologies, Inc. properties (AbortSet) %SHOWTITLE Property is of type 'bool' ShowTitle = true; end methods % constructor block function obj = EtchedViewContainer(varargin) %ETCHEDVIEWCONTAINER Constructor for EtchedViewContainer object % % OBJ = ETCHEDVIEWCONTAINER (PROP, VALUE, ...) constructs a new % EtchedViewContainer object. obj@mbcgui.multiview.ViewContainer(varargin{ : }); % converted super class constructor call end % EtchedViewContainer end % constructor block methods function set.ShowTitle(obj,value) % DataType = 'bool' validateattributes(value,{'logical'}, {'scalar'},'','ShowTitle') obj.ShowTitle = value; if obj.ShowTitle set(obj.PanelHandle, 'Title', obj.View.gettitle); else set(obj.PanelHandle, 'Title', ''); end end end % set and get functions methods (Access=protected) % protected methods %---------------------------------------- function pConfigurePanel(obj) %PCONFIGUREPANEL Configure a uipanel for use as the main Panel % % PCONFIGUREPANEL(OBJ) is called to configure the object that is % used as the main panel in the ViewContainer pConfigurePanel@mbcgui.multiview.ViewContainer(obj); set(obj.PanelHandle, 'BorderType', 'etchedin'); set(obj.PanelHandle, 'LayoutBorder', [10 10 10 5]); end % pConfigurePanel %---------------------------------------- function pPostSetView(obj) %PPOSTSETVIEW Notify method called after the view is set % % PPOSTSETVIEW(OBJ) is called in response to the View property being set. pPostSetView@mbcgui.multiview.ViewContainer(obj); if ~isempty(obj.View) % Set title on the panel if obj.ShowTitle set(obj.PanelHandle, 'Title', obj.View.gettitle); end end end % pPostSetView end % protected methods end % classdef