It would be really great if your upcoming demo could illustrate how you did these nice panels with rounded corners as seen on the image (or if you could give me a hint of how to do so !). Thanks and congratulation on your submission
Julian
The demo is in the @jcontrol folder and needs to be copied from there (as described in the Readme,txt; Not ideal I know, but it stops me forgetting it in nearly every update).
Axes are MATLAB HG objects. To reposition Swing objects relative to MATLAB axes you would need to code a ResizeFcn callback for the container - Swing knows nothing about the the axes and the axes are rendered at a low level by MATLAB (probably using Java Graphics2D in the end, but I don't know). There is no way to connect the two that I know of except by hard-coding via ResizeFcn.
Watch out though for a new post in the next couple of months. It may suit your purpose. "Project Waterloo" includes a MATLAB compatible extension to the SwingX JXGraph which allows data to be plotted ala MATLAB (instead of functions) and allows Swing components to be positioned in the axes using axis coordinate space - in fact Swing components can replace MATLAB's 'markers'. Waterloo has a lot more in it than this (watch this space).
Hi Malcolm,
thanks for this software again. Two things:
1. The last update doesn't have the example again.
2. Is it possible to position jcontrol objects to axes instead of to the window? I have an application that has three axes, the bottom one with many jcontrol objects. When a user resizes this axis or the one immediately on top, the jcontrol objects are not repositioned correctly. I think I should mention that the axes are inside a uiextras.GridFlex layout manager. I appreciate your input (or the input of any other reader).
Thanks!
Julian
This does not look like a jcontrol problem - then you would see jcontrol (x instances).
If there are references to the audioplayer objects in the onCleanup declarations, or any other callbacks, that might explain the problem. Explicitly clearing those references in the DeleteFcn for your windows should solve the problem.
Nice piece of work!
I have issues with audioplayer and jcontrol, and I was hoping someone could give me some insight.
I created a search object that pops up in a different window when the user uses a combination of keys (i.e., ctrl+f) in the main window. The main application instantiate one audioplayer, and several text labels, and the search object look into the labels for a give text.
if I run 'clear classes' after I've opened the main file and closed it without calling the search object, it doesn't report anything.
but if I open the main file, invoke the search object and close the application (even having done no operations in the search object), the 'clear classes' command reports that:
Warning: Objects of 'onCleanup' class exist. Cannot clear this
class or any of its super-classes.
Warning: The following classes still have existing instances
that cannot be cleared:
audioplayer (3 instances)
I'm in MacBook Pro running Matlab 7.11 (R2010b)
Comment only