Keeping the main view updated as the overview rectangle is being dragged

Article ID: 2298
Last updated: 29 May, 2018
Article ID: 2298
Last updated: 29 May, 2018
Revision: 3
Views: 636
Posted: 15 Jul, 2005
by Dean J.
Updated: 29 May, 2018
by Gargani A.

Question

How can I ensure that the main view is updated as the overview rectangle is being dragged?

Answer

By default, JViews uses IlvManagerMagViewInteractor to translate the target view when the mouse is released. You can have the target view translated while the mouse is dragged by overriding the IlvManagerMagViewInteractor.processMouseEvent method. For example:

IlvManagerMagViewInteractor interactor = new IlvManagerMagViewInteractor(target, true) {
protected void processMouseMotionEvent(MouseEvent event) {
if (event.getModifiers()== MouseEvent.MOUSE_DRAGGED) {
super.processMouseMotionEvent(event);
adjustView(getRectangle());
} else {
super.processMouseMotionEvent(event);
}
}
};

Then you can set this customized interactor onto the overview.

This article was:   Helpful | Not helpful
Report an issue
Article ID: 2298
Last updated: 29 May, 2018
Revision: 3
Views: 636
Posted: 15 Jul, 2005 by Dean J.
Updated: 29 May, 2018 by Gargani A.

Others in this category