How would I allow the user to move the view when they move the mouse off screen?
I would implement the vi开发者_高级运维ew moving, I just need to know if the mouse is offscreen (offwindow) and adjust the offset variables accordingly.
Maybe you can use a MouseListener to listen for the mouseExited event. Then you can use the MouseInfo class to get the current location of the mouse and then reset the location of the window accordingly.
If the mouse is moving too fast, the mouse may still be outside the window after you reset the location so maybe you will need to start a Timer to continually check the MouseInfo to get the current mouse location and then continually adjust the window location. If at any time a mouseEntered event is generated then you can stop the Timer.
精彩评论