int evtType = event.getID();
if(evtType!=MouseEvent.MOUSE_MOVED && evtType!=MouseEvent.MOUSE_PRESSED)
return;
// get the activation listener for the current dockbarManager
DockbarManager mgr = DockbarManager.getCurrent();
ActivationListener listener = mgr==null? null: mgr.getActivationListener();
if(listener==null || !listener.isAvailable())
return;
// translate the mouse event to the viewpane parent
MouseEvent evt = (MouseEvent)event;
Point p = SwingUtilities.convertPoint((Component)evt.getSource(), evt.getPoint(), mgr.getViewPane().getParent());
ViewPane viewPane = mgr.getViewPane();
boolean mouseOver = viewPane.getBounds().contains(p);
if(evtType==MouseEvent.MOUSE_PRESSED)
// check mousePressed for activation/deactivation
listener.mousePressed(p, mouseOver);