if(log.isDebugEnabled()) { log.debug((getRow(pos)) + "," + (getCol(pos))); log.debug(e.getX() + "," + e.getY()+ "," + fmWidth+ "," + fmHeight); }
   public void moveCursor (MouseEvent e) {      if(!keyboardLocked) {         int pos = getPosFromView(e.getX(),e.getY());//         System.out.println((getRow(pos)) + "," + (getCol(pos)));//         System.out.println(e.getX() + "," + e.getY()+ "," + fmWidth+ "," + fmHeight);         if (pos < 0)            return ;         // because getRowColFromPoint returns offset of 1,1 we need to         //    translate to offset 0,0//         pos -= (numCols + 1);         int g = screen[pos].getWhichGUI();         // lets check for hot spots         if (g >= ScreenChar.BUTTON_LEFT &&  g <= ScreenChar.BUTTON_LAST) {            StringBuffer aid = new StringBuffer();            boolean aidFlag = true;            switch (g) {               case ScreenChar.BUTTON_RIGHT:               case ScreenChar.BUTTON_MIDDLE:                  while (screen[--pos].getWhichGUI() !=                           ScreenChar.BUTTON_LEFT) {                  }               case ScreenChar.BUTTON_LEFT:                  if (screen[pos].getChar() == 'F') {                     pos++;                  }                  else                     aidFlag=false;                  if (screen[pos+1].getChar() != '=' &&                        screen[pos+1].getChar() != '.' &&                        screen[pos+1].getChar() != '/' ) {//                     System.out.println(" Hotspot clicked!!! we will send characters " +//                                    screen[pos].getChar() +//                                    screen[pos+1].getChar());                     aid.append(screen[pos].getChar());                     aid.append(screen[pos + 1].getChar());                  }                  else {//                        System.out.println(" Hotspot clicked!!! we will send character " +//                                    screen[pos].getChar());//                     aid.append(screen[pos].getChar());                  }                  break;            }            if (aidFlag) {               switch (g) {                  case ScreenChar.BUTTON_LEFT_UP:                  case ScreenChar.BUTTON_MIDDLE_UP:                  case ScreenChar.BUTTON_RIGHT_UP:                  case ScreenChar.BUTTON_ONE_UP:                  case ScreenChar.BUTTON_SB_UP:                  case ScreenChar.BUTTON_SB_GUIDE:                     gui.sendAidKey(tnvt.AID_ROLL_UP);                     break;                  case ScreenChar.BUTTON_LEFT_DN:                  case ScreenChar.BUTTON_MIDDLE_DN:                  case ScreenChar.BUTTON_RIGHT_DN:                  case ScreenChar.BUTTON_ONE_DN:                  case ScreenChar.BUTTON_SB_DN:                  case ScreenChar.BUTTON_SB_THUMB:                     gui.sendAidKey(tnvt.AID_ROLL_DOWN);                     break;                  case ScreenChar.BUTTON_LEFT_EB:                  case ScreenChar.BUTTON_MIDDLE_EB:                  case ScreenChar.BUTTON_RIGHT_EB:                     System.out.println("Send to external Browser");                     break;                  default:                     int aidKey = Integer.parseInt(aid.toString());                     if (aidKey >= 1 && aidKey <= 12)                        gui.sendAidKey(0x30 + aidKey);                     if (aidKey >= 13 && aidKey <= 24)                        gui.sendAidKey(0xB0 + (aidKey - 12));               }            }            else {               if (screenFields.getCurrentField() != null) {                  int xPos = screenFields.getCurrentField().startPos();                  for (int x = 0; x < aid.length(); x++) {//                  System.out.println(sr + "," + (sc + x) + " " + aid.charAt(x));                     screen[xPos + x].setChar(aid.charAt(x));                  }//                  System.out.println(aid);                  screenFields.setCurrentFieldMDT();                  gui.sendAidKey(tnvt.AID_ENTER);               }            }         }         else {            // this is a note to not execute this code here when we implement            //   the remain after edit function option.            if (gui.rubberband.isAreaSelected()) {               gui.rubberband.reset();               gui.repaint();            }            else {               goto_XY(pos);               isInField(lastPos);            }         }      }      gui.requestFocus();   }