How to set the property for jslider

3 次查看(过去 30 天)
%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!!!

采纳的回答

Yair Altman
Yair Altman 2014-11-12
  1 个评论
TAY
TAY 2014-11-12
Sorry, I dont really get it, will be better with some explains. Thank you.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Migrate GUIDE Apps 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by