Пример #1
0
 /**
  * @see
  *     ca.uvic.csr.shrimp.DisplayBean.event.ShrimpMouseListener#mouseReleased(ca.uvic.csr.shrimp.DisplayBean.event.ShrimpMouseEvent)
  */
 public void mouseReleased(ShrimpMouseEvent e) {
   if (!handleAnyMouseEvent(e)) {
     return;
   }
   if (e.isLeftMouseButton()) {
     processMouseRelease(UserEvent.LEFT_MOUSE_BUTTON);
   } else if (e.isMiddleMouseButton()) {
     processMouseRelease(UserEvent.MIDDLE_MOUSE_BUTTON);
   } else if (e.isRightMouseButton()) {
     processMouseRelease(UserEvent.RIGHT_MOUSE_BUTTON);
   }
 }
Пример #2
0
 /**
  * @see
  *     ca.uvic.csr.shrimp.DisplayBean.event.ShrimpMouseListener#mousePressed(ca.uvic.csr.shrimp.DisplayBean.event.ShrimpMouseEvent)
  */
 public void mousePressed(ShrimpMouseEvent e) {
   if (!handleAnyMouseEvent(e)) {
     return;
   }
   if (e.isLeftMouseButton()) {
     processMousePress(
         UserEvent.LEFT_MOUSE_BUTTON,
         UserEvent.DOUBLE_CLICK__LEFT_MOUSE_BUTTON,
         e.getClickCount());
   } else if (e.isMiddleMouseButton()) {
     processMousePress(
         UserEvent.MIDDLE_MOUSE_BUTTON,
         UserEvent.DOUBLE_CLICK__MIDDLE_MOUSE_BUTTON,
         e.getClickCount());
   } else if (e.isRightMouseButton()) {
     processMousePress(
         UserEvent.RIGHT_MOUSE_BUTTON,
         UserEvent.DOUBLE_CLICK__RIGHT_MOUSE_BUTTON,
         e.getClickCount());
   }
 }