diff src/org/tn5250j/framework/tn5250/Screen5250.java @ 425:b284b8f9e535 stable-1.9.0-8

cleanup logging
author Carl Byington <carl@five-ten-sg.com>
date Fri, 31 Oct 2014 17:22:05 -0700
parents 09c1d3aae3f0
children b525a8141923
line wrap: on
line diff
--- a/src/org/tn5250j/framework/tn5250/Screen5250.java	Fri Oct 31 12:40:09 2014 -0700
+++ b/src/org/tn5250j/framework/tn5250/Screen5250.java	Fri Oct 31 17:22:05 2014 -0700
@@ -387,147 +387,6 @@
         return sumVector;
     }
 
-    /**
-     * This will move the screen cursor based on the mouse event.
-     *
-     * I do not think the checks here for the gui characters should be here but
-     * will leave them here for now until we work out the interaction.  This
-     * should be up to the gui frontend in my opinion.
-     *
-     * @param pos
-     */
-    public boolean moveCursor(int pos) {
-        if (!oia.isKeyBoardLocked()) {
-            if (pos < 0)
-                return false;
-
-            // because getRowColFromPoint returns offset of 1,1 we need to
-            //    translate to offset 0,0
-            //         pos -= (numCols + 1);
-            int g = planes.getWhichGUI(pos);
-
-            // lets check for hot spots
-            if (g >= BUTTON_LEFT && g <= BUTTON_LAST) {
-                StringBuffer aid = new StringBuffer();
-                boolean aidFlag = true;
-
-                switch (g) {
-                    case BUTTON_RIGHT:
-                    case BUTTON_MIDDLE:
-                        while (planes.getWhichGUI(--pos) != BUTTON_LEFT) {
-                        }
-
-                    case BUTTON_LEFT:
-                        if (planes.getChar(pos) == 'F') {
-                            pos++;
-                        }
-                        else
-                            aidFlag = false;
-
-                        if (planes.getChar(pos + 1) != '='
-                                && planes.getChar(pos + 1) != '.'
-                                && planes.getChar(pos + 1) != '/') {
-                            Log.d(TAG, " Hotspot clicked!!! we will send characters "
-                                  + planes.getChar(pos) + " " + planes.getChar(pos + 1));
-                            aid.append(planes.getChar(pos));
-                            aid.append(planes.getChar(pos + 1));
-                        }
-                        else {
-                            Log.d(TAG, " Hotspot clicked!!! we will send character "
-                                  + planes.getChar(pos));
-                            aid.append(planes.getChar(pos));
-                        }
-
-                        break;
-                }
-
-                if (aidFlag) {
-                    switch (g) {
-                        case BUTTON_LEFT_UP:
-                        case BUTTON_MIDDLE_UP:
-                        case BUTTON_RIGHT_UP:
-                        case BUTTON_ONE_UP:
-                        case BUTTON_SB_UP:
-                        case BUTTON_SB_GUIDE:
-                            sessionVT.sendAidKey(AID_ROLL_UP);
-                            break;
-
-                        case BUTTON_LEFT_DN:
-                        case BUTTON_MIDDLE_DN:
-                        case BUTTON_RIGHT_DN:
-                        case BUTTON_ONE_DN:
-                        case BUTTON_SB_DN:
-                        case BUTTON_SB_THUMB:
-                            sessionVT.sendAidKey(AID_ROLL_DOWN);
-                            break;
-
-                        case BUTTON_LEFT_EB:
-                        case BUTTON_MIDDLE_EB:
-                        case BUTTON_RIGHT_EB:
-                            StringBuffer eb = new StringBuffer();
-
-                            while (planes.getWhichGUI(pos--) != BUTTON_LEFT_EB)
-                                ;
-
-                            while (planes.getWhichGUI(pos++) != BUTTON_RIGHT_EB) {
-                                eb.append(planes.getChar(pos));
-                            }
-
-                            sessionVT.showURL(eb.toString());
-                            // take out the log statement when we are sure it is
-                            // working
-                            Log.i(TAG, "Send to external Browser: " + eb.toString());
-                            break;
-
-                        default:
-                            int aidKey = Integer.parseInt(aid.toString());
-
-                            if (aidKey >= 1 && aidKey <= 12)
-                                sessionVT.sendAidKey(0x30 + aidKey);
-
-                            if (aidKey >= 13 && aidKey <= 24)
-                                sessionVT.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));
-                            planes.setChar(xPos + x , aid.charAt(x));
-                        }
-
-                        //                  System.out.println(aid);
-                        screenFields.setCurrentFieldMDT();
-                        sessionVT.sendAidKey(AID_ENTER);
-                    }
-                }
-
-                // return back to the calling routine that the cursor was not moved
-                // but something else here was done like aid keys or the such
-                return false;
-            }
-
-            // 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();
-            // return back to the calling object that the cursor was indeed
-            //  moved with in the screen object
-            return true;
-            //              }
-        }
-
-        return false;
-    }
-
     public void setVT(tnvt v) {
         sessionVT = v;
     }