Code covered by the BSD License  

Highlights from
Graphical Wrappers

5.0

5.0 | 2 ratings Rate this file 16 Downloads (last 30 days) File Size: 31.7 KB File ID: #34728

Graphical Wrappers

by

 

22 Jan 2012 (Updated )

Wrappers improve Matlab graphical components.

| Watch this File

File Information
Description

Wrappers improve Matlab graphical components with two major features:
 - callbacks are replaced by events.
 - any property can be synchronize with another object's property.

Note: This class needs MagicListener:
http://www.mathworks.fr/matlabcentral/fileexchange/34606

Observe (and run) the class DemoWrapper to see a demonstration of wrappers.

Acknowledgements

Find J Obj Find Java Handles Of Matlab Graphic Objects and Magic Listener inspired this file.

MATLAB release MATLAB 7.7 (R2008b)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (5)
15 Oct 2013 Benoit Charles

@Kritian - A big old try-catch can do the job. An updated version is incoming.

15 Oct 2013 Kristian

Beautiful work. However, a couple of changes have been done to the underlying graphical components in recent versions of MATLAB. For instance CellEditFcn and CellSelectionFcn have been replaced by CellEditCallback and CellSelectionCallback, respectively, at least in 2012a.
Do you know if there is a way for the wrappers to detect the version and fork to the correct names?

24 Aug 2013 Benoit Charles

@Sam - Funny bug. That's append when you load a figure whith hgload and try to construct a wrapper around it. You can see, if you are interested by the topic, more informations about the bug here: http://undocumentedmatlab.com/blog/detecting-window-focus-events/#comment-14204

I'll make an update quickly to fix the issue.

23 Aug 2013 Sam

I get the following error. Please can you help me resolve it?

...Sam

Error using FigureWrapper (line 629)
The name 'FocusGainedCallback' is not an accessible property for an instance of class
'com.mathworks.hg.peer.FigureAxisComponentProxy$_AxisCanvas'.

Error in JurorSurveyApp (line 4)
csg = FigureWrapper(CompareSoundsGUI()

21 Aug 2013 Werner

So useful, sometimes I can't understand why matlab doesn't document it events behaviour for the graphical elements. Thanks for this good submission, it makes the work simplier x)

Updates
26 Aug 2013

Fix the "hgload issue"
Add documentation

16 Oct 2013

TableWrapper: R2012a compatibility

Contact us