How to create a scrolling "list" of plots in a GUI?

5 Ansichten (letzte 30 Tage)
Corey
Corey am 9 Sep. 2011
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.

Akzeptierte Antwort

Malcolm Lidierth
Malcolm Lidierth am 26 Sep. 2011
@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 Kommentar
Corey
Corey am 29 Sep. 2011
Malcolm,
This is really a fantastic toolbox - especially great for those of us who are not Java programmers, but would like to improve the appearance of our Matlab GUI's.
Also, the GScroller and GScrollPane are unique Matlab user interface objects - I have not found a comparable capability anywhere else.
Thanks!
-Corey

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (1)

Corey
Corey am 5 Okt. 2011
Malcolm,
I've got a few questions regarding the GScroller object...
Is it possible to (easily) change the width / height of buttons added to a GFlyoutPanel object?
When I add panels (and hence Matlab axes) to the GScroller object, I've noticed that once I scroll down, I cannot use the Matlab figure zoom tool on the axes which are initially not visible on the GScroller panel. Is this to be expected? Is there a way around this?
Thanks, Corey
  1 Kommentar
Malcolm Lidierth
Malcolm Lidierth am 6 Okt. 2011
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?

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Interactive Control and Callbacks finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by