if (! (guiPane instanceof ApplicationPane))
{
return;
}
ApplicationPane appPane = (ApplicationPane) guiPane;
switch (e.getID())
{
case MouseEvent.MOUSE_MOVED:
{
MouseEvent event = (MouseEvent) e;
Point glassPanePos = ((SwingGUIPane) appPane).getPanel().getLocationOnScreen();
Point compPos = ((JComponent) e.getSource()).getLocationOnScreen();
pointerX = (int) (compPos.getX() - glassPanePos.getX() + event.getX());
pointerY = (int) (compPos.getY() - glassPanePos.getY() + event.getY());
action.sendMouseMove(pointerX, pointerY);
break;
}
case KeyEvent.KEY_RELEASED:
{
KeyEvent event = (KeyEvent) e;
switch (event.getKeyCode())
{
case KeyEvent.VK_F1:
appPane.contextHelp();
break;
case KeyEvent.VK_F5:
action.sendPaint(pointerX, pointerY, WhiteBoardAction.PAINT_EXCLAMATION);