|
"Yair Altman" <altmanyDEL@gmailDEL.comDEL> wrote in message <gpaaep$ard$1@fred.mathworks.com>...
> "Matthew Whitaker" <mattlwhitaker@REMOVEgmail.com> wrote in message <gp9gad$sle$1@fred.mathworks.com>...
> > Hello,
> >
> > I just updated from R2006b to R2009a. I have some critical functions in my code that rely on being able to interact with the underlying Java API for handle graphics objects.
> >
> > I see that the Mathworks folks have decided to start warning that the JavaFrame property of the figure object is going to be obsoleted in a future release. I gave them my feedback at their site but I'm interested in who else out there will be greatly inconvenienced by this. Also does anyone have any insight into any replacements for this.
> >
> > I do realize that it is an undocumented feature and can change any time (so I need no lectures on that) but when there still is not a built in method (as far as I can see) to maximize and minimize figures (see setWindowState and setWindowOnTop in FEX) I still see a need to be able to get at this stuff.
> >
> > There are a whole host of features and properties of the underlying Java objects that the JavaFrame gives you a hook into. They are not for the newbie but when you are developing deployed commercial apps they can be a life saver.
> >
> > I'm interested in any comments on this
> >
> > Matt W.
>
> I believe the warning started in 2008a or 2008b and I too have been much inconvenienced with it. There are several important features that can only be done using the underlying Java objects, and (at least today) these can only be accessed via the figure's JavaFrame property.
>
> Another example to the one you gave is setting some unexposed properties of uicontrols like continuous slider movement callbacks, editbox typing callbacks, focus gained/lost callbacks (for a nice rollover/highlighting effect) etc. If TMW plan to enable direct access to the Java controls via their HG container then ok, but if that does not happen then it would be cause shameful degradation in Matlab GUI effectiveness.
>
> There are several workaround that you could use even then. I won't post them here (I don't want to give TMW any bad ideas...), but if and when the crisis does arrive I will surely post and try my best to scream them out loud wherever I can.
>
> Until then, simply turn the warning off by:
> warning off MATLAB:HandleGraphics:ObsoletedProperty:JavaFrame
>
> Yair Altman
> http://Undocumented-Matlab.com (one of the places where I'll post...)
I have tried to get the JavaFrame another way(inspired by Yair). But till now I can only get a com.mathworks.hg.peer.FigureFrameProxy$FigureFrame object insted of the com.mathworks.hg.peer.FigurePeer object from get(hfig,'JavaFrame'). But with this object I can setAlwaysOnTop,setMaximized,setMinimized, etc. just like I usually do with the obsoleting JavaFrame object.
Vist http://cid-909609e321d6e37a.skydrive.live.com/self.aspx/.Public/getJFrame.m for the detailed code.
|