bugged
stringlengths
6
599k
fixed
stringlengths
6
40.8M
__index_level_0__
int64
0
3.24M
public void setParagraphAttributes(int offset, int length, AttributeSet attributes, boolean replace) { // FIXME: Implement me. throw new Error("not implemented"); }
public void setParagraphAttributes(int offset, int length, AttributeSet attributes, boolean replace) { // FIXME: Implement me. int index = offset; while (index < offset + length) { AbstractElement par = (AbstractElement) getParagraphElement(index); AttributeContext ctx = getAttributeContext(); if (replace) par.removeAttributes(par); par.addAttributes(attributes); index = par.getElementCount(); } }
7,963
public boolean moveCursor(MouseEvent e, 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) != '/') { // System.out.println(" Hotspot clicked!!! we will send // characters " + // screen[pos].getChar() + // screen[pos+1].getChar()); aid.append(planes.getChar(pos)); aid.append(planes.getChar(pos + 1)); } else { log.debug(" 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(tnvt.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(tnvt.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)); } org.tn5250j.tools.system.OperatingSystem.displayURL(eb .toString()); // take out the log statement when we are sure it is // working log.info("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(tnvt.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; } 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); // return back to the calling object that the cursor was indeed // moved with in the screen object return true; // } } } return false; }
publicbooleanmoveCursor(MouseEvente,intpos){ if(!oia.isKeyBoardLocked()){ if(pos<0) returnfalse; //becausegetRowColFromPointreturnsoffsetof1,1weneedto //translatetooffset0,0 //pos-=(numCols+1); intg=planes.getWhichGUI(pos); //letscheckforhotspots if(g>=BUTTON_LEFT&&g<=BUTTON_LAST){ StringBufferaid=newStringBuffer(); booleanaidFlag=true; switch(g){ caseBUTTON_RIGHT: caseBUTTON_MIDDLE: while(planes.getWhichGUI(--pos)!=BUTTON_LEFT){ } caseBUTTON_LEFT: if(planes.getChar(pos)=='F'){ pos++; }else aidFlag=false; if(planes.getChar(pos+1)!='=' &&planes.getChar(pos+1)!='.' &&planes.getChar(pos+1)!='/'){ //System.out.println("Hotspotclicked!!!wewillsend //characters"+ //screen[pos].getChar()+ //screen[pos+1].getChar()); aid.append(planes.getChar(pos)); aid.append(planes.getChar(pos+1)); }else{ log.debug("Hotspotclicked!!!wewillsendcharacter" +planes.getChar(pos)); aid.append(planes.getChar(pos)); } break; } if(aidFlag){ switch(g){ caseBUTTON_LEFT_UP: caseBUTTON_MIDDLE_UP: caseBUTTON_RIGHT_UP: caseBUTTON_ONE_UP: caseBUTTON_SB_UP: caseBUTTON_SB_GUIDE: sessionVT.sendAidKey(tnvt.AID_ROLL_UP); break; caseBUTTON_LEFT_DN: caseBUTTON_MIDDLE_DN: caseBUTTON_RIGHT_DN: caseBUTTON_ONE_DN: caseBUTTON_SB_DN: caseBUTTON_SB_THUMB: sessionVT.sendAidKey(tnvt.AID_ROLL_DOWN); break; caseBUTTON_LEFT_EB: caseBUTTON_MIDDLE_EB: caseBUTTON_RIGHT_EB: StringBuffereb=newStringBuffer(); while(planes.getWhichGUI(pos--)!=BUTTON_LEFT_EB) ; while(planes.getWhichGUI(pos++)!=BUTTON_RIGHT_EB){ eb.append(planes.getChar(pos)); } org.tn5250j.tools.system.OperatingSystem.displayURL(eb .toString()); //takeoutthelogstatementwhenwearesureitis //working log.info("SendtoexternalBrowser:"+eb.toString()); break; default: intaidKey=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){ intxPos=screenFields.getCurrentField().startPos(); for(intx=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(tnvt.AID_ENTER); } } //returnbacktothecallingroutinethatthecursorwasnotmoved //butsomethingelseherewasdonelikeaidkeysorthesuch returnfalse; } else{ //thisisanotetonotexecutethiscodeherewhenwe //implement //theremainaftereditfunctionoption. // if(gui.rubberband.isAreaSelected()){ // gui.rubberband.reset(); // gui.repaint(); // }else{ goto_XY(pos); isInField(lastPos); //returnbacktothecallingobjectthatthecursorwasindeed //movedwithinthescreenobject returntrue; // } } } returnfalse; }
7,964
public boolean moveCursor(MouseEvent e, 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) != '/') { // System.out.println(" Hotspot clicked!!! we will send // characters " + // screen[pos].getChar() + // screen[pos+1].getChar()); aid.append(planes.getChar(pos)); aid.append(planes.getChar(pos + 1)); } else { log.debug(" 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(tnvt.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(tnvt.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)); } org.tn5250j.tools.system.OperatingSystem.displayURL(eb .toString()); // take out the log statement when we are sure it is // working log.info("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(tnvt.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; } 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); // return back to the calling object that the cursor was indeed // moved with in the screen object return true; // } } } return false; }
publicbooleanmoveCursor(MouseEvente,intpos){ if(!oia.isKeyBoardLocked()){ if(pos<0) returnfalse; //becausegetRowColFromPointreturnsoffsetof1,1weneedto //translatetooffset0,0 //pos-=(numCols+1); intg=planes.getWhichGUI(pos); //letscheckforhotspots if(g>=BUTTON_LEFT&&g<=BUTTON_LAST){ StringBufferaid=newStringBuffer(); booleanaidFlag=true; switch(g){ caseBUTTON_RIGHT: caseBUTTON_MIDDLE: while(planes.getWhichGUI(--pos)!=BUTTON_LEFT){ } caseBUTTON_LEFT: if(planes.getChar(pos)=='F'){ pos++; }else aidFlag=false; if(planes.getChar(pos+1)!='=' &&planes.getChar(pos+1)!='.' &&planes.getChar(pos+1)!='/'){ //System.out.println("Hotspotclicked!!!wewillsend //characters"+ //screen[pos].getChar()+ //screen[pos+1].getChar()); aid.append(planes.getChar(pos)); aid.append(planes.getChar(pos+1)); }else{ log.debug("Hotspotclicked!!!wewillsendcharacter" +planes.getChar(pos)); aid.append(planes.getChar(pos)); } break; } if(aidFlag){ switch(g){ caseBUTTON_LEFT_UP: caseBUTTON_MIDDLE_UP: caseBUTTON_RIGHT_UP: caseBUTTON_ONE_UP: caseBUTTON_SB_UP: caseBUTTON_SB_GUIDE: sessionVT.sendAidKey(tnvt.AID_ROLL_UP); break; caseBUTTON_LEFT_DN: caseBUTTON_MIDDLE_DN: caseBUTTON_RIGHT_DN: caseBUTTON_ONE_DN: caseBUTTON_SB_DN: caseBUTTON_SB_THUMB: sessionVT.sendAidKey(tnvt.AID_ROLL_DOWN); break; caseBUTTON_LEFT_EB: caseBUTTON_MIDDLE_EB: caseBUTTON_RIGHT_EB: StringBuffereb=newStringBuffer(); while(planes.getWhichGUI(pos--)!=BUTTON_LEFT_EB) ; while(planes.getWhichGUI(pos++)!=BUTTON_RIGHT_EB){ eb.append(planes.getChar(pos)); } org.tn5250j.tools.system.OperatingSystem.displayURL(eb .toString()); //takeoutthelogstatementwhenwearesureitis //working log.info("SendtoexternalBrowser:"+eb.toString()); break; default: intaidKey=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){ intxPos=screenFields.getCurrentField().startPos(); for(intx=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(tnvt.AID_ENTER); } } //returnbacktothecallingroutinethatthecursorwasnotmoved //butsomethingelseherewasdonelikeaidkeysorthesuch returnfalse; } else{ //thisisanotetonotexecutethiscodeherewhenwe //implement //theremainaftereditfunctionoption. // if(gui.rubberband.isAreaSelected()){ // gui.rubberband.reset(); // gui.repaint(); // }else{ goto_XY(pos); isInField(lastPos); //returnbacktothecallingobjectthatthecursorwasindeed //movedwithinthescreenobject returntrue; // } } } returnfalse; }
7,965
public boolean moveCursor(MouseEvent e, 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) != '/') { // System.out.println(" Hotspot clicked!!! we will send // characters " + // screen[pos].getChar() + // screen[pos+1].getChar()); aid.append(planes.getChar(pos)); aid.append(planes.getChar(pos + 1)); } else { log.debug(" 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(tnvt.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(tnvt.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)); } org.tn5250j.tools.system.OperatingSystem.displayURL(eb .toString()); // take out the log statement when we are sure it is // working log.info("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(tnvt.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; } 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); // return back to the calling object that the cursor was indeed // moved with in the screen object return true; // } } } return false; }
publicbooleanmoveCursor(MouseEvente,intpos){ if(!oia.isKeyBoardLocked()){ if(pos<0) returnfalse; //becausegetRowColFromPointreturnsoffsetof1,1weneedto //translatetooffset0,0 //pos-=(numCols+1); intg=planes.getWhichGUI(pos); //letscheckforhotspots if(g>=BUTTON_LEFT&&g<=BUTTON_LAST){ StringBufferaid=newStringBuffer(); booleanaidFlag=true; switch(g){ caseBUTTON_RIGHT: caseBUTTON_MIDDLE: while(planes.getWhichGUI(--pos)!=BUTTON_LEFT){ } caseBUTTON_LEFT: if(planes.getChar(pos)=='F'){ pos++; }else aidFlag=false; if(planes.getChar(pos+1)!='=' &&planes.getChar(pos+1)!='.' &&planes.getChar(pos+1)!='/'){ //System.out.println("Hotspotclicked!!!wewillsend //characters"+ //screen[pos].getChar()+ //screen[pos+1].getChar()); aid.append(planes.getChar(pos)); aid.append(planes.getChar(pos+1)); }else{ log.debug("Hotspotclicked!!!wewillsendcharacter" +planes.getChar(pos)); aid.append(planes.getChar(pos)); } break; } if(aidFlag){ switch(g){ caseBUTTON_LEFT_UP: caseBUTTON_MIDDLE_UP: caseBUTTON_RIGHT_UP: caseBUTTON_ONE_UP: caseBUTTON_SB_UP: caseBUTTON_SB_GUIDE: sessionVT.sendAidKey(tnvt.AID_ROLL_UP); break; caseBUTTON_LEFT_DN: caseBUTTON_MIDDLE_DN: caseBUTTON_RIGHT_DN: caseBUTTON_ONE_DN: caseBUTTON_SB_DN: caseBUTTON_SB_THUMB: sessionVT.sendAidKey(tnvt.AID_ROLL_DOWN); break; caseBUTTON_LEFT_EB: caseBUTTON_MIDDLE_EB: caseBUTTON_RIGHT_EB: StringBuffereb=newStringBuffer(); while(planes.getWhichGUI(pos--)!=BUTTON_LEFT_EB) ; while(planes.getWhichGUI(pos++)!=BUTTON_RIGHT_EB){ eb.append(planes.getChar(pos)); } org.tn5250j.tools.system.OperatingSystem.displayURL(eb .toString()); //takeoutthelogstatementwhenwearesureitis //working log.info("SendtoexternalBrowser:"+eb.toString()); break; default: intaidKey=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){ intxPos=screenFields.getCurrentField().startPos(); for(intx=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(tnvt.AID_ENTER); } } //returnbacktothecallingroutinethatthecursorwasnotmoved //butsomethingelseherewasdonelikeaidkeysorthesuch returnfalse; } else{ //thisisanotetonotexecutethiscodeherewhenwe //implement //theremainaftereditfunctionoption. // if(gui.rubberband.isAreaSelected()){ // gui.rubberband.reset(); // gui.repaint(); // }else{ goto_XY(pos); isInField(lastPos); //returnbacktothecallingobjectthatthecursorwasindeed //movedwithinthescreenobject returntrue; // } } } returnfalse; }
7,966
public boolean moveCursor(MouseEvent e, 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) != '/') { // System.out.println(" Hotspot clicked!!! we will send // characters " + // screen[pos].getChar() + // screen[pos+1].getChar()); aid.append(planes.getChar(pos)); aid.append(planes.getChar(pos + 1)); } else { log.debug(" 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(tnvt.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(tnvt.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)); } org.tn5250j.tools.system.OperatingSystem.displayURL(eb .toString()); // take out the log statement when we are sure it is // working log.info("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(tnvt.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; } 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); // return back to the calling object that the cursor was indeed // moved with in the screen object return true; // } } } return false; }
publicbooleanmoveCursor(MouseEvente,intpos){ if(!oia.isKeyBoardLocked()){ if(pos<0) returnfalse; //becausegetRowColFromPointreturnsoffsetof1,1weneedto //translatetooffset0,0 //pos-=(numCols+1); intg=planes.getWhichGUI(pos); //letscheckforhotspots if(g>=BUTTON_LEFT&&g<=BUTTON_LAST){ StringBufferaid=newStringBuffer(); booleanaidFlag=true; switch(g){ caseBUTTON_RIGHT: caseBUTTON_MIDDLE: while(planes.getWhichGUI(--pos)!=BUTTON_LEFT){ } caseBUTTON_LEFT: if(planes.getChar(pos)=='F'){ pos++; }else aidFlag=false; if(planes.getChar(pos+1)!='=' &&planes.getChar(pos+1)!='.' &&planes.getChar(pos+1)!='/'){ //System.out.println("Hotspotclicked!!!wewillsend //characters"+ //screen[pos].getChar()+ //screen[pos+1].getChar()); aid.append(planes.getChar(pos)); aid.append(planes.getChar(pos+1)); }else{ log.debug("Hotspotclicked!!!wewillsendcharacter" +planes.getChar(pos)); aid.append(planes.getChar(pos)); } break; } if(aidFlag){ switch(g){ caseBUTTON_LEFT_UP: caseBUTTON_MIDDLE_UP: caseBUTTON_RIGHT_UP: caseBUTTON_ONE_UP: caseBUTTON_SB_UP: caseBUTTON_SB_GUIDE: sessionVT.sendAidKey(tnvt.AID_ROLL_UP); break; caseBUTTON_LEFT_DN: caseBUTTON_MIDDLE_DN: caseBUTTON_RIGHT_DN: caseBUTTON_ONE_DN: caseBUTTON_SB_DN: caseBUTTON_SB_THUMB: sessionVT.sendAidKey(tnvt.AID_ROLL_DOWN); break; caseBUTTON_LEFT_EB: caseBUTTON_MIDDLE_EB: caseBUTTON_RIGHT_EB: StringBuffereb=newStringBuffer(); while(planes.getWhichGUI(pos--)!=BUTTON_LEFT_EB) ; while(planes.getWhichGUI(pos++)!=BUTTON_RIGHT_EB){ eb.append(planes.getChar(pos)); } org.tn5250j.tools.system.OperatingSystem.displayURL(eb .toString()); //takeoutthelogstatementwhenwearesureitis //working log.info("SendtoexternalBrowser:"+eb.toString()); break; default: intaidKey=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){ intxPos=screenFields.getCurrentField().startPos(); for(intx=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(tnvt.AID_ENTER); } } //returnbacktothecallingroutinethatthecursorwasnotmoved //butsomethingelseherewasdonelikeaidkeysorthesuch returnfalse; } else{ //thisisanotetonotexecutethiscodeherewhenwe //implement //theremainaftereditfunctionoption. // if(gui.rubberband.isAreaSelected()){ // gui.rubberband.reset(); // gui.repaint(); // }else{ goto_XY(pos); isInField(lastPos); //returnbacktothecallingobjectthatthecursorwasindeed //movedwithinthescreenobject returntrue; // } } } returnfalse; }
7,967
public boolean moveCursor(MouseEvent e, 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) != '/') { // System.out.println(" Hotspot clicked!!! we will send // characters " + // screen[pos].getChar() + // screen[pos+1].getChar()); aid.append(planes.getChar(pos)); aid.append(planes.getChar(pos + 1)); } else { log.debug(" 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(tnvt.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(tnvt.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)); } org.tn5250j.tools.system.OperatingSystem.displayURL(eb .toString()); // take out the log statement when we are sure it is // working log.info("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(tnvt.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; } 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); // return back to the calling object that the cursor was indeed // moved with in the screen object return true; // } } } return false; }
publicbooleanmoveCursor(MouseEvente,intpos){ if(!oia.isKeyBoardLocked()){ if(pos<0) returnfalse; //becausegetRowColFromPointreturnsoffsetof1,1weneedto //translatetooffset0,0 //pos-=(numCols+1); intg=planes.getWhichGUI(pos); //letscheckforhotspots if(g>=BUTTON_LEFT&&g<=BUTTON_LAST){ StringBufferaid=newStringBuffer(); booleanaidFlag=true; switch(g){ caseBUTTON_RIGHT: caseBUTTON_MIDDLE: while(planes.getWhichGUI(--pos)!=BUTTON_LEFT){ } caseBUTTON_LEFT: if(planes.getChar(pos)=='F'){ pos++; }else aidFlag=false; if(planes.getChar(pos+1)!='=' &&planes.getChar(pos+1)!='.' &&planes.getChar(pos+1)!='/'){ //System.out.println("Hotspotclicked!!!wewillsend //characters"+ //screen[pos].getChar()+ //screen[pos+1].getChar()); aid.append(planes.getChar(pos)); aid.append(planes.getChar(pos+1)); }else{ log.debug("Hotspotclicked!!!wewillsendcharacter" +planes.getChar(pos)); aid.append(planes.getChar(pos)); } break; } if(aidFlag){ switch(g){ caseBUTTON_LEFT_UP: caseBUTTON_MIDDLE_UP: caseBUTTON_RIGHT_UP: caseBUTTON_ONE_UP: caseBUTTON_SB_UP: caseBUTTON_SB_GUIDE: sessionVT.sendAidKey(tnvt.AID_ROLL_UP); break; caseBUTTON_LEFT_DN: caseBUTTON_MIDDLE_DN: caseBUTTON_RIGHT_DN: caseBUTTON_ONE_DN: caseBUTTON_SB_DN: caseBUTTON_SB_THUMB: sessionVT.sendAidKey(tnvt.AID_ROLL_DOWN); break; caseBUTTON_LEFT_EB: caseBUTTON_MIDDLE_EB: caseBUTTON_RIGHT_EB: StringBuffereb=newStringBuffer(); while(planes.getWhichGUI(pos--)!=BUTTON_LEFT_EB) ; while(planes.getWhichGUI(pos++)!=BUTTON_RIGHT_EB){ eb.append(planes.getChar(pos)); } org.tn5250j.tools.system.OperatingSystem.displayURL(eb .toString()); //takeoutthelogstatementwhenwearesureitis //working log.info("SendtoexternalBrowser:"+eb.toString()); break; default: intaidKey=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){ intxPos=screenFields.getCurrentField().startPos(); for(intx=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(tnvt.AID_ENTER); } } //returnbacktothecallingroutinethatthecursorwasnotmoved //butsomethingelseherewasdonelikeaidkeysorthesuch returnfalse; } else{ //thisisanotetonotexecutethiscodeherewhenwe //implement //theremainaftereditfunctionoption. // if(gui.rubberband.isAreaSelected()){ // gui.rubberband.reset(); // gui.repaint(); // }else{ goto_XY(pos); isInField(lastPos); //returnbacktothecallingobjectthatthecursorwasindeed //movedwithinthescreenobject returntrue; // } } } returnfalse; }
7,968
public boolean moveCursor(MouseEvent e, 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) != '/') { // System.out.println(" Hotspot clicked!!! we will send // characters " + // screen[pos].getChar() + // screen[pos+1].getChar()); aid.append(planes.getChar(pos)); aid.append(planes.getChar(pos + 1)); } else { log.debug(" 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(tnvt.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(tnvt.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)); } org.tn5250j.tools.system.OperatingSystem.displayURL(eb .toString()); // take out the log statement when we are sure it is // working log.info("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(tnvt.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; } 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); // return back to the calling object that the cursor was indeed // moved with in the screen object return true; // } } } return false; }
publicbooleanmoveCursor(MouseEvente,intpos){ if(!oia.isKeyBoardLocked()){ if(pos<0) returnfalse; //becausegetRowColFromPointreturnsoffsetof1,1weneedto //translatetooffset0,0 //pos-=(numCols+1); intg=planes.getWhichGUI(pos); //letscheckforhotspots if(g>=BUTTON_LEFT&&g<=BUTTON_LAST){ StringBufferaid=newStringBuffer(); booleanaidFlag=true; switch(g){ caseBUTTON_RIGHT: caseBUTTON_MIDDLE: while(planes.getWhichGUI(--pos)!=BUTTON_LEFT){ } caseBUTTON_LEFT: if(planes.getChar(pos)=='F'){ pos++; }else aidFlag=false; if(planes.getChar(pos+1)!='=' &&planes.getChar(pos+1)!='.' &&planes.getChar(pos+1)!='/'){ //System.out.println("Hotspotclicked!!!wewillsend //characters"+ //screen[pos].getChar()+ //screen[pos+1].getChar()); aid.append(planes.getChar(pos)); aid.append(planes.getChar(pos+1)); }else{ log.debug("Hotspotclicked!!!wewillsendcharacter" +planes.getChar(pos)); aid.append(planes.getChar(pos)); } break; } if(aidFlag){ switch(g){ caseBUTTON_LEFT_UP: caseBUTTON_MIDDLE_UP: caseBUTTON_RIGHT_UP: caseBUTTON_ONE_UP: caseBUTTON_SB_UP: caseBUTTON_SB_GUIDE: sessionVT.sendAidKey(tnvt.AID_ROLL_UP); break; caseBUTTON_LEFT_DN: caseBUTTON_MIDDLE_DN: caseBUTTON_RIGHT_DN: caseBUTTON_ONE_DN: caseBUTTON_SB_DN: caseBUTTON_SB_THUMB: sessionVT.sendAidKey(tnvt.AID_ROLL_DOWN); break; caseBUTTON_LEFT_EB: caseBUTTON_MIDDLE_EB: caseBUTTON_RIGHT_EB: StringBuffereb=newStringBuffer(); while(planes.getWhichGUI(pos--)!=BUTTON_LEFT_EB) ; while(planes.getWhichGUI(pos++)!=BUTTON_RIGHT_EB){ eb.append(planes.getChar(pos)); } org.tn5250j.tools.system.OperatingSystem.displayURL(eb .toString()); //takeoutthelogstatementwhenwearesureitis //working log.info("SendtoexternalBrowser:"+eb.toString()); break; default: intaidKey=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){ intxPos=screenFields.getCurrentField().startPos(); for(intx=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(tnvt.AID_ENTER); } } //returnbacktothecallingroutinethatthecursorwasnotmoved //butsomethingelseherewasdonelikeaidkeysorthesuch returnfalse; } else{ //thisisanotetonotexecutethiscodeherewhenwe //implement //theremainaftereditfunctionoption. // if(gui.rubberband.isAreaSelected()){ // gui.rubberband.reset(); // gui.repaint(); // }else{ goto_XY(pos); isInField(lastPos); //returnbacktothecallingobjectthatthecursorwasindeed //movedwithinthescreenobject returntrue; // } } } returnfalse; }
7,969
public boolean moveCursor(MouseEvent e, 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) != '/') { // System.out.println(" Hotspot clicked!!! we will send // characters " + // screen[pos].getChar() + // screen[pos+1].getChar()); aid.append(planes.getChar(pos)); aid.append(planes.getChar(pos + 1)); } else { log.debug(" 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(tnvt.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(tnvt.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)); } org.tn5250j.tools.system.OperatingSystem.displayURL(eb .toString()); // take out the log statement when we are sure it is // working log.info("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(tnvt.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; } 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); // return back to the calling object that the cursor was indeed // moved with in the screen object return true; // } } } return false; }
publicSystem.out.println(g); booleanSystem.out.println(g); moveCursor(MouseEventSystem.out.println(g); e,System.out.println(g); intSystem.out.println(g); pos)System.out.println(g); { ifSystem.out.println(g); (!oia.isKeyBoardLocked())System.out.println(g); { ifSystem.out.println(g); (posSystem.out.println(g); <System.out.println(g); 0) returnSystem.out.println(g); false; //System.out.println(g); becauseSystem.out.println(g); getRowColFromPointSystem.out.println(g); returnsSystem.out.println(g); offsetSystem.out.println(g); ofSystem.out.println(g); 1,1System.out.println(g); weSystem.out.println(g); needSystem.out.println(g); to //System.out.println(g); System.out.println(g); System.out.println(g); System.out.println(g); translateSystem.out.println(g); toSystem.out.println(g); offsetSystem.out.println(g); 0,0 //System.out.println(g); System.out.println(g); System.out.println(g); System.out.println(g); System.out.println(g); System.out.println(g); System.out.println(g); System.out.println(g); System.out.println(g); posSystem.out.println(g); -=System.out.println(g); (numColsSystem.out.println(g); +System.out.println(g); 1); intSystem.out.println(g); gSystem.out.println(g); =System.out.println(g); planes.getWhichGUI(pos); //System.out.println(g); letsSystem.out.println(g); checkSystem.out.println(g); forSystem.out.println(g); hotSystem.out.println(g); spots ifSystem.out.println(g); (gSystem.out.println(g); >=System.out.println(g); BUTTON_LEFTSystem.out.println(g); &&System.out.println(g); gSystem.out.println(g); <=System.out.println(g); BUTTON_LAST)System.out.println(g); { StringBufferSystem.out.println(g); aidSystem.out.println(g); =System.out.println(g); newSystem.out.println(g); StringBuffer(); booleanSystem.out.println(g); aidFlagSystem.out.println(g); =System.out.println(g); true; switchSystem.out.println(g); (g)System.out.println(g); { caseSystem.out.println(g); BUTTON_RIGHT: caseSystem.out.println(g); BUTTON_MIDDLE: whileSystem.out.println(g); (planes.getWhichGUI(--pos)System.out.println(g); !=System.out.println(g); BUTTON_LEFT)System.out.println(g); { } caseSystem.out.println(g); BUTTON_LEFT: ifSystem.out.println(g); (planes.getChar(pos)System.out.println(g); ==System.out.println(g); 'F')System.out.println(g); { pos++; }System.out.println(g); else aidFlagSystem.out.println(g); =System.out.println(g); false; ifSystem.out.println(g); (planes.getChar(posSystem.out.println(g); +System.out.println(g); 1)System.out.println(g); !=System.out.println(g); '=' &&System.out.println(g); planes.getChar(posSystem.out.println(g); +System.out.println(g); 1)System.out.println(g); !=System.out.println(g); '.' &&System.out.println(g); planes.getChar(posSystem.out.println(g); +System.out.println(g); 1)System.out.println(g); !=System.out.println(g); '/')System.out.println(g); { //System.out.println(g); System.out.println(g); System.out.println(g); System.out.println(g); System.out.println(g); System.out.println(g); System.out.println(g); System.out.println(g); System.out.println(g); System.out.println(g); System.out.println(g); System.out.println(g); System.out.println(g); System.out.println(g); System.out.println(g); System.out.println(g); System.out.println(g); System.out.println(g); System.out.println(g); System.out.println(g); System.out.println(g); System.out.println("System.out.println(g); HotspotSystem.out.println(g); clicked!!!System.out.println(g); weSystem.out.println(g); willSystem.out.println(g); send //System.out.println(g); charactersSystem.out.println(g); "System.out.println(g); + //System.out.println(g); System.out.println(g); System.out.println(g); System.out.println(g); System.out.println(g); System.out.println(g); System.out.println(g); System.out.println(g); System.out.println(g); System.out.println(g); System.out.println(g); System.out.println(g); System.out.println(g); System.out.println(g); System.out.println(g); System.out.println(g); System.out.println(g); System.out.println(g); System.out.println(g); System.out.println(g); System.out.println(g); System.out.println(g); System.out.println(g); System.out.println(g); System.out.println(g); System.out.println(g); System.out.println(g); System.out.println(g); System.out.println(g); System.out.println(g); System.out.println(g); System.out.println(g); System.out.println(g); System.out.println(g); System.out.println(g); System.out.println(g); screen[pos].getChar()System.out.println(g); + //System.out.println(g); System.out.println(g); System.out.println(g); System.out.println(g); System.out.println(g); System.out.println(g); System.out.println(g); System.out.println(g); System.out.println(g); System.out.println(g); System.out.println(g); System.out.println(g); System.out.println(g); System.out.println(g); System.out.println(g); System.out.println(g); System.out.println(g); System.out.println(g); System.out.println(g); System.out.println(g); System.out.println(g); System.out.println(g); System.out.println(g); System.out.println(g); System.out.println(g); System.out.println(g); System.out.println(g); System.out.println(g); System.out.println(g); System.out.println(g); System.out.println(g); System.out.println(g); System.out.println(g); System.out.println(g); System.out.println(g); System.out.println(g); screen[pos+1].getChar()); aid.append(planes.getChar(pos)); aid.append(planes.getChar(posSystem.out.println(g); +System.out.println(g); 1)); }System.out.println(g); elseSystem.out.println(g); { log.debug("System.out.println(g); HotspotSystem.out.println(g); clicked!!!System.out.println(g); weSystem.out.println(g); willSystem.out.println(g); sendSystem.out.println(g); characterSystem.out.println(g); " +System.out.println(g); planes.getChar(pos)); aid.append(planes.getChar(pos)); } break; } ifSystem.out.println(g); (aidFlag)System.out.println(g); { switchSystem.out.println(g); (g)System.out.println(g); { caseSystem.out.println(g); BUTTON_LEFT_UP: caseSystem.out.println(g); BUTTON_MIDDLE_UP: caseSystem.out.println(g); BUTTON_RIGHT_UP: caseSystem.out.println(g); BUTTON_ONE_UP: caseSystem.out.println(g); BUTTON_SB_UP: caseSystem.out.println(g); BUTTON_SB_GUIDE: sessionVT.sendAidKey(tnvt.AID_ROLL_UP); break; caseSystem.out.println(g); BUTTON_LEFT_DN: caseSystem.out.println(g); BUTTON_MIDDLE_DN: caseSystem.out.println(g); BUTTON_RIGHT_DN: caseSystem.out.println(g); BUTTON_ONE_DN: caseSystem.out.println(g); BUTTON_SB_DN: caseSystem.out.println(g); BUTTON_SB_THUMB: sessionVT.sendAidKey(tnvt.AID_ROLL_DOWN); break; caseSystem.out.println(g); BUTTON_LEFT_EB: caseSystem.out.println(g); BUTTON_MIDDLE_EB: caseSystem.out.println(g); BUTTON_RIGHT_EB: StringBufferSystem.out.println(g); ebSystem.out.println(g); =System.out.println(g); newSystem.out.println(g); StringBuffer(); whileSystem.out.println(g); (planes.getWhichGUI(pos--)System.out.println(g); !=System.out.println(g); BUTTON_LEFT_EB) ; whileSystem.out.println(g); (planes.getWhichGUI(pos++)System.out.println(g); !=System.out.println(g); BUTTON_RIGHT_EB)System.out.println(g); { eb.append(planes.getChar(pos)); } org.tn5250j.tools.system.OperatingSystem.displayURL(eb .toString()); //System.out.println(g); takeSystem.out.println(g); outSystem.out.println(g); theSystem.out.println(g); logSystem.out.println(g); statementSystem.out.println(g); whenSystem.out.println(g); weSystem.out.println(g); areSystem.out.println(g); sureSystem.out.println(g); itSystem.out.println(g); is //System.out.println(g); working log.info("SendSystem.out.println(g); toSystem.out.println(g); externalSystem.out.println(g); Browser:System.out.println(g); "System.out.println(g); +System.out.println(g); eb.toString()); break; default: intSystem.out.println(g); aidKeySystem.out.println(g); =System.out.println(g); Integer.parseInt(aid.toString()); ifSystem.out.println(g); (aidKeySystem.out.println(g); >=System.out.println(g); 1System.out.println(g); &&System.out.println(g); aidKeySystem.out.println(g); <=System.out.println(g); 12) sessionVT.sendAidKey(0x30System.out.println(g); +System.out.println(g); aidKey); ifSystem.out.println(g); (aidKeySystem.out.println(g); >=System.out.println(g); 13System.out.println(g); &&System.out.println(g); aidKeySystem.out.println(g); <=System.out.println(g); 24) sessionVT.sendAidKey(0xB0System.out.println(g); +System.out.println(g); (aidKeySystem.out.println(g); -System.out.println(g); 12)); } }System.out.println(g); elseSystem.out.println(g); { ifSystem.out.println(g); (screenFields.getCurrentField()System.out.println(g); !=System.out.println(g); null)System.out.println(g); { intSystem.out.println(g); xPosSystem.out.println(g); =System.out.println(g); screenFields.getCurrentField().startPos(); forSystem.out.println(g); (intSystem.out.println(g); xSystem.out.println(g); =System.out.println(g); 0;System.out.println(g); xSystem.out.println(g); <System.out.println(g); aid.length();System.out.println(g); x++)System.out.println(g); { //System.out.println(g); System.out.println(g); System.out.println(g); System.out.println(g); System.out.println(g); System.out.println(g); System.out.println(g); System.out.println(g); System.out.println(g); System.out.println(g); System.out.println(g); System.out.println(g); System.out.println(g); System.out.println(g); System.out.println(g); System.out.println(g); System.out.println(g); System.out.println(g); System.out.println(srSystem.out.println(g); +System.out.println(g); ","System.out.println(g); +System.out.println(g); (scSystem.out.println(g); +System.out.println(g); x)System.out.println(g); +System.out.println(g); "System.out.println(g); "System.out.println(g); + //System.out.println(g); aid.charAt(x)); planes.setChar(xPosSystem.out.println(g); +System.out.println(g); x,System.out.println(g); aid.charAt(x)); } //System.out.println(g); System.out.println(g); System.out.println(g); System.out.println(g); System.out.println(g); System.out.println(g); System.out.println(g); System.out.println(g); System.out.println(g); System.out.println(g); System.out.println(g); System.out.println(g); System.out.println(g); System.out.println(g); System.out.println(g); System.out.println(g); System.out.println(g); System.out.println(g); System.out.println(aid); screenFields.setCurrentFieldMDT(); sessionVT.sendAidKey(tnvt.AID_ENTER); } } //System.out.println(g); returnSystem.out.println(g); backSystem.out.println(g); toSystem.out.println(g); theSystem.out.println(g); callingSystem.out.println(g); routineSystem.out.println(g); thatSystem.out.println(g); theSystem.out.println(g); cursorSystem.out.println(g); wasSystem.out.println(g); notSystem.out.println(g); moved //System.out.println(g); butSystem.out.println(g); somethingSystem.out.println(g); elseSystem.out.println(g); hereSystem.out.println(g); wasSystem.out.println(g); doneSystem.out.println(g); likeSystem.out.println(g); aidSystem.out.println(g); keysSystem.out.println(g); orSystem.out.println(g); theSystem.out.println(g); such returnSystem.out.println(g); false; } elseSystem.out.println(g); { //System.out.println(g); thisSystem.out.println(g); isSystem.out.println(g); aSystem.out.println(g); noteSystem.out.println(g); toSystem.out.println(g); notSystem.out.println(g); executeSystem.out.println(g); thisSystem.out.println(g); codeSystem.out.println(g); hereSystem.out.println(g); whenSystem.out.println(g); we //System.out.println(g); implement //System.out.println(g); System.out.println(g); System.out.println(g); theSystem.out.println(g); remainSystem.out.println(g); afterSystem.out.println(g); editSystem.out.println(g); functionSystem.out.println(g); option. // ifSystem.out.println(g); (gui.rubberband.isAreaSelected())System.out.println(g); { // gui.rubberband.reset(); // gui.repaint(); // }System.out.println(g); elseSystem.out.println(g); { goto_XY(pos); isInField(lastPos); //System.out.println(g); returnSystem.out.println(g); backSystem.out.println(g); toSystem.out.println(g); theSystem.out.println(g); callingSystem.out.println(g); objectSystem.out.println(g); thatSystem.out.println(g); theSystem.out.println(g); cursorSystem.out.println(g); wasSystem.out.println(g); indeed //System.out.println(g); System.out.println(g); movedSystem.out.println(g); withSystem.out.println(g); inSystem.out.println(g); theSystem.out.println(g); screenSystem.out.println(g); object returnSystem.out.println(g); true; // } } } returnSystem.out.println(g); false; }
7,970
public boolean moveCursor(MouseEvent e, 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) != '/') { // System.out.println(" Hotspot clicked!!! we will send // characters " + // screen[pos].getChar() + // screen[pos+1].getChar()); aid.append(planes.getChar(pos)); aid.append(planes.getChar(pos + 1)); } else { log.debug(" 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(tnvt.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(tnvt.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)); } org.tn5250j.tools.system.OperatingSystem.displayURL(eb .toString()); // take out the log statement when we are sure it is // working log.info("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(tnvt.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; } 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); // return back to the calling object that the cursor was indeed // moved with in the screen object return true; // } } } return false; }
publicbooleanmoveCursor(MouseEvente,intpos){ if(!oia.isKeyBoardLocked()){ if(pos<0) returnfalse; //becausegetRowColFromPointreturnsoffsetof1,1weneedto //translatetooffset0,0 //pos-=(numCols+1); intg=planes.getWhichGUI(pos); //letscheckforhotspots if(g>=BUTTON_LEFT&&g<=BUTTON_LAST){ StringBufferaid=newStringBuffer(); booleanaidFlag=true; switch(g){ caseBUTTON_RIGHT: caseBUTTON_MIDDLE: while(planes.getWhichGUI(--pos)!=BUTTON_LEFT){ } caseBUTTON_LEFT: if(planes.getChar(pos)=='F'){ pos++; }else aidFlag=false; if(planes.getChar(pos+1)!='=' &&planes.getChar(pos+1)!='.' &&planes.getChar(pos+1)!='/'){ //System.out.println("Hotspotclicked!!!wewillsend //characters"+ //screen[pos].getChar()+ //screen[pos+1].getChar()); aid.append(planes.getChar(pos)); aid.append(planes.getChar(pos+1)); }else{ log.debug("Hotspotclicked!!!wewillsendcharacter" +planes.getChar(pos)); aid.append(planes.getChar(pos)); } break; } if(aidFlag){ switch(g){ caseBUTTON_LEFT_UP: caseBUTTON_MIDDLE_UP: caseBUTTON_RIGHT_UP: caseBUTTON_ONE_UP: caseBUTTON_SB_UP: caseBUTTON_SB_GUIDE: sessionVT.sendAidKey(tnvt.AID_ROLL_UP); break; caseBUTTON_LEFT_DN: caseBUTTON_MIDDLE_DN: caseBUTTON_RIGHT_DN: caseBUTTON_ONE_DN: caseBUTTON_SB_DN: caseBUTTON_SB_THUMB: sessionVT.sendAidKey(tnvt.AID_ROLL_DOWN); break; caseBUTTON_LEFT_EB: caseBUTTON_MIDDLE_EB: caseBUTTON_RIGHT_EB: StringBuffereb=newStringBuffer(); while(planes.getWhichGUI(pos--)!=BUTTON_LEFT_EB) ; while(planes.getWhichGUI(pos++)!=BUTTON_RIGHT_EB){ eb.append(planes.getChar(pos)); } org.tn5250j.tools.system.OperatingSystem.displayURL(eb .toString()); //takeoutthelogstatementwhenwearesureitis //working log.info("SendtoexternalBrowser:"+eb.toString()); break; default: intaidKey=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){ intxPos=screenFields.getCurrentField().startPos(); for(intx=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(tnvt.AID_ENTER); } } //returnbacktothecallingroutinethatthecursorwasnotmoved //butsomethingelseherewasdonelikeaidkeysorthesuch returnfalse; } else{ //thisisanotetonotexecutethiscodeherewhenwe //implement //theremainaftereditfunctionoption. // if(gui.rubberband.isAreaSelected()){ // gui.rubberband.reset(); // gui.repaint(); // }else{ goto_XY(pos); isInField(lastPos); //returnbacktothecallingobjectthatthecursorwasindeed //movedwithinthescreenobject returntrue; // } } } returnfalse; }
7,971
public boolean moveCursor(MouseEvent e, 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) != '/') { // System.out.println(" Hotspot clicked!!! we will send // characters " + // screen[pos].getChar() + // screen[pos+1].getChar()); aid.append(planes.getChar(pos)); aid.append(planes.getChar(pos + 1)); } else { log.debug(" 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(tnvt.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(tnvt.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)); } org.tn5250j.tools.system.OperatingSystem.displayURL(eb .toString()); // take out the log statement when we are sure it is // working log.info("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(tnvt.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; } 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); // return back to the calling object that the cursor was indeed // moved with in the screen object return true; // } } } return false; }
publicbooleanmoveCursor(MouseEvente,intpos){ if(!oia.isKeyBoardLocked()){ if(pos<0) returnfalse; //becausegetRowColFromPointreturnsoffsetof1,1weneedto //translatetooffset0,0 //pos-=(numCols+1); intg=planes.getWhichGUI(pos); //letscheckforhotspots if(g>=BUTTON_LEFT&&g<=BUTTON_LAST){ StringBufferaid=newStringBuffer(); booleanaidFlag=true; switch(g){ caseBUTTON_RIGHT: caseBUTTON_MIDDLE: while(planes.getWhichGUI(--pos)!=BUTTON_LEFT){ } caseBUTTON_LEFT: if(planes.getChar(pos)=='F'){ pos++; }else aidFlag=false; if(planes.getChar(pos+1)!='=' &&planes.getChar(pos+1)!='.' &&planes.getChar(pos+1)!='/'){ //System.out.println("Hotspotclicked!!!wewillsend //characters"+ //screen[pos].getChar()+ //screen[pos+1].getChar()); aid.append(planes.getChar(pos)); aid.append(planes.getChar(pos+1)); }else{ log.debug("Hotspotclicked!!!wewillsendcharacter" +planes.getChar(pos)); aid.append(planes.getChar(pos)); } break; } if(aidFlag){ switch(g){ caseBUTTON_LEFT_UP: caseBUTTON_MIDDLE_UP: caseBUTTON_RIGHT_UP: caseBUTTON_ONE_UP: caseBUTTON_SB_UP: caseBUTTON_SB_GUIDE: sessionVT.sendAidKey(tnvt.AID_ROLL_UP); break; caseBUTTON_LEFT_DN: caseBUTTON_MIDDLE_DN: caseBUTTON_RIGHT_DN: caseBUTTON_ONE_DN: caseBUTTON_SB_DN: caseBUTTON_SB_THUMB: sessionVT.sendAidKey(tnvt.AID_ROLL_DOWN); break; caseBUTTON_LEFT_EB: caseBUTTON_MIDDLE_EB: caseBUTTON_RIGHT_EB: StringBuffereb=newStringBuffer(); while(planes.getWhichGUI(pos--)!=BUTTON_LEFT_EB) ; while(planes.getWhichGUI(pos++)!=BUTTON_RIGHT_EB){ eb.append(planes.getChar(pos)); } org.tn5250j.tools.system.OperatingSystem.displayURL(eb .toString()); //takeoutthelogstatementwhenwearesureitis //working log.info("SendtoexternalBrowser:"+eb.toString()); break; default: intaidKey=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){ intxPos=screenFields.getCurrentField().startPos(); for(intx=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(tnvt.AID_ENTER); } } //returnbacktothecallingroutinethatthecursorwasnotmoved //butsomethingelseherewasdonelikeaidkeysorthesuch returnfalse; } else{ //thisisanotetonotexecutethiscodeherewhenwe //implement //theremainaftereditfunctionoption. // if(gui.rubberband.isAreaSelected()){ // gui.rubberband.reset(); // gui.repaint(); // }else{ goto_XY(pos); isInField(lastPos); //returnbacktothecallingobjectthatthecursorwasindeed //movedwithinthescreenobject returntrue; // } } } returnfalse; }
7,972
public boolean moveCursor(MouseEvent e, 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) != '/') { // System.out.println(" Hotspot clicked!!! we will send // characters " + // screen[pos].getChar() + // screen[pos+1].getChar()); aid.append(planes.getChar(pos)); aid.append(planes.getChar(pos + 1)); } else { log.debug(" 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(tnvt.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(tnvt.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)); } org.tn5250j.tools.system.OperatingSystem.displayURL(eb .toString()); // take out the log statement when we are sure it is // working log.info("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(tnvt.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; } 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); // return back to the calling object that the cursor was indeed // moved with in the screen object return true; // } } } return false; }
publicbooleanmoveCursor(MouseEvente,intpos){ if(!oia.isKeyBoardLocked()){ if(pos<0) returnfalse; //becausegetRowColFromPointreturnsoffsetof1,1weneedto //translatetooffset0,0 //pos-=(numCols+1); intg=planes.getWhichGUI(pos); //letscheckforhotspots if(g>=BUTTON_LEFT&&g<=BUTTON_LAST){ StringBufferaid=newStringBuffer(); booleanaidFlag=true; switch(g){ caseBUTTON_RIGHT: caseBUTTON_MIDDLE: while(planes.getWhichGUI(--pos)!=BUTTON_LEFT){ } caseBUTTON_LEFT: if(planes.getChar(pos)=='F'){ pos++; }else aidFlag=false; if(planes.getChar(pos+1)!='=' &&planes.getChar(pos+1)!='.' &&planes.getChar(pos+1)!='/'){ //System.out.println("Hotspotclicked!!!wewillsend //characters"+ //screen[pos].getChar()+ //screen[pos+1].getChar()); aid.append(planes.getChar(pos)); aid.append(planes.getChar(pos+1)); }else{ log.debug("Hotspotclicked!!!wewillsendcharacter" +planes.getChar(pos)); aid.append(planes.getChar(pos)); } break; } if(aidFlag){ switch(g){ caseBUTTON_LEFT_UP: caseBUTTON_MIDDLE_UP: caseBUTTON_RIGHT_UP: caseBUTTON_ONE_UP: caseBUTTON_SB_UP: caseBUTTON_SB_GUIDE: sessionVT.sendAidKey(tnvt.AID_ROLL_UP); break; caseBUTTON_LEFT_DN: caseBUTTON_MIDDLE_DN: caseBUTTON_RIGHT_DN: caseBUTTON_ONE_DN: caseBUTTON_SB_DN: caseBUTTON_SB_THUMB: sessionVT.sendAidKey(tnvt.AID_ROLL_DOWN); break; caseBUTTON_LEFT_EB: caseBUTTON_MIDDLE_EB: caseBUTTON_RIGHT_EB: StringBuffereb=newStringBuffer(); while(planes.getWhichGUI(pos--)!=BUTTON_LEFT_EB) ; while(planes.getWhichGUI(pos++)!=BUTTON_RIGHT_EB){ eb.append(planes.getChar(pos)); } org.tn5250j.tools.system.OperatingSystem.displayURL(eb .toString()); //takeoutthelogstatementwhenwearesureitis //working log.info("SendtoexternalBrowser:"+eb.toString()); break; default: intaidKey=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){ intxPos=screenFields.getCurrentField().startPos(); for(intx=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(tnvt.AID_ENTER); } } //returnbacktothecallingroutinethatthecursorwasnotmoved //butsomethingelseherewasdonelikeaidkeysorthesuch returnfalse; } else{ //thisisanotetonotexecutethiscodeherewhenwe //implement //theremainaftereditfunctionoption. // if(gui.rubberband.isAreaSelected()){ // gui.rubberband.reset(); // gui.repaint(); // }else{ goto_XY(pos); isInField(lastPos); //returnbacktothecallingobjectthatthecursorwasindeed //movedwithinthescreenobject returntrue; // } } } returnfalse; }
7,973
public boolean moveCursor(MouseEvent e, 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) != '/') { // System.out.println(" Hotspot clicked!!! we will send // characters " + // screen[pos].getChar() + // screen[pos+1].getChar()); aid.append(planes.getChar(pos)); aid.append(planes.getChar(pos + 1)); } else { log.debug(" 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(tnvt.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(tnvt.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)); } org.tn5250j.tools.system.OperatingSystem.displayURL(eb .toString()); // take out the log statement when we are sure it is // working log.info("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(tnvt.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; } 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); // return back to the calling object that the cursor was indeed // moved with in the screen object return true; // } } } return false; }
publicbooleanmoveCursor(MouseEvente,intpos){ if(!oia.isKeyBoardLocked()){ if(pos<0) returnfalse; //becausegetRowColFromPointreturnsoffsetof1,1weneedto //translatetooffset0,0 //pos-=(numCols+1); intg=planes.getWhichGUI(pos); //letscheckforhotspots if(g>=BUTTON_LEFT&&g<=BUTTON_LAST){ StringBufferaid=newStringBuffer(); booleanaidFlag=true; switch(g){ caseBUTTON_RIGHT: caseBUTTON_MIDDLE: while(planes.getWhichGUI(--pos)!=BUTTON_LEFT){ } caseBUTTON_LEFT: if(planes.getChar(pos)=='F'){ pos++; }else aidFlag=false; if(planes.getChar(pos+1)!='=' &&planes.getChar(pos+1)!='.' &&planes.getChar(pos+1)!='/'){ //System.out.println("Hotspotclicked!!!wewillsend //characters"+ //screen[pos].getChar()+ //screen[pos+1].getChar()); aid.append(planes.getChar(pos)); aid.append(planes.getChar(pos+1)); }else{ log.debug("Hotspotclicked!!!wewillsendcharacter" +planes.getChar(pos)); aid.append(planes.getChar(pos)); } break; } if(aidFlag){ switch(g){ caseBUTTON_LEFT_UP: caseBUTTON_MIDDLE_UP: caseBUTTON_RIGHT_UP: caseBUTTON_ONE_UP: caseBUTTON_SB_UP: caseBUTTON_SB_GUIDE: sessionVT.sendAidKey(tnvt.AID_ROLL_UP); break; caseBUTTON_LEFT_DN: caseBUTTON_MIDDLE_DN: caseBUTTON_RIGHT_DN: caseBUTTON_ONE_DN: caseBUTTON_SB_DN: caseBUTTON_SB_THUMB: sessionVT.sendAidKey(tnvt.AID_ROLL_DOWN); break; caseBUTTON_LEFT_EB: caseBUTTON_MIDDLE_EB: caseBUTTON_RIGHT_EB: StringBuffereb=newStringBuffer(); while(planes.getWhichGUI(pos--)!=BUTTON_LEFT_EB) ; while(planes.getWhichGUI(pos++)!=BUTTON_RIGHT_EB){ eb.append(planes.getChar(pos)); } org.tn5250j.tools.system.OperatingSystem.displayURL(eb .toString()); //takeoutthelogstatementwhenwearesureitis //working log.info("SendtoexternalBrowser:"+eb.toString()); break; default: intaidKey=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){ intxPos=screenFields.getCurrentField().startPos(); for(intx=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(tnvt.AID_ENTER); } } //returnbacktothecallingroutinethatthecursorwasnotmoved //butsomethingelseherewasdonelikeaidkeysorthesuch returnfalse; } else{ //thisisanotetonotexecutethiscodeherewhenwe //implement //theremainaftereditfunctionoption. // if(gui.rubberband.isAreaSelected()){ // gui.rubberband.reset(); // gui.repaint(); // }else{ goto_XY(pos); isInField(lastPos); //returnbacktothecallingobjectthatthecursorwasindeed //movedwithinthescreenobject returntrue; // } } } returnfalse; }
7,974
public boolean moveCursor(MouseEvent e, 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) != '/') { // System.out.println(" Hotspot clicked!!! we will send // characters " + // screen[pos].getChar() + // screen[pos+1].getChar()); aid.append(planes.getChar(pos)); aid.append(planes.getChar(pos + 1)); } else { log.debug(" 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(tnvt.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(tnvt.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)); } org.tn5250j.tools.system.OperatingSystem.displayURL(eb .toString()); // take out the log statement when we are sure it is // working log.info("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(tnvt.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; } 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); // return back to the calling object that the cursor was indeed // moved with in the screen object return true; // } } } return false; }
public boolean moveCursor(MouseEvent e, 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) != '/') { // System.out.println(" Hotspot clicked!!! we will send // characters " + // screen[pos].getChar() + // screen[pos+1].getChar()); aid.append(planes.getChar(pos)); aid.append(planes.getChar(pos + 1)); } else { log.debug(" 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(tnvt.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(tnvt.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)); } org.tn5250j.tools.system.OperatingSystem.displayURL(eb .toString()); // take out the log statement when we are sure it is // working log.info("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(tnvt.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; } 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); // return back to the calling object that the cursor was indeed // moved with in the screen object return true; // } } } return false; }
7,975
public boolean moveCursor(MouseEvent e, 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) != '/') { // System.out.println(" Hotspot clicked!!! we will send // characters " + // screen[pos].getChar() + // screen[pos+1].getChar()); aid.append(planes.getChar(pos)); aid.append(planes.getChar(pos + 1)); } else { log.debug(" 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(tnvt.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(tnvt.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)); } org.tn5250j.tools.system.OperatingSystem.displayURL(eb .toString()); // take out the log statement when we are sure it is // working log.info("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(tnvt.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; } 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); // return back to the calling object that the cursor was indeed // moved with in the screen object return true; // } } } return false; }
public boolean moveCursor(MouseEvent e, 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) != '/') { // System.out.println(" Hotspot clicked!!! we will send // characters " + // screen[pos].getChar() + // screen[pos+1].getChar()); aid.append(planes.getChar(pos)); aid.append(planes.getChar(pos + 1)); } else { log.debug(" 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(tnvt.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(tnvt.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)); } org.tn5250j.tools.system.OperatingSystem.displayURL(eb .toString()); // take out the log statement when we are sure it is // working log.info("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(tnvt.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; } 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); // return back to the calling object that the cursor was indeed // moved with in the screen object return true; // } } } return false; }
7,976
public boolean moveCursor(MouseEvent e, 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) != '/') { // System.out.println(" Hotspot clicked!!! we will send // characters " + // screen[pos].getChar() + // screen[pos+1].getChar()); aid.append(planes.getChar(pos)); aid.append(planes.getChar(pos + 1)); } else { log.debug(" 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(tnvt.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(tnvt.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)); } org.tn5250j.tools.system.OperatingSystem.displayURL(eb .toString()); // take out the log statement when we are sure it is // working log.info("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(tnvt.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; } 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); // return back to the calling object that the cursor was indeed // moved with in the screen object return true; // } } } return false; }
public boolean moveCursor(MouseEvent e, 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) != '/') { // System.out.println(" Hotspot clicked!!! we will send // characters " + // screen[pos].getChar() + // screen[pos+1].getChar()); aid.append(planes.getChar(pos)); aid.append(planes.getChar(pos + 1)); } else { log.debug(" 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(tnvt.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(tnvt.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)); } org.tn5250j.tools.system.OperatingSystem.displayURL(eb .toString()); // take out the log statement when we are sure it is // working log.info("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(tnvt.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; } 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); // return back to the calling object that the cursor was indeed // moved with in the screen object return true; // } } } return false; }
7,977
public boolean moveCursor(MouseEvent e, 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) != '/') { // System.out.println(" Hotspot clicked!!! we will send // characters " + // screen[pos].getChar() + // screen[pos+1].getChar()); aid.append(planes.getChar(pos)); aid.append(planes.getChar(pos + 1)); } else { log.debug(" 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(tnvt.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(tnvt.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)); } org.tn5250j.tools.system.OperatingSystem.displayURL(eb .toString()); // take out the log statement when we are sure it is // working log.info("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(tnvt.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; } 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); // return back to the calling object that the cursor was indeed // moved with in the screen object return true; // } } } return false; }
public boolean moveCursor(MouseEvent e, 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) != '/') { // System.out.println(" Hotspot clicked!!! we will send // characters " + // screen[pos].getChar() + // screen[pos+1].getChar()); aid.append(planes.getChar(pos)); aid.append(planes.getChar(pos + 1)); } else { log.debug(" 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(tnvt.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(tnvt.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)); } org.tn5250j.tools.system.OperatingSystem.displayURL(eb .toString()); // take out the log statement when we are sure it is // working log.info("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(tnvt.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; } 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); // return back to the calling object that the cursor was indeed // moved with in the screen object return true; // } } } return false; }
7,978
public boolean moveCursor(MouseEvent e, 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) != '/') { // System.out.println(" Hotspot clicked!!! we will send // characters " + // screen[pos].getChar() + // screen[pos+1].getChar()); aid.append(planes.getChar(pos)); aid.append(planes.getChar(pos + 1)); } else { log.debug(" 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(tnvt.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(tnvt.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)); } org.tn5250j.tools.system.OperatingSystem.displayURL(eb .toString()); // take out the log statement when we are sure it is // working log.info("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(tnvt.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; } 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); // return back to the calling object that the cursor was indeed // moved with in the screen object return true; // } } } return false; }
publicbooleanmoveCursor(MouseEvente,intpos){ if(!oia.isKeyBoardLocked()){ if(pos<0) returnfalse; //becausegetRowColFromPointreturnsoffsetof1,1weneedto //translatetooffset0,0 //pos-=(numCols+1); intg=planes.getWhichGUI(pos); //letscheckforhotspots if(g>=BUTTON_LEFT&&g<=BUTTON_LAST){ StringBufferaid=newStringBuffer(); booleanaidFlag=true; switch(g){ caseBUTTON_RIGHT: caseBUTTON_MIDDLE: while(planes.getWhichGUI(--pos)!=BUTTON_LEFT){ } caseBUTTON_LEFT: if(planes.getChar(pos)=='F'){ pos++; }else aidFlag=false; if(planes.getChar(pos+1)!='=' &&planes.getChar(pos+1)!='.' &&planes.getChar(pos+1)!='/'){ //System.out.println("Hotspotclicked!!!wewillsend //characters"+ //screen[pos].getChar()+ //screen[pos+1].getChar()); aid.append(planes.getChar(pos)); aid.append(planes.getChar(pos+1)); }else{ log.debug("Hotspotclicked!!!wewillsendcharacter" +planes.getChar(pos)); aid.append(planes.getChar(pos)); } break; } if(aidFlag){ switch(g){ caseBUTTON_LEFT_UP: caseBUTTON_MIDDLE_UP: caseBUTTON_RIGHT_UP: caseBUTTON_ONE_UP: caseBUTTON_SB_UP: caseBUTTON_SB_GUIDE: sessionVT.sendAidKey(tnvt.AID_ROLL_UP); break; caseBUTTON_LEFT_DN: caseBUTTON_MIDDLE_DN: caseBUTTON_RIGHT_DN: caseBUTTON_ONE_DN: caseBUTTON_SB_DN: caseBUTTON_SB_THUMB: sessionVT.sendAidKey(tnvt.AID_ROLL_DOWN); break; caseBUTTON_LEFT_EB: caseBUTTON_MIDDLE_EB: caseBUTTON_RIGHT_EB: StringBuffereb=newStringBuffer(); while(planes.getWhichGUI(pos--)!=BUTTON_LEFT_EB) ; while(planes.getWhichGUI(pos++)!=BUTTON_RIGHT_EB){ eb.append(planes.getChar(pos)); } org.tn5250j.tools.system.OperatingSystem.displayURL(eb .toString()); //takeoutthelogstatementwhenwearesureitis //working log.info("SendtoexternalBrowser:"+eb.toString()); break; default: intaidKey=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){ intxPos=screenFields.getCurrentField().startPos(); for(intx=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(tnvt.AID_ENTER); } } //returnbacktothecallingroutinethatthecursorwasnotmoved //butsomethingelseherewasdonelikeaidkeysorthesuch returnfalse; } else{ //thisisanotetonotexecutethiscodeherewhenwe //implement //theremainaftereditfunctionoption. // if(gui.rubberband.isAreaSelected()){ // gui.rubberband.reset(); // gui.repaint(); // }else{ goto_XY(pos); isInField(lastPos); //returnbacktothecallingobjectthatthecursorwasindeed //movedwithinthescreenobject returntrue; // } } } returnfalse; }
7,979
public boolean moveCursor(MouseEvent e, 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) != '/') { // System.out.println(" Hotspot clicked!!! we will send // characters " + // screen[pos].getChar() + // screen[pos+1].getChar()); aid.append(planes.getChar(pos)); aid.append(planes.getChar(pos + 1)); } else { log.debug(" 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(tnvt.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(tnvt.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)); } org.tn5250j.tools.system.OperatingSystem.displayURL(eb .toString()); // take out the log statement when we are sure it is // working log.info("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(tnvt.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; } 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); // return back to the calling object that the cursor was indeed // moved with in the screen object return true; // } } } return false; }
publicbooleanmoveCursor(MouseEvente,intpos){ if(!oia.isKeyBoardLocked()){ if(pos<0) returnfalse; //becausegetRowColFromPointreturnsoffsetof1,1weneedto //translatetooffset0,0 //pos-=(numCols+1); intg=planes.getWhichGUI(pos); //letscheckforhotspots if(g>=BUTTON_LEFT&&g<=BUTTON_LAST){ StringBufferaid=newStringBuffer(); booleanaidFlag=true; switch(g){ caseBUTTON_RIGHT: caseBUTTON_MIDDLE: while(planes.getWhichGUI(--pos)!=BUTTON_LEFT){ } caseBUTTON_LEFT: if(planes.getChar(pos)=='F'){ pos++; }else aidFlag=false; if(planes.getChar(pos+1)!='=' &&planes.getChar(pos+1)!='.' &&planes.getChar(pos+1)!='/'){ //System.out.println("Hotspotclicked!!!wewillsend //characters"+ //screen[pos].getChar()+ //screen[pos+1].getChar()); aid.append(planes.getChar(pos)); aid.append(planes.getChar(pos+1)); }else{ log.debug("Hotspotclicked!!!wewillsendcharacter" +planes.getChar(pos)); aid.append(planes.getChar(pos)); } break; } if(aidFlag){ switch(g){ caseBUTTON_LEFT_UP: caseBUTTON_MIDDLE_UP: caseBUTTON_RIGHT_UP: caseBUTTON_ONE_UP: caseBUTTON_SB_UP: caseBUTTON_SB_GUIDE: sessionVT.sendAidKey(tnvt.AID_ROLL_UP); break; caseBUTTON_LEFT_DN: caseBUTTON_MIDDLE_DN: caseBUTTON_RIGHT_DN: caseBUTTON_ONE_DN: caseBUTTON_SB_DN: caseBUTTON_SB_THUMB: sessionVT.sendAidKey(tnvt.AID_ROLL_DOWN); break; caseBUTTON_LEFT_EB: caseBUTTON_MIDDLE_EB: caseBUTTON_RIGHT_EB: StringBuffereb=newStringBuffer(); while(planes.getWhichGUI(pos--)!=BUTTON_LEFT_EB) ; while(planes.getWhichGUI(pos++)!=BUTTON_RIGHT_EB){ eb.append(planes.getChar(pos)); } org.tn5250j.tools.system.OperatingSystem.displayURL(eb .toString()); //takeoutthelogstatementwhenwearesureitis //working log.info("SendtoexternalBrowser:"+eb.toString()); break; default: intaidKey=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){ intxPos=screenFields.getCurrentField().startPos(); for(intx=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(tnvt.AID_ENTER); } } //returnbacktothecallingroutinethatthecursorwasnotmoved //butsomethingelseherewasdonelikeaidkeysorthesuch returnfalse; } else{ //thisisanotetonotexecutethiscodeherewhenwe //implement //theremainaftereditfunctionoption. // if(gui.rubberband.isAreaSelected()){ // gui.rubberband.reset(); // gui.repaint(); // }else{ goto_XY(pos); isInField(lastPos); //returnbacktothecallingobjectthatthecursorwasindeed //movedwithinthescreenobject returntrue; // } } } returnfalse; }
7,980
public boolean moveCursor(MouseEvent e, 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) != '/') { // System.out.println(" Hotspot clicked!!! we will send // characters " + // screen[pos].getChar() + // screen[pos+1].getChar()); aid.append(planes.getChar(pos)); aid.append(planes.getChar(pos + 1)); } else { log.debug(" 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(tnvt.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(tnvt.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)); } org.tn5250j.tools.system.OperatingSystem.displayURL(eb .toString()); // take out the log statement when we are sure it is // working log.info("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(tnvt.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; } 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); // return back to the calling object that the cursor was indeed // moved with in the screen object return true; // } } } return false; }
publicbooleanmoveCursor(MouseEvente,intpos){ if(!oia.isKeyBoardLocked()){ if(pos<0) returnfalse; //becausegetRowColFromPointreturnsoffsetof1,1weneedto //translatetooffset0,0 //pos-=(numCols+1); intg=planes.getWhichGUI(pos); //letscheckforhotspots if(g>=BUTTON_LEFT&&g<=BUTTON_LAST){ StringBufferaid=newStringBuffer(); booleanaidFlag=true; switch(g){ caseBUTTON_RIGHT: caseBUTTON_MIDDLE: while(planes.getWhichGUI(--pos)!=BUTTON_LEFT){ } caseBUTTON_LEFT: if(planes.getChar(pos)=='F'){ pos++; }else aidFlag=false; if(planes.getChar(pos+1)!='=' &&planes.getChar(pos+1)!='.' &&planes.getChar(pos+1)!='/'){ //System.out.println("Hotspotclicked!!!wewillsend //characters"+ //screen[pos].getChar()+ //screen[pos+1].getChar()); aid.append(planes.getChar(pos)); aid.append(planes.getChar(pos+1)); }else{ log.debug("Hotspotclicked!!!wewillsendcharacter" +planes.getChar(pos)); aid.append(planes.getChar(pos)); } break; } if(aidFlag){ switch(g){ caseBUTTON_LEFT_UP: caseBUTTON_MIDDLE_UP: caseBUTTON_RIGHT_UP: caseBUTTON_ONE_UP: caseBUTTON_SB_UP: caseBUTTON_SB_GUIDE: sessionVT.sendAidKey(tnvt.AID_ROLL_UP); break; caseBUTTON_LEFT_DN: caseBUTTON_MIDDLE_DN: caseBUTTON_RIGHT_DN: caseBUTTON_ONE_DN: caseBUTTON_SB_DN: caseBUTTON_SB_THUMB: sessionVT.sendAidKey(tnvt.AID_ROLL_DOWN); break; caseBUTTON_LEFT_EB: caseBUTTON_MIDDLE_EB: caseBUTTON_RIGHT_EB: StringBuffereb=newStringBuffer(); while(planes.getWhichGUI(pos--)!=BUTTON_LEFT_EB) ; while(planes.getWhichGUI(pos++)!=BUTTON_RIGHT_EB){ eb.append(planes.getChar(pos)); } org.tn5250j.tools.system.OperatingSystem.displayURL(eb .toString()); //takeoutthelogstatementwhenwearesureitis //working log.info("SendtoexternalBrowser:"+eb.toString()); break; default: intaidKey=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){ intxPos=screenFields.getCurrentField().startPos(); for(intx=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(tnvt.AID_ENTER); } } //returnbacktothecallingroutinethatthecursorwasnotmoved //butsomethingelseherewasdonelikeaidkeysorthesuch returnfalse; } else{ //thisisanotetonotexecutethiscodeherewhenwe //implement //theremainaftereditfunctionoption. // if(gui.rubberband.isAreaSelected()){ // gui.rubberband.reset(); // gui.repaint(); // }else{ goto_XY(pos); isInField(lastPos); //returnbacktothecallingobjectthatthecursorwasindeed //movedwithinthescreenobject returntrue; // } } } returnfalse; }
7,981
public boolean moveCursor(MouseEvent e, 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) != '/') { // System.out.println(" Hotspot clicked!!! we will send // characters " + // screen[pos].getChar() + // screen[pos+1].getChar()); aid.append(planes.getChar(pos)); aid.append(planes.getChar(pos + 1)); } else { log.debug(" 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(tnvt.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(tnvt.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)); } org.tn5250j.tools.system.OperatingSystem.displayURL(eb .toString()); // take out the log statement when we are sure it is // working log.info("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(tnvt.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; } 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); // return back to the calling object that the cursor was indeed // moved with in the screen object return true; // } } } return false; }
publicbooleanmoveCursor(MouseEvente,intpos){ if(!oia.isKeyBoardLocked()){ if(pos<0) returnfalse; //becausegetRowColFromPointreturnsoffsetof1,1weneedto //translatetooffset0,0 //pos-=(numCols+1); intg=planes.getWhichGUI(pos); //letscheckforhotspots if(g>=BUTTON_LEFT&&g<=BUTTON_LAST){ StringBufferaid=newStringBuffer(); booleanaidFlag=true; switch(g){ caseBUTTON_RIGHT: caseBUTTON_MIDDLE: while(planes.getWhichGUI(--pos)!=BUTTON_LEFT){ } caseBUTTON_LEFT: if(planes.getChar(pos)=='F'){ pos++; }else aidFlag=false; if(planes.getChar(pos+1)!='=' &&planes.getChar(pos+1)!='.' &&planes.getChar(pos+1)!='/'){ //System.out.println("Hotspotclicked!!!wewillsend //characters"+ //screen[pos].getChar()+ //screen[pos+1].getChar()); aid.append(planes.getChar(pos)); aid.append(planes.getChar(pos+1)); }else{ log.debug("Hotspotclicked!!!wewillsendcharacter" +planes.getChar(pos)); aid.append(planes.getChar(pos)); } break; } if(aidFlag){ switch(g){ caseBUTTON_LEFT_UP: caseBUTTON_MIDDLE_UP: caseBUTTON_RIGHT_UP: caseBUTTON_ONE_UP: caseBUTTON_SB_UP: caseBUTTON_SB_GUIDE: sessionVT.sendAidKey(tnvt.AID_ROLL_UP); break; caseBUTTON_LEFT_DN: caseBUTTON_MIDDLE_DN: caseBUTTON_RIGHT_DN: caseBUTTON_ONE_DN: caseBUTTON_SB_DN: caseBUTTON_SB_THUMB: sessionVT.sendAidKey(tnvt.AID_ROLL_DOWN); break; caseBUTTON_LEFT_EB: caseBUTTON_MIDDLE_EB: caseBUTTON_RIGHT_EB: StringBuffereb=newStringBuffer(); while(planes.getWhichGUI(pos--)!=BUTTON_LEFT_EB) ; while(planes.getWhichGUI(pos++)!=BUTTON_RIGHT_EB){ eb.append(planes.getChar(pos)); } org.tn5250j.tools.system.OperatingSystem.displayURL(eb .toString()); //takeoutthelogstatementwhenwearesureitis //working log.info("SendtoexternalBrowser:"+eb.toString()); break; default: intaidKey=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){ intxPos=screenFields.getCurrentField().startPos(); for(intx=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(tnvt.AID_ENTER); } } //returnbacktothecallingroutinethatthecursorwasnotmoved //butsomethingelseherewasdonelikeaidkeysorthesuch returnfalse; } else{ //thisisanotetonotexecutethiscodeherewhenwe //implement //theremainaftereditfunctionoption. // if(gui.rubberband.isAreaSelected()){ // gui.rubberband.reset(); // gui.repaint(); // }else{ goto_XY(pos); isInField(lastPos); //returnbacktothecallingobjectthatthecursorwasindeed //movedwithinthescreenobject returntrue; // } } } returnfalse; }
7,982
public boolean moveCursor(MouseEvent e, 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) != '/') { // System.out.println(" Hotspot clicked!!! we will send // characters " + // screen[pos].getChar() + // screen[pos+1].getChar()); aid.append(planes.getChar(pos)); aid.append(planes.getChar(pos + 1)); } else { log.debug(" 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(tnvt.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(tnvt.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)); } org.tn5250j.tools.system.OperatingSystem.displayURL(eb .toString()); // take out the log statement when we are sure it is // working log.info("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(tnvt.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; } 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); // return back to the calling object that the cursor was indeed // moved with in the screen object return true; // } } } return false; }
publicbooleanmoveCursor(MouseEvente,intpos){ if(!oia.isKeyBoardLocked()){ if(pos<0) returnfalse; //becausegetRowColFromPointreturnsoffsetof1,1weneedto //translatetooffset0,0 //pos-=(numCols+1); intg=planes.getWhichGUI(pos); //letscheckforhotspots if(g>=BUTTON_LEFT&&g<=BUTTON_LAST){ StringBufferaid=newStringBuffer(); booleanaidFlag=true; switch(g){ caseBUTTON_RIGHT: caseBUTTON_MIDDLE: while(planes.getWhichGUI(--pos)!=BUTTON_LEFT){ } caseBUTTON_LEFT: if(planes.getChar(pos)=='F'){ pos++; }else aidFlag=false; if(planes.getChar(pos+1)!='=' &&planes.getChar(pos+1)!='.' &&planes.getChar(pos+1)!='/'){ //System.out.println("Hotspotclicked!!!wewillsend //characters"+ //screen[pos].getChar()+ //screen[pos+1].getChar()); aid.append(planes.getChar(pos)); aid.append(planes.getChar(pos+1)); }else{ log.debug("Hotspotclicked!!!wewillsendcharacter" +planes.getChar(pos)); aid.append(planes.getChar(pos)); } break; } if(aidFlag){ switch(g){ caseBUTTON_LEFT_UP: caseBUTTON_MIDDLE_UP: caseBUTTON_RIGHT_UP: caseBUTTON_ONE_UP: caseBUTTON_SB_UP: caseBUTTON_SB_GUIDE: sessionVT.sendAidKey(tnvt.AID_ROLL_UP); break; caseBUTTON_LEFT_DN: caseBUTTON_MIDDLE_DN: caseBUTTON_RIGHT_DN: caseBUTTON_ONE_DN: caseBUTTON_SB_DN: caseBUTTON_SB_THUMB: sessionVT.sendAidKey(tnvt.AID_ROLL_DOWN); break; caseBUTTON_LEFT_EB: caseBUTTON_MIDDLE_EB: caseBUTTON_RIGHT_EB: StringBuffereb=newStringBuffer(); while(planes.getWhichGUI(pos--)!=BUTTON_LEFT_EB) ; while(planes.getWhichGUI(pos++)!=BUTTON_RIGHT_EB){ eb.append(planes.getChar(pos)); } org.tn5250j.tools.system.OperatingSystem.displayURL(eb .toString()); //takeoutthelogstatementwhenwearesureitis //working log.info("SendtoexternalBrowser:"+eb.toString()); break; default: intaidKey=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){ intxPos=screenFields.getCurrentField().startPos(); for(intx=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(tnvt.AID_ENTER); } } //returnbacktothecallingroutinethatthecursorwasnotmoved //butsomethingelseherewasdonelikeaidkeysorthesuch returnfalse; } else{ //thisisanotetonotexecutethiscodeherewhenwe //implement //theremainaftereditfunctionoption. // if(gui.rubberband.isAreaSelected()){ // gui.rubberband.reset(); // gui.repaint(); // }else{ goto_XY(pos); isInField(lastPos); //returnbacktothecallingobjectthatthecursorwasindeed //movedwithinthescreenobject returntrue; // } } } returnfalse; }
7,983
public boolean moveCursor(MouseEvent e, 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) != '/') { // System.out.println(" Hotspot clicked!!! we will send // characters " + // screen[pos].getChar() + // screen[pos+1].getChar()); aid.append(planes.getChar(pos)); aid.append(planes.getChar(pos + 1)); } else { log.debug(" 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(tnvt.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(tnvt.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)); } org.tn5250j.tools.system.OperatingSystem.displayURL(eb .toString()); // take out the log statement when we are sure it is // working log.info("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(tnvt.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; } 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); // return back to the calling object that the cursor was indeed // moved with in the screen object return true; // } } } return false; }
public boolean moveCursor(MouseEvent e, 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) != '/') { // System.out.println(" Hotspot clicked!!! we will send // characters " + // screen[pos].getChar() + // screen[pos+1].getChar()); aid.append(planes.getChar(pos)); aid.append(planes.getChar(pos + 1)); } else { log.debug(" 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(tnvt.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(tnvt.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)); } org.tn5250j.tools.system.OperatingSystem.displayURL(eb .toString()); // take out the log statement when we are sure it is // working log.info("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(tnvt.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; } 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); // return back to the calling object that the cursor was indeed // moved with in the screen object return true; // } } } return false; }
7,984
public boolean moveCursor(MouseEvent e, 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) != '/') { // System.out.println(" Hotspot clicked!!! we will send // characters " + // screen[pos].getChar() + // screen[pos+1].getChar()); aid.append(planes.getChar(pos)); aid.append(planes.getChar(pos + 1)); } else { log.debug(" 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(tnvt.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(tnvt.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)); } org.tn5250j.tools.system.OperatingSystem.displayURL(eb .toString()); // take out the log statement when we are sure it is // working log.info("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(tnvt.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; } 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); // return back to the calling object that the cursor was indeed // moved with in the screen object return true; // } } } return false; }
publicbooleanmoveCursor(MouseEvente,intpos){ if(!oia.isKeyBoardLocked()){ if(pos<0) returnfalse; //becausegetRowColFromPointreturnsoffsetof1,1weneedto //translatetooffset0,0 //pos-=(numCols+1); intg=planes.getWhichGUI(pos); //letscheckforhotspots if(g>=BUTTON_LEFT&&g<=BUTTON_LAST){ StringBufferaid=newStringBuffer(); booleanaidFlag=true; switch(g){ caseBUTTON_RIGHT: caseBUTTON_MIDDLE: while(planes.getWhichGUI(--pos)!=BUTTON_LEFT){ } caseBUTTON_LEFT: if(planes.getChar(pos)=='F'){ pos++; }else aidFlag=false; if(planes.getChar(pos+1)!='=' &&planes.getChar(pos+1)!='.' &&planes.getChar(pos+1)!='/'){ //System.out.println("Hotspotclicked!!!wewillsend //characters"+ //screen[pos].getChar()+ //screen[pos+1].getChar()); aid.append(planes.getChar(pos)); aid.append(planes.getChar(pos+1)); }else{ log.debug("Hotspotclicked!!!wewillsendcharacter" +planes.getChar(pos)); aid.append(planes.getChar(pos)); } break; } if(aidFlag){ switch(g){ caseBUTTON_LEFT_UP: caseBUTTON_MIDDLE_UP: caseBUTTON_RIGHT_UP: caseBUTTON_ONE_UP: caseBUTTON_SB_UP: caseBUTTON_SB_GUIDE: sessionVT.sendAidKey(tnvt.AID_ROLL_UP); break; caseBUTTON_LEFT_DN: caseBUTTON_MIDDLE_DN: caseBUTTON_RIGHT_DN: caseBUTTON_ONE_DN: caseBUTTON_SB_DN: caseBUTTON_SB_THUMB: sessionVT.sendAidKey(tnvt.AID_ROLL_DOWN); break; caseBUTTON_LEFT_EB: caseBUTTON_MIDDLE_EB: caseBUTTON_RIGHT_EB: StringBuffereb=newStringBuffer(); while(planes.getWhichGUI(pos--)!=BUTTON_LEFT_EB) ; while(planes.getWhichGUI(pos++)!=BUTTON_RIGHT_EB){ eb.append(planes.getChar(pos)); } org.tn5250j.tools.system.OperatingSystem.displayURL(eb .toString()); //takeoutthelogstatementwhenwearesureitis //working log.info("SendtoexternalBrowser:"+eb.toString()); break; default: intaidKey=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){ intxPos=screenFields.getCurrentField().startPos(); for(intx=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(tnvt.AID_ENTER); } } //returnbacktothecallingroutinethatthecursorwasnotmoved //butsomethingelseherewasdonelikeaidkeysorthesuch returnfalse; } else{ //thisisanotetonotexecutethiscodeherewhenwe //implement //theremainaftereditfunctionoption. // if(gui.rubberband.isAreaSelected()){ // gui.rubberband.reset(); // gui.repaint(); // }else{ goto_XY(pos); isInField(lastPos); //returnbacktothecallingobjectthatthecursorwasindeed //movedwithinthescreenobject returntrue; // } } } returnfalse; }
7,985
public boolean moveCursor(MouseEvent e, 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) != '/') { // System.out.println(" Hotspot clicked!!! we will send // characters " + // screen[pos].getChar() + // screen[pos+1].getChar()); aid.append(planes.getChar(pos)); aid.append(planes.getChar(pos + 1)); } else { log.debug(" 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(tnvt.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(tnvt.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)); } org.tn5250j.tools.system.OperatingSystem.displayURL(eb .toString()); // take out the log statement when we are sure it is // working log.info("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(tnvt.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; } 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); // return back to the calling object that the cursor was indeed // moved with in the screen object return true; // } } } return false; }
publicbooleanmoveCursor(MouseEvente,intpos){ if(!oia.isKeyBoardLocked()){ if(pos<0) returnfalse; //becausegetRowColFromPointreturnsoffsetof1,1weneedto //translatetooffset0,0 //pos-=(numCols+1); intg=planes.getWhichGUI(pos); //letscheckforhotspots if(g>=BUTTON_LEFT&&g<=BUTTON_LAST){ StringBufferaid=newStringBuffer(); booleanaidFlag=true; switch(g){ caseBUTTON_RIGHT: caseBUTTON_MIDDLE: while(planes.getWhichGUI(--pos)!=BUTTON_LEFT){ } caseBUTTON_LEFT: if(planes.getChar(pos)=='F'){ pos++; }else aidFlag=false; if(planes.getChar(pos+1)!='=' &&planes.getChar(pos+1)!='.' &&planes.getChar(pos+1)!='/'){ //System.out.println("Hotspotclicked!!!wewillsend //characters"+ //screen[pos].getChar()+ //screen[pos+1].getChar()); aid.append(planes.getChar(pos)); aid.append(planes.getChar(pos+1)); }else{ log.debug("Hotspotclicked!!!wewillsendcharacter" +planes.getChar(pos)); aid.append(planes.getChar(pos)); } break; } if(aidFlag){ switch(g){ caseBUTTON_LEFT_UP: caseBUTTON_MIDDLE_UP: caseBUTTON_RIGHT_UP: caseBUTTON_ONE_UP: caseBUTTON_SB_UP: caseBUTTON_SB_GUIDE: sessionVT.sendAidKey(tnvt.AID_ROLL_UP); break; caseBUTTON_LEFT_DN: caseBUTTON_MIDDLE_DN: caseBUTTON_RIGHT_DN: caseBUTTON_ONE_DN: caseBUTTON_SB_DN: caseBUTTON_SB_THUMB: sessionVT.sendAidKey(tnvt.AID_ROLL_DOWN); break; caseBUTTON_LEFT_EB: caseBUTTON_MIDDLE_EB: caseBUTTON_RIGHT_EB: StringBuffereb=newStringBuffer(); while(planes.getWhichGUI(pos--)!=BUTTON_LEFT_EB) ; while(planes.getWhichGUI(pos++)!=BUTTON_RIGHT_EB){ eb.append(planes.getChar(pos)); } org.tn5250j.tools.system.OperatingSystem.displayURL(eb .toString()); //takeoutthelogstatementwhenwearesureitis //working log.info("SendtoexternalBrowser:"+eb.toString()); break; default: intaidKey=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){ intxPos=screenFields.getCurrentField().startPos(); for(intx=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(tnvt.AID_ENTER); } } //returnbacktothecallingroutinethatthecursorwasnotmoved //butsomethingelseherewasdonelikeaidkeysorthesuch returnfalse; } else{ //thisisanotetonotexecutethiscodeherewhenwe //implement //theremainaftereditfunctionoption. // if(gui.rubberband.isAreaSelected()){ // gui.rubberband.reset(); // gui.repaint(); // }else{ goto_XY(pos); isInField(lastPos); //returnbacktothecallingobjectthatthecursorwasindeed //movedwithinthescreenobject returntrue; // } } } returnfalse; }
7,986
public boolean moveCursor(MouseEvent e, 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) != '/') { // System.out.println(" Hotspot clicked!!! we will send // characters " + // screen[pos].getChar() + // screen[pos+1].getChar()); aid.append(planes.getChar(pos)); aid.append(planes.getChar(pos + 1)); } else { log.debug(" 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(tnvt.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(tnvt.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)); } org.tn5250j.tools.system.OperatingSystem.displayURL(eb .toString()); // take out the log statement when we are sure it is // working log.info("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(tnvt.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; } 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); // return back to the calling object that the cursor was indeed // moved with in the screen object return true; // } } } return false; }
publicbooleanmoveCursor(MouseEvente,intpos){ if(!oia.isKeyBoardLocked()){ if(pos<0) returnfalse; //becausegetRowColFromPointreturnsoffsetof1,1weneedto //translatetooffset0,0 //pos-=(numCols+1); intg=planes.getWhichGUI(pos); //letscheckforhotspots if(g>=BUTTON_LEFT&&g<=BUTTON_LAST){ StringBufferaid=newStringBuffer(); booleanaidFlag=true; switch(g){ caseBUTTON_RIGHT: caseBUTTON_MIDDLE: while(planes.getWhichGUI(--pos)!=BUTTON_LEFT){ } caseBUTTON_LEFT: if(planes.getChar(pos)=='F'){ pos++; }else aidFlag=false; if(planes.getChar(pos+1)!='=' &&planes.getChar(pos+1)!='.' &&planes.getChar(pos+1)!='/'){ //System.out.println("Hotspotclicked!!!wewillsend //characters"+ //screen[pos].getChar()+ //screen[pos+1].getChar()); aid.append(planes.getChar(pos)); aid.append(planes.getChar(pos+1)); }else{ log.debug("Hotspotclicked!!!wewillsendcharacter" +planes.getChar(pos)); aid.append(planes.getChar(pos)); } break; } if(aidFlag){ switch(g){ caseBUTTON_LEFT_UP: caseBUTTON_MIDDLE_UP: caseBUTTON_RIGHT_UP: caseBUTTON_ONE_UP: caseBUTTON_SB_UP: caseBUTTON_SB_GUIDE: sessionVT.sendAidKey(tnvt.AID_ROLL_UP); break; caseBUTTON_LEFT_DN: caseBUTTON_MIDDLE_DN: caseBUTTON_RIGHT_DN: caseBUTTON_ONE_DN: caseBUTTON_SB_DN: caseBUTTON_SB_THUMB: sessionVT.sendAidKey(tnvt.AID_ROLL_DOWN); break; caseBUTTON_LEFT_EB: caseBUTTON_MIDDLE_EB: caseBUTTON_RIGHT_EB: StringBuffereb=newStringBuffer(); while(planes.getWhichGUI(pos--)!=BUTTON_LEFT_EB) ; while(planes.getWhichGUI(pos++)!=BUTTON_RIGHT_EB){ eb.append(planes.getChar(pos)); } org.tn5250j.tools.system.OperatingSystem.displayURL(eb .toString()); //takeoutthelogstatementwhenwearesureitis //working log.info("SendtoexternalBrowser:"+eb.toString()); break; default: intaidKey=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){ intxPos=screenFields.getCurrentField().startPos(); for(intx=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(tnvt.AID_ENTER); } } //returnbacktothecallingroutinethatthecursorwasnotmoved //butsomethingelseherewasdonelikeaidkeysorthesuch returnfalse; } else{ //thisisanotetonotexecutethiscodeherewhenwe //implement //theremainaftereditfunctionoption. // if(gui.rubberband.isAreaSelected()){ // gui.rubberband.reset(); // gui.repaint(); // }else{ goto_XY(pos); isInField(lastPos); //returnbacktothecallingobjectthatthecursorwasindeed //movedwithinthescreenobject returntrue; // } } } returnfalse; }
7,987
public boolean moveCursor(MouseEvent e, 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) != '/') { // System.out.println(" Hotspot clicked!!! we will send // characters " + // screen[pos].getChar() + // screen[pos+1].getChar()); aid.append(planes.getChar(pos)); aid.append(planes.getChar(pos + 1)); } else { log.debug(" 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(tnvt.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(tnvt.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)); } org.tn5250j.tools.system.OperatingSystem.displayURL(eb .toString()); // take out the log statement when we are sure it is // working log.info("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(tnvt.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; } 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); // return back to the calling object that the cursor was indeed // moved with in the screen object return true; // } } } return false; }
publicbooleanmoveCursor(MouseEvente,intpos){ if(!oia.isKeyBoardLocked()){ if(pos<0) returnfalse; //becausegetRowColFromPointreturnsoffsetof1,1weneedto //translatetooffset0,0 //pos-=(numCols+1); intg=planes.getWhichGUI(pos); //letscheckforhotspots if(g>=BUTTON_LEFT&&g<=BUTTON_LAST){ StringBufferaid=newStringBuffer(); booleanaidFlag=true; switch(g){ caseBUTTON_RIGHT: caseBUTTON_MIDDLE: while(planes.getWhichGUI(--pos)!=BUTTON_LEFT){ } caseBUTTON_LEFT: if(planes.getChar(pos)=='F'){ pos++; }else aidFlag=false; if(planes.getChar(pos+1)!='=' &&planes.getChar(pos+1)!='.' &&planes.getChar(pos+1)!='/'){ //System.out.println("Hotspotclicked!!!wewillsend //characters"+ //screen[pos].getChar()+ //screen[pos+1].getChar()); aid.append(planes.getChar(pos)); aid.append(planes.getChar(pos+1)); }else{ log.debug("Hotspotclicked!!!wewillsendcharacter" +planes.getChar(pos)); aid.append(planes.getChar(pos)); } break; } if(aidFlag){ switch(g){ caseBUTTON_LEFT_UP: caseBUTTON_MIDDLE_UP: caseBUTTON_RIGHT_UP: caseBUTTON_ONE_UP: caseBUTTON_SB_UP: caseBUTTON_SB_GUIDE: sessionVT.sendAidKey(tnvt.AID_ROLL_UP); break; caseBUTTON_LEFT_DN: caseBUTTON_MIDDLE_DN: caseBUTTON_RIGHT_DN: caseBUTTON_ONE_DN: caseBUTTON_SB_DN: caseBUTTON_SB_THUMB: sessionVT.sendAidKey(tnvt.AID_ROLL_DOWN); break; caseBUTTON_LEFT_EB: caseBUTTON_MIDDLE_EB: caseBUTTON_RIGHT_EB: StringBuffereb=newStringBuffer(); while(planes.getWhichGUI(pos--)!=BUTTON_LEFT_EB) ; while(planes.getWhichGUI(pos++)!=BUTTON_RIGHT_EB){ eb.append(planes.getChar(pos)); } org.tn5250j.tools.system.OperatingSystem.displayURL(eb .toString()); //takeoutthelogstatementwhenwearesureitis //working log.info("SendtoexternalBrowser:"+eb.toString()); break; default: intaidKey=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){ intxPos=screenFields.getCurrentField().startPos(); for(intx=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(tnvt.AID_ENTER); } } //returnbacktothecallingroutinethatthecursorwasnotmoved //butsomethingelseherewasdonelikeaidkeysorthesuch returnfalse; } else{ //thisisanotetonotexecutethiscodeherewhenwe //implement //theremainaftereditfunctionoption. // if(gui.rubberband.isAreaSelected()){ // gui.rubberband.reset(); // gui.repaint(); // }else{ goto_XY(pos); isInField(lastPos); //returnbacktothecallingobjectthatthecursorwasindeed //movedwithinthescreenobject returntrue; // } } } returnfalse; }
7,988
public boolean moveCursor(MouseEvent e, 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) != '/') { // System.out.println(" Hotspot clicked!!! we will send // characters " + // screen[pos].getChar() + // screen[pos+1].getChar()); aid.append(planes.getChar(pos)); aid.append(planes.getChar(pos + 1)); } else { log.debug(" 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(tnvt.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(tnvt.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)); } org.tn5250j.tools.system.OperatingSystem.displayURL(eb .toString()); // take out the log statement when we are sure it is // working log.info("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(tnvt.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; } 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); // return back to the calling object that the cursor was indeed // moved with in the screen object return true; // } } } return false; }
publicbooleanmoveCursor(MouseEvente,intpos){ if(!oia.isKeyBoardLocked()){ if(pos<0) returnfalse; //becausegetRowColFromPointreturnsoffsetof1,1weneedto //translatetooffset0,0 //pos-=(numCols+1); intg=planes.getWhichGUI(pos); //letscheckforhotspots if(g>=BUTTON_LEFT&&g<=BUTTON_LAST){ StringBufferaid=newStringBuffer(); booleanaidFlag=true; switch(g){ caseBUTTON_RIGHT: caseBUTTON_MIDDLE: while(planes.getWhichGUI(--pos)!=BUTTON_LEFT){ } caseBUTTON_LEFT: if(planes.getChar(pos)=='F'){ pos++; }else aidFlag=false; if(planes.getChar(pos+1)!='=' &&planes.getChar(pos+1)!='.' &&planes.getChar(pos+1)!='/'){ //System.out.println("Hotspotclicked!!!wewillsend //characters"+ //screen[pos].getChar()+ //screen[pos+1].getChar()); aid.append(planes.getChar(pos)); aid.append(planes.getChar(pos+1)); }else{ log.debug("Hotspotclicked!!!wewillsendcharacter" +planes.getChar(pos)); aid.append(planes.getChar(pos)); } break; } if(aidFlag){ switch(g){ caseBUTTON_LEFT_UP: caseBUTTON_MIDDLE_UP: caseBUTTON_RIGHT_UP: caseBUTTON_ONE_UP: caseBUTTON_SB_UP: caseBUTTON_SB_GUIDE: sessionVT.sendAidKey(tnvt.AID_ROLL_UP); break; caseBUTTON_LEFT_DN: caseBUTTON_MIDDLE_DN: caseBUTTON_RIGHT_DN: caseBUTTON_ONE_DN: caseBUTTON_SB_DN: caseBUTTON_SB_THUMB: sessionVT.sendAidKey(tnvt.AID_ROLL_DOWN); break; caseBUTTON_LEFT_EB: caseBUTTON_MIDDLE_EB: caseBUTTON_RIGHT_EB: StringBuffereb=newStringBuffer(); while(planes.getWhichGUI(pos--)!=BUTTON_LEFT_EB) ; while(planes.getWhichGUI(pos++)!=BUTTON_RIGHT_EB){ eb.append(planes.getChar(pos)); } org.tn5250j.tools.system.OperatingSystem.displayURL(eb .toString()); //takeoutthelogstatementwhenwearesureitis //working log.info("SendtoexternalBrowser:"+eb.toString()); break; default: intaidKey=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){ intxPos=screenFields.getCurrentField().startPos(); for(intx=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(tnvt.AID_ENTER); } } //returnbacktothecallingroutinethatthecursorwasnotmoved //butsomethingelseherewasdonelikeaidkeysorthesuch returnfalse; } else{ //thisisanotetonotexecutethiscodeherewhenwe //implement //theremainaftereditfunctionoption. // if(gui.rubberband.isAreaSelected()){ // gui.rubberband.reset(); // gui.repaint(); // }else{ goto_XY(pos); isInField(lastPos); //returnbacktothecallingobjectthatthecursorwasindeed //movedwithinthescreenobject returntrue; // } } } returnfalse; }
7,989
public boolean moveCursor(MouseEvent e, 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) != '/') { // System.out.println(" Hotspot clicked!!! we will send // characters " + // screen[pos].getChar() + // screen[pos+1].getChar()); aid.append(planes.getChar(pos)); aid.append(planes.getChar(pos + 1)); } else { log.debug(" 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(tnvt.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(tnvt.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)); } org.tn5250j.tools.system.OperatingSystem.displayURL(eb .toString()); // take out the log statement when we are sure it is // working log.info("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(tnvt.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; } 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); // return back to the calling object that the cursor was indeed // moved with in the screen object return true; // } } } return false; }
publicbooleanmoveCursor(MouseEvente,intpos){ if(!oia.isKeyBoardLocked()){ if(pos<0) returnfalse; //becausegetRowColFromPointreturnsoffsetof1,1weneedto //translatetooffset0,0 //pos-=(numCols+1); intg=planes.getWhichGUI(pos); //letscheckforhotspots if(g>=BUTTON_LEFT&&g<=BUTTON_LAST){ StringBufferaid=newStringBuffer(); booleanaidFlag=true; switch(g){ caseBUTTON_RIGHT: caseBUTTON_MIDDLE: while(planes.getWhichGUI(--pos)!=BUTTON_LEFT){ } caseBUTTON_LEFT: if(planes.getChar(pos)=='F'){ pos++; }else aidFlag=false; if(planes.getChar(pos+1)!='=' &&planes.getChar(pos+1)!='.' &&planes.getChar(pos+1)!='/'){ //System.out.println("Hotspotclicked!!!wewillsend //characters"+ //screen[pos].getChar()+ //screen[pos+1].getChar()); aid.append(planes.getChar(pos)); aid.append(planes.getChar(pos+1)); }else{ log.debug("Hotspotclicked!!!wewillsendcharacter" +planes.getChar(pos)); aid.append(planes.getChar(pos)); } break; } if(aidFlag){ switch(g){ caseBUTTON_LEFT_UP: caseBUTTON_MIDDLE_UP: caseBUTTON_RIGHT_UP: caseBUTTON_ONE_UP: caseBUTTON_SB_UP: caseBUTTON_SB_GUIDE: sessionVT.sendAidKey(tnvt.AID_ROLL_UP); break; caseBUTTON_LEFT_DN: caseBUTTON_MIDDLE_DN: caseBUTTON_RIGHT_DN: caseBUTTON_ONE_DN: caseBUTTON_SB_DN: caseBUTTON_SB_THUMB: sessionVT.sendAidKey(tnvt.AID_ROLL_DOWN); break; caseBUTTON_LEFT_EB: caseBUTTON_MIDDLE_EB: caseBUTTON_RIGHT_EB: StringBuffereb=newStringBuffer(); while(planes.getWhichGUI(pos--)!=BUTTON_LEFT_EB) ; while(planes.getWhichGUI(pos++)!=BUTTON_RIGHT_EB){ eb.append(planes.getChar(pos)); } org.tn5250j.tools.system.OperatingSystem.displayURL(eb .toString()); //takeoutthelogstatementwhenwearesureitis //working log.info("SendtoexternalBrowser:"+eb.toString()); break; default: intaidKey=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){ intxPos=screenFields.getCurrentField().startPos(); for(intx=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(tnvt.AID_ENTER); } } //returnbacktothecallingroutinethatthecursorwasnotmoved //butsomethingelseherewasdonelikeaidkeysorthesuch returnfalse; } else{ //thisisanotetonotexecutethiscodeherewhenwe //implement //theremainaftereditfunctionoption. // if(gui.rubberband.isAreaSelected()){ // gui.rubberband.reset(); // gui.repaint(); // }else{ goto_XY(pos); isInField(lastPos); //returnbacktothecallingobjectthatthecursorwasindeed //movedwithinthescreenobject returntrue; // } } } returnfalse; }
7,990
public boolean moveCursor(MouseEvent e, 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) != '/') { // System.out.println(" Hotspot clicked!!! we will send // characters " + // screen[pos].getChar() + // screen[pos+1].getChar()); aid.append(planes.getChar(pos)); aid.append(planes.getChar(pos + 1)); } else { log.debug(" 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(tnvt.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(tnvt.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)); } org.tn5250j.tools.system.OperatingSystem.displayURL(eb .toString()); // take out the log statement when we are sure it is // working log.info("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(tnvt.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; } 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); // return back to the calling object that the cursor was indeed // moved with in the screen object return true; // } } } return false; }
publicbooleanmoveCursor(MouseEvente,intpos){ if(!oia.isKeyBoardLocked()){ if(pos<0) returnfalse; //becausegetRowColFromPointreturnsoffsetof1,1weneedto //translatetooffset0,0 //pos-=(numCols+1); intg=planes.getWhichGUI(pos); //letscheckforhotspots if(g>=BUTTON_LEFT&&g<=BUTTON_LAST){ StringBufferaid=newStringBuffer(); booleanaidFlag=true; switch(g){ caseBUTTON_RIGHT: caseBUTTON_MIDDLE: while(planes.getWhichGUI(--pos)!=BUTTON_LEFT){ } caseBUTTON_LEFT: if(planes.getChar(pos)=='F'){ pos++; }else aidFlag=false; if(planes.getChar(pos+1)!='=' &&planes.getChar(pos+1)!='.' &&planes.getChar(pos+1)!='/'){ //System.out.println("Hotspotclicked!!!wewillsend //characters"+ //screen[pos].getChar()+ //screen[pos+1].getChar()); aid.append(planes.getChar(pos)); aid.append(planes.getChar(pos+1)); }else{ log.debug("Hotspotclicked!!!wewillsendcharacter" +planes.getChar(pos)); aid.append(planes.getChar(pos)); } break; } if(aidFlag){ switch(g){ caseBUTTON_LEFT_UP: caseBUTTON_MIDDLE_UP: caseBUTTON_RIGHT_UP: caseBUTTON_ONE_UP: caseBUTTON_SB_UP: caseBUTTON_SB_GUIDE: sessionVT.sendAidKey(tnvt.AID_ROLL_UP); break; caseBUTTON_LEFT_DN: caseBUTTON_MIDDLE_DN: caseBUTTON_RIGHT_DN: caseBUTTON_ONE_DN: caseBUTTON_SB_DN: caseBUTTON_SB_THUMB: sessionVT.sendAidKey(tnvt.AID_ROLL_DOWN); break; caseBUTTON_LEFT_EB: caseBUTTON_MIDDLE_EB: caseBUTTON_RIGHT_EB: StringBuffereb=newStringBuffer(); while(planes.getWhichGUI(pos--)!=BUTTON_LEFT_EB) ; while(planes.getWhichGUI(pos++)!=BUTTON_RIGHT_EB){ eb.append(planes.getChar(pos)); } org.tn5250j.tools.system.OperatingSystem.displayURL(eb .toString()); //takeoutthelogstatementwhenwearesureitis //working log.info("SendtoexternalBrowser:"+eb.toString()); break; default: intaidKey=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){ intxPos=screenFields.getCurrentField().startPos(); for(intx=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(tnvt.AID_ENTER); } } //returnbacktothecallingroutinethatthecursorwasnotmoved //butsomethingelseherewasdonelikeaidkeysorthesuch returnfalse; } else{ //thisisanotetonotexecutethiscodeherewhenwe //implement //theremainaftereditfunctionoption. // if(gui.rubberband.isAreaSelected()){ // gui.rubberband.reset(); // gui.repaint(); // }else{ goto_XY(pos); isInField(lastPos); //returnbacktothecallingobjectthatthecursorwasindeed //movedwithinthescreenobject returntrue; // } } } returnfalse; }
7,991
public boolean moveCursor(MouseEvent e, 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) != '/') { // System.out.println(" Hotspot clicked!!! we will send // characters " + // screen[pos].getChar() + // screen[pos+1].getChar()); aid.append(planes.getChar(pos)); aid.append(planes.getChar(pos + 1)); } else { log.debug(" 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(tnvt.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(tnvt.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)); } org.tn5250j.tools.system.OperatingSystem.displayURL(eb .toString()); // take out the log statement when we are sure it is // working log.info("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(tnvt.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; } 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); // return back to the calling object that the cursor was indeed // moved with in the screen object return true; // } } } return false; }
publicbooleanmoveCursor(MouseEvente,intpos){ if(!oia.isKeyBoardLocked()){ if(pos<0) returnfalse; //becausegetRowColFromPointreturnsoffsetof1,1weneedto //translatetooffset0,0 //pos-=(numCols+1); intg=planes.getWhichGUI(pos); //letscheckforhotspots if(g>=BUTTON_LEFT&&g<=BUTTON_LAST){ StringBufferaid=newStringBuffer(); booleanaidFlag=true; switch(g){ caseBUTTON_RIGHT: caseBUTTON_MIDDLE: while(planes.getWhichGUI(--pos)!=BUTTON_LEFT){ } caseBUTTON_LEFT: if(planes.getChar(pos)=='F'){ pos++; }else aidFlag=false; if(planes.getChar(pos+1)!='=' &&planes.getChar(pos+1)!='.' &&planes.getChar(pos+1)!='/'){ //System.out.println("Hotspotclicked!!!wewillsend //characters"+ //screen[pos].getChar()+ //screen[pos+1].getChar()); aid.append(planes.getChar(pos)); aid.append(planes.getChar(pos+1)); }else{ log.debug("Hotspotclicked!!!wewillsendcharacter" +planes.getChar(pos)); aid.append(planes.getChar(pos)); } break; } if(aidFlag){ switch(g){ caseBUTTON_LEFT_UP: caseBUTTON_MIDDLE_UP: caseBUTTON_RIGHT_UP: caseBUTTON_ONE_UP: caseBUTTON_SB_UP: caseBUTTON_SB_GUIDE: sessionVT.sendAidKey(tnvt.AID_ROLL_UP); break; caseBUTTON_LEFT_DN: caseBUTTON_MIDDLE_DN: caseBUTTON_RIGHT_DN: caseBUTTON_ONE_DN: caseBUTTON_SB_DN: caseBUTTON_SB_THUMB: sessionVT.sendAidKey(tnvt.AID_ROLL_DOWN); break; caseBUTTON_LEFT_EB: caseBUTTON_MIDDLE_EB: caseBUTTON_RIGHT_EB: StringBuffereb=newStringBuffer(); while(planes.getWhichGUI(pos--)!=BUTTON_LEFT_EB) ; while(planes.getWhichGUI(pos++)!=BUTTON_RIGHT_EB){ eb.append(planes.getChar(pos)); } org.tn5250j.tools.system.OperatingSystem.displayURL(eb .toString()); //takeoutthelogstatementwhenwearesureitis //working log.info("SendtoexternalBrowser:"+eb.toString()); break; default: intaidKey=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){ intxPos=screenFields.getCurrentField().startPos(); for(intx=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(tnvt.AID_ENTER); } } //returnbacktothecallingroutinethatthecursorwasnotmoved //butsomethingelseherewasdonelikeaidkeysorthesuch returnfalse; } else{ //thisisanotetonotexecutethiscodeherewhenwe //implement //theremainaftereditfunctionoption. // if(gui.rubberband.isAreaSelected()){ // gui.rubberband.reset(); // gui.repaint(); // }else{ goto_XY(pos); isInField(lastPos); //returnbacktothecallingobjectthatthecursorwasindeed //movedwithinthescreenobject returntrue; // } } } returnfalse; }
7,992
public boolean moveCursor(MouseEvent e, 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) != '/') { // System.out.println(" Hotspot clicked!!! we will send // characters " + // screen[pos].getChar() + // screen[pos+1].getChar()); aid.append(planes.getChar(pos)); aid.append(planes.getChar(pos + 1)); } else { log.debug(" 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(tnvt.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(tnvt.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)); } org.tn5250j.tools.system.OperatingSystem.displayURL(eb .toString()); // take out the log statement when we are sure it is // working log.info("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(tnvt.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; } 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); // return back to the calling object that the cursor was indeed // moved with in the screen object return true; // } } } return false; }
publicbooleanmoveCursor(MouseEvente,intpos){ if(!oia.isKeyBoardLocked()){ if(pos<0) returnfalse; //becausegetRowColFromPointreturnsoffsetof1,1weneedto //translatetooffset0,0 //pos-=(numCols+1); intg=planes.getWhichGUI(pos); //letscheckforhotspots if(g>=BUTTON_LEFT&&g<=BUTTON_LAST){ StringBufferaid=newStringBuffer(); booleanaidFlag=true; switch(g){ caseBUTTON_RIGHT: caseBUTTON_MIDDLE: while(planes.getWhichGUI(--pos)!=BUTTON_LEFT){ } caseBUTTON_LEFT: if(planes.getChar(pos)=='F'){ pos++; }else aidFlag=false; if(planes.getChar(pos+1)!='=' &&planes.getChar(pos+1)!='.' &&planes.getChar(pos+1)!='/'){ //System.out.println("Hotspotclicked!!!wewillsend //characters"+ //screen[pos].getChar()+ //screen[pos+1].getChar()); aid.append(planes.getChar(pos)); aid.append(planes.getChar(pos+1)); }else{ log.debug("Hotspotclicked!!!wewillsendcharacter" +planes.getChar(pos)); aid.append(planes.getChar(pos)); } break; } if(aidFlag){ switch(g){ caseBUTTON_LEFT_UP: caseBUTTON_MIDDLE_UP: caseBUTTON_RIGHT_UP: caseBUTTON_ONE_UP: caseBUTTON_SB_UP: caseBUTTON_SB_GUIDE: sessionVT.sendAidKey(tnvt.AID_ROLL_UP); break; caseBUTTON_LEFT_DN: caseBUTTON_MIDDLE_DN: caseBUTTON_RIGHT_DN: caseBUTTON_ONE_DN: caseBUTTON_SB_DN: caseBUTTON_SB_THUMB: sessionVT.sendAidKey(tnvt.AID_ROLL_DOWN); break; caseBUTTON_LEFT_EB: caseBUTTON_MIDDLE_EB: caseBUTTON_RIGHT_EB: StringBuffereb=newStringBuffer(); while(planes.getWhichGUI(pos--)!=BUTTON_LEFT_EB) ; while(planes.getWhichGUI(pos++)!=BUTTON_RIGHT_EB){ eb.append(planes.getChar(pos)); } org.tn5250j.tools.system.OperatingSystem.displayURL(eb .toString()); //takeoutthelogstatementwhenwearesureitis //working log.info("SendtoexternalBrowser:"+eb.toString()); break; default: intaidKey=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){ intxPos=screenFields.getCurrentField().startPos(); for(intx=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(tnvt.AID_ENTER); } } //returnbacktothecallingroutinethatthecursorwasnotmoved //butsomethingelseherewasdonelikeaidkeysorthesuch returnfalse; } else{ //thisisanotetonotexecutethiscodeherewhenwe //implement //theremainaftereditfunctionoption. // if(gui.rubberband.isAreaSelected()){ // gui.rubberband.reset(); // gui.repaint(); // }else{ goto_XY(pos); isInField(lastPos); //returnbacktothecallingobjectthatthecursorwasindeed //movedwithinthescreenobject returntrue; // } } } returnfalse; }
7,993
public boolean moveCursor(MouseEvent e, 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) != '/') { // System.out.println(" Hotspot clicked!!! we will send // characters " + // screen[pos].getChar() + // screen[pos+1].getChar()); aid.append(planes.getChar(pos)); aid.append(planes.getChar(pos + 1)); } else { log.debug(" 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(tnvt.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(tnvt.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)); } org.tn5250j.tools.system.OperatingSystem.displayURL(eb .toString()); // take out the log statement when we are sure it is // working log.info("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(tnvt.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; } 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); // return back to the calling object that the cursor was indeed // moved with in the screen object return true; // } } } return false; }
publicbooleanmoveCursor(MouseEvente,intpos){ if(!oia.isKeyBoardLocked()){ if(pos<0) returnfalse; //becausegetRowColFromPointreturnsoffsetof1,1weneedto //translatetooffset0,0 //pos-=(numCols+1); intg=planes.getWhichGUI(pos); //letscheckforhotspots if(g>=BUTTON_LEFT&&g<=BUTTON_LAST){ StringBufferaid=newStringBuffer(); booleanaidFlag=true; switch(g){ caseBUTTON_RIGHT: caseBUTTON_MIDDLE: while(planes.getWhichGUI(--pos)!=BUTTON_LEFT){ } caseBUTTON_LEFT: if(planes.getChar(pos)=='F'){ pos++; }else aidFlag=false; if(planes.getChar(pos+1)!='=' &&planes.getChar(pos+1)!='.' &&planes.getChar(pos+1)!='/'){ //System.out.println("Hotspotclicked!!!wewillsend //characters"+ //screen[pos].getChar()+ //screen[pos+1].getChar()); aid.append(planes.getChar(pos)); aid.append(planes.getChar(pos+1)); }else{ log.debug("Hotspotclicked!!!wewillsendcharacter" +planes.getChar(pos)); aid.append(planes.getChar(pos)); } break; } if(aidFlag){ switch(g){ caseBUTTON_LEFT_UP: caseBUTTON_MIDDLE_UP: caseBUTTON_RIGHT_UP: caseBUTTON_ONE_UP: caseBUTTON_SB_UP: caseBUTTON_SB_GUIDE: sessionVT.sendAidKey(tnvt.AID_ROLL_UP); break; caseBUTTON_LEFT_DN: caseBUTTON_MIDDLE_DN: caseBUTTON_RIGHT_DN: caseBUTTON_ONE_DN: caseBUTTON_SB_DN: caseBUTTON_SB_THUMB: sessionVT.sendAidKey(tnvt.AID_ROLL_DOWN); break; caseBUTTON_LEFT_EB: caseBUTTON_MIDDLE_EB: caseBUTTON_RIGHT_EB: StringBuffereb=newStringBuffer(); while(planes.getWhichGUI(pos--)!=BUTTON_LEFT_EB) ; while(planes.getWhichGUI(pos++)!=BUTTON_RIGHT_EB){ eb.append(planes.getChar(pos)); } org.tn5250j.tools.system.OperatingSystem.displayURL(eb .toString()); //takeoutthelogstatementwhenwearesureitis //working log.info("SendtoexternalBrowser:"+eb.toString()); break; default: intaidKey=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){ intxPos=screenFields.getCurrentField().startPos(); for(intx=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(tnvt.AID_ENTER); } } //returnbacktothecallingroutinethatthecursorwasnotmoved //butsomethingelseherewasdonelikeaidkeysorthesuch returnfalse; } else{ //thisisanotetonotexecutethiscodeherewhenwe //implement //theremainaftereditfunctionoption. // if(gui.rubberband.isAreaSelected()){ // gui.rubberband.reset(); // gui.repaint(); // }else{ goto_XY(pos); isInField(lastPos); //returnbacktothecallingobjectthatthecursorwasindeed //movedwithinthescreenobject returntrue; // } } } returnfalse; }
7,994
public boolean moveCursor(MouseEvent e, 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) != '/') { // System.out.println(" Hotspot clicked!!! we will send // characters " + // screen[pos].getChar() + // screen[pos+1].getChar()); aid.append(planes.getChar(pos)); aid.append(planes.getChar(pos + 1)); } else { log.debug(" 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(tnvt.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(tnvt.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)); } org.tn5250j.tools.system.OperatingSystem.displayURL(eb .toString()); // take out the log statement when we are sure it is // working log.info("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(tnvt.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; } 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); // return back to the calling object that the cursor was indeed // moved with in the screen object return true; // } } } return false; }
publicbooleanmoveCursor(MouseEvente,intpos){ if(!oia.isKeyBoardLocked()){ if(pos<0) returnfalse; //becausegetRowColFromPointreturnsoffsetof1,1weneedto //translatetooffset0,0 //pos-=(numCols+1); intg=planes.getWhichGUI(pos); //letscheckforhotspots if(g>=BUTTON_LEFT&&g<=BUTTON_LAST){ StringBufferaid=newStringBuffer(); booleanaidFlag=true; switch(g){ caseBUTTON_RIGHT: caseBUTTON_MIDDLE: while(planes.getWhichGUI(--pos)!=BUTTON_LEFT){ } caseBUTTON_LEFT: if(planes.getChar(pos)=='F'){ pos++; }else aidFlag=false; if(planes.getChar(pos+1)!='=' &&planes.getChar(pos+1)!='.' &&planes.getChar(pos+1)!='/'){ //System.out.println("Hotspotclicked!!!wewillsend //characters"+ //screen[pos].getChar()+ //screen[pos+1].getChar()); aid.append(planes.getChar(pos)); aid.append(planes.getChar(pos+1)); }else{ log.debug("Hotspotclicked!!!wewillsendcharacter" +planes.getChar(pos)); aid.append(planes.getChar(pos)); } break; } if(aidFlag){ switch(g){ caseBUTTON_LEFT_UP: caseBUTTON_MIDDLE_UP: caseBUTTON_RIGHT_UP: caseBUTTON_ONE_UP: caseBUTTON_SB_UP: caseBUTTON_SB_GUIDE: sessionVT.sendAidKey(tnvt.AID_ROLL_UP); break; caseBUTTON_LEFT_DN: caseBUTTON_MIDDLE_DN: caseBUTTON_RIGHT_DN: caseBUTTON_ONE_DN: caseBUTTON_SB_DN: caseBUTTON_SB_THUMB: sessionVT.sendAidKey(tnvt.AID_ROLL_DOWN); break; caseBUTTON_LEFT_EB: caseBUTTON_MIDDLE_EB: caseBUTTON_RIGHT_EB: StringBuffereb=newStringBuffer(); while(planes.getWhichGUI(pos--)!=BUTTON_LEFT_EB) ; while(planes.getWhichGUI(pos++)!=BUTTON_RIGHT_EB){ eb.append(planes.getChar(pos)); } org.tn5250j.tools.system.OperatingSystem.displayURL(eb .toString()); //takeoutthelogstatementwhenwearesureitis //working log.info("SendtoexternalBrowser:"+eb.toString()); break; default: intaidKey=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){ intxPos=screenFields.getCurrentField().startPos(); for(intx=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(tnvt.AID_ENTER); } } //returnbacktothecallingroutinethatthecursorwasnotmoved //butsomethingelseherewasdonelikeaidkeysorthesuch returnfalse; } else{ //thisisanotetonotexecutethiscodeherewhenwe //implement //theremainaftereditfunctionoption. // if(gui.rubberband.isAreaSelected()){ // gui.rubberband.reset(); // gui.repaint(); // }else{ goto_XY(pos); isInField(lastPos); //returnbacktothecallingobjectthatthecursorwasindeed //movedwithinthescreenobject returntrue; // } } } returnfalse; }
7,995
public boolean moveCursor(MouseEvent e, 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) != '/') { // System.out.println(" Hotspot clicked!!! we will send // characters " + // screen[pos].getChar() + // screen[pos+1].getChar()); aid.append(planes.getChar(pos)); aid.append(planes.getChar(pos + 1)); } else { log.debug(" 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(tnvt.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(tnvt.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)); } org.tn5250j.tools.system.OperatingSystem.displayURL(eb .toString()); // take out the log statement when we are sure it is // working log.info("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(tnvt.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; } 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); // return back to the calling object that the cursor was indeed // moved with in the screen object return true; // } } } return false; }
publicbooleanmoveCursor(MouseEvente,intpos){ if(!oia.isKeyBoardLocked()){ if(pos<0) returnfalse; //becausegetRowColFromPointreturnsoffsetof1,1weneedto //translatetooffset0,0 //pos-=(numCols+1); intg=planes.getWhichGUI(pos); //letscheckforhotspots if(g>=BUTTON_LEFT&&g<=BUTTON_LAST){ StringBufferaid=newStringBuffer(); booleanaidFlag=true; switch(g){ caseBUTTON_RIGHT: caseBUTTON_MIDDLE: while(planes.getWhichGUI(--pos)!=BUTTON_LEFT){ } caseBUTTON_LEFT: if(planes.getChar(pos)=='F'){ pos++; }else aidFlag=false; if(planes.getChar(pos+1)!='=' &&planes.getChar(pos+1)!='.' &&planes.getChar(pos+1)!='/'){ //System.out.println("Hotspotclicked!!!wewillsend //characters"+ //screen[pos].getChar()+ //screen[pos+1].getChar()); aid.append(planes.getChar(pos)); aid.append(planes.getChar(pos+1)); }else{ log.debug("Hotspotclicked!!!wewillsendcharacter" +planes.getChar(pos)); aid.append(planes.getChar(pos)); } break; } if(aidFlag){ switch(g){ caseBUTTON_LEFT_UP: caseBUTTON_MIDDLE_UP: caseBUTTON_RIGHT_UP: caseBUTTON_ONE_UP: caseBUTTON_SB_UP: caseBUTTON_SB_GUIDE: sessionVT.sendAidKey(tnvt.AID_ROLL_UP); break; caseBUTTON_LEFT_DN: caseBUTTON_MIDDLE_DN: caseBUTTON_RIGHT_DN: caseBUTTON_ONE_DN: caseBUTTON_SB_DN: caseBUTTON_SB_THUMB: sessionVT.sendAidKey(tnvt.AID_ROLL_DOWN); break; caseBUTTON_LEFT_EB: caseBUTTON_MIDDLE_EB: caseBUTTON_RIGHT_EB: StringBuffereb=newStringBuffer(); while(planes.getWhichGUI(pos--)!=BUTTON_LEFT_EB) ; while(planes.getWhichGUI(pos++)!=BUTTON_RIGHT_EB){ eb.append(planes.getChar(pos)); } org.tn5250j.tools.system.OperatingSystem.displayURL(eb .toString()); //takeoutthelogstatementwhenwearesureitis //working log.info("SendtoexternalBrowser:"+eb.toString()); break; default: intaidKey=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){ intxPos=screenFields.getCurrentField().startPos(); for(intx=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(tnvt.AID_ENTER); } } //returnbacktothecallingroutinethatthecursorwasnotmoved //butsomethingelseherewasdonelikeaidkeysorthesuch returnfalse; } else{ //thisisanotetonotexecutethiscodeherewhenwe //implement //theremainaftereditfunctionoption. // if(gui.rubberband.isAreaSelected()){ // gui.rubberband.reset(); // gui.repaint(); // }else{ goto_XY(pos); isInField(lastPos); //returnbacktothecallingobjectthatthecursorwasindeed //movedwithinthescreenobject returntrue; // } } } returnfalse; }
7,996
public boolean moveCursor(MouseEvent e, 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) != '/') { // System.out.println(" Hotspot clicked!!! we will send // characters " + // screen[pos].getChar() + // screen[pos+1].getChar()); aid.append(planes.getChar(pos)); aid.append(planes.getChar(pos + 1)); } else { log.debug(" 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(tnvt.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(tnvt.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)); } org.tn5250j.tools.system.OperatingSystem.displayURL(eb .toString()); // take out the log statement when we are sure it is // working log.info("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(tnvt.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; } 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); // return back to the calling object that the cursor was indeed // moved with in the screen object return true; // } } } return false; }
publicbooleanmoveCursor(MouseEvente,intpos){ if(!oia.isKeyBoardLocked()){ if(pos<0) returnfalse; //becausegetRowColFromPointreturnsoffsetof1,1weneedto //translatetooffset0,0 //pos-=(numCols+1); intg=planes.getWhichGUI(pos); //letscheckforhotspots if(g>=BUTTON_LEFT&&g<=BUTTON_LAST){ StringBufferaid=newStringBuffer(); booleanaidFlag=true; switch(g){ caseBUTTON_RIGHT: caseBUTTON_MIDDLE: while(planes.getWhichGUI(--pos)!=BUTTON_LEFT){ } caseBUTTON_LEFT: if(planes.getChar(pos)=='F'){ pos++; }else aidFlag=false; if(planes.getChar(pos+1)!='=' &&planes.getChar(pos+1)!='.' &&planes.getChar(pos+1)!='/'){ //System.out.println("Hotspotclicked!!!wewillsend //characters"+ //screen[pos].getChar()+ //screen[pos+1].getChar()); aid.append(planes.getChar(pos)); aid.append(planes.getChar(pos+1)); }else{ log.debug("Hotspotclicked!!!wewillsendcharacter" +planes.getChar(pos)); aid.append(planes.getChar(pos)); } break; } if(aidFlag){ switch(g){ caseBUTTON_LEFT_UP: caseBUTTON_MIDDLE_UP: caseBUTTON_RIGHT_UP: caseBUTTON_ONE_UP: caseBUTTON_SB_UP: caseBUTTON_SB_GUIDE: sessionVT.sendAidKey(tnvt.AID_ROLL_UP); break; caseBUTTON_LEFT_DN: caseBUTTON_MIDDLE_DN: caseBUTTON_RIGHT_DN: caseBUTTON_ONE_DN: caseBUTTON_SB_DN: caseBUTTON_SB_THUMB: sessionVT.sendAidKey(tnvt.AID_ROLL_DOWN); break; caseBUTTON_LEFT_EB: caseBUTTON_MIDDLE_EB: caseBUTTON_RIGHT_EB: StringBuffereb=newStringBuffer(); while(planes.getWhichGUI(pos--)!=BUTTON_LEFT_EB) ; while(planes.getWhichGUI(pos++)!=BUTTON_RIGHT_EB){ eb.append(planes.getChar(pos)); } org.tn5250j.tools.system.OperatingSystem.displayURL(eb .toString()); //takeoutthelogstatementwhenwearesureitis //working log.info("SendtoexternalBrowser:"+eb.toString()); break; default: intaidKey=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){ intxPos=screenFields.getCurrentField().startPos(); for(intx=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(tnvt.AID_ENTER); } } //returnbacktothecallingroutinethatthecursorwasnotmoved //butsomethingelseherewasdonelikeaidkeysorthesuch returnfalse; } else{ //thisisanotetonotexecutethiscodeherewhenwe //implement //theremainaftereditfunctionoption. // if(gui.rubberband.isAreaSelected()){ // gui.rubberband.reset(); // gui.repaint(); // }else{ goto_XY(pos); isInField(lastPos); //returnbacktothecallingobjectthatthecursorwasindeed //movedwithinthescreenobject returntrue; // } } } returnfalse; }
7,997
protected void createDefaultRenderers() { //FIXME: Create the renderer object. }
setDefaultRenderer(Boolean.class, new BooleanCellRenderer()); setDefaultRenderer(Number.class, new NumberCellRenderer()); setDefaultRenderer(Double.class, new DoubleCellRenderer()); setDefaultRenderer(Double.class, new FloatCellRenderer()); setDefaultRenderer(Date.class, new DateCellRenderer()); setDefaultRenderer(Icon.class, new IconCellRenderer()); setDefaultRenderer(Boolean.class, new BooleanCellRenderer()); setDefaultRenderer(Number.class, new NumberCellRenderer()); setDefaultRenderer(Double.class, new DoubleCellRenderer()); setDefaultRenderer(Double.class, new FloatCellRenderer()); setDefaultRenderer(Date.class, new DateCellRenderer()); setDefaultRenderer(Icon.class, new IconCellRenderer()); protectedsetDefaultRenderer(Boolean.class, new BooleanCellRenderer()); setDefaultRenderer(Number.class, new NumberCellRenderer()); setDefaultRenderer(Double.class, new DoubleCellRenderer()); setDefaultRenderer(Double.class, new FloatCellRenderer()); setDefaultRenderer(Date.class, new DateCellRenderer()); setDefaultRenderer(Icon.class, new IconCellRenderer()); voidsetDefaultRenderer(Boolean.class, new BooleanCellRenderer()); setDefaultRenderer(Number.class, new NumberCellRenderer()); setDefaultRenderer(Double.class, new DoubleCellRenderer()); setDefaultRenderer(Double.class, new FloatCellRenderer()); setDefaultRenderer(Date.class, new DateCellRenderer()); setDefaultRenderer(Icon.class, new IconCellRenderer()); createDefaultRenderers()setDefaultRenderer(Boolean.class, new BooleanCellRenderer()); setDefaultRenderer(Number.class, new NumberCellRenderer()); setDefaultRenderer(Double.class, new DoubleCellRenderer()); setDefaultRenderer(Double.class, new FloatCellRenderer()); setDefaultRenderer(Date.class, new DateCellRenderer()); setDefaultRenderer(Icon.class, new IconCellRenderer()); setDefaultRenderer(Boolean.class, new BooleanCellRenderer()); setDefaultRenderer(Number.class, new NumberCellRenderer()); setDefaultRenderer(Double.class, new DoubleCellRenderer()); setDefaultRenderer(Double.class, new FloatCellRenderer()); setDefaultRenderer(Date.class, new DateCellRenderer()); setDefaultRenderer(Icon.class, new IconCellRenderer()); {setDefaultRenderer(Boolean.class, new BooleanCellRenderer()); setDefaultRenderer(Number.class, new NumberCellRenderer()); setDefaultRenderer(Double.class, new DoubleCellRenderer()); setDefaultRenderer(Double.class, new FloatCellRenderer()); setDefaultRenderer(Date.class, new DateCellRenderer()); setDefaultRenderer(Icon.class, new IconCellRenderer()); setDefaultRenderer(Boolean.class, new BooleanCellRenderer()); setDefaultRenderer(Number.class, new NumberCellRenderer()); setDefaultRenderer(Double.class, new DoubleCellRenderer()); setDefaultRenderer(Double.class, new FloatCellRenderer()); setDefaultRenderer(Date.class, new DateCellRenderer()); setDefaultRenderer(Icon.class, new IconCellRenderer()); setDefaultRenderer(Boolean.class, new BooleanCellRenderer()); setDefaultRenderer(Number.class, new NumberCellRenderer()); setDefaultRenderer(Double.class, new DoubleCellRenderer()); setDefaultRenderer(Double.class, new FloatCellRenderer()); setDefaultRenderer(Date.class, new DateCellRenderer()); setDefaultRenderer(Icon.class, new IconCellRenderer()); setDefaultRenderer(Boolean.class, new BooleanCellRenderer()); setDefaultRenderer(Number.class, new NumberCellRenderer()); setDefaultRenderer(Double.class, new DoubleCellRenderer()); setDefaultRenderer(Double.class, new FloatCellRenderer()); setDefaultRenderer(Date.class, new DateCellRenderer()); setDefaultRenderer(Icon.class, new IconCellRenderer()); //FIXME:setDefaultRenderer(Boolean.class, new BooleanCellRenderer()); setDefaultRenderer(Number.class, new NumberCellRenderer()); setDefaultRenderer(Double.class, new DoubleCellRenderer()); setDefaultRenderer(Double.class, new FloatCellRenderer()); setDefaultRenderer(Date.class, new DateCellRenderer()); setDefaultRenderer(Icon.class, new IconCellRenderer()); CreatesetDefaultRenderer(Boolean.class, new BooleanCellRenderer()); setDefaultRenderer(Number.class, new NumberCellRenderer()); setDefaultRenderer(Double.class, new DoubleCellRenderer()); setDefaultRenderer(Double.class, new FloatCellRenderer()); setDefaultRenderer(Date.class, new DateCellRenderer()); setDefaultRenderer(Icon.class, new IconCellRenderer()); thesetDefaultRenderer(Boolean.class, new BooleanCellRenderer()); setDefaultRenderer(Number.class, new NumberCellRenderer()); setDefaultRenderer(Double.class, new DoubleCellRenderer()); setDefaultRenderer(Double.class, new FloatCellRenderer()); setDefaultRenderer(Date.class, new DateCellRenderer()); setDefaultRenderer(Icon.class, new IconCellRenderer()); renderersetDefaultRenderer(Boolean.class, new BooleanCellRenderer()); setDefaultRenderer(Number.class, new NumberCellRenderer()); setDefaultRenderer(Double.class, new DoubleCellRenderer()); setDefaultRenderer(Double.class, new FloatCellRenderer()); setDefaultRenderer(Date.class, new DateCellRenderer()); setDefaultRenderer(Icon.class, new IconCellRenderer()); object.setDefaultRenderer(Boolean.class, new BooleanCellRenderer()); setDefaultRenderer(Number.class, new NumberCellRenderer()); setDefaultRenderer(Double.class, new DoubleCellRenderer()); setDefaultRenderer(Double.class, new FloatCellRenderer()); setDefaultRenderer(Date.class, new DateCellRenderer()); setDefaultRenderer(Icon.class, new IconCellRenderer()); setDefaultRenderer(Boolean.class, new BooleanCellRenderer()); setDefaultRenderer(Number.class, new NumberCellRenderer()); setDefaultRenderer(Double.class, new DoubleCellRenderer()); setDefaultRenderer(Double.class, new FloatCellRenderer()); setDefaultRenderer(Date.class, new DateCellRenderer()); setDefaultRenderer(Icon.class, new IconCellRenderer()); }
7,998
private void distributeSpill(TableColumn[] cols, int spill) { int MIN = 0; int MAX = 0; int PREF = 0; int[] min = new int[cols.length]; int[] max = new int[cols.length]; int[] pref = new int[cols.length]; for (int i = 0; i < cols.length; ++i) { pref[i] = cols[i].getPreferredWidth(); min[i] = cols[i].getMinWidth(); max[i] = cols[i].getMaxWidth(); PREF += pref[i]; MIN += min[i]; MAX += max[i]; } for (int i = 0; i < cols.length; ++i) { int adj = 0; if (spill > 0) adj = (spill * (pref[i] - min[i])) / (PREF - MIN); else adj = (spill * (max[i] - pref[i])) / (MAX - PREF); cols[i].setWidth(pref[i] + adj); } }
private void distributeSpill(TableColumn[] cols, int spill) { int MIN = 0; int MAX = 0; int PREF = 0; int[] min = new int[cols.length]; int[] max = new int[cols.length]; int[] pref = new int[cols.length]; for (int i = 0; i < cols.length; ++i) { pref[i] = cols[i].getPreferredWidth(); min[i] = cols[i].getMinWidth(); max[i] = cols[i].getMaxWidth(); PREF += pref[i]; MIN += min[i]; MAX += max[i]; } for (int i = 0; i < cols.length; ++i) { int adj = 0; if (spill > 0) adj = (spill * (pref[i] - min[i])) / (PREF - MIN); else adj = (spill * (max[i] - pref[i])) / (MAX - PREF); cols[i].setWidth(pref[i] + adj); } }
7,999
private void distributeSpill(TableColumn[] cols, int spill) { int MIN = 0; int MAX = 0; int PREF = 0; int[] min = new int[cols.length]; int[] max = new int[cols.length]; int[] pref = new int[cols.length]; for (int i = 0; i < cols.length; ++i) { pref[i] = cols[i].getPreferredWidth(); min[i] = cols[i].getMinWidth(); max[i] = cols[i].getMaxWidth(); PREF += pref[i]; MIN += min[i]; MAX += max[i]; } for (int i = 0; i < cols.length; ++i) { int adj = 0; if (spill > 0) adj = (spill * (pref[i] - min[i])) / (PREF - MIN); else adj = (spill * (max[i] - pref[i])) / (MAX - PREF); cols[i].setWidth(pref[i] + adj); } }
private void distributeSpill(TableColumn[] cols, int spill) { int MIN = 0; int MAX = 0; int PREF = 0; int[] min = new int[cols.length]; int[] max = new int[cols.length]; int[] pref = new int[cols.length]; for (int i = 0; i < cols.length; ++i) { pref[i] = cols[i].getPreferredWidth(); min[i] = cols[i].getMinWidth(); max[i] = cols[i].getMaxWidth(); PREF += pref[i]; MIN += min[i]; MAX += max[i]; } for (int i = 0; i < cols.length; ++i) { int adj = 0; if (spill > 0) adj = (spill * (pref[i] - min[i])) / (PREF - MIN); else adj = (spill * (max[i] - pref[i])) / (MAX - PREF); cols[i].setWidth(pref[i] + adj); } }
8,000
public void doLayout() { TableColumn resizingColumn = null; int ncols = getColumnCount(); if (ncols < 1) return; int[] pref = new int[ncols]; int prefSum = 0; int rCol = -1; if (tableHeader != null) resizingColumn = tableHeader.getResizingColumn(); for (int i = 0; i < ncols; ++i) { TableColumn col = columnModel.getColumn(i); int p = col.getWidth(); pref[i] = p; prefSum += p; if (resizingColumn == col) rCol = i; } int spill = prefSum - getWidth(); if (resizingColumn != null) { TableColumn col; TableColumn [] cols; switch (getAutoResizeMode()) { case AUTO_RESIZE_LAST_COLUMN: col = columnModel.getColumn(ncols-1); col.setWidth(col.getPreferredWidth() + spill); break; case AUTO_RESIZE_NEXT_COLUMN: col = columnModel.getColumn(ncols-1); col.setWidth(col.getPreferredWidth() + spill); break; case AUTO_RESIZE_ALL_COLUMNS: cols = new TableColumn[ncols]; for (int i = 0; i < ncols; ++i) cols[i] = columnModel.getColumn(i); distributeSpill(cols, spill); break; case AUTO_RESIZE_SUBSEQUENT_COLUMNS: cols = new TableColumn[ncols]; for (int i = rCol; i < ncols; ++i) cols[i] = columnModel.getColumn(i); distributeSpill(cols, spill); break; case AUTO_RESIZE_OFF: default: } } else { TableColumn [] cols = new TableColumn[ncols]; for (int i = 0; i < ncols; ++i) cols[i] = columnModel.getColumn(i); distributeSpill(cols, spill); } }
public void doLayout() { TableColumn resizingColumn = null; int ncols = getColumnCount(); if (ncols < 1) return; int[] pref = new int[ncols]; int prefSum = 0; int rCol = -1; if (tableHeader != null) resizingColumn = tableHeader.getResizingColumn(); for (int i = 0; i < ncols; ++i) { TableColumn col = columnModel.getColumn(i); int p = col.getWidth(); pref[i] = p; prefSum += p; if (resizingColumn == col) rCol = i; } int spill = getWidth() - prefSum; if (resizingColumn != null) { TableColumn col; TableColumn [] cols; switch (getAutoResizeMode()) { case AUTO_RESIZE_LAST_COLUMN: col = columnModel.getColumn(ncols-1); col.setWidth(col.getPreferredWidth() + spill); break; case AUTO_RESIZE_NEXT_COLUMN: col = columnModel.getColumn(ncols-1); col.setWidth(col.getPreferredWidth() + spill); break; case AUTO_RESIZE_ALL_COLUMNS: cols = new TableColumn[ncols]; for (int i = 0; i < ncols; ++i) cols[i] = columnModel.getColumn(i); distributeSpill(cols, spill); break; case AUTO_RESIZE_SUBSEQUENT_COLUMNS: cols = new TableColumn[ncols]; for (int i = rCol; i < ncols; ++i) cols[i] = columnModel.getColumn(i); distributeSpill(cols, spill); break; case AUTO_RESIZE_OFF: default: } } else { TableColumn [] cols = new TableColumn[ncols]; for (int i = 0; i < ncols; ++i) cols[i] = columnModel.getColumn(i); distributeSpill(cols, spill); } }
8,001
public View create(Element element) { View view = null; Object attr = element.getAttributes().getAttribute( StyleConstants.NameAttribute); if (attr instanceof HTML.Tag) { HTML.Tag tag = (HTML.Tag) attr; if (tag.equals(HTML.Tag.IMPLIED) || tag.equals(HTML.Tag.P) || tag.equals(HTML.Tag.H1) || tag.equals(HTML.Tag.H2) || tag.equals(HTML.Tag.H3) || tag.equals(HTML.Tag.H4) || tag.equals(HTML.Tag.H5) || tag.equals(HTML.Tag.H6) || tag.equals(HTML.Tag.DT)) view = new ParagraphView(element); else if (tag.equals(HTML.Tag.LI) || tag.equals(HTML.Tag.DL) || tag.equals(HTML.Tag.DD) || tag.equals(HTML.Tag.BODY) || tag.equals(HTML.Tag.HTML) || tag.equals(HTML.Tag.CENTER) || tag.equals(HTML.Tag.DIV) || tag.equals(HTML.Tag.BLOCKQUOTE) || tag.equals(HTML.Tag.PRE)) view = new BlockView(element, View.Y_AXIS); // FIXME: Uncomment when the views have been implemented else if (tag.equals(HTML.Tag.CONTENT)) view = new InlineView(element); /* else if (tag.equals(HTML.Tag.MENU) || tag.equals(HTML.Tag.DIR) || tag.equals(HTML.Tag.UL) || tag.equals(HTML.Tag.OL)) view = new ListView(element); else if (tag.equals(HTML.Tag.IMG)) view = new ImageView(element); else if (tag.equals(HTML.Tag.HR)) view = new HRuleView(element); else if (tag.equals(HTML.Tag.BR)) view = new BRView(element); else if (tag.equals(HTML.Tag.TABLE)) view = new TableView(element); else if (tag.equals(HTML.Tag.INPUT) || tag.equals(HTML.Tag.SELECT) || tag.equals(HTML.Tag.TEXTAREA)) view = new FormView(element); else if (tag.equals(HTML.Tag.OBJECT)) view = new ObjectView(element); else if (tag.equals(HTML.Tag.FRAMESET)) view = new FrameSetView(element); else if (tag.equals(HTML.Tag.FRAME)) view = new FrameView(element); */ } if (view == null) { String name = element.getName(); if (name.equals(AbstractDocument.ContentElementName)) view = new LabelView(element); else if (name.equals(AbstractDocument.ParagraphElementName)) view = new ParagraphView(element); else if (name.equals(AbstractDocument.SectionElementName)) view = new BoxView(element, View.Y_AXIS); else if (name.equals(StyleConstants.ComponentElementName)) view = new ComponentView(element); else if (name.equals(StyleConstants.IconElementName)) view = new IconView(element); } return view; }
public View create(Element element) { View view = null; Object attr = element.getAttributes().getAttribute( StyleConstants.NameAttribute); if (attr instanceof HTML.Tag) { HTML.Tag tag = (HTML.Tag) attr; if (tag.equals(HTML.Tag.IMPLIED) || tag.equals(HTML.Tag.P) || tag.equals(HTML.Tag.H1) || tag.equals(HTML.Tag.H2) || tag.equals(HTML.Tag.H3) || tag.equals(HTML.Tag.H4) || tag.equals(HTML.Tag.H5) || tag.equals(HTML.Tag.H6) || tag.equals(HTML.Tag.DT)) view = new ParagraphView(element); else if (tag.equals(HTML.Tag.LI) || tag.equals(HTML.Tag.DL) || tag.equals(HTML.Tag.DD) || tag.equals(HTML.Tag.BODY) || tag.equals(HTML.Tag.HTML) || tag.equals(HTML.Tag.CENTER) || tag.equals(HTML.Tag.DIV) || tag.equals(HTML.Tag.BLOCKQUOTE) || tag.equals(HTML.Tag.PRE)) view = new BlockView(element, View.Y_AXIS); // FIXME: Uncomment when the views have been implemented else if (tag.equals(HTML.Tag.CONTENT)) view = new InlineView(element); /* else if (tag.equals(HTML.Tag.MENU) || tag.equals(HTML.Tag.DIR) || tag.equals(HTML.Tag.UL) || tag.equals(HTML.Tag.OL)) view = new ListView(element); else if (tag.equals(HTML.Tag.IMG)) view = new ImageView(element); else if (tag.equals(HTML.Tag.HR)) view = new HRuleView(element); else if (tag.equals(HTML.Tag.BR)) view = new BRView(element); else if (tag.equals(HTML.Tag.TABLE)) view = new TableView(element); else if (tag.equals(HTML.Tag.INPUT) || tag.equals(HTML.Tag.SELECT) || tag.equals(HTML.Tag.TEXTAREA)) view = new FormView(element); else if (tag.equals(HTML.Tag.OBJECT)) view = new ObjectView(element); else if (tag.equals(HTML.Tag.FRAMESET)) view = new FrameSetView(element); else if (tag.equals(HTML.Tag.FRAME)) view = new FrameView(element); */ } if (view == null) { String name = element.getName(); if (name.equals(AbstractDocument.ContentElementName)) view = new LabelView(element); else if (name.equals(AbstractDocument.ParagraphElementName)) view = new ParagraphView(element); else if (name.equals(AbstractDocument.SectionElementName)) view = new BoxView(element, View.Y_AXIS); else if (name.equals(StyleConstants.ComponentElementName)) view = new ComponentView(element); else if (name.equals(StyleConstants.IconElementName)) view = new IconView(element); } return view; }
8,004
public View create(Element element) { View view = null; Object attr = element.getAttributes().getAttribute( StyleConstants.NameAttribute); if (attr instanceof HTML.Tag) { HTML.Tag tag = (HTML.Tag) attr; if (tag.equals(HTML.Tag.IMPLIED) || tag.equals(HTML.Tag.P) || tag.equals(HTML.Tag.H1) || tag.equals(HTML.Tag.H2) || tag.equals(HTML.Tag.H3) || tag.equals(HTML.Tag.H4) || tag.equals(HTML.Tag.H5) || tag.equals(HTML.Tag.H6) || tag.equals(HTML.Tag.DT)) view = new ParagraphView(element); else if (tag.equals(HTML.Tag.LI) || tag.equals(HTML.Tag.DL) || tag.equals(HTML.Tag.DD) || tag.equals(HTML.Tag.BODY) || tag.equals(HTML.Tag.HTML) || tag.equals(HTML.Tag.CENTER) || tag.equals(HTML.Tag.DIV) || tag.equals(HTML.Tag.BLOCKQUOTE) || tag.equals(HTML.Tag.PRE)) view = new BlockView(element, View.Y_AXIS); // FIXME: Uncomment when the views have been implemented else if (tag.equals(HTML.Tag.CONTENT)) view = new InlineView(element); /* else if (tag.equals(HTML.Tag.MENU) || tag.equals(HTML.Tag.DIR) || tag.equals(HTML.Tag.UL) || tag.equals(HTML.Tag.OL)) view = new ListView(element); else if (tag.equals(HTML.Tag.IMG)) view = new ImageView(element); else if (tag.equals(HTML.Tag.HR)) view = new HRuleView(element); else if (tag.equals(HTML.Tag.BR)) view = new BRView(element); else if (tag.equals(HTML.Tag.TABLE)) view = new TableView(element); else if (tag.equals(HTML.Tag.INPUT) || tag.equals(HTML.Tag.SELECT) || tag.equals(HTML.Tag.TEXTAREA)) view = new FormView(element); else if (tag.equals(HTML.Tag.OBJECT)) view = new ObjectView(element); else if (tag.equals(HTML.Tag.FRAMESET)) view = new FrameSetView(element); else if (tag.equals(HTML.Tag.FRAME)) view = new FrameView(element); */ } if (view == null) { String name = element.getName(); if (name.equals(AbstractDocument.ContentElementName)) view = new LabelView(element); else if (name.equals(AbstractDocument.ParagraphElementName)) view = new ParagraphView(element); else if (name.equals(AbstractDocument.SectionElementName)) view = new BoxView(element, View.Y_AXIS); else if (name.equals(StyleConstants.ComponentElementName)) view = new ComponentView(element); else if (name.equals(StyleConstants.IconElementName)) view = new IconView(element); } return view; }
public View create(Element element) { View view = null; Object attr = element.getAttributes().getAttribute( StyleConstants.NameAttribute); if (attr instanceof HTML.Tag) { HTML.Tag tag = (HTML.Tag) attr; if (tag.equals(HTML.Tag.IMPLIED) || tag.equals(HTML.Tag.P) || tag.equals(HTML.Tag.H1) || tag.equals(HTML.Tag.H2) || tag.equals(HTML.Tag.H3) || tag.equals(HTML.Tag.H4) || tag.equals(HTML.Tag.H5) || tag.equals(HTML.Tag.H6) || tag.equals(HTML.Tag.DT)) view = new ParagraphView(element); else if (tag.equals(HTML.Tag.LI) || tag.equals(HTML.Tag.DL) || tag.equals(HTML.Tag.DD) || tag.equals(HTML.Tag.BODY) || tag.equals(HTML.Tag.HTML) || tag.equals(HTML.Tag.CENTER) || tag.equals(HTML.Tag.DIV) || tag.equals(HTML.Tag.BLOCKQUOTE) || tag.equals(HTML.Tag.PRE)) view = new BlockView(element, View.Y_AXIS); // FIXME: Uncomment when the views have been implemented else if (tag.equals(HTML.Tag.CONTENT)) view = new InlineView(element); /* else if (tag.equals(HTML.Tag.MENU) || tag.equals(HTML.Tag.DIR) || tag.equals(HTML.Tag.UL) || tag.equals(HTML.Tag.OL)) view = new ListView(element); else if (tag.equals(HTML.Tag.IMG)) view = new ImageView(element); else if (tag.equals(HTML.Tag.HR)) view = new HRuleView(element); else if (tag.equals(HTML.Tag.BR)) view = new BRView(element); else if (tag.equals(HTML.Tag.TABLE)) view = new TableView(element); else if (tag.equals(HTML.Tag.INPUT) || tag.equals(HTML.Tag.SELECT) || tag.equals(HTML.Tag.TEXTAREA)) view = new FormView(element); else if (tag.equals(HTML.Tag.OBJECT)) view = new ObjectView(element); else if (tag.equals(HTML.Tag.FRAMESET)) view = new FrameSetView(element); else if (tag.equals(HTML.Tag.FRAME)) view = new FrameView(element); */ } if (view == null) { String name = element.getName(); if (name.equals(AbstractDocument.ContentElementName)) view = new LabelView(element); else if (name.equals(AbstractDocument.ParagraphElementName)) view = new ParagraphView(element); else if (name.equals(AbstractDocument.SectionElementName)) view = new BoxView(element, View.Y_AXIS); else if (name.equals(StyleConstants.ComponentElementName)) view = new ComponentView(element); else if (name.equals(StyleConstants.IconElementName)) view = new IconView(element); } return view; }
8,005
static final KDF getInstance(final byte[] K) { int ndx = -1; final byte[] keyMaterial; if (K != null) { keyMaterial = K; ndx = 0; } else { keyMaterial = new byte[AES_BLOCK_SIZE]; ndx = new Random ().nextInt (256); // XXX does this need to be secure? } return new KDF(keyMaterial, ndx); }
static final KDF getInstance(final byte[] K) { int ndx = -1; final byte[] keyMaterial; if (K != null) { keyMaterial = K; ndx = 0; } else { keyMaterial = new byte[AES_BLOCK_SIZE]; while (ndx < 1 || ndx > 255) ndx = (byte) nextByte(); // XXX does this need to be secure? } return new KDF(keyMaterial, ndx); }
8,007
public int getLayer(Component c) { if (! componentToLayer.containsKey (c)) throw new IllegalArgumentException (); return ((Integer) componentToLayer.get(c)).intValue(); }
public int getLayer(Component c) { if (! componentToLayer.containsKey (c)) throw new IllegalArgumentException (); return ((Integer) componentToLayer.get(c)).intValue(); }
8,009
public JPanel() { this(new FlowLayout(), true); }
public JPanel() { this(new FlowLayout(), true); }
8,010
public JPanel() { this(new FlowLayout(), true); }
public JPanel() { this(new FlowLayout(), true); }
8,011
public AccessibleContext getAccessibleContext() { if (accessibleContext == null) accessibleContext = new AccessibleJPanel(); return accessibleContext; }
public AccessibleContext getAccessibleContext() { if (accessibleContext == null) accessibleContext = new AccessibleJPanel(); return accessibleContext; }
8,012
public AccessibleContext getAccessibleContext() { if (accessibleContext == null) accessibleContext = new AccessibleJPanel(); return accessibleContext; }
public AccessibleContext getAccessibleContext() { if (accessibleContext == null) accessibleContext = new AccessibleJPanel(); return accessibleContext; }
8,013
public PanelUI getUI() { return (PanelUI) ui; }
public PanelUI getUI() { return (PanelUI) ui; }
8,014
protected String paramString() { return "JPanel"; }
protected String paramString() { return "JPanel"; }
8,015
protected String paramString() { return "JPanel"; }
protected String paramString() { return "JPanel"; }
8,016
public void setUI(PanelUI ui) { super.setUI(ui); }
public void setUI(PanelUI ui) { super.setUI(ui); }
8,017
public void updateUI() { setUI((PanelUI) UIManager.getUI(this)); }
public void updateUI() { setUI((PanelUI) UIManager.getUI(this)); }
8,018
protected void fireSessionJump(int dir) { if (listeners != null) { int size = listeners.size(); for (int i = 0; i < size; i++) { SessionJumpListener target = (SessionJumpListener)listeners.elementAt(i); jumpEvent.setJumpDirection(dir); target.onSessionJump(jumpEvent); } } }
protected void fireSessionJump(int dir) { if (listeners != null) { int size = listeners.size(); for (int i = 0; i < size; i++) { SessionJumpListener target = (SessionJumpListener)listeners.elementAt(i); jumpEvent.setJumpDirection(dir); target.onSessionJump(jumpEvent); } } }
8,019
protected void fireSessionJump(int dir) { if (listeners != null) { int size = listeners.size(); for (int i = 0; i < size; i++) { SessionJumpListener target = (SessionJumpListener)listeners.elementAt(i); jumpEvent.setJumpDirection(dir); target.onSessionJump(jumpEvent); } } }
protected void fireSessionJump(int dir) { if (listeners != null) { int size = listeners.size(); for (int i = 0; i < size; i++) { SessionJumpListener target = (SessionJumpListener)listeners.elementAt(i); jumpEvent.setJumpDirection(dir); target.onSessionJump(jumpEvent); } } }
8,020
private void jbInit() throws Exception { this.setLayout(borderLayout1);// this.setOpaque(false); setDoubleBuffered(true); s.setOpaque(false); s.setDoubleBuffered(true); loadProps(); screen = new Screen5250(this,defaultProps); this.addComponentListener(this); if (!defaultProps.containsKey("width") || !defaultProps.containsKey("height")) // set the initialize size this.setSize(screen.getPreferredSize()); else { this.setSize(Integer.parseInt((String)defaultProps.get("width")), Integer.parseInt((String)defaultProps.get("height")) ); } addMouseListener(new MouseAdapter() { public void mousePressed(MouseEvent e) { /** @todo check for popup trigger on linux * */// if (e.isPopupTrigger()) { // using SwingUtilities because popuptrigger does not work on linux if (SwingUtilities.isRightMouseButton(e)) { doPopup(e); } } public void mouseReleased(MouseEvent e) {// System.out.println("Mouse Released"); } public void mouseClicked(MouseEvent e) { if (e.getClickCount() == 2) { screen.sendKeys("[enter]"); } else { screen.moveCursor(e); repaint(); getFocusForMe(); } } }); addKeyListener(new KeyAdapter() { public void keyTyped(KeyEvent e) { processVTKeyTyped(e); } public void keyPressed(KeyEvent ke) { processVTKeyPressed(ke); } public void keyReleased(KeyEvent e) { processVTKeyReleased(e); } }); keyMap = new KeyMapper(); keyMap.init(); /** * this is taken out right now look at the method for description */// initKeyBindings(); macros = new Macronizer(); macros.init(); keyPad.addActionListener(this); if (getStringProperty("keypad").equals("Yes")) keyPad.setVisible(true); else keyPad.setVisible(false); // Warning do not change the the order of the adding of keypad and // the screen. This will cause resizing problems because it will // resize the screen first and during the resize we need to calculate // the bouding area based on the height of the keyPad. // See resizeMe() and getDrawingBounds() this.add(keyPad,BorderLayout.SOUTH); this.add(s,BorderLayout.CENTER); setRubberBand(new TNRubberBand(this)); this.requestFocus(); jumpEvent = new SessionJumpEvent(this); }
private void jbInit() throws Exception { this.setLayout(borderLayout1);// this.setOpaque(false); setDoubleBuffered(true); s.setOpaque(false); s.setDoubleBuffered(true); loadProps(); screen = new Screen5250(this,defaultProps); this.addComponentListener(this); if (!defaultProps.containsKey("width") || !defaultProps.containsKey("height")) // set the initialize size this.setSize(screen.getPreferredSize()); else { this.setSize(Integer.parseInt((String)defaultProps.get("width")), Integer.parseInt((String)defaultProps.get("height")) ); } addMouseListener(new MouseAdapter() { public void mousePressed(MouseEvent e) { /** @todo check for popup trigger on linux * */// if (e.isPopupTrigger()) { // using SwingUtilities because popuptrigger does not work on linux if (SwingUtilities.isRightMouseButton(e)) { doPopup(e); } } public void mouseReleased(MouseEvent e) {// System.out.println("Mouse Released"); } public void mouseClicked(MouseEvent e) { if (e.getClickCount() == 2) { screen.sendKeys("[enter]"); } else { screen.moveCursor(e); repaint(); getFocusForMe(); } } }); addKeyListener(new KeyAdapter() { public void keyTyped(KeyEvent e) { processVTKeyTyped(e); } public void keyPressed(KeyEvent ke) { processVTKeyPressed(ke); } public void keyReleased(KeyEvent e) { processVTKeyReleased(e); } }); keyMap = new KeyMapper(); keyMap.init(); /** * this is taken out right now look at the method for description */// initKeyBindings(); macros = new Macronizer(); macros.init(); keyPad.addActionListener(this); if (getStringProperty("keypad").equals("Yes")) keyPad.setVisible(true); else keyPad.setVisible(false); // Warning do not change the the order of the adding of keypad and // the screen. This will cause resizing problems because it will // resize the screen first and during the resize we need to calculate // the bouding area based on the height of the keyPad. // See resizeMe() and getDrawingBounds() this.add(keyPad,BorderLayout.SOUTH); this.add(s,BorderLayout.CENTER); setRubberBand(new TNRubberBand(this)); this.requestFocus(); jumpEvent = new SessionJumpEvent(this); }
8,021
protected final void setRubberBand(TNRubberBand newValue) { rubberband = newValue; }
protected final void setRubberBand(TNRubberBand newValue) { rubberband = newValue; }
8,022
public void stateChanged(ChangeEvent e) { // FIXME: It seems that this class is not used anywhere }
public void stateChanged(ChangeEvent e) { // FIXME: It seems that this class is not used anywhere }
8,023
public void mouseEntered(MouseEvent e) { /* When mouse enters menu item, it should be considered selected if (i) if this menu is a submenu in some other menu (ii) or if this menu is in a menu bar and some other menu in a menu bar was just selected and has its popup menu visible. (If nothing was selected, menu should be pressed before it will be selected) */ JMenu menu = (JMenu) menuItem; // NOTE: the following if used to require !menu.isArmed but I could find // no reason for this and it was preventing some JDK-compatible behaviour. // Specifically, if a menu is selected but its popup menu not visible, // and then another menu is selected whose popup menu IS visible, when // the mouse is moved over the first menu, its popup menu should become // visible. if (! menu.isTopLevelMenu() || popupVisible()) { // set new selection and forward this event to MenuSelectionManager MenuSelectionManager manager = MenuSelectionManager.defaultManager(); manager.setSelectedPath(getPath()); manager.processMouseEvent(e); } }
public void mouseEntered(MouseEvent e) { /* When mouse enters menu item, it should be considered selected if (i) if this menu is a submenu in some other menu (ii) or if this menu is in a menu bar and some other menu in a menu bar was just selected and has its popup menu visible. (If nothing was selected, menu should be pressed before it will be selected) */ JMenu menu = (JMenu) menuItem; // NOTE: the following if used to require !menu.isArmed but I could find // no reason for this and it was preventing some JDK-compatible behaviour. // Specifically, if a menu is selected but its popup menu not visible, // and then another menu is selected whose popup menu IS visible, when // the mouse is moved over the first menu, its popup menu should become // visible. if (! menu.isTopLevelMenu() || popupVisible()) { // set new selection and forward this event to MenuSelectionManager MenuSelectionManager manager = MenuSelectionManager.defaultManager(); manager.setSelectedPath(getPath()); manager.processMouseEvent(e); } }
8,024
public void mousePressed(MouseEvent e) { MenuSelectionManager manager = MenuSelectionManager.defaultManager(); JMenu menu = (JMenu) menuItem; manager.processMouseEvent(e); // Menu should be displayed when the menu is pressed only if // it is top-level menu if (menu.isTopLevelMenu()) { if (menu.getPopupMenu().isVisible()) // If menu is visible and menu button was pressed.. // then need to cancel the menu manager.clearSelectedPath(); else { // Display the menu int x = 0; int y = menu.getHeight(); manager.setSelectedPath(getPath()); JMenuBar mb = (JMenuBar) menu.getParent(); // set selectedIndex of the selectionModel of a menuBar mb.getSelectionModel().setSelectedIndex(mb.getComponentIndex(menu)); } } }
public void mousePressed(MouseEvent e) { MenuSelectionManager manager = MenuSelectionManager.defaultManager(); JMenu menu = (JMenu) menuItem; manager.processMouseEvent(e); // Menu should be displayed when the menu is pressed only if // it is top-level menu if (menu.isTopLevelMenu()) { if (menu.getPopupMenu().isVisible()) // If menu is visible and menu button was pressed.. // then need to cancel the menu manager.clearSelectedPath(); else { // Display the menu int x = 0; int y = menu.getHeight(); manager.setSelectedPath(getPath()); JMenuBar mb = (JMenuBar) menu.getParent(); // set selectedIndex of the selectionModel of a menuBar mb.getSelectionModel().setSelectedIndex(mb.getComponentIndex(menu)); } } }
8,025
public void mousePressed(MouseEvent e) { MenuSelectionManager manager = MenuSelectionManager.defaultManager(); JMenu menu = (JMenu) menuItem; manager.processMouseEvent(e); // Menu should be displayed when the menu is pressed only if // it is top-level menu if (menu.isTopLevelMenu()) { if (menu.getPopupMenu().isVisible()) // If menu is visible and menu button was pressed.. // then need to cancel the menu manager.clearSelectedPath(); else { // Display the menu int x = 0; int y = menu.getHeight(); manager.setSelectedPath(getPath()); JMenuBar mb = (JMenuBar) menu.getParent(); // set selectedIndex of the selectionModel of a menuBar mb.getSelectionModel().setSelectedIndex(mb.getComponentIndex(menu)); } } }
public void mousePressed(MouseEvent e) { MenuSelectionManager manager = MenuSelectionManager.defaultManager(); JMenu menu = (JMenu) menuItem; manager.processMouseEvent(e); // Menu should be displayed when the menu is pressed only if // it is top-level menu if (menu.isTopLevelMenu()) { if (menu.getPopupMenu().isVisible()) // If menu is visible and menu button was pressed.. // then need to cancel the menu manager.clearSelectedPath(); else { // Display the menu int x = 0; int y = menu.getHeight(); manager.setSelectedPath(getPath()); JMenuBar mb = (JMenuBar) menu.getParent(); // set selectedIndex of the selectionModel of a menuBar mb.getSelectionModel().setSelectedIndex(mb.getComponentIndex(menu)); } } }
8,026
protected ChangeListener createChangeListener(JComponent c) { return new ChangeHandler(); }
protected ChangeListener createChangeListener(JComponent c) { return new ChangeHandler((JMenu) c, this); }
8,027
public void run () { boolean keepTrucking = true; while (keepTrucking) { try { bk = (Stream5250)dsq.get(); } catch (InterruptedException ie) { System.out.println(" vt thread interrupted and stopping "); keepTrucking = false; continue; } // lets play nicely with the others on the playground me.yield(); pthread.yield(); invited = false; screen52.setCursorOff();// System.out.println("operation code: " + bk.getOpCode()); if (bk == null) continue; switch (bk.getOpCode()) { case 00:// System.out.println("No operation"); break; case 1:// System.out.println("Invite Operation"); parseIncoming(); screen52.setKeyboardLocked(false); cursorOn = true; setInvited(); break; case 2:// System.out.println("Output Only"); parseIncoming();// System.out.println(screen52.dirty); screen52.updateDirty(); // invited = true; break; case 3:// System.out.println("Put/Get Operation"); parseIncoming();// inviteIt =true; setInvited(); break; case 4:// System.out.println("Save Screen Operation"); parseIncoming(); break; case 5:// System.out.println("Restore Screen Operation"); parseIncoming(); break; case 6:// System.out.println("Read Immediate"); sendAidKey(0); break; case 7:// System.out.println("Reserved"); break; case 8:// System.out.println("Read Screen Operation"); try { readScreen(); } catch (IOException ex) { } break; case 9:// System.out.println("Reserved"); break; case 10:// System.out.println("Cancel Invite Operation"); cancelInvite(); break; case 11:// System.out.println("Turn on message light"); screen52.setMessageLightOn(); screen52.setCursorOn(); break; case 12:// System.out.println("Turn off Message light"); screen52.setMessageLightOff(); screen52.setCursorOn(); break; default: break; } if (screen52.isUsingGuiInterface()) screen52.drawFields();// if (screen52.screen[0][1].getChar() == '#' &&// screen52.screen[0][2].getChar() == '!')// execCmd();// else { if (screen52.isHotSpots()) { screen52.checkHotSpots(); } try { screen52.updateDirty(); } catch (Exception exd ) { System.out.println(" tnvt.run: " + exd.getMessage()); } if (cursorOn && !screen52.isKeyboardLocked()) { screen52.setCursorOn(); cursorOn = false; } // lets play nicely with the others on the playground me.yield(); pthread.yield(); } }
public void run () { boolean keepTrucking = true; while (keepTrucking) { try { bk = (Stream5250)dsq.get(); } catch (InterruptedException ie) { System.out.println(" vt thread interrupted and stopping "); keepTrucking = false; continue; } // lets play nicely with the others on the playground pthread.yield(); invited = false; screen52.setCursorOff();// System.out.println("operation code: " + bk.getOpCode()); if (bk == null) continue; switch (bk.getOpCode()) { case 00:// System.out.println("No operation"); break; case 1:// System.out.println("Invite Operation"); parseIncoming(); screen52.setKeyboardLocked(false); cursorOn = true; setInvited(); break; case 2:// System.out.println("Output Only"); parseIncoming();// System.out.println(screen52.dirty); screen52.updateDirty(); // invited = true; break; case 3:// System.out.println("Put/Get Operation"); parseIncoming();// inviteIt =true; setInvited(); break; case 4:// System.out.println("Save Screen Operation"); parseIncoming(); break; case 5:// System.out.println("Restore Screen Operation"); parseIncoming(); break; case 6:// System.out.println("Read Immediate"); sendAidKey(0); break; case 7:// System.out.println("Reserved"); break; case 8:// System.out.println("Read Screen Operation"); try { readScreen(); } catch (IOException ex) { } break; case 9:// System.out.println("Reserved"); break; case 10:// System.out.println("Cancel Invite Operation"); cancelInvite(); break; case 11:// System.out.println("Turn on message light"); screen52.setMessageLightOn(); screen52.setCursorOn(); break; case 12:// System.out.println("Turn off Message light"); screen52.setMessageLightOff(); screen52.setCursorOn(); break; default: break; } if (screen52.isUsingGuiInterface()) screen52.drawFields();// if (screen52.screen[0][1].getChar() == '#' &&// screen52.screen[0][2].getChar() == '!')// execCmd();// else { if (screen52.isHotSpots()) { screen52.checkHotSpots(); } try { screen52.updateDirty(); } catch (Exception exd ) { System.out.println(" tnvt.run: " + exd.getMessage()); } if (cursorOn && !screen52.isKeyboardLocked()) { screen52.setCursorOn(); cursorOn = false; } // lets play nicely with the others on the playground pthread.yield(); } }
8,028
public void run () { boolean keepTrucking = true; while (keepTrucking) { try { bk = (Stream5250)dsq.get(); } catch (InterruptedException ie) { System.out.println(" vt thread interrupted and stopping "); keepTrucking = false; continue; } // lets play nicely with the others on the playground me.yield(); pthread.yield(); invited = false; screen52.setCursorOff();// System.out.println("operation code: " + bk.getOpCode()); if (bk == null) continue; switch (bk.getOpCode()) { case 00:// System.out.println("No operation"); break; case 1:// System.out.println("Invite Operation"); parseIncoming(); screen52.setKeyboardLocked(false); cursorOn = true; setInvited(); break; case 2:// System.out.println("Output Only"); parseIncoming();// System.out.println(screen52.dirty); screen52.updateDirty(); // invited = true; break; case 3:// System.out.println("Put/Get Operation"); parseIncoming();// inviteIt =true; setInvited(); break; case 4:// System.out.println("Save Screen Operation"); parseIncoming(); break; case 5:// System.out.println("Restore Screen Operation"); parseIncoming(); break; case 6:// System.out.println("Read Immediate"); sendAidKey(0); break; case 7:// System.out.println("Reserved"); break; case 8:// System.out.println("Read Screen Operation"); try { readScreen(); } catch (IOException ex) { } break; case 9:// System.out.println("Reserved"); break; case 10:// System.out.println("Cancel Invite Operation"); cancelInvite(); break; case 11:// System.out.println("Turn on message light"); screen52.setMessageLightOn(); screen52.setCursorOn(); break; case 12:// System.out.println("Turn off Message light"); screen52.setMessageLightOff(); screen52.setCursorOn(); break; default: break; } if (screen52.isUsingGuiInterface()) screen52.drawFields();// if (screen52.screen[0][1].getChar() == '#' &&// screen52.screen[0][2].getChar() == '!')// execCmd();// else { if (screen52.isHotSpots()) { screen52.checkHotSpots(); } try { screen52.updateDirty(); } catch (Exception exd ) { System.out.println(" tnvt.run: " + exd.getMessage()); } if (cursorOn && !screen52.isKeyboardLocked()) { screen52.setCursorOn(); cursorOn = false; } // lets play nicely with the others on the playground me.yield(); pthread.yield(); } }
public void run () { boolean keepTrucking = true; while (keepTrucking) { try { bk = (Stream5250)dsq.get(); } catch (InterruptedException ie) { System.out.println(" vt thread interrupted and stopping "); keepTrucking = false; continue; } // lets play nicely with the others on the playground me.yield(); pthread.yield(); invited = false; screen52.setCursorOff();// System.out.println("operation code: " + bk.getOpCode()); if (bk == null) continue; switch (bk.getOpCode()) { case 00:// System.out.println("No operation"); break; case 1:// System.out.println("Invite Operation"); parseIncoming(); screen52.setKeyboardLocked(false); cursorOn = true; setInvited(); break; case 2:// System.out.println("Output Only"); parseIncoming();// System.out.println(screen52.dirty); screen52.updateDirty(); // invited = true; break; case 3:// System.out.println("Put/Get Operation"); parseIncoming();// inviteIt =true; setInvited(); break; case 4:// System.out.println("Save Screen Operation"); parseIncoming(); break; case 5:// System.out.println("Restore Screen Operation"); parseIncoming(); break; case 6:// System.out.println("Read Immediate"); sendAidKey(0); break; case 7:// System.out.println("Reserved"); break; case 8:// System.out.println("Read Screen Operation"); try { readScreen(); } catch (IOException ex) { } break; case 9:// System.out.println("Reserved"); break; case 10:// System.out.println("Cancel Invite Operation"); cancelInvite(); break; case 11:// System.out.println("Turn on message light"); screen52.setMessageLightOn(); screen52.setCursorOn(); break; case 12:// System.out.println("Turn off Message light"); screen52.setMessageLightOff(); screen52.setCursorOn(); break; default: break; } if (screen52.isUsingGuiInterface()) screen52.drawFields();// if (screen52.screen[0][1].getChar() == '#' &&// screen52.screen[0][2].getChar() == '!')// execCmd();// else { if (screen52.isHotSpots()) { screen52.checkHotSpots(); } try { screen52.updateDirty(); } catch (Exception exd ) { System.out.println(" tnvt.run: " + exd.getMessage()); } if (cursorOn && !screen52.isKeyboardLocked()) { screen52.setCursorOn(); cursorOn = false; } // lets play nicely with the others on the playground me.yield(); pthread.yield(); } }
8,029
public void run () { boolean keepTrucking = true; while (keepTrucking) { try { bk = (Stream5250)dsq.get(); } catch (InterruptedException ie) { System.out.println(" vt thread interrupted and stopping "); keepTrucking = false; continue; } // lets play nicely with the others on the playground me.yield(); pthread.yield(); invited = false; screen52.setCursorOff();// System.out.println("operation code: " + bk.getOpCode()); if (bk == null) continue; switch (bk.getOpCode()) { case 00:// System.out.println("No operation"); break; case 1:// System.out.println("Invite Operation"); parseIncoming(); screen52.setKeyboardLocked(false); cursorOn = true; setInvited(); break; case 2:// System.out.println("Output Only"); parseIncoming();// System.out.println(screen52.dirty); screen52.updateDirty(); // invited = true; break; case 3:// System.out.println("Put/Get Operation"); parseIncoming();// inviteIt =true; setInvited(); break; case 4:// System.out.println("Save Screen Operation"); parseIncoming(); break; case 5:// System.out.println("Restore Screen Operation"); parseIncoming(); break; case 6:// System.out.println("Read Immediate"); sendAidKey(0); break; case 7:// System.out.println("Reserved"); break; case 8:// System.out.println("Read Screen Operation"); try { readScreen(); } catch (IOException ex) { } break; case 9:// System.out.println("Reserved"); break; case 10:// System.out.println("Cancel Invite Operation"); cancelInvite(); break; case 11:// System.out.println("Turn on message light"); screen52.setMessageLightOn(); screen52.setCursorOn(); break; case 12:// System.out.println("Turn off Message light"); screen52.setMessageLightOff(); screen52.setCursorOn(); break; default: break; } if (screen52.isUsingGuiInterface()) screen52.drawFields();// if (screen52.screen[0][1].getChar() == '#' &&// screen52.screen[0][2].getChar() == '!')// execCmd();// else { if (screen52.isHotSpots()) { screen52.checkHotSpots(); } try { screen52.updateDirty(); } catch (Exception exd ) { System.out.println(" tnvt.run: " + exd.getMessage()); } if (cursorOn && !screen52.isKeyboardLocked()) { screen52.setCursorOn(); cursorOn = false; } // lets play nicely with the others on the playground me.yield(); pthread.yield(); } }
public void run () { boolean keepTrucking = true; while (keepTrucking) { try { bk = (Stream5250)dsq.get(); } catch (InterruptedException ie) { System.out.println(" vt thread interrupted and stopping "); keepTrucking = false; continue; } // lets play nicely with the others on the playground pthread.yield(); invited = false; screen52.setCursorOff();// System.out.println("operation code: " + bk.getOpCode()); if (bk == null) continue; switch (bk.getOpCode()) { case 00:// System.out.println("No operation"); break; case 1:// System.out.println("Invite Operation"); parseIncoming(); screen52.setKeyboardLocked(false); cursorOn = true; setInvited(); break; case 2:// System.out.println("Output Only"); parseIncoming();// System.out.println(screen52.dirty); screen52.updateDirty(); // invited = true; break; case 3:// System.out.println("Put/Get Operation"); parseIncoming();// inviteIt =true; setInvited(); break; case 4:// System.out.println("Save Screen Operation"); parseIncoming(); break; case 5:// System.out.println("Restore Screen Operation"); parseIncoming(); break; case 6:// System.out.println("Read Immediate"); sendAidKey(0); break; case 7:// System.out.println("Reserved"); break; case 8:// System.out.println("Read Screen Operation"); try { readScreen(); } catch (IOException ex) { } break; case 9:// System.out.println("Reserved"); break; case 10:// System.out.println("Cancel Invite Operation"); cancelInvite(); break; case 11:// System.out.println("Turn on message light"); screen52.setMessageLightOn(); screen52.setCursorOn(); break; case 12:// System.out.println("Turn off Message light"); screen52.setMessageLightOff(); screen52.setCursorOn(); break; default: break; } if (screen52.isUsingGuiInterface()) screen52.drawFields();// if (screen52.screen[0][1].getChar() == '#' &&// screen52.screen[0][2].getChar() == '!')// execCmd();// else { if (screen52.isHotSpots()) { screen52.checkHotSpots(); } try { screen52.updateDirty(); } catch (Exception exd ) { System.out.println(" tnvt.run: " + exd.getMessage()); } if (cursorOn && !screen52.isKeyboardLocked()) { screen52.setCursorOn(); cursorOn = false; } // lets play nicely with the others on the playground pthread.yield(); } }
8,030
public void changedUpdate(DocumentEvent ev, Shape shape, ViewFactory vf) { Element el = getElement(); DocumentEvent.ElementChange ec = ev.getChange(el); if (ec != null) updateChildren(ec, ev, vf); forwardUpdate(ec, ev, shape, vf); updateLayout(ec, ev, shape); }
public void changedUpdate(DocumentEvent ev, Shape shape, ViewFactory vf) { Element el = getElement(); DocumentEvent.ElementChange ec = ev.getChange(el); if (ec != null) { if (! updateChildren(ec, ev, vf)) ec = null; } forwardUpdate(ec, ev, shape, vf); updateLayout(ec, ev, shape); }
8,031
protected void forwardUpdate(DocumentEvent.ElementChange ec, DocumentEvent ev, Shape shape, ViewFactory vf) { int count = getViewCount(); if (count > 0) { int startOffset = ev.getOffset(); int endOffset = startOffset + ev.getLength(); int startIndex = getViewIndex(startOffset, Position.Bias.Backward); int endIndex = getViewIndex(endOffset, Position.Bias.Forward); int index = -1; int addLength = -1; if (ec != null) { index = ec.getIndex(); addLength = ec.getChildrenAdded().length; } if (startIndex >= 0 && endIndex >= 0) { for (int i = startIndex; i <= endIndex; i++) { // Skip newly added child views. if (index >= 0 && i >= index && i < (index+addLength)) continue; View child = getView(i); forwardUpdateToView(child, ev, shape, vf); } } } }
protected void forwardUpdate(DocumentEvent.ElementChange ec, DocumentEvent ev, Shape shape, ViewFactory vf) { int count = getViewCount(); if (count > 0) { int startOffset = ev.getOffset(); int startIndex = getViewIndex(startOffset, Position.Bias.Backward); int endIndex = getViewIndex(endOffset, Position.Bias.Forward); int index = -1; int addLength = -1; if (ec != null) { index = ec.getIndex(); addLength = ec.getChildrenAdded().length; } if (startIndex >= 0 && endIndex >= 0) { for (int i = startIndex; i <= endIndex; i++) { // Skip newly added child views. if (index >= 0 && i >= index && i < (index+addLength)) continue; View child = getView(i); forwardUpdateToView(child, ev, shape, vf); } } } }
8,033
protected void forwardUpdate(DocumentEvent.ElementChange ec, DocumentEvent ev, Shape shape, ViewFactory vf) { int count = getViewCount(); if (count > 0) { int startOffset = ev.getOffset(); int endOffset = startOffset + ev.getLength(); int startIndex = getViewIndex(startOffset, Position.Bias.Backward); int endIndex = getViewIndex(endOffset, Position.Bias.Forward); int index = -1; int addLength = -1; if (ec != null) { index = ec.getIndex(); addLength = ec.getChildrenAdded().length; } if (startIndex >= 0 && endIndex >= 0) { for (int i = startIndex; i <= endIndex; i++) { // Skip newly added child views. if (index >= 0 && i >= index && i < (index+addLength)) continue; View child = getView(i); forwardUpdateToView(child, ev, shape, vf); } } } }
protected void forwardUpdate(DocumentEvent.ElementChange ec, DocumentEvent ev, Shape shape, ViewFactory vf) { int count = getViewCount(); if (count > 0) { int startOffset = ev.getOffset(); int endOffset = startOffset + ev.getLength(); int startIndex = getViewIndex(startOffset, Position.Bias.Backward); int endIndex = getViewIndex(endOffset, Position.Bias.Forward); int index = -1; int addLength = -1; if (ec != null) { index = ec.getIndex(); addLength = ec.getChildrenAdded().length; } if (startIndex >= 0 && endIndex >= 0) { for (int i = startIndex; i <= endIndex; i++) { // Skip newly added child views. if (index >= 0 && i >= index && i < (index+addLength)) continue; View child = getView(i); forwardUpdateToView(child, ev, shape, vf); } } } }
8,034
protected void forwardUpdate(DocumentEvent.ElementChange ec, DocumentEvent ev, Shape shape, ViewFactory vf) { int count = getViewCount(); if (count > 0) { int startOffset = ev.getOffset(); int endOffset = startOffset + ev.getLength(); int startIndex = getViewIndex(startOffset, Position.Bias.Backward); int endIndex = getViewIndex(endOffset, Position.Bias.Forward); int index = -1; int addLength = -1; if (ec != null) { index = ec.getIndex(); addLength = ec.getChildrenAdded().length; } if (startIndex >= 0 && endIndex >= 0) { for (int i = startIndex; i <= endIndex; i++) { // Skip newly added child views. if (index >= 0 && i >= index && i < (index+addLength)) continue; View child = getView(i); forwardUpdateToView(child, ev, shape, vf); } } } }
protected void forwardUpdate(DocumentEvent.ElementChange ec, DocumentEvent ev, Shape shape, ViewFactory vf) { int count = getViewCount(); if (count > 0) { int startOffset = ev.getOffset(); int endOffset = startOffset + ev.getLength(); int startIndex = getViewIndex(startOffset, Position.Bias.Backward); int endIndex = getViewIndex(endOffset, Position.Bias.Forward); int index = -1; int addLength = -1; if (ec != null) { index = ec.getIndex(); addLength = ec.getChildrenAdded().length; } if (startIndex >= 0 && endIndex >= 0) { for (int i = startIndex; i <= endIndex; i++) { // Skip newly added child views. if (index >= 0 && i >= index && i < (index+addLength)) continue; View child = getView(i); forwardUpdateToView(child, ev, shape, vf); } } } }
8,035
protected void forwardUpdate(DocumentEvent.ElementChange ec, DocumentEvent ev, Shape shape, ViewFactory vf) { int count = getViewCount(); if (count > 0) { int startOffset = ev.getOffset(); int endOffset = startOffset + ev.getLength(); int startIndex = getViewIndex(startOffset, Position.Bias.Backward); int endIndex = getViewIndex(endOffset, Position.Bias.Forward); int index = -1; int addLength = -1; if (ec != null) { index = ec.getIndex(); addLength = ec.getChildrenAdded().length; } if (startIndex >= 0 && endIndex >= 0) { for (int i = startIndex; i <= endIndex; i++) { // Skip newly added child views. if (index >= 0 && i >= index && i < (index+addLength)) continue; View child = getView(i); forwardUpdateToView(child, ev, shape, vf); } } } }
protected void forwardUpdate(DocumentEvent.ElementChange ec, DocumentEvent ev, Shape shape, ViewFactory vf) { int count = getViewCount(); if (count > 0) { int startOffset = ev.getOffset(); int endOffset = startOffset + ev.getLength(); int startIndex = getViewIndex(startOffset, Position.Bias.Backward); int endIndex = getViewIndex(endOffset, Position.Bias.Forward); int index = -1; int addLength = -1; if (ec != null) { index = ec.getIndex(); addLength = ec.getChildrenAdded().length; } if (startIndex >= 0) { for (int i = startIndex; i <= endIndex; i++) { // Skip newly added child views. if (index >= 0 && i >= index && i < (index+addLength)) continue; View child = getView(i); forwardUpdateToView(child, ev, shape, vf); } } } }
8,036
protected void forwardUpdate(DocumentEvent.ElementChange ec, DocumentEvent ev, Shape shape, ViewFactory vf) { int count = getViewCount(); if (count > 0) { int startOffset = ev.getOffset(); int endOffset = startOffset + ev.getLength(); int startIndex = getViewIndex(startOffset, Position.Bias.Backward); int endIndex = getViewIndex(endOffset, Position.Bias.Forward); int index = -1; int addLength = -1; if (ec != null) { index = ec.getIndex(); addLength = ec.getChildrenAdded().length; } if (startIndex >= 0 && endIndex >= 0) { for (int i = startIndex; i <= endIndex; i++) { // Skip newly added child views. if (index >= 0 && i >= index && i < (index+addLength)) continue; View child = getView(i); forwardUpdateToView(child, ev, shape, vf); } } } }
protected void forwardUpdate(DocumentEvent.ElementChange ec, DocumentEvent ev, Shape shape, ViewFactory vf) { int count = getViewCount(); if (count > 0) { int startOffset = ev.getOffset(); int endOffset = startOffset + ev.getLength(); int startIndex = getViewIndex(startOffset, Position.Bias.Backward); int endIndex = getViewIndex(endOffset, Position.Bias.Forward); int index = -1; int addLength = -1; if (ec != null) { index = ec.getIndex(); addLength = ec.getChildrenAdded().length; } if (startIndex >= 0 && endIndex >= 0) { for (int i = startIndex; i <= endIndex; i++) { // Skip newly added child views. if (index >= 0 && i >= index && i < (index+addLength)) continue; View child = getView(i); forwardUpdateToView(child, ev, shape, vf); } } } }
8,037
protected void forwardUpdate(DocumentEvent.ElementChange ec, DocumentEvent ev, Shape shape, ViewFactory vf) { int count = getViewCount(); if (count > 0) { int startOffset = ev.getOffset(); int endOffset = startOffset + ev.getLength(); int startIndex = getViewIndex(startOffset, Position.Bias.Backward); int endIndex = getViewIndex(endOffset, Position.Bias.Forward); int index = -1; int addLength = -1; if (ec != null) { index = ec.getIndex(); addLength = ec.getChildrenAdded().length; } if (startIndex >= 0 && endIndex >= 0) { for (int i = startIndex; i <= endIndex; i++) { // Skip newly added child views. if (index >= 0 && i >= index && i < (index+addLength)) continue; View child = getView(i); forwardUpdateToView(child, ev, shape, vf); } } } }
protected void forwardUpdate(DocumentEvent.ElementChange ec, DocumentEvent ev, Shape shape, ViewFactory vf) { int count = getViewCount(); if (count > 0) { int startOffset = ev.getOffset(); int endOffset = startOffset + ev.getLength(); int startIndex = getViewIndex(startOffset, Position.Bias.Backward); int endIndex = getViewIndex(endOffset, Position.Bias.Forward); int index = -1; int addLength = -1; if (ec != null) { index = ec.getIndex(); addLength = ec.getChildrenAdded().length; } if (startIndex >= 0 && endIndex >= 0) { for (int i = startIndex; i <= endIndex; i++) { // Skip newly added child views. if (index >= 0 && i >= index && i < (index+addLength)) continue; View child = getView(i); if (child != null) { Shape childAlloc = getChildAllocation(i, shape); forwardUpdateToView(child, ev, childAlloc, vf); } } } } }
8,038
public void removeUpdate(DocumentEvent ev, Shape shape, ViewFactory vf) { Element el = getElement(); DocumentEvent.ElementChange ec = ev.getChange(el); if (ec != null) updateChildren(ec, ev, vf); forwardUpdate(ec, ev, shape, vf); updateLayout(ec, ev, shape); }
public void removeUpdate(DocumentEvent ev, Shape shape, ViewFactory vf) { Element el = getElement(); DocumentEvent.ElementChange ec = ev.getChange(el); if (ec != null) { if (! updateChildren(ec, ev, vf)) ec = null; } forwardUpdate(ec, ev, shape, vf); updateLayout(ec, ev, shape); }
8,039
public int getIntData (Locator locator) throws NoDataException { int longIndex = getLongArrayIndex(locator); int shortIndex = getShortArrayIndex(locator); try { if (java.lang.reflect.Array.getByte(longDataArray.get(longIndex), shortIndex) !=1) throw new NoDataException(); //the location we try to access contains noDataValue return java.lang.reflect.Array.getInt(longDataArray.get(longIndex), shortIndex); } catch (Exception e) { //the location we try to access is not allocated, //i.e., no data in the cell throw new NoDataException(); } }
public int getIntData (Locator locator) throws NoDataException { int longIndex = getLongArrayIndex(locator); int shortIndex = getShortArrayIndex(locator); try { if (java.lang.reflect.Array.getByte(longDataArray.get(longIndex), shortIndex) !=1) throw new NoDataException(); //the location we try to access contains noDataValue return java.lang.reflect.Array.getInt(longDataArray.get(longIndex+1), shortIndex); } catch (Exception e) { //the location we try to access is not allocated, //i.e., no data in the cell throw new NoDataException(); } }
8,040
public long getLongData (Locator locator) throws NoDataException { int longIndex = getLongArrayIndex(locator); int shortIndex = getShortArrayIndex(locator); try { if (java.lang.reflect.Array.getByte(longDataArray.get(longIndex), shortIndex) !=1) throw new NoDataException(); //the location we try to access contains noDataValue return java.lang.reflect.Array.getLong(longDataArray.get(longIndex), shortIndex); } catch (Exception e) { //the location we try to access is not allocated, //i.e., no data in the cell throw new NoDataException(); } }
public long getLongData (Locator locator) throws NoDataException { int longIndex = getLongArrayIndex(locator); int shortIndex = getShortArrayIndex(locator); try { if (java.lang.reflect.Array.getByte(longDataArray.get(longIndex), shortIndex) !=1) throw new NoDataException(); //the location we try to access contains noDataValue return java.lang.reflect.Array.getLong(longDataArray.get(longIndex+1), shortIndex); } catch (Exception e) { //the location we try to access is not allocated, //i.e., no data in the cell throw new NoDataException(); } }
8,041
public short getShortData (Locator locator) throws NoDataException { int longIndex = getLongArrayIndex(locator); int shortIndex = getShortArrayIndex(locator); try { if (java.lang.reflect.Array.getByte(longDataArray.get(longIndex), shortIndex) !=1) throw new NoDataException(); //the location we try to access contains noDataValue return java.lang.reflect.Array.getShort(longDataArray.get(longIndex), shortIndex); } catch (Exception e) { //the location we try to access is not allocated, //i.e., no data in the cell throw new NoDataException(); } }
public short getShortData (Locator locator) throws NoDataException { int longIndex = getLongArrayIndex(locator); int shortIndex = getShortArrayIndex(locator); try { if (java.lang.reflect.Array.getByte(longDataArray.get(longIndex), shortIndex) !=1) throw new NoDataException(); //the location we try to access contains noDataValue return java.lang.reflect.Array.getShort(longDataArray.get(longIndex+1), shortIndex); } catch (Exception e) { //the location we try to access is not allocated, //i.e., no data in the cell throw new NoDataException(); } }
8,042
protected void addImpl(Component comp, Object constraints, int index) { synchronized (getTreeLock ()) { if (index > ncomponents || (index < 0 && index != -1) || comp instanceof Window || (comp instanceof Container && ((Container) comp).isAncestorOf(this))) throw new IllegalArgumentException(); // Reparent component, and make sure component is instantiated if // we are. if (comp.parent != null) comp.parent.remove(comp); comp.parent = this; if (peer != null) { if (comp.isLightweight ()) { enableEvents (comp.eventMask); if (!isLightweight ()) enableEvents (AWTEvent.PAINT_EVENT_MASK); } } invalidate(); if (component == null) component = new Component[4]; // FIXME, better initial size? // This isn't the most efficient implementation. We could do less // copying when growing the array. It probably doesn't matter. if (ncomponents >= component.length) { int nl = component.length * 2; Component[] c = new Component[nl]; System.arraycopy(component, 0, c, 0, ncomponents); component = c; } if (index == -1) component[ncomponents++] = comp; else { System.arraycopy(component, index, component, index + 1, ncomponents - index); component[index] = comp; ++ncomponents; } // Notify the layout manager. if (layoutMgr != null) { if (layoutMgr instanceof LayoutManager2) { LayoutManager2 lm2 = (LayoutManager2) layoutMgr; lm2.addLayoutComponent(comp, constraints); } else if (constraints instanceof String) layoutMgr.addLayoutComponent((String) constraints, comp); else layoutMgr.addLayoutComponent(null, comp); } // Post event to notify of adding the container. ContainerEvent ce = new ContainerEvent(this, ContainerEvent.COMPONENT_ADDED, comp); getToolkit().getSystemEventQueue().postEvent(ce); } }
if (isShowing ()) { if (isShowing ()) { protectedif (isShowing ()) { voidif (isShowing ()) { addImpl(Componentif (isShowing ()) { comp,if (isShowing ()) { Objectif (isShowing ()) { constraints,if (isShowing ()) { intif (isShowing ()) { index)if (isShowing ()) { if (isShowing ()) { {if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { synchronizedif (isShowing ()) { (getTreeLockif (isShowing ()) { ())if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { {if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { ifif (isShowing ()) { (indexif (isShowing ()) { >if (isShowing ()) { ncomponentsif (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { ||if (isShowing ()) { (indexif (isShowing ()) { <if (isShowing ()) { 0if (isShowing ()) { &&if (isShowing ()) { indexif (isShowing ()) { !=if (isShowing ()) { -1)if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { ||if (isShowing ()) { compif (isShowing ()) { instanceofif (isShowing ()) { Windowif (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { ||if (isShowing ()) { (compif (isShowing ()) { instanceofif (isShowing ()) { Containerif (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { &&if (isShowing ()) { ((Container)if (isShowing ()) { comp).isAncestorOf(this)))if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { throwif (isShowing ()) { newif (isShowing ()) { IllegalArgumentException();if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { //if (isShowing ()) { Reparentif (isShowing ()) { component,if (isShowing ()) { andif (isShowing ()) { makeif (isShowing ()) { sureif (isShowing ()) { componentif (isShowing ()) { isif (isShowing ()) { instantiatedif (isShowing ()) { ifif (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { //if (isShowing ()) { weif (isShowing ()) { are.if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { ifif (isShowing ()) { (comp.parentif (isShowing ()) { !=if (isShowing ()) { null)if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { comp.parent.remove(comp);if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { comp.parentif (isShowing ()) { =if (isShowing ()) { this;if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { ifif (isShowing ()) { (peerif (isShowing ()) { !=if (isShowing ()) { null)if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { {if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { ifif (isShowing ()) { (comp.isLightweightif (isShowing ()) { ()) if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { { enableEventsif (isShowing ()) { (comp.eventMask); ifif (isShowing ()) { (!isLightweightif (isShowing ()) { ()) if (isShowing ()) { if (isShowing ()) { enableEventsif (isShowing ()) { (AWTEvent.PAINT_EVENT_MASK); if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { }if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { }if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { invalidate();if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { ifif (isShowing ()) { (componentif (isShowing ()) { ==if (isShowing ()) { null)if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { componentif (isShowing ()) { =if (isShowing ()) { newif (isShowing ()) { Component[4];if (isShowing ()) { //if (isShowing ()) { FIXME,if (isShowing ()) { betterif (isShowing ()) { initialif (isShowing ()) { size?if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { //if (isShowing ()) { Thisif (isShowing ()) { isn'tif (isShowing ()) { theif (isShowing ()) { mostif (isShowing ()) { efficientif (isShowing ()) { implementation.if (isShowing ()) { if (isShowing ()) { Weif (isShowing ()) { couldif (isShowing ()) { doif (isShowing ()) { lessif (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { //if (isShowing ()) { copyingif (isShowing ()) { whenif (isShowing ()) { growingif (isShowing ()) { theif (isShowing ()) { array.if (isShowing ()) { if (isShowing ()) { Itif (isShowing ()) { probablyif (isShowing ()) { doesn'tif (isShowing ()) { matter.if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { ifif (isShowing ()) { (ncomponentsif (isShowing ()) { >=if (isShowing ()) { component.length)if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { {if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { intif (isShowing ()) { nlif (isShowing ()) { =if (isShowing ()) { component.lengthif (isShowing ()) { *if (isShowing ()) { 2;if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { Component[]if (isShowing ()) { cif (isShowing ()) { =if (isShowing ()) { newif (isShowing ()) { Component[nl];if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { System.arraycopy(component,if (isShowing ()) { 0,if (isShowing ()) { c,if (isShowing ()) { 0,if (isShowing ()) { ncomponents);if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { componentif (isShowing ()) { =if (isShowing ()) { c;if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { }if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { ifif (isShowing ()) { (indexif (isShowing ()) { ==if (isShowing ()) { -1)if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { component[ncomponents++]if (isShowing ()) { =if (isShowing ()) { comp;if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { elseif (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { {if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { System.arraycopy(component,if (isShowing ()) { index,if (isShowing ()) { component,if (isShowing ()) { indexif (isShowing ()) { +if (isShowing ()) { 1,if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { ncomponentsif (isShowing ()) { -if (isShowing ()) { index);if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { component[index]if (isShowing ()) { =if (isShowing ()) { comp;if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { ++ncomponents;if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { }if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { //if (isShowing ()) { Notifyif (isShowing ()) { theif (isShowing ()) { layoutif (isShowing ()) { manager.if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { ifif (isShowing ()) { (layoutMgrif (isShowing ()) { !=if (isShowing ()) { null)if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { {if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { ifif (isShowing ()) { (layoutMgrif (isShowing ()) { instanceofif (isShowing ()) { LayoutManager2)if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { {if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { LayoutManager2if (isShowing ()) { lm2if (isShowing ()) { =if (isShowing ()) { (LayoutManager2)if (isShowing ()) { layoutMgr;if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { lm2.addLayoutComponent(comp,if (isShowing ()) { constraints);if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { }if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { elseif (isShowing ()) { ifif (isShowing ()) { (constraintsif (isShowing ()) { instanceofif (isShowing ()) { String)if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { layoutMgr.addLayoutComponent((String)if (isShowing ()) { constraints,if (isShowing ()) { comp);if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { elseif (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { layoutMgr.addLayoutComponent(null,if (isShowing ()) { comp);if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { }if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { //if (isShowing ()) { Postif (isShowing ()) { eventif (isShowing ()) { toif (isShowing ()) { notifyif (isShowing ()) { ofif (isShowing ()) { addingif (isShowing ()) { theif (isShowing ()) { container.if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { ContainerEventif (isShowing ()) { ceif (isShowing ()) { =if (isShowing ()) { newif (isShowing ()) { ContainerEvent(this,if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { ContainerEvent.COMPONENT_ADDED,if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { comp);if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { getToolkit().getSystemEventQueue().postEvent(ce);if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { }if (isShowing ()) { if (isShowing ()) { }
8,043
public void remove(int index) { synchronized (getTreeLock ()) { Component r = component[index]; r.removeNotify(); System.arraycopy(component, index + 1, component, index, ncomponents - index - 1); component[--ncomponents] = null; invalidate(); if (layoutMgr != null) layoutMgr.removeLayoutComponent(r); r.parent = null; // Post event to notify of adding the container. ContainerEvent ce = new ContainerEvent(this, ContainerEvent.COMPONENT_REMOVED, r); getToolkit().getSystemEventQueue().postEvent(ce); } }
if (isShowing ()) { if (isShowing ()) { publicif (isShowing ()) { voidif (isShowing ()) { remove(intif (isShowing ()) { index)if (isShowing ()) { if (isShowing ()) { {if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { synchronizedif (isShowing ()) { (getTreeLockif (isShowing ()) { ())if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { {if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { Componentif (isShowing ()) { rif (isShowing ()) { =if (isShowing ()) { component[index];if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { r.removeNotify();if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { System.arraycopy(component,if (isShowing ()) { indexif (isShowing ()) { +if (isShowing ()) { 1,if (isShowing ()) { component,if (isShowing ()) { index,if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { ncomponentsif (isShowing ()) { -if (isShowing ()) { indexif (isShowing ()) { -if (isShowing ()) { 1);if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { component[--ncomponents]if (isShowing ()) { =if (isShowing ()) { null;if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { invalidate();if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { ifif (isShowing ()) { (layoutMgrif (isShowing ()) { !=if (isShowing ()) { null)if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { layoutMgr.removeLayoutComponent(r);if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { r.parentif (isShowing ()) { =if (isShowing ()) { null;if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { //if (isShowing ()) { Postif (isShowing ()) { eventif (isShowing ()) { toif (isShowing ()) { notifyif (isShowing ()) { ofif (isShowing ()) { addingif (isShowing ()) { theif (isShowing ()) { container.if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { ContainerEventif (isShowing ()) { ceif (isShowing ()) { =if (isShowing ()) { newif (isShowing ()) { ContainerEvent(this,if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { ContainerEvent.COMPONENT_REMOVED,if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { r);if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { getToolkit().getSystemEventQueue().postEvent(ce);if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { if (isShowing ()) { }if (isShowing ()) { if (isShowing ()) { }
8,045
public SwingFramePeer(SwingToolkit toolkit, JDesktopPane desktopPane, Frame awtFrame) { super(toolkit, awtFrame, new SwingFrame(awtFrame)); jComponent.initialize(this); SwingToolkit.copyAwtProperties(awtFrame, this.jComponent); jComponent.getContentPane().setLayout(new SwingFrameLayout(this)); jComponent.setLocation(awtFrame.getLocation()); jComponent.setSize(awtFrame.getSize()); setResizable(awtFrame.isResizable()); jComponent.setIconifiable(true); jComponent.setMaximizable(true); jComponent.setClosable(true); try { jComponent.setIcon(awtFrame.getState() == Frame.ICONIFIED); } catch (PropertyVetoException x) { } setState(awtFrame.getState()); jComponent.setTitle(awtFrame.getTitle()); //frame.setIconImage(awtFrame.getIconImage()); setMenuBar(awtFrame.getMenuBar()); desktopPane.add(jComponent); desktopPane.setSelectedFrame(jComponent); jComponent.toFront(); desktopPane.doLayout(); }
public SwingFramePeer(SwingToolkit toolkit, JDesktopPane desktopPane, Frame awtFrame) { super(toolkit, awtFrame, new SwingFrame(awtFrame)); jComponent.initialize(this); SwingToolkit.copyAwtProperties(awtFrame, this.jComponent); jComponent.getContentPane().setLayout(new SwingContainerLayout(this)); jComponent.setLocation(awtFrame.getLocation()); jComponent.setSize(awtFrame.getSize()); setResizable(awtFrame.isResizable()); jComponent.setIconifiable(true); jComponent.setMaximizable(true); jComponent.setClosable(true); try { jComponent.setIcon(awtFrame.getState() == Frame.ICONIFIED); } catch (PropertyVetoException x) { } setState(awtFrame.getState()); jComponent.setTitle(awtFrame.getTitle()); //frame.setIconImage(awtFrame.getIconImage()); setMenuBar(awtFrame.getMenuBar()); desktopPane.add(jComponent); desktopPane.setSelectedFrame(jComponent); jComponent.toFront(); desktopPane.doLayout(); }
8,047
public void clear() { synchronized (lock) { vector.clear(); lock.notify(); } }
public void clear() { synchronized (lock) { vector.clear(); lock.notifyAll(); } }
8,048
public Object get() throws InterruptedException { synchronized (lock) { // wait until there is something to read while (isEmpty()) lock.wait(); /** * @todo here is the throttling code to look at * * just something here to try. OK it works but we need to be a little * more intelligent with the throttling. */ if (vector.size() >= 20) { vector.remove(0); vector.remove(0); vector.remove(0); vector.remove(0); vector.remove(0); vector.remove(0); vector.remove(0); vector.remove(0); vector.remove(0); vector.remove(0); vector.remove(0); vector.remove(0); vector.remove(0); vector.remove(0); vector.remove(0); vector.remove(0); vector.remove(0); vector.remove(0);// System.out.println(vector.size()); } // we have the lock and state we're seeking return vector.remove(0); } }
public Object get() throws InterruptedException { synchronized (lock) { // wait until there is something to read while (isEmpty()) { lock.wait(); /** * @todo here is the throttling code to look at * * just something here to try. OK it works but we need to be a little * more intelligent with the throttling. */ if (vector.size() >= 20) { vector.remove(0); vector.remove(0); vector.remove(0); vector.remove(0); vector.remove(0); vector.remove(0); vector.remove(0); vector.remove(0); vector.remove(0); vector.remove(0); vector.remove(0); vector.remove(0); vector.remove(0); vector.remove(0); vector.remove(0); vector.remove(0); vector.remove(0); vector.remove(0);// System.out.println(vector.size()); } // we have the lock and state we're seeking return vector.remove(0); } }
8,049
public void put(Object o) { synchronized (lock) { vector.addElement(o);// if (vector.size() > 5)// System.out.println(vector.size()); // tell waiting threads to wake up lock.notify(); } }
public void put(Object o) { synchronized (lock) { vector.addElement(o);// if (vector.size() > 5)// System.out.println(vector.size()); // tell waiting threads to wake up lock.notifyAll(); } }
8,051
void visitParameter(Parameter p);
void visitParameter(Parameter p);
8,052
String visitValue(String s, boolean last, int tokenType);
String visitValue(String s, boolean last, int tokenType);
8,053
String getCompletedLine() { return line; }
String getCompletedLine() { return line; }
8,054
public void visitParameter(Parameter p) { this.param = p; String s = p.getName(); if( !Parameter.ANONYMOUS.equals(s) ) { line += "-" + s + " "; } }
public void visitParameter(Parameter p) { this.param = p; String s = p.getName(); if( !Parameter.ANONYMOUS.equals(s) ) { line += "-" + s + " "; } }
8,055
public String visitValue(String s, boolean last, int tokenType) { String result = ""; if (last) { // we're not yet at the end of the command line // token to be completed result = param.complete(s); line += result; } else { result = ((tokenType & CommandLine.STRING) != 0 ? CommandLine.escape(s, true) : s); line += result + " "; } return result; }
public String visitValue(String s, boolean last, int tokenType) { String result = ""; if (last) { // we're not yet at the end of the command line // token to be completed result = param.complete(s); line += result; } else { result = ((tokenType & CommandLine.STRING) != 0 ? CommandLine.escape(s, true) : s); line += result + " "; } return result; }
8,056
void finishParameter() { if( param == null ) return; if( valued || !param.hasArgument() ) result.put(param, null); // mark it as "set" if( param.hasArgument() ) { Argument arg = param.getArgument(); result.put(arg, arg.getValues()); } param = null; valued = false; }
void finishParameter() { if( param == null ) return; if( valued || !param.hasArgument() ) result.put(param, null); // mark it as "set" if( param.hasArgument() ) { Argument arg = param.getArgument(); result.put(arg, arg.getValues()); } param = null; valued = false; }
8,057
void finishParameter() { if( param == null ) return; if( valued || !param.hasArgument() ) result.put(param, null); // mark it as "set" if( param.hasArgument() ) { Argument arg = param.getArgument(); result.put(arg, arg.getValues()); } param = null; valued = false; }
void finishParameter() { if( param == null ) return; if( valued || !param.hasArgument() ) result.put(param, null); // mark it as "set" if( param.hasArgument() ) { Argument arg = param.getArgument(); result.put(arg, arg.getValues()); } param = null; valued = false; }
8,058
Map getArgumentMap() { finishParameter(); return result; }
Map getArgumentMap() { finishParameter(); return result; }
8,059
public void visitParameter(Parameter p) { finishParameter(); this.param = p; }
public void visitParameter(Parameter p) { finishParameter(); this.param = p; }
8,060
public String visitValue(String s, boolean last, int tokenType) { if( last && "".equals(s) ) return null; valued = true; return s; }
public String visitValue(String s, boolean last, int tokenType) { if( last && "".equals(s) ) return null; valued = true; return s; }
8,061
public Syntax(String description, Parameter[] params) { this.description = description; this.params = params; }
public Syntax(String description, Parameter[] params) { this.description = description; this.params = params; }
8,062
private void clearArguments() { for (int i = 0; i < params.length; i++) if (params[i].hasArgument()) params[i].getArgument().clear(); }
private void clearArguments() { for (int i = 0; i < params.length; i++) if (params[i].hasArgument()) params[i].getArgument().clear(); }
8,063
public String complete(CommandLine partial) throws CompletionException { CompletionVisitor visitor = new CompletionVisitor(); try { visitCommandLine(partial, visitor); } catch(SyntaxError ex) { throw new CompletionException(ex.getMessage()); } return visitor.getCompletedLine(); }
public String complete(CommandLine partial) throws CompletionException { CompletionVisitor visitor = new CompletionVisitor(); try { visitCommandLine(partial, visitor); } catch(SyntaxError ex) { throw new CompletionException(ex.getMessage()); } return visitor.getCompletedLine(); }
8,064
public String getDescription() { return description; }
public String getDescription() { return description; }
8,065
public Parameter[] getParams() { return params; }
public Parameter[] getParams() { return params; }
8,066
synchronized ParsedArguments parse(String[] args) throws SyntaxError { if (params.length == 0) { if( args.length == 0 ) return new ParsedArguments(new HashMap()); throw new SyntaxError("Syntax takes no parameter"); } CommandLine cmdLine = new CommandLine(args); ParseVisitor visitor = new ParseVisitor(); visitCommandLine(cmdLine, visitor); ParsedArguments result = new ParsedArguments(visitor.getArgumentMap()); // check if all mandatory parameters are set for( int i = 0; i < params.length; i++ ) if( !params[i].isOptional() && !params[i].isSet(result) ) throw new SyntaxError("Mandatory parameter " + params[i].getName() + " not set"); return result; }
synchronized ParsedArguments parse(String[] args) throws SyntaxError { if (params.length == 0) { if( args.length == 0 ) return new ParsedArguments(new HashMap()); throw new SyntaxError("Syntax takes no parameter"); } CommandLine cmdLine = new CommandLine(args); ParseVisitor visitor = new ParseVisitor(); visitCommandLine(cmdLine, visitor); ParsedArguments result = new ParsedArguments(visitor.getArgumentMap()); // check if all mandatory parameters are set for( int i = 0; i < params.length; i++ ) if( !params[i].isOptional() && !params[i].isSet(result) ) throw new SyntaxError("Mandatory parameter " + params[i].getName() + " not set"); return result; }
8,067
synchronized ParsedArguments parse(String[] args) throws SyntaxError { if (params.length == 0) { if( args.length == 0 ) return new ParsedArguments(new HashMap()); throw new SyntaxError("Syntax takes no parameter"); } CommandLine cmdLine = new CommandLine(args); ParseVisitor visitor = new ParseVisitor(); visitCommandLine(cmdLine, visitor); ParsedArguments result = new ParsedArguments(visitor.getArgumentMap()); // check if all mandatory parameters are set for( int i = 0; i < params.length; i++ ) if( !params[i].isOptional() && !params[i].isSet(result) ) throw new SyntaxError("Mandatory parameter " + params[i].getName() + " not set"); return result; }
synchronized ParsedArguments parse(String[] args) throws SyntaxError { if (params.length == 0) { if( args.length == 0 ) return new ParsedArguments(new HashMap()); throw new SyntaxError("Syntax takes no parameter"); } CommandLine cmdLine = new CommandLine(args); ParseVisitor visitor = new ParseVisitor(); visitCommandLine(cmdLine, visitor); ParsedArguments result = new ParsedArguments(visitor.getArgumentMap()); // check if all mandatory parameters are set for( int i = 0; i < params.length; i++ ) if( !params[i].isOptional() && !params[i].isSet(result) ) throw new SyntaxError("Mandatory parameter " + params[i].getName() + " not set"); return result; }
8,068
synchronized ParsedArguments parse(String[] args) throws SyntaxError { if (params.length == 0) { if( args.length == 0 ) return new ParsedArguments(new HashMap()); throw new SyntaxError("Syntax takes no parameter"); } CommandLine cmdLine = new CommandLine(args); ParseVisitor visitor = new ParseVisitor(); visitCommandLine(cmdLine, visitor); ParsedArguments result = new ParsedArguments(visitor.getArgumentMap()); // check if all mandatory parameters are set for( int i = 0; i < params.length; i++ ) if( !params[i].isOptional() && !params[i].isSet(result) ) throw new SyntaxError("Mandatory parameter " + params[i].getName() + " not set"); return result; }
synchronized ParsedArguments parse(String[] args) throws SyntaxError { if (params.length == 0) { if( args.length == 0 ) return new ParsedArguments(new HashMap()); throw new SyntaxError("Syntax takes no parameter"); } CommandLine cmdLine = new CommandLine(args); ParseVisitor visitor = new ParseVisitor(); visitCommandLine(cmdLine, visitor); ParsedArguments result = new ParsedArguments(visitor.getArgumentMap()); // check if all mandatory parameters are set for( int i = 0; i < params.length; i++ ) if( !params[i].isOptional() && !params[i].isSet(result) ) throw new SyntaxError("Mandatory parameter " + params[i].getName() + " not set"); return result; }
8,069
private synchronized void visitCommandLine(CommandLine cmdLine, CommandLineVisitor visitor) { clearArguments(); Parameter param = null; do { String s = ""; if( cmdLine.hasNext() ) s = cmdLine.next(); // TODO: it didn't handle correctly the parameters starting with "-" /*if (s.startsWith("-") && (cmdLine.getTokenType() == CommandLine.LITERAL)) { // we got a named parameter here if (param != null) // last param takes an argument, but it's not given throw new SyntaxError("Unexpected Parameter " + s); param = getParameter(s.substring(1)); if (param == null) throw new SyntaxError("Unknown Parameter \"" + s + "\""); visitor.visitParameter(param); } else { // we got an argument */ if (param == null) {// must be an argument for an anonymous parameter param = getAnonymousParameter(); if (param == null) {// but...there are no more of them throw new SyntaxError("Unexpected argument \"" + s + "\""); } else { visitor.visitParameter(param); } //} // no check if there is an argument, as else we would have exited before (Parameter satisfied) Argument arg = param.getArgument(); String value = visitor.visitValue(s, !cmdLine.hasNext(), cmdLine.getTokenType()); if( value != null ) arg.setValue(value); } if (param.isSatisfied()) param = null; } while (cmdLine.hasNext()); }
private synchronized void visitCommandLine(CommandLine cmdLine, CommandLineVisitor visitor) { clearArguments(); Parameter param = null; do { String s = ""; if( cmdLine.hasNext() ) s = cmdLine.next(); // TODO: it didn't handle correctly the parameters starting with "-" /*if (s.startsWith("-") && (cmdLine.getTokenType() == CommandLine.LITERAL)) { // we got a named parameter here if (param != null) // last param takes an argument, but it's not given throw new SyntaxError("Unexpected Parameter " + s); param = getParameter(s.substring(1)); if (param == null) throw new SyntaxError("Unknown Parameter \"" + s + "\""); visitor.visitParameter(param); } else { // we got an argument */ if (param == null) {// must be an argument for an anonymous parameter param = getAnonymousParameter(); if (param == null) {// but...there are no more of them throw new SyntaxError("Unexpected argument \"" + s + "\""); } else { visitor.visitParameter(param); } //} // no check if there is an argument, as else we would have exited before (Parameter satisfied) Argument arg = param.getArgument(); String value = visitor.visitValue(s, !cmdLine.hasNext(), cmdLine.getTokenType()); if( value != null ) arg.setValue(value); } if (param.isSatisfied()) param = null; } while (cmdLine.hasNext()); }
8,070