How to create a scrolling "list" of plots in a GUI?
조회 수: 5 (최근 30일)
이전 댓글 표시
I'm looking for a way to create something like a Java JScrollPane() in a Matlab GUI, and have it contain multiple Matlab axes() objects.
I've tried using this: http://www.mathworks.com/matlabcentral/fileexchange/32697-making-matlab-swing I'm able to get multiple JPanel() objects into a JScrollPane() - however, the underlying issue there is the use of a JPanel() object as a Parent for a Matlab axes() object (can't do it).
Anyone know of a workable approach for this?
This is the best approach I have come across so far (which actually does a pretty good job): http://www.mathworks.com/matlabcentral/fileexchange/7730-scrollsubplot
I'd love to find a way to do this with Java classes though, since the look is much better than native Matlab widgets.
댓글 수: 0
채택된 답변
Malcolm Lidierth
2011년 9월 26일
@Corey, two scrolling objects now added to the Waterloo Swing Library [version1.06] may do what you want: GScroller -which scrolls unidirectionally and might be useful for multiple, equally sized images and a GScrollPane that gives 2D scrolling.
The library is free and open-source (GPLv3) and available on SourceForge. See http://sigtool.sourceforge.net/
Regards ML
General screenshots showing some of the MATLAB GUIs you can create with this library:
추가 답변 (1개)
Corey
2011년 10월 5일
댓글 수: 1
Malcolm Lidierth
2011년 10월 6일
Corey
The GFlyoutPanel provides a dockbar-like panel that appears when the mouse moves over the relevant side of a figure. That's why its is dockbar size by default but it has a setWidth(n) method. Use that to set the width for vertical, and height for horizontal, GFlyoutPanels.
Using figure zooms/pan with the standard scrolling tools inside a GScroller was not expected. Pan/zoom will work with most of the components but maybe not here. Both the GScroller and GScrollPane provide panning via the scrollbars. You could program the button down callback for the uipanels to respond to selection of a specific uipanel e.g. by copying its contents to a full size figure. Would that help in your context?
참고 항목
카테고리
Help Center 및 File Exchange에서 Interactive Control and Callbacks에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!