
21Introduction to Java in MATLAB
®
HitTest = on
Interruptible = on
Parent = []
Selected = off
SelectionHighlight = on
Tag =
Type = EventTest
UIContextMenu = []
UserData = []
Visible = on
>> set(evt)
Class
TestEventCallback: string -or- function handle -or- cell array
. . .
>> set(evt,'TestEventCallback',@(h,e)disp(h))
>> get(evt)
Class = [ (1 by 1) java.lang.Class array]
TestEventCallback = [ (1 by 1) function_handle array] <= ok
TestEventCallbackData = []
. . .
>> evt.notifyMyTest % invoke Java event
0.0009765625 % <= MATLAB callback
Note how MATLAB automatically converted the Java event testEvent, declared in
interface