
Undocumented Secrets of MATLAB
®
-Java Programming218
Note: Another re-arrangement method, which overcomes the uisplittool ush-left bug, is to
use Java-level re-arrangement, as explained in Section 4.5.4.
More advanced customization is required to present the undo/redo actions in a drop-down
(combo-box). Unfortunately, since MATLAB only enables adding uipushtools and uitoggle-
tools to toolbars, we need to use a Java component. The drawback of using such a component is
that it is inaccessible via the toolbar’s Children property (implementation of the drop-down
callback function is left as an exercise to the reader):
jToolbar = get(get(hToolbar,'JavaContainer'),'ComponentPeer'); ...