def __init__(self): MouseListener.__init__(self)
# arguments for demostration purpose will_change1 = Par('string', 'val') will_change2 = Par('int', 14) demo3 = Par('int', 20) demo_var4 = Par('float', 1.2) demo_change = Par('float', 20.0) #demo_uri = Par('string', 'file') # define a mouse listener and register it to Plot1 def __single_click__(e): print e.getX() def __double_click__(e): frame_id.value = int(e.getX()) mli1 = MouseListener() mli1.on_double_click = __double_click__ #Plot1.add_mouse_listener(mli1) # Make a new plot if not 'Plot4' in globals() or Plot4 is None or Plot4.is_disposed() : Plot4 = Plot(title = 'Integration') Plot4.add_mouse_listener(mli1) __cur_ds__ = None def jump_to_frame(fid): global __cur_ds__ print 'jump_to_frame(' + str(fid) + ')' if not __cur_ds__ is None : ds_size = len(__cur_ds__) if fid >= 0 and fid < ds_size :