How to set the property for jslider
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
%This is what I have declare in the OpeningFcn
[class,handles.jSlider_brightness] = javacomponent(javax.swing.JSlider,[440,340,350,40]); set(class,'PaintTicks',1,'SnapToTicks',0,'MajorTickSpacing',1,'PaintLabels',1,'PaintTrack',1,'maximum',1,'minimum',-1,'value',0); set(handles.jSlider_brightness,... 'StateChangedCallback',{@jSlider_brightness_Callback, handles});
%%I have a callback function as below :
_________________________________________________________
function jSlider_brightness_Callback(hObject, eventdata, src) global hLoadFile; handles = guidata(src); listIdx = get(handles.popupmenu_colormap,'Value'); handles.beta = get(handles.jSlider_brightness,'value'); handles.new_colormap_P = brighten(hLoadFile.handles.colormap.all_colormap{listIdx},handles.beta); colormap(handles.axes_fig,handles.new_colormap_P); % Update structure guidata(hObject,handles);
____________________________________________________________
this gui is to update the brightness of the colormap when sliding the slider but it only allow me to show the result with -1,0,. Anyone know how to solve this problem?
Thank you in advance!!!
0 commentaires
Réponse acceptée
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Startup and Shutdown dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!