필터 지우기
필터 지우기

How to set the property for jslider

조회 수: 3 (최근 30일)
TAY
TAY 2014년 11월 5일
댓글: TAY 2014년 11월 12일
%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