0001 function UpdateGraphProperty_jd(hObject, eventdata, handles, axes, selectedgraphs, property, listofitems)
0002
0003
0004
0005 NumberOfPropertyItems = 0;
0006 PropertyItems = {};
0007 for iGraph = 1:length(handles.graphs),
0008 if isequal(handles.graphs{iGraph}.axes,axes)...
0009 & min(abs(selectedgraphs - iGraph)) == 0,
0010 NumberOfPropertyItems = NumberOfPropertyItems + 1;
0011 PropertyItems{NumberOfPropertyItems} = get(handles.graphs{iGraph}.hgraph,property);
0012 end
0013 end
0014
0015 if isempty(PropertyItems),
0016 set(hObject,'Value',1);
0017 return
0018 end
0019
0020 PropertyItemsRef = PropertyItems{1};
0021 for iPropertyItems = 2:length(PropertyItems),
0022 if ~isequal(PropertyItemsRef,PropertyItems{iPropertyItems}),
0023 set(hObject,'Value',1);
0024 return
0025 end
0026 end
0027
0028 for iItem = 1:length(listofitems),
0029 if isequal(PropertyItemsRef,listofitems{iItem}),
0030 set(hObject,'Value',iItem + 2);
0031 end
0032 end
0033