www.gusucode.com > mbclayouts 工具箱 matlab 源码程序 > mbclayouts/@xregtablayout2/get.m
function res =get(obj,parameter) % Synopsis % function res =get(obj,parameter) % % Description % Performs the same action as the handle graphics get function. % Some parameter types are overloaded however to take into account % object groupings. % % Tablayout2 properties - see tablayout2/set for more information % BACKGROUNDCOLOR % FOREGROUNDCOLOR % TABLABELS % MINTABSIZE % INNERBORDER % ENABLE % % Copyright 2000-2010 The MathWorks, Inc. and Ford Global Technologies, Inc. ud=get(obj.whiteline,'UserData'); switch upper(parameter) case 'POSITION' if ud.buttonloc==0 res = get(obj.xregcardlayout,'Position')-[2 2 -4 -24]-ud.innerborder; elseif ud.buttonloc==1 res = get(obj.xregcardlayout,'Position')-[2 22 -4 -24]-ud.innerborder; end case 'BACKGROUNDCOLOR' res=ud.bgcol; case 'FOREGROUNDCOLOR' res=get(ud.tablabels(1),'ForegroundColor'); case 'VISIBLE' res=ud.visible; case {'TABLABELS','LABELS'} res=get(ud.tablabels(:),'String')'; case 'MINTABSIZE' res=ud.mintabsize; case 'CALLBACK' res=ud.callback; case 'INNERBORDER' res=[-(ud.innerborder(4)+ud.innerborder(2)) -(ud.innerborder(3)+ud.innerborder(1)) ud.innerborder(2) ud.innerborder(1)]; case 'FIGURE' % euphemism for parent, used by tabobject's res=get(obj.xregcardlayout,'Parent'); case 'ENABLE' if all(ud.enabled) res='on'; elseif ~any(ud.enabled) res='off'; else res=repmat({'off'},1,length(ud.enabled)); res((ud.enabled~=0))={'on'}; end otherwise res = get(obj.xregcardlayout,parameter); end