How to set the property for jslider

3 views (last 30 days)
TAY
TAY on 5 Nov 2014
Commented: TAY on 12 Nov 2014
%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!!!

Accepted Answer

Yair Altman
Yair Altman on 12 Nov 2014
  1 Comment
TAY
TAY on 12 Nov 2014
Sorry, I dont really get it, will be better with some explains. Thank you.

Sign in to comment.

More Answers (0)

Categories

Find more on Migrate GUIDE Apps in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!