bugged
stringlengths 6
599k
| fixed
stringlengths 10
599k
| __index_level_0__
int64 0
1.13M
|
|---|---|---|
public void setAccessory(JComponent accessory) { // TODO } // setAccessory()
|
public void setAccessory(JComponent accessory) { // TODO } // setAccessory()
| 6,174
|
public void setApproveButtonMnemonic(int mnemonic) { // TODO } // setApproveButtonMnemonic()
|
public void setApproveButtonMnemonic(int mnemonic) { // TODO } // setApproveButtonMnemonic()
| 6,175
|
public void setApproveButtonText(String text) { // TODO } // setApproveButtonText()
|
public void setApproveButtonText(String text) { // TODO } // setApproveButtonText()
| 6,176
|
public void setApproveButtonToolTipText(String text) { // TODO } // setApproveButtonToolTipText()
|
public void setApproveButtonToolTipText(String text) { // TODO } // setApproveButtonToolTipText()
| 6,177
|
public void setControlButtonsAreShown(boolean value) { // TODO } // setControlButtonsAreShown()
|
public void setControlButtonsAreShown(boolean value) { // TODO } // setControlButtonsAreShown()
| 6,178
|
public void setCurrentDirectory(File directory) { // TODO } // setCurrentDirectory()
|
public void setCurrentDirectory(File directory) { // TODO } // setCurrentDirectory()
| 6,179
|
public void setDialogTitle(String title) { // TODO } // setDialogTitle()
|
public void setDialogTitle(String title) { // TODO } // setDialogTitle()
| 6,180
|
public void setDialogType(int type) { // TODO } // setDialogType()
|
public void setDialogType(int type) { // TODO } // setDialogType()
| 6,181
|
public void setFileFilter(FileFilter filter) { // TODO } // setFileFilter()
|
public void setFileFilter(FileFilter filter) { // TODO } // setFileFilter()
| 6,182
|
public void setFileHidingEnabled(boolean enabled) { // TODO } // setFileHidingEnabled()
|
public void setFileHidingEnabled(boolean enabled) { // TODO } // setFileHidingEnabled()
| 6,183
|
public void setFileSelectionMode(int mode) { // TODO } // setFileSelectionMode()
|
public void setFileSelectionMode(int mode) { // TODO } // setFileSelectionMode()
| 6,184
|
public void setFileSystemView(FileSystemView fsv) { // TODO } // setFileSystemView()
|
public void setFileSystemView(FileSystemView fsv) { // TODO } // setFileSystemView()
| 6,185
|
public void setFileView(FileView view) { // TODO } // setFileView()
|
public void setFileView(FileView view) { // TODO } // setFileView()
| 6,186
|
public void setMultiSelectionEnabled(boolean enabled) { // TODO } // setMultiSelectionEnabled()
|
public void setMultiSelectionEnabled(boolean enabled) { // TODO } // setMultiSelectionEnabled()
| 6,187
|
public void setSelectedFile(File file) { // TODO } // setSelectedFile()
|
public void setSelectedFile(File file) { // TODO } // setSelectedFile()
| 6,188
|
public void setSelectedFiles(File[] files) { // TODO } // setSelectedFiles()
|
public void setSelectedFiles(File[] files) { // TODO } // setSelectedFiles()
| 6,189
|
protected void setup(FileSystemView view) { // TODO } // setup()
|
protected void setup(FileSystemView view) { // TODO } // setup()
| 6,190
|
public int showDialog(Component parent, String approveButtonText) { return CANCEL_OPTION; // TODO } // showDialog()
|
public int showDialog(Component parent, String approveButtonText) { return CANCEL_OPTION; // TODO } // showDialog()
| 6,191
|
public int showOpenDialog(Component parent) { return CANCEL_OPTION; // TODO } // showOpenDialog()
|
public int showOpenDialog(Component parent) { return CANCEL_OPTION; // TODO } // showOpenDialog()
| 6,192
|
public int showSaveDialog(Component parent) { return CANCEL_OPTION; // TODO } // showSaveDialog()
|
public int showSaveDialog(Component parent) { return CANCEL_OPTION; // TODO } // showSaveDialog()
| 6,193
|
public void updateUI() { setUI((FileChooserUI) UIManager.get(this)); invalidate(); } // updateUI()
|
public void updateUI() { setUI((FileChooserUI) UIManager.get(this)); invalidate(); } // updateUI()
| 6,194
|
private boolean writeToDisplay(boolean controlsExist) { int pos = 0; boolean error=false; boolean done=false; int attr; byte nextOne; byte control0 = 0; byte control1 = 0; int saRows = screen52.getRows(); int saCols = screen52.getCols(); try { if (controlsExist) { control0 = bk.getNextByte(); control1 = bk.getNextByte(); processCC0(control0); } while (bk.hasNext() && !done) {// pos = bk.getCurrentPos();// int rowc = screen52.getCurrentRow();// int colc = screen52.getCurrentCol(); switch (bk.getNextByte()) { case 1: // SOH - Start of Header Order error = processSOH(); break; case 02: // RA - Repeat to address int row = screen52.getCurrentRow(); int col = screen52.getCurrentCol(); int toRow = bk.getNextByte(); int toCol = bk.getNextByte() & 0xff; if (toRow >= row) { int repeat = bk.getNextByte(); // a little intelligence here I hope if (row == 1 && col == 2 && toRow == screen52.getRows() && toCol == screen52.getCols()) screen52.clearScreen(); else { if (repeat != 0) repeat = getASCIIChar(repeat); int times = ((toRow * screen52.getCols()) + toCol) - ((row * screen52.getCols()) + col); while (times-- >= 0) { screen52.setChar(repeat); } } } else { sendNegResponse(NR_REQUEST_ERROR,0x05,0x01,0x23," RA invalid"); error =true; } break; case 03: // EA - Erase to address int EArow = screen52.getCurrentRow(); int EAcol = screen52.getCurrentCol(); int toEARow = bk.getNextByte(); int toEACol = bk.getNextByte() & 0xff; int EALength = bk.getNextByte() & 0xff; while (--EALength > 0) { bk.getNextByte(); } char EAAttr = (char)0; // a little intelligence here I hope if (EArow == 1 && EAcol == 2 && toEARow == screen52.getRows() && toEACol == screen52.getCols()) screen52.clearScreen(); else { int times = ((toEARow * screen52.getCols()) + toEACol) - ((EArow * screen52.getCols()) + EAcol); while (times-- >= 0) { screen52.setChar(EAAttr); } } break; case 04: // Command - Escape done = true; break; case 16: // TD - Transparent Data bk.getNextByte(); int j = bk.getNextByte(); // length while (j-- > 0) bk.getNextByte(); break; case 17: // SBA - set buffer address order (row column) int saRow = bk.getNextByte(); int saCol = bk.getNextByte() & 0xff; // make sure it is in bounds if (saRow >= 0 && saRow <= screen52.getRows() && saCol >= 0 && saCol <= screen52.getCols()) { screen52.goto_XY(saRow,saCol); // now set screen position for output } else { sendNegResponse(NR_REQUEST_ERROR,0x05,0x01,0x22,"invalid row/col order" + " saRow = " + saRow + " saRows = " + screen52.getRows() + " saCol = " + saCol); error = true; } break; case 18: // WEA - Extended Attribute bk.getNextByte(); bk.getNextByte(); break; case 19: // IC - Insert Cursor case 20: // MC - Move Cursor int icX = bk.getNextByte(); int icY = bk.getNextByte() & 0xff; if (icX >= 0 && icX <= saRows && icY >= 0 && icY <= saCols)// System.out.println(" IC " + icX + " " + icY); screen52.setPendingInsert(true,icX,icY); else { sendNegResponse(NR_REQUEST_ERROR,0x05,0x01,0x22," IC/IM position invalid "); error = true; } break; case 21: // WTDSF - Write To Display Structured Field order error = writeToDisplayStructuredField(); break; case 29: // SF - Start of Field int fcw1 = 0; int fcw2 = 0; int ffw1 = 0; int ffw0 = bk.getNextByte(); // FFW if (!isAttribute(ffw0)) { ffw1 = bk.getNextByte(); // FFW 1 fcw1 = bk.getNextByte(); // check for field control word if (!isAttribute(fcw1)) { fcw2 = bk.getNextByte(); // FCW 2 attr = bk.getNextByte(); // attribute field } else { attr = fcw1; // attribute of field fcw1 = 0; } } else { attr = ffw0; } int fLength = (bk.getNextByte() & 0xff) << 8 | bk.getNextByte() & 0xff; screen52.addField(attr,fLength, ffw0,ffw1,fcw1,fcw2); break; default: // all others must be output to screen byte byte0 = bk.getByteOffset(-1); if (isAttribute(byte0)) { screen52.setAttr(byte0); } else { if (!screen52.isStatusErrorCode()) { if (!isData(byte0)) {// if (byte0 == 255) {// sendNegResponse(NR_REQUEST_ERROR,0x05,0x01,0x42,// " Attempt to send FF to screen");// }// else screen52.setChar(byte0); } else// screen52.setChar(getASCIIChar(byte0)); screen52.setChar(codePage.ebcdic2uni(byte0)); } else { if (byte0 == 0) screen52.setChar(byte0); else screen52.setChar(getASCIIChar(byte0)); } } break; } if (error) done = true; } } catch (Exception e) { System.out.println("write to display " + e.getMessage()); }; processCC1(control1); return error; }
|
private boolean writeToDisplay(boolean controlsExist) { int pos = 0; boolean error=false; boolean done=false; int attr; byte nextOne; byte control0 = 0; byte control1 = 0; int saRows = screen52.getRows(); int saCols = screen52.getCols(); try { if (controlsExist) { control0 = bk.getNextByte(); control1 = bk.getNextByte(); processCC0(control0); } while (bk.hasNext() && !done) {// pos = bk.getCurrentPos();// int rowc = screen52.getCurrentRow();// int colc = screen52.getCurrentCol(); switch (bk.getNextByte()) { case 1: // SOH - Start of Header Order error = processSOH(); break; case 02: // RA - Repeat to address int row = screen52.getCurrentRow(); int col = screen52.getCurrentCol(); int toRow = bk.getNextByte(); int toCol = bk.getNextByte() & 0xff; if (toRow >= row) { int repeat = bk.getNextByte(); // a little intelligence here I hope if (row == 1 && col == 2 && toRow == screen52.getRows() && toCol == screen52.getCols()) screen52.clearScreen(); else { if (repeat != 0) repeat = getASCIIChar(repeat); int times = ((toRow * screen52.getCols()) + toCol) - ((row * screen52.getCols()) + col); while (times-- >= 0) { screen52.setChar(repeat); } } } else { sendNegResponse(NR_REQUEST_ERROR,0x05,0x01,0x23," RA invalid"); error =true; } break; case 03: // EA - Erase to address int EArow = screen52.getCurrentRow(); int EAcol = screen52.getCurrentCol(); int toEARow = bk.getNextByte(); int toEACol = bk.getNextByte() & 0xff; int EALength = bk.getNextByte() & 0xff; while (--EALength > 0) { bk.getNextByte(); } char EAAttr = (char)0; // a little intelligence here I hope if (EArow == 1 && EAcol == 2 && toEARow == screen52.getRows() && toEACol == screen52.getCols()) screen52.clearScreen(); else { int times = ((toEARow * screen52.getCols()) + toEACol) - ((EArow * screen52.getCols()) + EAcol); while (times-- >= 0) { screen52.setChar(EAAttr); } } break; case 04: // Command - Escape done = true; break; case 16: // TD - Transparent Data bk.getNextByte(); int j = bk.getNextByte(); // length while (j-- > 0) bk.getNextByte(); break; case 17: // SBA - set buffer address order (row column) int saRow = bk.getNextByte(); int saCol = bk.getNextByte() & 0xff; // make sure it is in bounds if (saRow >= 0 && saRow <= screen52.getRows() && saCol >= 0 && saCol <= screen52.getCols()) { screen52.goto_XY(saRow,saCol); // now set screen position for output } else { sendNegResponse(NR_REQUEST_ERROR,0x05,0x01,0x22,"invalid row/col order" + " saRow = " + saRow + " saRows = " + screen52.getRows() + " saCol = " + saCol); error = true; } break; case 18: // WEA - Extended Attribute bk.getNextByte(); bk.getNextByte(); break; case 19: // IC - Insert Cursor case 20: // MC - Move Cursor int icX = bk.getNextByte(); int icY = bk.getNextByte() & 0xff; if (icX >= 0 && icX <= saRows && icY >= 0 && icY <= saCols)// System.out.println(" IC " + icX + " " + icY); screen52.setPendingInsert(true,icX,icY); else { sendNegResponse(NR_REQUEST_ERROR,0x05,0x01,0x22," IC/IM position invalid "); error = true; } break; case 21: // WTDSF - Write To Display Structured Field order error = writeToDisplayStructuredField(); break; case 29: // SF - Start of Field int fcw1 = 0; int fcw2 = 0; int ffw1 = 0; int ffw0 = bk.getNextByte(); // FFW if (!isAttribute(ffw0)) { ffw1 = bk.getNextByte(); // FFW 1 fcw1 = bk.getNextByte(); // check for field control word if (!isAttribute(fcw1)) { fcw2 = bk.getNextByte(); // FCW 2 attr = bk.getNextByte(); // attribute field } else { attr = fcw1; // attribute of field fcw1 = 0; } } else { attr = ffw0; } int fLength = (bk.getNextByte() & 0xff) << 8 | bk.getNextByte() & 0xff; screen52.addField(attr,fLength, ffw0,ffw1,fcw1,fcw2); break; default: // all others must be output to screen byte byte0 = bk.getByteOffset(-1); if (isAttribute(byte0)) { screen52.setAttr(byte0); } else { if (!screen52.isStatusErrorCode()) { if (!isData(byte0)) {// if (byte0 == 255) {// sendNegResponse(NR_REQUEST_ERROR,0x05,0x01,0x42,// " Attempt to send FF to screen");// }// else screen52.setChar(byte0); } else// screen52.setChar(getASCIIChar(byte0)); screen52.setChar(codePage.ebcdic2uni(byte0)); } else { if (byte0 == 0) screen52.setChar(byte0); else screen52.setChar(getASCIIChar(byte0)); } } break; } if (error) done = true; } } catch (Exception e) { System.out.println("write to display " + e.getMessage()); }; processCC1(control1); return error; }
| 6,195
|
private boolean writeToDisplay(boolean controlsExist) { int pos = 0; boolean error=false; boolean done=false; int attr; byte nextOne; byte control0 = 0; byte control1 = 0; int saRows = screen52.getRows(); int saCols = screen52.getCols(); try { if (controlsExist) { control0 = bk.getNextByte(); control1 = bk.getNextByte(); processCC0(control0); } while (bk.hasNext() && !done) {// pos = bk.getCurrentPos();// int rowc = screen52.getCurrentRow();// int colc = screen52.getCurrentCol(); switch (bk.getNextByte()) { case 1: // SOH - Start of Header Order error = processSOH(); break; case 02: // RA - Repeat to address int row = screen52.getCurrentRow(); int col = screen52.getCurrentCol(); int toRow = bk.getNextByte(); int toCol = bk.getNextByte() & 0xff; if (toRow >= row) { int repeat = bk.getNextByte(); // a little intelligence here I hope if (row == 1 && col == 2 && toRow == screen52.getRows() && toCol == screen52.getCols()) screen52.clearScreen(); else { if (repeat != 0) repeat = getASCIIChar(repeat); int times = ((toRow * screen52.getCols()) + toCol) - ((row * screen52.getCols()) + col); while (times-- >= 0) { screen52.setChar(repeat); } } } else { sendNegResponse(NR_REQUEST_ERROR,0x05,0x01,0x23," RA invalid"); error =true; } break; case 03: // EA - Erase to address int EArow = screen52.getCurrentRow(); int EAcol = screen52.getCurrentCol(); int toEARow = bk.getNextByte(); int toEACol = bk.getNextByte() & 0xff; int EALength = bk.getNextByte() & 0xff; while (--EALength > 0) { bk.getNextByte(); } char EAAttr = (char)0; // a little intelligence here I hope if (EArow == 1 && EAcol == 2 && toEARow == screen52.getRows() && toEACol == screen52.getCols()) screen52.clearScreen(); else { int times = ((toEARow * screen52.getCols()) + toEACol) - ((EArow * screen52.getCols()) + EAcol); while (times-- >= 0) { screen52.setChar(EAAttr); } } break; case 04: // Command - Escape done = true; break; case 16: // TD - Transparent Data bk.getNextByte(); int j = bk.getNextByte(); // length while (j-- > 0) bk.getNextByte(); break; case 17: // SBA - set buffer address order (row column) int saRow = bk.getNextByte(); int saCol = bk.getNextByte() & 0xff; // make sure it is in bounds if (saRow >= 0 && saRow <= screen52.getRows() && saCol >= 0 && saCol <= screen52.getCols()) { screen52.goto_XY(saRow,saCol); // now set screen position for output } else { sendNegResponse(NR_REQUEST_ERROR,0x05,0x01,0x22,"invalid row/col order" + " saRow = " + saRow + " saRows = " + screen52.getRows() + " saCol = " + saCol); error = true; } break; case 18: // WEA - Extended Attribute bk.getNextByte(); bk.getNextByte(); break; case 19: // IC - Insert Cursor case 20: // MC - Move Cursor int icX = bk.getNextByte(); int icY = bk.getNextByte() & 0xff; if (icX >= 0 && icX <= saRows && icY >= 0 && icY <= saCols)// System.out.println(" IC " + icX + " " + icY); screen52.setPendingInsert(true,icX,icY); else { sendNegResponse(NR_REQUEST_ERROR,0x05,0x01,0x22," IC/IM position invalid "); error = true; } break; case 21: // WTDSF - Write To Display Structured Field order error = writeToDisplayStructuredField(); break; case 29: // SF - Start of Field int fcw1 = 0; int fcw2 = 0; int ffw1 = 0; int ffw0 = bk.getNextByte(); // FFW if (!isAttribute(ffw0)) { ffw1 = bk.getNextByte(); // FFW 1 fcw1 = bk.getNextByte(); // check for field control word if (!isAttribute(fcw1)) { fcw2 = bk.getNextByte(); // FCW 2 attr = bk.getNextByte(); // attribute field } else { attr = fcw1; // attribute of field fcw1 = 0; } } else { attr = ffw0; } int fLength = (bk.getNextByte() & 0xff) << 8 | bk.getNextByte() & 0xff; screen52.addField(attr,fLength, ffw0,ffw1,fcw1,fcw2); break; default: // all others must be output to screen byte byte0 = bk.getByteOffset(-1); if (isAttribute(byte0)) { screen52.setAttr(byte0); } else { if (!screen52.isStatusErrorCode()) { if (!isData(byte0)) {// if (byte0 == 255) {// sendNegResponse(NR_REQUEST_ERROR,0x05,0x01,0x42,// " Attempt to send FF to screen");// }// else screen52.setChar(byte0); } else// screen52.setChar(getASCIIChar(byte0)); screen52.setChar(codePage.ebcdic2uni(byte0)); } else { if (byte0 == 0) screen52.setChar(byte0); else screen52.setChar(getASCIIChar(byte0)); } } break; } if (error) done = true; } } catch (Exception e) { System.out.println("write to display " + e.getMessage()); }; processCC1(control1); return error; }
|
private boolean writeToDisplay(boolean controlsExist) { int pos = 0; boolean error=false; boolean done=false; int attr; byte nextOne; byte control0 = 0; byte control1 = 0; int saRows = screen52.getRows(); int saCols = screen52.getCols(); try { if (controlsExist) { control0 = bk.getNextByte(); control1 = bk.getNextByte(); processCC0(control0); } while (bk.hasNext() && !done) {// pos = bk.getCurrentPos();// int rowc = screen52.getCurrentRow();// int colc = screen52.getCurrentCol(); switch (bk.getNextByte()) { case 1: // SOH - Start of Header Order error = processSOH(); break; case 02: // RA - Repeat to address int row = screen52.getCurrentRow(); int col = screen52.getCurrentCol(); int toRow = bk.getNextByte(); int toCol = bk.getNextByte() & 0xff; if (toRow >= row) { int repeat = bk.getNextByte(); // a little intelligence here I hope if (row == 1 && col == 2 && toRow == screen52.getRows() && toCol == screen52.getCols()) screen52.clearScreen(); else { if (repeat != 0) repeat = getASCIIChar(repeat); int times = ((toRow * screen52.getCols()) + toCol) - ((row * screen52.getCols()) + col); while (times-- >= 0) { screen52.setChar(repeat); } } } else { sendNegResponse(NR_REQUEST_ERROR,0x05,0x01,0x23," RA invalid"); error =true; } break; case 03: // EA - Erase to address int EArow = screen52.getCurrentRow(); int EAcol = screen52.getCurrentCol(); int toEARow = bk.getNextByte(); int toEACol = bk.getNextByte() & 0xff; int EALength = bk.getNextByte() & 0xff; while (--EALength > 0) { bk.getNextByte(); } char EAAttr = (char)0; // a little intelligence here I hope if (EArow == 1 && EAcol == 2 && toEARow == screen52.getRows() && toEACol == screen52.getCols()) screen52.clearScreen(); else { int times = ((toEARow * screen52.getCols()) + toEACol) - ((EArow * screen52.getCols()) + EAcol); while (times-- >= 0) { screen52.setChar(EAAttr); } } break; case 04: // Command - Escape done = true; break; case 16: // TD - Transparent Data bk.getNextByte(); int j = bk.getNextByte(); // length while (j-- > 0) bk.getNextByte(); break; case 17: // SBA - set buffer address order (row column) int saRow = bk.getNextByte(); int saCol = bk.getNextByte() & 0xff; // make sure it is in bounds if (saRow >= 0 && saRow <= screen52.getRows() && saCol >= 0 && saCol <= screen52.getCols()) { screen52.goto_XY(saRow,saCol); // now set screen position for output } else { sendNegResponse(NR_REQUEST_ERROR,0x05,0x01,0x22,"invalid row/col order" + " saRow = " + saRow + " saRows = " + screen52.getRows() + " saCol = " + saCol); error = true; } break; case 18: // WEA - Extended Attribute bk.getNextByte(); bk.getNextByte(); break; case 19: // IC - Insert Cursor case 20: // MC - Move Cursor int icX = bk.getNextByte(); int icY = bk.getNextByte() & 0xff; if (icX >= 0 && icX <= saRows && icY >= 0 && icY <= saCols)// System.out.println(" IC " + icX + " " + icY); screen52.setPendingInsert(true,icX,icY); else { sendNegResponse(NR_REQUEST_ERROR,0x05,0x01,0x22," IC/IM position invalid "); error = true; } break; case 21: // WTDSF - Write To Display Structured Field order error = writeToDisplayStructuredField(); break; case 29: // SF - Start of Field int fcw1 = 0; int fcw2 = 0; int ffw1 = 0; int ffw0 = bk.getNextByte(); // FFW if (!isAttribute(ffw0)) { ffw1 = bk.getNextByte(); // FFW 1 fcw1 = bk.getNextByte(); // check for field control word if (!isAttribute(fcw1)) { fcw2 = bk.getNextByte(); // FCW 2 attr = bk.getNextByte(); // attribute field } else { attr = fcw1; // attribute of field fcw1 = 0; } } else { attr = ffw0; } int fLength = (bk.getNextByte() & 0xff) << 8 | bk.getNextByte() & 0xff; screen52.addField(attr,fLength, ffw0,ffw1,fcw1,fcw2); break; default: // all others must be output to screen byte byte0 = bk.getByteOffset(-1); if (isAttribute(byte0)) { screen52.setAttr(byte0); } else { if (!screen52.isStatusErrorCode()) { if (!isData(byte0)) {// if (byte0 == 255) {// sendNegResponse(NR_REQUEST_ERROR,0x05,0x01,0x42,// " Attempt to send FF to screen");// }// else screen52.setChar(byte0); } else// screen52.setChar(getASCIIChar(byte0)); screen52.setChar(codePage.ebcdic2uni(byte0)); } else { if (byte0 == 0) screen52.setChar(byte0); else screen52.setChar(getASCIIChar(byte0)); } } break; } if (error) done = true; } } catch (Exception e) { System.out.println("write to display " + e.getMessage()); }; processCC1(control1); return error; }
| 6,196
|
private void doRenameVariables(IRBasicBlock block) { System.out.println("\ndoRenameVariables block: " + block); Iterator it = block.getQuads().iterator(); while (it.hasNext()) { Quad q = (Quad) it.next(); Operand[] refs = q.getReferencedOps(); if (refs != null) { int n = refs.length; for (int i=0; i<n; i+=1) { SSAStack st = getStack(refs[i]); if (st != null) { refs[i] = st.peek(); } } } if (q instanceof AssignQuad) { AssignQuad aq = (AssignQuad) q; SSAStack st = getStack(aq.getLHS()); aq.setLHS(st.getNewVariable()); } } }
|
private void doRenameVariables(IRBasicBlock block) { Iterator it = block.getQuads().iterator(); while (it.hasNext()) { Quad q = (Quad) it.next(); Operand[] refs = q.getReferencedOps(); if (refs != null) { int n = refs.length; for (int i=0; i<n; i+=1) { SSAStack st = getStack(refs[i]); if (st != null) { refs[i] = st.peek(); } } } if (q instanceof AssignQuad) { AssignQuad aq = (AssignQuad) q; SSAStack st = getStack(aq.getLHS()); aq.setLHS(st.getNewVariable()); } } }
| 6,197
|
private void placePhiFunctions() { System.out.println("\nplacePhiFunctions"); for (int i=0; i<bblocks.length; i+=1) { IRBasicBlock b = bblocks[i]; BootableArrayList defList = b.getDefList(); for (int j=0; j<defList.size(); j+=1) { Variable def = (Variable) defList.get(j); List df = b.getDominanceFrontier(); Iterator it = df.iterator(); while (it.hasNext()) { IRBasicBlock dfb = (IRBasicBlock) it.next(); dfb.add(new PhiAssignQuad(dfb, def.getIndex())); } } } }
|
private void placePhiFunctions() { for (int i=0; i<bblocks.length; i+=1) { IRBasicBlock b = bblocks[i]; BootableArrayList defList = b.getDefList(); for (int j=0; j<defList.size(); j+=1) { Variable def = (Variable) defList.get(j); List df = b.getDominanceFrontier(); Iterator it = df.iterator(); while (it.hasNext()) { IRBasicBlock dfb = (IRBasicBlock) it.next(); dfb.add(new PhiAssignQuad(dfb, def.getIndex())); } } } }
| 6,198
|
private void popVariables(IRBasicBlock block) { System.out.println("\npopVariables block: " + block); Iterator it = block.getQuads().iterator(); while (it.hasNext()) { Quad q = (Quad) it.next(); if (q instanceof AssignQuad) { AssignQuad aq = (AssignQuad) q; SSAStack st = getStack(aq.getLHS()); st.pop(); } } }
|
private void popVariables(IRBasicBlock block) { Iterator it = block.getQuads().iterator(); while (it.hasNext()) { Quad q = (Quad) it.next(); if (q instanceof AssignQuad) { AssignQuad aq = (AssignQuad) q; SSAStack st = getStack(aq.getLHS()); st.pop(); } } }
| 6,199
|
private void renameVariables(IRBasicBlock block) { System.out.println("\nrenameVariables block: " + block); doRenameVariables(block); Iterator it = block.getSuccessors().iterator(); while (it.hasNext()) { IRBasicBlock b = (IRBasicBlock) it.next(); rewritePhiParams(b); } it = block.getDominatedBlocks().iterator(); while (it.hasNext()) { IRBasicBlock b = (IRBasicBlock) it.next(); if (b != block) { renameVariables(b); } } popVariables(block); }
|
private void renameVariables(IRBasicBlock block) { doRenameVariables(block); Iterator it = block.getSuccessors().iterator(); while (it.hasNext()) { IRBasicBlock b = (IRBasicBlock) it.next(); rewritePhiParams(b); } it = block.getDominatedBlocks().iterator(); while (it.hasNext()) { IRBasicBlock b = (IRBasicBlock) it.next(); if (b != block) { renameVariables(b); } } popVariables(block); }
| 6,200
|
private void rewritePhiParams(IRBasicBlock block) { if (block == null) { return; } System.out.println("\nrewritePhiParams block: " + block); Iterator it = block.getQuads().iterator(); while (it.hasNext()) { Quad q = (Quad) it.next(); if (q instanceof PhiAssignQuad) { PhiAssignQuad aq = (PhiAssignQuad) q; SSAStack st = getStack(aq.getLHS()); Variable var = st.peek(); if (var != null) { PhiOperand phi = (PhiOperand) aq.getPhiOperand(); phi.addSource(var); } } } }
|
private void rewritePhiParams(IRBasicBlock block) { if (block == null) { return; } Iterator it = block.getQuads().iterator(); while (it.hasNext()) { Quad q = (Quad) it.next(); if (q instanceof PhiAssignQuad) { PhiAssignQuad aq = (PhiAssignQuad) q; SSAStack st = getStack(aq.getLHS()); Variable var = st.peek(); if (var != null) { PhiOperand phi = (PhiOperand) aq.getPhiOperand(); phi.addSource(var); } } } }
| 6,201
|
private void rewritePhiParams(IRBasicBlock block) { if (block == null) { return; } System.out.println("\nrewritePhiParams block: " + block); Iterator it = block.getQuads().iterator(); while (it.hasNext()) { Quad q = (Quad) it.next(); if (q instanceof PhiAssignQuad) { PhiAssignQuad aq = (PhiAssignQuad) q; SSAStack st = getStack(aq.getLHS()); Variable var = st.peek(); if (var != null) { PhiOperand phi = (PhiOperand) aq.getPhiOperand(); phi.addSource(var); } } } }
|
private void rewritePhiParams(IRBasicBlock block) { if (block == null) { return; } System.out.println("\nrewritePhiParams block: " + block); Iterator it = block.getQuads().iterator(); while (it.hasNext()) { Quad q = (Quad) it.next(); if (q instanceof PhiAssignQuad) { PhiAssignQuad aq = (PhiAssignQuad) q; SSAStack st = getStack(aq.getLHS()); Variable var = st.peek(); if (var != null) { PhiOperand phi = (PhiOperand) aq.getPhiOperand(); phi.addSource(var); } } } }
| 6,202
|
public void setDisplayedMnemonicIndex(int index) throws IllegalArgumentException { if (index < -1 || title != null && index >= title.length()) throw new IllegalArgumentException(); if (title == null || mnemonicKey == 0 || title.charAt(index) != mnemonicKey) index = -1; underlinedChar = index; }
|
public void setDisplayedMnemonicIndex(int index) throws IllegalArgumentException { if (index < -1 || title != null && index >= title.length()) throw new IllegalArgumentException(); if (title == null || mnemonicKey == 0 || (index > -1 && title.charAt(index) != mnemonicKey)) index = -1; underlinedChar = index; }
| 6,204
|
void processVTKeyReleased(KeyEvent e){ displayInfo(e); if (isLinux && e.getKeyCode() == e.VK_ALT_GRAPH) { isAltGr = false; } int keycode = e.getKeyCode(); if (e.isAltDown() || e.isShiftDown() || e.isControlDown() || e.isActionKey() || keycode == KeyEvent.VK_CONTROL) { keyevent = e;// displayInfo(e,"Released added"); dialog.setVisible(false); dialog.dispose(); } }
|
void processVTKeyReleased(KeyEvent e){ displayInfo(e); if (isLinux && e.getKeyCode() == KeyEvent.VK_ALT_GRAPH) { isAltGr = false; } int keycode = e.getKeyCode(); if (e.isAltDown() || e.isShiftDown() || e.isControlDown() || e.isActionKey() || keycode == KeyEvent.VK_CONTROL) { keyevent = e;// displayInfo(e,"Released added"); dialog.setVisible(false); dialog.dispose(); } }
| 6,205
|
public void addText (String text) { String currentValue = getValue(); if(currentValue == null) currentValue = new String (); // yes, this can happen currentValue.concat(text); setValue(currentValue); }
|
public void addText (String text) { String currentValue = getValue(); if(currentValue == null) currentValue = new String (); // yes, this can happen currentValue.concat(text); setValue(currentValue); }
| 6,206
|
public static void doEntry(Frame parent, String propKey, Properties props2) { props = props2; confTabs = new JTabbedPane(); ec = new JCheckBox(LangTool.getString("conf.labelEnhanced")); tc = new JCheckBox(LangTool.getString("conf.labelUseSystemName")); sdn = new JCheckBox(LangTool.getString("conf.labelUseHostName")); useProxy = new JCheckBox(LangTool.getString("conf.labelUseProxy")); sdNormal = new JRadioButton(LangTool.getString("conf.label24")); JRadioButton sdBig = new JRadioButton(LangTool.getString("conf.label27")); noEmbed = new JCheckBox(LangTool.getString("conf.labelEmbed")); deamon = new JCheckBox(LangTool.getString("conf.labelDeamon")); newJVM = new JCheckBox(LangTool.getString("conf.labelNewJVM")); heartBeat = new JCheckBox(LangTool.getString("conf.labelHeartBeat")); jtb = new JCheckBox("AS/400 Toolbox"); jtb.addItemListener(new java.awt.event.ItemListener() { public void itemStateChanged(ItemEvent e) { doCPStateChanged(e); } }); cpb = new JComboBox(); String[] availCP = getAvailableCodePages(); cpb.addItem(LangTool.getString("conf.labelDefault")); for (int x = 0; x < availCP.length; x++) { cpb.addItem(availCP[x]); } sslType = new JComboBox(); for (int x = 0; x < SSL_TYPES.length; x++) { sslType.addItem(SSL_TYPES[x]); } if (propKey == null) { systemName = new JTextField(20); systemId = new JTextField(20); port = new JTextField("23",5); deviceName = new JTextField(20); fpn = new JTextField(20); proxyHost = new JTextField(20); proxyPort = new JTextField("1080",5); ec.setSelected(true); tc.setSelected(true); jtb.setSelected(false); sdNormal.setSelected(true); deamon.setSelected(true); newJVM.setEnabled(false); noEmbed.setEnabled(false); deamon.setEnabled(false); systemName.setDocument(new SomethingEnteredDocument()); } else { String[] args = new String[20]; parseArgs((String)props.get(propKey),args); systemName = new JTextField(propKey,20); systemName.setEditable(false); systemName.setEnabled(false); systemId = new JTextField(args[0],20); if (isSpecified("-p",args)) { port = new JTextField(getParm("-p",args),5); } else { port = new JTextField("23",5); } if (isSpecified("-sslType",args)) sslType.setSelectedItem(getParm("-sslType",args)); if (isSpecified("-sph",args)) proxyHost = new JTextField(getParm("-sph",args),20); else proxyHost = new JTextField(20); if (isSpecified("-f",args)) fpn = new JTextField(getParm("-f",args),20); else fpn = new JTextField(20); if (isSpecified("-cp",args)) { String codepage = getParm("-cp",args); String[] acps = CharMappings.getAvailableCodePages(); jtb.setSelected(true); for (int x = 0; x < acps.length; x++) { if (acps[x].equals(codepage)) jtb.setSelected(false); } cpb.setSelectedItem(codepage); } if (isSpecified("-e",args)) ec.setSelected(true); else ec.setSelected(false); if (isSpecified("-t",args)) tc.setSelected(true); else tc.setSelected(false); if (isSpecified("-132",args)) sdBig.setSelected(true); else sdNormal.setSelected(true); if (isSpecified("-dn",args)) deviceName = new JTextField(getParm("-dn",args),20); else deviceName = new JTextField(20); if (isSpecified("-dn=hostname",args)) { sdn.setSelected(true); deviceName.setEnabled(false); } else { sdn.setSelected(false); deviceName.setEnabled(true); } if (isSpecified("-spp",args)) { proxyPort = new JTextField(getParm("-spp",args),5); } else { proxyPort = new JTextField("1080",5); } if (isSpecified("-usp",args)) useProxy.setSelected(true); else useProxy.setSelected(false); if (isSpecified("-noembed",args)) noEmbed.setSelected(true); else noEmbed.setSelected(false); if (isSpecified("-d",args)) deamon.setSelected(true); else deamon.setSelected(false); if (isSpecified("-nc",args)) newJVM.setSelected(true); else newJVM.setSelected(false); if (isSpecified("-hb",args)) heartBeat.setSelected(true); else heartBeat.setSelected(false); if (isSpecified("-hb",args)) heartBeat.setSelected(true); else heartBeat.setSelected(false); } //Create main attributes panel JPanel mp = new JPanel(); BoxLayout mpLayout = new BoxLayout(mp,BoxLayout.Y_AXIS); mp.setLayout(mpLayout); //System Name panel JPanel snp = new JPanel(); AlignLayout snpLayout = new AlignLayout(2,5,5); snp.setLayout(snpLayout); snp.setBorder(BorderFactory.createEtchedBorder()); addLabelComponent(LangTool.getString("conf.labelSystemName"), systemName, snp); addLabelComponent(" ", noEmbed, snp); addLabelComponent(" ", deamon, snp); addLabelComponent(" ", newJVM, snp); //System Id panel JPanel sip = new JPanel(); AlignLayout al = new AlignLayout(2,5,5); sip.setLayout(al); sip.setBorder(BorderFactory.createTitledBorder( LangTool.getString("conf.labelSystemIdTitle"))); addLabelComponent(LangTool.getString("conf.labelSystemId"), systemId, sip); addLabelComponent(LangTool.getString("conf.labelPort"), port, sip); addLabelComponent(LangTool.getString("conf.labelDeviceName"), deviceName, sip); addLabelComponent("", sdn, sip); sdn.addItemListener(new java.awt.event.ItemListener() { public void itemStateChanged(ItemEvent e) { doItemStateChanged(e); } }); addLabelComponent(LangTool.getString("conf.labelSSLType"), sslType, sip); addLabelComponent("", heartBeat, sip); // options panel JPanel op = new JPanel(); BoxLayout opLayout = new BoxLayout(op,BoxLayout.Y_AXIS); op.setLayout(opLayout); op.setBorder(BorderFactory.createTitledBorder( LangTool.getString("conf.labelOptionsTitle"))); // file name panel JPanel fp = new JPanel(); BoxLayout fpLayout = new BoxLayout(fp,BoxLayout.Y_AXIS); fp.setLayout(fpLayout); fp.setBorder(BorderFactory.createTitledBorder( LangTool.getString("conf.labelConfFile"))); fp.add(fpn); // screen dimensions panel JPanel sdp = new JPanel(); BoxLayout sdpLayout = new BoxLayout(sdp,BoxLayout.X_AXIS); sdp.setLayout(sdpLayout); sdp.setBorder(BorderFactory.createTitledBorder( LangTool.getString("conf.labelDimensions"))); // Group the radio buttons. ButtonGroup sdGroup = new ButtonGroup(); sdGroup.add(sdNormal); sdGroup.add(sdBig); sdp.add(sdNormal); sdp.add(sdBig); // code page panel JPanel cp = new JPanel(); BoxLayout cpLayout = new BoxLayout(cp,BoxLayout.X_AXIS); cp.setLayout(cpLayout); cp.setBorder(BorderFactory.createTitledBorder( LangTool.getString("conf.labelCodePage"))); cp.add(cpb); cp.add(jtb); // emulation mode panel JPanel ep = new JPanel(); BoxLayout epLayout = new BoxLayout(ep,BoxLayout.X_AXIS); ep.setLayout(epLayout); ep.setBorder(BorderFactory.createTitledBorder( LangTool.getString("conf.labelEmulateMode"))); ep.add(ec); // title to be use panel JPanel tp = new JPanel(); BoxLayout tpLayout = new BoxLayout(tp,BoxLayout.X_AXIS); tp.setLayout(tpLayout); tp.setBorder(BorderFactory.createTitledBorder( "")); addLabelComponent("", tc, tp); // add all options to Options panel op.add(fp); op.add(sdp); op.add(cp); op.add(ep); op.add(tp); //System Id panel JPanel sprox = new JPanel(); AlignLayout spal = new AlignLayout(2,5,5); sprox.setLayout(spal); sprox.setBorder(BorderFactory.createEtchedBorder()); addLabelComponent("", useProxy, sprox); addLabelComponent(LangTool.getString("conf.labelProxyHost"), proxyHost, sprox); addLabelComponent(LangTool.getString("conf.labelProxyPort"), proxyPort, sprox); confTabs.addTab(LangTool.getString("conf.tabGeneral"),snp); confTabs.addTab(LangTool.getString("conf.tabTCP"),sip); confTabs.addTab(LangTool.getString("conf.tabOptions"),op); confTabs.addTab(LangTool.getString("conf.tabProxy"),sprox); if (systemName.getText().trim().length() <= 0) { confTabs.setEnabledAt(1,false); confTabs.setEnabledAt(2,false); confTabs.setEnabledAt(3,false); } systemName.setAlignmentX(Component.CENTER_ALIGNMENT); systemId.setAlignmentX(Component.CENTER_ALIGNMENT); fpn.setAlignmentX(Component.CENTER_ALIGNMENT); cpb.setAlignmentX(Component.CENTER_ALIGNMENT); Object[] message = new Object[1]; message[0] = confTabs; options = new JButton[2]; String title; final String propKey2 = propKey; if (propKey2 == null) { Action add = new AbstractAction(LangTool.getString("conf.optAdd")) { public void actionPerformed(ActionEvent e) { doConfigureAction(propKey2); } }; options[0] = new JButton(add); ((JButton)options[0]).setEnabled(false); title = LangTool.getString("conf.addEntryATitle"); } else { Action edit = new AbstractAction(LangTool.getString("conf.optEdit")) { public void actionPerformed(ActionEvent e) { doConfigureAction(propKey2); } }; options[0] = new JButton(edit); title = LangTool.getString("conf.addEntryETitle"); } Action cancel = new AbstractAction(LangTool.getString("conf.optCancel")) { public void actionPerformed(ActionEvent e) { dialog.dispose(); } }; options[1] = new JButton(cancel); JOptionPane pane = new JOptionPane(message, JOptionPane.PLAIN_MESSAGE, JOptionPane.DEFAULT_OPTION, null, options, options[0]); Component parentComponent = parent; pane.setInitialValue(options[0]); pane.setComponentOrientation(parentComponent.getComponentOrientation()); dialog = pane.createDialog(parentComponent, title); //, JRootPane.PLAIN_DIALOG); dialog.show(); }
|
public static void doEntry(Frame parent, String propKey, Properties props2) { props = props2; confTabs = new JTabbedPane(); ec = new JCheckBox(LangTool.getString("conf.labelEnhanced")); tc = new JCheckBox(LangTool.getString("conf.labelUseSystemName")); sdn = new JCheckBox(LangTool.getString("conf.labelUseHostName")); useProxy = new JCheckBox(LangTool.getString("conf.labelUseProxy")); sdNormal = new JRadioButton(LangTool.getString("conf.label24")); JRadioButton sdBig = new JRadioButton(LangTool.getString("conf.label27")); noEmbed = new JCheckBox(LangTool.getString("conf.labelEmbed")); deamon = new JCheckBox(LangTool.getString("conf.labelDeamon")); newJVM = new JCheckBox(LangTool.getString("conf.labelNewJVM")); heartBeat = new JCheckBox(LangTool.getString("conf.labelHeartBeat")); jtb = new JCheckBox("AS/400 Toolbox"); jtb.addItemListener(new java.awt.event.ItemListener() { public void itemStateChanged(ItemEvent e) { doCPStateChanged(e); } }); cpb = new JComboBox(); String[] availCP = getAvailableCodePages(); cpb.addItem(LangTool.getString("conf.labelDefault")); for (int x = 0; x < availCP.length; x++) { cpb.addItem(availCP[x]); } sslType = new JComboBox(); for (int x = 0; x < SSL_TYPES.length; x++) { sslType.addItem(SSL_TYPES[x]); } if (propKey == null) { systemName = new JTextField(20); systemId = new JTextField(20); port = new JTextField("23",5); deviceName = new JTextField(20); fpn = new JTextField(20); proxyHost = new JTextField(20); proxyPort = new JTextField("1080",5); ec.setSelected(true); tc.setSelected(true); jtb.setSelected(false); sdNormal.setSelected(true); deamon.setSelected(true); newJVM.setEnabled(false); noEmbed.setEnabled(false); deamon.setEnabled(false); systemName.setDocument(new SomethingEnteredDocument()); } else { String[] args = new String[20]; parseArgs((String)props.get(propKey),args); systemName = new JTextField(propKey,20); systemName.setEditable(false); systemName.setEnabled(false); systemId = new JTextField(args[0],20); if (isSpecified("-p",args)) { port = new JTextField(getParm("-p",args),5); } else { port = new JTextField("23",5); } if (isSpecified("-sslType",args)) sslType.setSelectedItem(getParm("-sslType",args)); if (isSpecified("-sph",args)) proxyHost = new JTextField(getParm("-sph",args),20); else proxyHost = new JTextField(20); if (isSpecified("-f",args)) fpn = new JTextField(getParm("-f",args),20); else fpn = new JTextField(20); if (isSpecified("-cp",args)) { String codepage = getParm("-cp",args); String[] acps = CharMappings.getAvailableCodePages(); jtb.setSelected(true); for (int x = 0; x < acps.length; x++) { if (acps[x].equals(codepage)) jtb.setSelected(false); } cpb.setSelectedItem(codepage); } if (isSpecified("-e",args)) ec.setSelected(true); else ec.setSelected(false); if (isSpecified("-t",args)) tc.setSelected(true); else tc.setSelected(false); if (isSpecified("-132",args)) sdBig.setSelected(true); else sdNormal.setSelected(true); if (isSpecified("-dn",args)) deviceName = new JTextField(getParm("-dn",args),20); else deviceName = new JTextField(20); if (isSpecified("-dn=hostname",args)) { sdn.setSelected(true); deviceName.setEnabled(false); } else { sdn.setSelected(false); deviceName.setEnabled(true); } if (isSpecified("-spp",args)) { proxyPort = new JTextField(getParm("-spp",args),5); } else { proxyPort = new JTextField("1080",5); } if (isSpecified("-usp",args)) useProxy.setSelected(true); else useProxy.setSelected(false); if (isSpecified("-noembed",args)) noEmbed.setSelected(true); else noEmbed.setSelected(false); if (isSpecified("-d",args)) deamon.setSelected(true); else deamon.setSelected(false); if (isSpecified("-nc",args)) newJVM.setSelected(true); else newJVM.setSelected(false); if (isSpecified("-hb",args)) heartBeat.setSelected(true); else heartBeat.setSelected(false); if (isSpecified("-hb",args)) heartBeat.setSelected(true); else heartBeat.setSelected(false); } //Create main attributes panel JPanel mp = new JPanel(); BoxLayout mpLayout = new BoxLayout(mp,BoxLayout.Y_AXIS); mp.setLayout(mpLayout); //System Name panel JPanel snp = new JPanel(); AlignLayout snpLayout = new AlignLayout(2,5,5); snp.setLayout(snpLayout); snp.setBorder(BorderFactory.createEtchedBorder()); addLabelComponent(LangTool.getString("conf.labelSystemName"), systemName, snp); addLabelComponent(" ", noEmbed, snp); addLabelComponent(" ", deamon, snp); addLabelComponent(" ", newJVM, snp); //System Id panel JPanel sip = new JPanel(); AlignLayout al = new AlignLayout(2,5,5); sip.setLayout(al); sip.setBorder(BorderFactory.createTitledBorder( LangTool.getString("conf.labelSystemIdTitle"))); addLabelComponent(LangTool.getString("conf.labelSystemId"), systemId, sip); addLabelComponent(LangTool.getString("conf.labelPort"), port, sip); addLabelComponent(LangTool.getString("conf.labelDeviceName"), deviceName, sip); addLabelComponent("", sdn, sip); sdn.addItemListener(new java.awt.event.ItemListener() { public void itemStateChanged(ItemEvent e) { doItemStateChanged(e); } }); addLabelComponent(LangTool.getString("conf.labelSSLType"), sslType, sip); addLabelComponent("", heartBeat, sip); // options panel JPanel op = new JPanel(); BoxLayout opLayout = new BoxLayout(op,BoxLayout.Y_AXIS); op.setLayout(opLayout); op.setBorder(BorderFactory.createTitledBorder( LangTool.getString("conf.labelOptionsTitle"))); // file name panel JPanel fp = new JPanel(); BoxLayout fpLayout = new BoxLayout(fp,BoxLayout.Y_AXIS); fp.setLayout(fpLayout); fp.setBorder(BorderFactory.createTitledBorder( LangTool.getString("conf.labelConfFile"))); fp.add(fpn); // screen dimensions panel JPanel sdp = new JPanel(); BoxLayout sdpLayout = new BoxLayout(sdp,BoxLayout.X_AXIS); sdp.setLayout(sdpLayout); sdp.setBorder(BorderFactory.createTitledBorder( LangTool.getString("conf.labelDimensions"))); // Group the radio buttons. ButtonGroup sdGroup = new ButtonGroup(); sdGroup.add(sdNormal); sdGroup.add(sdBig); sdp.add(sdNormal); sdp.add(sdBig); // code page panel JPanel cp = new JPanel(); BoxLayout cpLayout = new BoxLayout(cp,BoxLayout.X_AXIS); cp.setLayout(cpLayout); cp.setBorder(BorderFactory.createTitledBorder( LangTool.getString("conf.labelCodePage"))); cp.add(cpb); cp.add(jtb); // emulation mode panel JPanel ep = new JPanel(); BoxLayout epLayout = new BoxLayout(ep,BoxLayout.X_AXIS); ep.setLayout(epLayout); ep.setBorder(BorderFactory.createTitledBorder( LangTool.getString("conf.labelEmulateMode"))); ep.add(ec); // title to be use panel JPanel tp = new JPanel(); BoxLayout tpLayout = new BoxLayout(tp,BoxLayout.X_AXIS); tp.setLayout(tpLayout); tp.setBorder(BorderFactory.createTitledBorder( "")); addLabelComponent("", tc, tp); // add all options to Options panel op.add(fp); op.add(sdp); op.add(cp); op.add(ep); op.add(tp); //System Id panel JPanel sprox = new JPanel(); AlignLayout spal = new AlignLayout(2,5,5); sprox.setLayout(spal); sprox.setBorder(BorderFactory.createEtchedBorder()); addLabelComponent("", useProxy, sprox); addLabelComponent(LangTool.getString("conf.labelProxyHost"), proxyHost, sprox); addLabelComponent(LangTool.getString("conf.labelProxyPort"), proxyPort, sprox); confTabs.addTab(LangTool.getString("conf.tabGeneral"),snp); confTabs.addTab(LangTool.getString("conf.tabTCP"),sip); confTabs.addTab(LangTool.getString("conf.tabOptions"),op); confTabs.addTab(LangTool.getString("conf.tabProxy"),sprox); if (systemName.getText().trim().length() <= 0) { confTabs.setEnabledAt(1,false); confTabs.setEnabledAt(2,false); confTabs.setEnabledAt(3,false); } systemName.setAlignmentX(Component.CENTER_ALIGNMENT); systemId.setAlignmentX(Component.CENTER_ALIGNMENT); fpn.setAlignmentX(Component.CENTER_ALIGNMENT); cpb.setAlignmentX(Component.CENTER_ALIGNMENT); Object[] message = new Object[1]; message[0] = confTabs; options = new JButton[2]; String title; final String propKey2 = propKey; if (propKey2 == null) { Action add = new AbstractAction(LangTool.getString("conf.optAdd")) { public void actionPerformed(ActionEvent e) { doConfigureAction(propKey2); } }; options[0] = new JButton(add); ((JButton)options[0]).setEnabled(false); title = LangTool.getString("conf.addEntryATitle"); } else { Action edit = new AbstractAction(LangTool.getString("conf.optEdit")) { public void actionPerformed(ActionEvent e) { doConfigureAction(propKey2); } }; options[0] = new JButton(edit); title = LangTool.getString("conf.addEntryETitle"); } Action cancel = new AbstractAction(LangTool.getString("conf.optCancel")) { public void actionPerformed(ActionEvent e) { dialog.dispose(); } }; options[1] = new JButton(cancel); JOptionPane pane = new JOptionPane(message, JOptionPane.PLAIN_MESSAGE, JOptionPane.DEFAULT_OPTION, null, options, options[0]); Component parentComponent = parent; pane.setInitialValue(options[0]); pane.setComponentOrientation(parentComponent.getComponentOrientation()); dialog = pane.createDialog(parentComponent, title); //, JRootPane.PLAIN_DIALOG); dialog.setVisible(true); }
| 6,207
|
public InvalidOpcodeException(String s) { super(s); }
|
public InvalidOpcodeException(String s) { super(s); }
| 6,208
|
public KeyStoreException(String msg) { super(msg); }
|
public KeyStoreException() { super(msg); }
| 6,209
|
public KeyStoreException(String msg) { super(msg); }
|
public KeyStoreException(String msg) { }
| 6,210
|
public void connect() throws IOException { if (connected) { return; } String protocol = url.getProtocol(); boolean secure = "https".equals(protocol); String host = url.getHost(); int port = url.getPort(); if (port < 0) { port = secure ? HTTPConnection.HTTPS_PORT : HTTPConnection.HTTP_PORT; } String file = url.getFile(); String username = url.getUserInfo(); String password = null; if (username != null) { int ci = username.indexOf(':'); if (ci != -1) { password = username.substring(ci + 1); username = username.substring(0, ci); } } final Credentials creds = (username == null) ? null : new Credentials (username, password); boolean retry; do { retry = false; if (connection == null) { connection = getConnection(host, port, secure); if (secure) { SSLSocketFactory factory = getSSLSocketFactory(); HostnameVerifier verifier = getHostnameVerifier(); if (factory != null) { connection.setSSLSocketFactory(factory); } connection.addHandshakeCompletedListener(this); // TODO verifier } } if (proxyHostname != null) { if (proxyPort < 0) { proxyPort = secure ? HTTPConnection.HTTPS_PORT : HTTPConnection.HTTP_PORT; } connection.setProxy(proxyHostname, proxyPort); } try { request = connection.newRequest(method, file); if (!keepAlive) { request.setHeader("Connection", "close"); } if (agent != null) { request.setHeader("User-Agent", agent); } request.getHeaders().putAll(requestHeaders); if (requestSink != null) { byte[] content = requestSink.toByteArray(); RequestBodyWriter writer = new ByteArrayRequestBodyWriter(content); request.setRequestBodyWriter(writer); } if (creds != null) { request.setAuthenticator(new Authenticator() { public Credentials getCredentials(String realm, int attempts) { return (attempts < 2) ? creds : null; } }); } response = request.dispatch(); } catch (IOException ioe) { if (connection.useCount > 0) { // Connection re-use failed: Try a new connection. try { connection.close(); } catch (IOException _) { // Ignore. } connection = null; retry = true; continue; } else { // First time the connection was used: Hard failure. throw ioe; } } if (isRedirect(response) && getInstanceFollowRedirects()) { // Read the response body, if there is one. If the // redirect points us back at the same server, we will use // the cached connection, so we must make sure there is no // pending data in it. InputStream body = response.getBody(); if (body != null) { byte[] ignore = new byte[1024]; while (true) { int n = body.read(ignore, 0, ignore.length); if (n == -1) break; } } // Follow redirect String location = response.getHeader("Location"); if (location != null) { String connectionUri = connection.getURI(); int start = connectionUri.length(); if (location.startsWith(connectionUri) && location.charAt(start) == '/') { file = location.substring(start); retry = true; } else if (location.startsWith("http:")) { connection.close(); connection = null; secure = false; start = 7; int end = location.indexOf('/', start); host = location.substring(start, end); int ci = host.lastIndexOf(':'); if (ci != -1) { port = Integer.parseInt(host.substring (ci + 1)); host = host.substring(0, ci); } else { port = HTTPConnection.HTTP_PORT; } file = location.substring(end); retry = true; } else if (location.startsWith("https:")) { connection.close(); connection = null; secure = true; start = 8; int end = location.indexOf('/', start); host = location.substring(start, end); int ci = host.lastIndexOf(':'); if (ci != -1) { port = Integer.parseInt(host.substring (ci + 1)); host = host.substring(0, ci); } else { port = HTTPConnection.HTTPS_PORT; } file = location.substring(end); retry = true; } else if (location.length() > 0) { // Malformed absolute URI, treat as file part of URI if (location.charAt(0) == '/') { // Absolute path file = location; } else { // Relative path int lsi = file.lastIndexOf('/'); file = (lsi == -1) ? "/" : file.substring(0, lsi + 1); file += location; } retry = true; } } } else { responseSink = response.getBody(); if (response.getCode() == 404) { errorSink = responseSink; throw new FileNotFoundException(url.toString()); } } } while (retry); connected = true; }
|
public void connect() throws IOException { if (connected) { return; } String protocol = url.getProtocol(); boolean secure = "https".equals(protocol); String host = url.getHost(); int port = url.getPort(); if (port < 0) { port = secure ? HTTPConnection.HTTPS_PORT : HTTPConnection.HTTP_PORT; } String file = url.getFile(); String username = url.getUserInfo(); String password = null; if (username != null) { int ci = username.indexOf(':'); if (ci != -1) { password = username.substring(ci + 1); username = username.substring(0, ci); } } final Credentials creds = (username == null) ? null : new Credentials (username, password); boolean retry; do { retry = false; if (connection == null) { connection = getConnection(host, port, secure); if (secure) { SSLSocketFactory factory = getSSLSocketFactory(); HostnameVerifier verifier = getHostnameVerifier(); if (factory != null) { connection.setSSLSocketFactory(factory); } connection.addHandshakeCompletedListener(this); // TODO verifier } } if (proxyHostname != null) { if (proxyPort < 0) { proxyPort = secure ? HTTPConnection.HTTPS_PORT : HTTPConnection.HTTP_PORT; } connection.setProxy(proxyHostname, proxyPort); } try { request = connection.newRequest(method, file); if (!keepAlive) { request.setHeader("Connection", "close"); } if (agent != null) { request.setHeader("User-Agent", agent); } request.getHeaders().putAll(requestHeaders); if (requestSink != null) { byte[] content = requestSink.toByteArray(); RequestBodyWriter writer = new ByteArrayRequestBodyWriter(content); request.setRequestBodyWriter(writer); } if (creds != null) { request.setAuthenticator(new Authenticator() { public Credentials getCredentials(String realm, int attempts) { return (attempts < 2) ? creds : null; } }); } response = request.dispatch(); } catch (IOException ioe) { if (connection.useCount > 0) { // Connection re-use failed: Try a new connection. try { connection.close(); } catch (IOException _) { // Ignore. } connection = null; retry = true; continue; } else { // First time the connection was used: Hard failure. throw ioe; } } if (response.isRedirect() && getInstanceFollowRedirects()) { // Read the response body, if there is one. If the // redirect points us back at the same server, we will use // the cached connection, so we must make sure there is no // pending data in it. InputStream body = response.getBody(); if (body != null) { byte[] ignore = new byte[1024]; while (true) { int n = body.read(ignore, 0, ignore.length); if (n == -1) break; } } // Follow redirect String location = response.getHeader("Location"); if (location != null) { String connectionUri = connection.getURI(); int start = connectionUri.length(); if (location.startsWith(connectionUri) && location.charAt(start) == '/') { file = location.substring(start); retry = true; } else if (location.startsWith("http:")) { connection.close(); connection = null; secure = false; start = 7; int end = location.indexOf('/', start); host = location.substring(start, end); int ci = host.lastIndexOf(':'); if (ci != -1) { port = Integer.parseInt(host.substring (ci + 1)); host = host.substring(0, ci); } else { port = HTTPConnection.HTTP_PORT; } file = location.substring(end); retry = true; } else if (location.startsWith("https:")) { connection.close(); connection = null; secure = true; start = 8; int end = location.indexOf('/', start); host = location.substring(start, end); int ci = host.lastIndexOf(':'); if (ci != -1) { port = Integer.parseInt(host.substring (ci + 1)); host = host.substring(0, ci); } else { port = HTTPConnection.HTTPS_PORT; } file = location.substring(end); retry = true; } else if (location.length() > 0) { // Malformed absolute URI, treat as file part of URI if (location.charAt(0) == '/') { // Absolute path file = location; } else { // Relative path int lsi = file.lastIndexOf('/'); file = (lsi == -1) ? "/" : file.substring(0, lsi + 1); file += location; } retry = true; } } } else { responseSink = response.getBody(); if (response.getCode() == 404) { errorSink = responseSink; throw new FileNotFoundException(url.toString()); } } } while (retry); connected = true; }
| 6,212
|
public void connect() throws IOException { if (connected) { return; } String protocol = url.getProtocol(); boolean secure = "https".equals(protocol); String host = url.getHost(); int port = url.getPort(); if (port < 0) { port = secure ? HTTPConnection.HTTPS_PORT : HTTPConnection.HTTP_PORT; } String file = url.getFile(); String username = url.getUserInfo(); String password = null; if (username != null) { int ci = username.indexOf(':'); if (ci != -1) { password = username.substring(ci + 1); username = username.substring(0, ci); } } final Credentials creds = (username == null) ? null : new Credentials (username, password); boolean retry; do { retry = false; if (connection == null) { connection = getConnection(host, port, secure); if (secure) { SSLSocketFactory factory = getSSLSocketFactory(); HostnameVerifier verifier = getHostnameVerifier(); if (factory != null) { connection.setSSLSocketFactory(factory); } connection.addHandshakeCompletedListener(this); // TODO verifier } } if (proxyHostname != null) { if (proxyPort < 0) { proxyPort = secure ? HTTPConnection.HTTPS_PORT : HTTPConnection.HTTP_PORT; } connection.setProxy(proxyHostname, proxyPort); } try { request = connection.newRequest(method, file); if (!keepAlive) { request.setHeader("Connection", "close"); } if (agent != null) { request.setHeader("User-Agent", agent); } request.getHeaders().putAll(requestHeaders); if (requestSink != null) { byte[] content = requestSink.toByteArray(); RequestBodyWriter writer = new ByteArrayRequestBodyWriter(content); request.setRequestBodyWriter(writer); } if (creds != null) { request.setAuthenticator(new Authenticator() { public Credentials getCredentials(String realm, int attempts) { return (attempts < 2) ? creds : null; } }); } response = request.dispatch(); } catch (IOException ioe) { if (connection.useCount > 0) { // Connection re-use failed: Try a new connection. try { connection.close(); } catch (IOException _) { // Ignore. } connection = null; retry = true; continue; } else { // First time the connection was used: Hard failure. throw ioe; } } if (isRedirect(response) && getInstanceFollowRedirects()) { // Read the response body, if there is one. If the // redirect points us back at the same server, we will use // the cached connection, so we must make sure there is no // pending data in it. InputStream body = response.getBody(); if (body != null) { byte[] ignore = new byte[1024]; while (true) { int n = body.read(ignore, 0, ignore.length); if (n == -1) break; } } // Follow redirect String location = response.getHeader("Location"); if (location != null) { String connectionUri = connection.getURI(); int start = connectionUri.length(); if (location.startsWith(connectionUri) && location.charAt(start) == '/') { file = location.substring(start); retry = true; } else if (location.startsWith("http:")) { connection.close(); connection = null; secure = false; start = 7; int end = location.indexOf('/', start); host = location.substring(start, end); int ci = host.lastIndexOf(':'); if (ci != -1) { port = Integer.parseInt(host.substring (ci + 1)); host = host.substring(0, ci); } else { port = HTTPConnection.HTTP_PORT; } file = location.substring(end); retry = true; } else if (location.startsWith("https:")) { connection.close(); connection = null; secure = true; start = 8; int end = location.indexOf('/', start); host = location.substring(start, end); int ci = host.lastIndexOf(':'); if (ci != -1) { port = Integer.parseInt(host.substring (ci + 1)); host = host.substring(0, ci); } else { port = HTTPConnection.HTTPS_PORT; } file = location.substring(end); retry = true; } else if (location.length() > 0) { // Malformed absolute URI, treat as file part of URI if (location.charAt(0) == '/') { // Absolute path file = location; } else { // Relative path int lsi = file.lastIndexOf('/'); file = (lsi == -1) ? "/" : file.substring(0, lsi + 1); file += location; } retry = true; } } } else { responseSink = response.getBody(); if (response.getCode() == 404) { errorSink = responseSink; throw new FileNotFoundException(url.toString()); } } } while (retry); connected = true; }
|
public void connect() throws IOException { if (connected) { return; } String protocol = url.getProtocol(); boolean secure = "https".equals(protocol); String host = url.getHost(); int port = url.getPort(); if (port < 0) { port = secure ? HTTPConnection.HTTPS_PORT : HTTPConnection.HTTP_PORT; } String file = url.getFile(); String username = url.getUserInfo(); String password = null; if (username != null) { int ci = username.indexOf(':'); if (ci != -1) { password = username.substring(ci + 1); username = username.substring(0, ci); } } final Credentials creds = (username == null) ? null : new Credentials (username, password); boolean retry; do { retry = false; if (connection == null) { connection = getConnection(host, port, secure); if (secure) { SSLSocketFactory factory = getSSLSocketFactory(); HostnameVerifier verifier = getHostnameVerifier(); if (factory != null) { connection.setSSLSocketFactory(factory); } connection.addHandshakeCompletedListener(this); // TODO verifier } } if (proxyHostname != null) { if (proxyPort < 0) { proxyPort = secure ? HTTPConnection.HTTPS_PORT : HTTPConnection.HTTP_PORT; } connection.setProxy(proxyHostname, proxyPort); } try { request = connection.newRequest(method, file); if (!keepAlive) { request.setHeader("Connection", "close"); } if (agent != null) { request.setHeader("User-Agent", agent); } request.getHeaders().putAll(requestHeaders); if (requestSink != null) { byte[] content = requestSink.toByteArray(); RequestBodyWriter writer = new ByteArrayRequestBodyWriter(content); request.setRequestBodyWriter(writer); } if (creds != null) { request.setAuthenticator(new Authenticator() { public Credentials getCredentials(String realm, int attempts) { return (attempts < 2) ? creds : null; } }); } response = request.dispatch(); } catch (IOException ioe) { if (connection.useCount > 0) { // Connection re-use failed: Try a new connection. try { connection.close(); } catch (IOException _) { // Ignore. } connection = null; retry = true; continue; } else { // First time the connection was used: Hard failure. throw ioe; } } if (isRedirect(response) && getInstanceFollowRedirects()) { // Read the response body, if there is one. If the // redirect points us back at the same server, we will use // the cached connection, so we must make sure there is no // pending data in it. InputStream body = response.getBody(); if (body != null) { byte[] ignore = new byte[1024]; while (true) { int n = body.read(ignore, 0, ignore.length); if (n == -1) break; } } // Follow redirect String location = response.getHeader("Location"); if (location != null) { String connectionUri = connection.getURI(); int start = connectionUri.length(); if (location.startsWith(connectionUri) && location.charAt(start) == '/') { file = location.substring(start); retry = true; } else if (location.startsWith("http:")) { connection.close(); connection = null; secure = false; start = 7; int end = location.indexOf('/', start); host = location.substring(start, end); int ci = host.lastIndexOf(':'); if (ci != -1) { port = Integer.parseInt(host.substring (ci + 1)); host = host.substring(0, ci); } else { port = HTTPConnection.HTTP_PORT; } file = location.substring(end); retry = true; } else if (location.startsWith("https:")) { connection.close(); connection = null; secure = true; start = 8; int end = location.indexOf('/', start); host = location.substring(start, end); int ci = host.lastIndexOf(':'); if (ci != -1) { port = Integer.parseInt(host.substring (ci + 1)); host = host.substring(0, ci); } else { port = HTTPConnection.HTTPS_PORT; } file = location.substring(end); retry = true; } else if (location.length() > 0) { // Malformed absolute URI, treat as file part of URI if (location.charAt(0) == '/') { // Absolute path file = location; } else { // Relative path int lsi = file.lastIndexOf('/'); file = (lsi == -1) ? "/" : file.substring(0, lsi + 1); file += location; } retry = true; } } } else { responseSink = response.getBody(); if (response.getCode() == 404) { errorSink = responseSink; throw new FileNotFoundException(url.toString()); } } } while (retry); connected = true; }
| 6,213
|
public void connect() throws IOException { if (connected) { return; } String protocol = url.getProtocol(); boolean secure = "https".equals(protocol); String host = url.getHost(); int port = url.getPort(); if (port < 0) { port = secure ? HTTPConnection.HTTPS_PORT : HTTPConnection.HTTP_PORT; } String file = url.getFile(); String username = url.getUserInfo(); String password = null; if (username != null) { int ci = username.indexOf(':'); if (ci != -1) { password = username.substring(ci + 1); username = username.substring(0, ci); } } final Credentials creds = (username == null) ? null : new Credentials (username, password); boolean retry; do { retry = false; if (connection == null) { connection = getConnection(host, port, secure); if (secure) { SSLSocketFactory factory = getSSLSocketFactory(); HostnameVerifier verifier = getHostnameVerifier(); if (factory != null) { connection.setSSLSocketFactory(factory); } connection.addHandshakeCompletedListener(this); // TODO verifier } } if (proxyHostname != null) { if (proxyPort < 0) { proxyPort = secure ? HTTPConnection.HTTPS_PORT : HTTPConnection.HTTP_PORT; } connection.setProxy(proxyHostname, proxyPort); } try { request = connection.newRequest(method, file); if (!keepAlive) { request.setHeader("Connection", "close"); } if (agent != null) { request.setHeader("User-Agent", agent); } request.getHeaders().putAll(requestHeaders); if (requestSink != null) { byte[] content = requestSink.toByteArray(); RequestBodyWriter writer = new ByteArrayRequestBodyWriter(content); request.setRequestBodyWriter(writer); } if (creds != null) { request.setAuthenticator(new Authenticator() { public Credentials getCredentials(String realm, int attempts) { return (attempts < 2) ? creds : null; } }); } response = request.dispatch(); } catch (IOException ioe) { if (connection.useCount > 0) { // Connection re-use failed: Try a new connection. try { connection.close(); } catch (IOException _) { // Ignore. } connection = null; retry = true; continue; } else { // First time the connection was used: Hard failure. throw ioe; } } if (isRedirect(response) && getInstanceFollowRedirects()) { // Read the response body, if there is one. If the // redirect points us back at the same server, we will use // the cached connection, so we must make sure there is no // pending data in it. InputStream body = response.getBody(); if (body != null) { byte[] ignore = new byte[1024]; while (true) { int n = body.read(ignore, 0, ignore.length); if (n == -1) break; } } // Follow redirect String location = response.getHeader("Location"); if (location != null) { String connectionUri = connection.getURI(); int start = connectionUri.length(); if (location.startsWith(connectionUri) && location.charAt(start) == '/') { file = location.substring(start); retry = true; } else if (location.startsWith("http:")) { connection.close(); connection = null; secure = false; start = 7; int end = location.indexOf('/', start); host = location.substring(start, end); int ci = host.lastIndexOf(':'); if (ci != -1) { port = Integer.parseInt(host.substring (ci + 1)); host = host.substring(0, ci); } else { port = HTTPConnection.HTTP_PORT; } file = location.substring(end); retry = true; } else if (location.startsWith("https:")) { connection.close(); connection = null; secure = true; start = 8; int end = location.indexOf('/', start); host = location.substring(start, end); int ci = host.lastIndexOf(':'); if (ci != -1) { port = Integer.parseInt(host.substring (ci + 1)); host = host.substring(0, ci); } else { port = HTTPConnection.HTTPS_PORT; } file = location.substring(end); retry = true; } else if (location.length() > 0) { // Malformed absolute URI, treat as file part of URI if (location.charAt(0) == '/') { // Absolute path file = location; } else { // Relative path int lsi = file.lastIndexOf('/'); file = (lsi == -1) ? "/" : file.substring(0, lsi + 1); file += location; } retry = true; } } } else { responseSink = response.getBody(); if (response.getCode() == 404) { errorSink = responseSink; throw new FileNotFoundException(url.toString()); } } } while (retry); connected = true; }
|
public void connect() throws IOException { if (connected) { return; } String protocol = url.getProtocol(); boolean secure = "https".equals(protocol); String host = url.getHost(); int port = url.getPort(); if (port < 0) { port = secure ? HTTPConnection.HTTPS_PORT : HTTPConnection.HTTP_PORT; } String file = url.getFile(); String username = url.getUserInfo(); String password = null; if (username != null) { int ci = username.indexOf(':'); if (ci != -1) { password = username.substring(ci + 1); username = username.substring(0, ci); } } final Credentials creds = (username == null) ? null : new Credentials (username, password); boolean retry; do { retry = false; if (connection == null) { connection = getConnection(host, port, secure); if (secure) { SSLSocketFactory factory = getSSLSocketFactory(); HostnameVerifier verifier = getHostnameVerifier(); if (factory != null) { connection.setSSLSocketFactory(factory); } connection.addHandshakeCompletedListener(this); // TODO verifier } } if (proxyHostname != null) { if (proxyPort < 0) { proxyPort = secure ? HTTPConnection.HTTPS_PORT : HTTPConnection.HTTP_PORT; } connection.setProxy(proxyHostname, proxyPort); } try { request = connection.newRequest(method, file); if (!keepAlive) { request.setHeader("Connection", "close"); } if (agent != null) { request.setHeader("User-Agent", agent); } request.getHeaders().putAll(requestHeaders); if (requestSink != null) { byte[] content = requestSink.toByteArray(); RequestBodyWriter writer = new ByteArrayRequestBodyWriter(content); request.setRequestBodyWriter(writer); } if (creds != null) { request.setAuthenticator(new Authenticator() { public Credentials getCredentials(String realm, int attempts) { return (attempts < 2) ? creds : null; } }); } response = request.dispatch(); } catch (IOException ioe) { if (connection.useCount > 0) { // Connection re-use failed: Try a new connection. try { connection.close(); } catch (IOException _) { // Ignore. } connection = null; retry = true; continue; } else { // First time the connection was used: Hard failure. throw ioe; } } if (isRedirect(response) && getInstanceFollowRedirects()) { // Read the response body, if there is one. If the // redirect points us back at the same server, we will use // the cached connection, so we must make sure there is no // pending data in it. InputStream body = response.getBody(); if (body != null) { byte[] ignore = new byte[1024]; while (true) { int n = body.read(ignore, 0, ignore.length); if (n == -1) break; } } // Follow redirect String location = response.getHeader("Location"); if (location != null) { String connectionUri = connection.getURI(); int start = connectionUri.length(); if (location.startsWith(connectionUri) && location.charAt(start) == '/') { file = location.substring(start); retry = true; } else if (location.startsWith("http:")) { connection.close(); connection = null; secure = false; start = 7; int end = location.indexOf('/', start); host = location.substring(start, end); int ci = host.lastIndexOf(':'); if (ci != -1) { port = Integer.parseInt(host.substring (ci + 1)); host = host.substring(0, ci); } else { port = HTTPConnection.HTTP_PORT; } file = location.substring(end); retry = true; } else if (location.startsWith("https:")) { connection.close(); connection = null; secure = true; start = 8; int end = location.indexOf('/', start); host = location.substring(start, end); int ci = host.lastIndexOf(':'); if (ci != -1) { port = Integer.parseInt(host.substring (ci + 1)); host = host.substring(0, ci); } else { port = HTTPConnection.HTTPS_PORT; } file = location.substring(end); retry = true; } else if (location.length() > 0) { // Malformed absolute URI, treat as file part of URI if (location.charAt(0) == '/') { // Absolute path file = location; } else { // Relative path int lsi = file.lastIndexOf('/'); file = (lsi == -1) ? "/" : file.substring(0, lsi + 1); file += location; } retry = true; } } } else { responseSink = response.getBody(); if (response.getCode() == 404) { errorSink = responseSink; throw new FileNotFoundException(url.toString()); } } } while (retry); connected = true; }
| 6,214
|
public void setLength(long length) throws IOException { if (!canWrite()) throw new ReadOnlyFileSystemException( "FileSystem or File is readonly"); long blockSize = iNode.getExt2FileSystem().getBlockSize(); //synchronize to the inode cache to make sure that the inode does not // get //flushed between reading it and locking it synchronized (((Ext2FileSystem) getFileSystem()).getInodeCache()) { //reread the inode before synchronizing to it to make sure //all threads use the same instance rereadInode(); //lock the inode into the cache so it is not flushed before // synchronizing to it //(otherwise a new instance of INode referring to the same inode // could be put //in the cache resulting in the possibility of two threads // manipulating the same //inode at the same time because they would synchronize to // different INode instances) iNode.incLocked(); } //a single inode may be represented by more than one Ext2Directory // instances, //but each will use the same instance of the underlying inode (see // Ext2FileSystem.getINode()), //so synchronize to the inode synchronized (iNode) { try { //if length<getLength(), then the file is truncated if (length < getLength()) { long blockNr = length / blockSize; long blockOffset = length % blockSize; long nextBlock; if (blockOffset == 0) nextBlock = blockNr; else nextBlock = blockNr + 1; for (long i = iNode.getAllocatedBlockCount() - 1; i >= nextBlock; i--) { log.debug("setLength(): freeing up block " + i + " of inode"); iNode.freeDataBlock(i); } iNode.setSize(length); iNode.setMtime(System.currentTimeMillis() / 1000); //setLength done, unlock the inode from the cache iNode.decLocked(); return; } //if length>getLength(), then new blocks are allocated for the // file //The content of the new blocks is undefined (see the // setLength(long i) //method of java.io.RandomAccessFile if (length > getLength()) { long len = length - getLength(); long blocksAllocated = getLengthInBlocks(); long bytesAllocated = getLength(); long bytesCovered = 0; while (bytesCovered < len) { long blockIndex = (bytesAllocated + bytesCovered) / blockSize; long blockOffset = (bytesAllocated + bytesCovered) % blockSize; long newSection = Math.min(len - bytesCovered, blockSize - blockOffset); //allocate a new block if needed if (blockIndex >= blocksAllocated) { iNode.allocateDataBlock(blockIndex); blocksAllocated++; } bytesCovered += newSection; } iNode.setSize(length); iNode.setMtime(System.currentTimeMillis() / 1000); return; } } catch (Throwable ex) { final IOException ioe = new IOException(); ioe.initCause(ex); throw ioe; } finally { //setLength done, unlock the inode from the cache iNode.decLocked(); } } // synchronized(inode) }
|
public void setLength(long length) throws IOException { if (!canWrite()) throw new ReadOnlyFileSystemException( "FileSystem or File is readonly"); long blockSize = iNode.getExt2FileSystem().getBlockSize(); //synchronize to the inode cache to make sure that the inode does not // get //flushed between reading it and locking it synchronized (((Ext2FileSystem) getFileSystem()).getInodeCache()) { //reread the inode before synchronizing to it to make sure //all threads use the same instance rereadInode(); //lock the inode into the cache so it is not flushed before // synchronizing to it //(otherwise a new instance of INode referring to the same inode // could be put //in the cache resulting in the possibility of two threads // manipulating the same //inode at the same time because they would synchronize to // different INode instances) iNode.incLocked(); } //a single inode may be represented by more than one Ext2Directory // instances, //but each will use the same instance of the underlying inode (see // Ext2FileSystem.getINode()), //so synchronize to the inode synchronized (iNode) { try { //if length<getLength(), then the file is truncated if (length < getLength()) { long blockNr = length / blockSize; long blockOffset = length % blockSize; long nextBlock; if (blockOffset == 0) nextBlock = blockNr; else nextBlock = blockNr + 1; for (long i = iNode.getAllocatedBlockCount() - 1; i >= nextBlock; i--) { log.debug("setLength(): freeing up block " + i + " of inode"); iNode.freeDataBlock(i); } iNode.setSize(length); iNode.setMtime(System.currentTimeMillis() / 1000); //setLength done, unlock the inode from the cache return; } //if length>getLength(), then new blocks are allocated for the // file //The content of the new blocks is undefined (see the // setLength(long i) //method of java.io.RandomAccessFile if (length > getLength()) { long len = length - getLength(); long blocksAllocated = getLengthInBlocks(); long bytesAllocated = getLength(); long bytesCovered = 0; while (bytesCovered < len) { long blockIndex = (bytesAllocated + bytesCovered) / blockSize; long blockOffset = (bytesAllocated + bytesCovered) % blockSize; long newSection = Math.min(len - bytesCovered, blockSize - blockOffset); //allocate a new block if needed if (blockIndex >= blocksAllocated) { iNode.allocateDataBlock(blockIndex); blocksAllocated++; } bytesCovered += newSection; } iNode.setSize(length); iNode.setMtime(System.currentTimeMillis() / 1000); return; } } catch (Throwable ex) { final IOException ioe = new IOException(); ioe.initCause(ex); throw ioe; } finally { //setLength done, unlock the inode from the cache } } // synchronized(inode) }
| 6,219
|
public void beginValidate() { jComponent.doLayout(); }
|
public void beginValidate() { }
| 6,220
|
public SwingCanvasPeer(SwingToolkit toolkit, Canvas canvas) { super(toolkit, canvas, new JCanvas()); this.canvas = canvas; SwingToolkit.add(canvas, jComponent); SwingToolkit.copyAwtProperties(canvas, jComponent); }
|
public SwingCanvasPeer(SwingToolkit toolkit, Canvas canvas) { super(toolkit, canvas, new JCanvas()); this.canvas = canvas; SwingToolkit.add(canvas, jComponent); SwingToolkit.copyAwtProperties(canvas, jComponent); }
| 6,221
|
protected Point getPopupMenuOrigin() { // The menu's screen location and size. Point screenLoc = getLocationOnScreen(); Dimension size = getSize(); // Determine the popup's size. JPopupMenu popup = getPopupMenu(); Dimension popupSize = popup.getSize(); if (popupSize.width == 0 || popupSize.height == 0) popupSize = popup.getPreferredSize(); // Determine screen bounds. Toolkit tk = Toolkit.getDefaultToolkit(); Rectangle screenBounds = new Rectangle(tk.getScreenSize()); GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment(); GraphicsDevice gd = ge.getDefaultScreenDevice(); GraphicsConfiguration gc = gd.getDefaultConfiguration(); Insets screenInsets = tk.getScreenInsets(gc); screenBounds.x -= screenInsets.left; screenBounds.width -= screenInsets.left + screenInsets.right; screenBounds.y -= screenInsets.top; screenBounds.height -= screenInsets.top + screenInsets.bottom; screenLoc.x -= screenInsets.left; screenLoc.y -= screenInsets.top; Point point = new Point(); if (isTopLevelMenu()) { // If menu in the menu bar. int xOffset = UIManager.getInt("Menu.menuPopupOffsetX"); int yOffset = UIManager.getInt("Menu.menuPopupOffsetY"); // Determine X location. if (getComponentOrientation().isLeftToRight()) { // Prefer popup to the right. point.x = xOffset; // Check if it fits, otherwise place popup wherever it fits. if (screenLoc.x + point.x + popupSize.width > screenBounds.width + screenBounds.width && screenBounds.width - size.width < 2 * (screenLoc.x - screenBounds.x)) // Popup to the right if there's not enough room. point.x = size.width - xOffset - popupSize.width; } else { // Prefer popup to the left. point.x = size.width - xOffset - popupSize.width; if (screenLoc.x + point.x < screenBounds.x && screenBounds.width - size.width > 2 * (screenLoc.x - screenBounds.x)) // Popup to the left if there's not enough room. point.x = xOffset; } // Determine Y location. Prefer popping down. point.y = size.height + yOffset; if (screenLoc.y + point.y + popupSize.height >= screenBounds.height && screenBounds.height - size.height < 2 * (screenLoc.y - screenBounds.y)) // Position above if there's not enough room below. point.y = - yOffset - popupSize.height; } else { // If submenu. int xOffset = UIManager.getInt("Menu.submenuPopupOffsetX"); int yOffset = UIManager.getInt("Menu.submenuPopupOffsetY"); // Determine X location. if (getComponentOrientation().isLeftToRight()) { // Prefer popup to the right. point.x = size.width + xOffset; if (screenLoc.x + point.x + popupSize.width >= screenBounds.x + screenBounds.width && screenBounds.width - size.width < 2 * (screenLoc.x - screenBounds.x)) // Position to the left if there's not enough room on the right. point.x = - xOffset - popupSize.width; } else { // Prefer popup on the left side. point.x = - xOffset - popupSize.width; if (screenLoc.x + point.x < screenBounds.x && screenBounds.width - size.width > 2 * (screenLoc.x - screenBounds.x)) // Popup to the right if there's not enough room. point.x = size.width + xOffset; } // Determine Y location. Prefer popping down. point.y = yOffset; if (screenLoc.y + point.y + popupSize.height >= screenBounds.y + screenBounds.height && screenBounds.height - size.height < 2 * (screenLoc.y - screenBounds.y)) { // Pop up if there's not enough room below.// @classpath-bugfix 6/9/2006 Martin Husted Hartvig (hagar@jnode.org) : point.y = screenLoc.y - screenBounds.y + size.height - yOffset - popupSize.height;// @classpath-bugfix-end } } return point; }
|
protected Point getPopupMenuOrigin() { // The menu's screen location and size. Point screenLoc = getLocationOnScreen(); Dimension size = getSize(); // Determine the popup's size. JPopupMenu popup = getPopupMenu(); Dimension popupSize = popup.getSize(); if (popupSize.width == 0 || popupSize.height == 0) popupSize = popup.getPreferredSize(); // Determine screen bounds. Toolkit tk = Toolkit.getDefaultToolkit(); Rectangle screenBounds = new Rectangle(tk.getScreenSize()); GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment(); GraphicsDevice gd = ge.getDefaultScreenDevice(); GraphicsConfiguration gc = gd.getDefaultConfiguration(); Insets screenInsets = tk.getScreenInsets(gc); screenBounds.x -= screenInsets.left; screenBounds.width -= screenInsets.left + screenInsets.right; screenBounds.y -= screenInsets.top; screenBounds.height -= screenInsets.top + screenInsets.bottom; screenLoc.x -= screenInsets.left; screenLoc.y -= screenInsets.top; Point point = new Point(); if (isTopLevelMenu()) { // If menu in the menu bar. int xOffset = UIManager.getInt("Menu.menuPopupOffsetX"); int yOffset = UIManager.getInt("Menu.menuPopupOffsetY"); // Determine X location. if (getComponentOrientation().isLeftToRight()) { // Prefer popup to the right. point.x = xOffset; // Check if it fits, otherwise place popup wherever it fits. if (screenLoc.x + point.x + popupSize.width > screenBounds.width + screenBounds.width && screenBounds.width - size.width < 2 * (screenLoc.x - screenBounds.x)) // Popup to the right if there's not enough room. point.x = size.width - xOffset - popupSize.width; } else { // Prefer popup to the left. point.x = size.width - xOffset - popupSize.width; if (screenLoc.x + point.x < screenBounds.x && screenBounds.width - size.width > 2 * (screenLoc.x - screenBounds.x)) // Popup to the left if there's not enough room. point.x = xOffset; } // Determine Y location. Prefer popping down. point.y = size.height + yOffset; if (screenLoc.y + point.y + popupSize.height >= screenBounds.height && screenBounds.height - size.height < 2 * (screenLoc.y - screenBounds.y)) // Position above if there's not enough room below. point.y = - yOffset - popupSize.height; } else { // If submenu. int xOffset = UIManager.getInt("Menu.submenuPopupOffsetX"); int yOffset = UIManager.getInt("Menu.submenuPopupOffsetY"); // Determine X location. if (getComponentOrientation().isLeftToRight()) { // Prefer popup to the right. point.x = xOffset; if (screenLoc.x + point.x + popupSize.width >= screenBounds.x + screenBounds.width && screenBounds.width - size.width < 2 * (screenLoc.x - screenBounds.x)) // Position to the left if there's not enough room on the right. point.x = - xOffset - popupSize.width; } else { // Prefer popup on the left side. point.x = - xOffset - popupSize.width; if (screenLoc.x + point.x < screenBounds.x && screenBounds.width - size.width > 2 * (screenLoc.x - screenBounds.x)) // Popup to the right if there's not enough room. point.x = xOffset; } // Determine Y location. Prefer popping down. point.y = yOffset; if (screenLoc.y + point.y + popupSize.height >= screenBounds.y + screenBounds.height && screenBounds.height - size.height < 2 * (screenLoc.y - screenBounds.y)) { // Pop up if there's not enough room below.// @classpath-bugfix 6/9/2006 Martin Husted Hartvig (hagar@jnode.org) : point.y = screenLoc.y - screenBounds.y + size.height - yOffset - popupSize.height;// @classpath-bugfix-end } } return point; }
| 6,224
|
protected Point getPopupMenuOrigin() { // The menu's screen location and size. Point screenLoc = getLocationOnScreen(); Dimension size = getSize(); // Determine the popup's size. JPopupMenu popup = getPopupMenu(); Dimension popupSize = popup.getSize(); if (popupSize.width == 0 || popupSize.height == 0) popupSize = popup.getPreferredSize(); // Determine screen bounds. Toolkit tk = Toolkit.getDefaultToolkit(); Rectangle screenBounds = new Rectangle(tk.getScreenSize()); GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment(); GraphicsDevice gd = ge.getDefaultScreenDevice(); GraphicsConfiguration gc = gd.getDefaultConfiguration(); Insets screenInsets = tk.getScreenInsets(gc); screenBounds.x -= screenInsets.left; screenBounds.width -= screenInsets.left + screenInsets.right; screenBounds.y -= screenInsets.top; screenBounds.height -= screenInsets.top + screenInsets.bottom; screenLoc.x -= screenInsets.left; screenLoc.y -= screenInsets.top; Point point = new Point(); if (isTopLevelMenu()) { // If menu in the menu bar. int xOffset = UIManager.getInt("Menu.menuPopupOffsetX"); int yOffset = UIManager.getInt("Menu.menuPopupOffsetY"); // Determine X location. if (getComponentOrientation().isLeftToRight()) { // Prefer popup to the right. point.x = xOffset; // Check if it fits, otherwise place popup wherever it fits. if (screenLoc.x + point.x + popupSize.width > screenBounds.width + screenBounds.width && screenBounds.width - size.width < 2 * (screenLoc.x - screenBounds.x)) // Popup to the right if there's not enough room. point.x = size.width - xOffset - popupSize.width; } else { // Prefer popup to the left. point.x = size.width - xOffset - popupSize.width; if (screenLoc.x + point.x < screenBounds.x && screenBounds.width - size.width > 2 * (screenLoc.x - screenBounds.x)) // Popup to the left if there's not enough room. point.x = xOffset; } // Determine Y location. Prefer popping down. point.y = size.height + yOffset; if (screenLoc.y + point.y + popupSize.height >= screenBounds.height && screenBounds.height - size.height < 2 * (screenLoc.y - screenBounds.y)) // Position above if there's not enough room below. point.y = - yOffset - popupSize.height; } else { // If submenu. int xOffset = UIManager.getInt("Menu.submenuPopupOffsetX"); int yOffset = UIManager.getInt("Menu.submenuPopupOffsetY"); // Determine X location. if (getComponentOrientation().isLeftToRight()) { // Prefer popup to the right. point.x = size.width + xOffset; if (screenLoc.x + point.x + popupSize.width >= screenBounds.x + screenBounds.width && screenBounds.width - size.width < 2 * (screenLoc.x - screenBounds.x)) // Position to the left if there's not enough room on the right. point.x = - xOffset - popupSize.width; } else { // Prefer popup on the left side. point.x = - xOffset - popupSize.width; if (screenLoc.x + point.x < screenBounds.x && screenBounds.width - size.width > 2 * (screenLoc.x - screenBounds.x)) // Popup to the right if there's not enough room. point.x = size.width + xOffset; } // Determine Y location. Prefer popping down. point.y = yOffset; if (screenLoc.y + point.y + popupSize.height >= screenBounds.y + screenBounds.height && screenBounds.height - size.height < 2 * (screenLoc.y - screenBounds.y)) { // Pop up if there's not enough room below.// @classpath-bugfix 6/9/2006 Martin Husted Hartvig (hagar@jnode.org) : point.y = screenLoc.y - screenBounds.y + size.height - yOffset - popupSize.height;// @classpath-bugfix-end } } return point; }
|
protected Point getPopupMenuOrigin() { // The menu's screen location and size. Point screenLoc = getLocationOnScreen(); Dimension size = getSize(); // Determine the popup's size. JPopupMenu popup = getPopupMenu(); Dimension popupSize = popup.getSize(); if (popupSize.width == 0 || popupSize.height == 0) popupSize = popup.getPreferredSize(); // Determine screen bounds. Toolkit tk = Toolkit.getDefaultToolkit(); Rectangle screenBounds = new Rectangle(tk.getScreenSize()); GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment(); GraphicsDevice gd = ge.getDefaultScreenDevice(); GraphicsConfiguration gc = gd.getDefaultConfiguration(); Insets screenInsets = tk.getScreenInsets(gc); screenBounds.x -= screenInsets.left; screenBounds.width -= screenInsets.left + screenInsets.right; screenBounds.y -= screenInsets.top; screenBounds.height -= screenInsets.top + screenInsets.bottom; screenLoc.x -= screenInsets.left; screenLoc.y -= screenInsets.top; Point point = new Point(); if (isTopLevelMenu()) { // If menu in the menu bar. int xOffset = UIManager.getInt("Menu.menuPopupOffsetX"); int yOffset = UIManager.getInt("Menu.menuPopupOffsetY"); // Determine X location. if (getComponentOrientation().isLeftToRight()) { // Prefer popup to the right. point.x = xOffset; // Check if it fits, otherwise place popup wherever it fits. if (screenLoc.x + point.x + popupSize.width > screenBounds.width + screenBounds.width && screenBounds.width - size.width < 2 * (screenLoc.x - screenBounds.x)) // Popup to the right if there's not enough room. point.x = size.width - xOffset - popupSize.width; } else { // Prefer popup to the left. point.x = size.width - xOffset - popupSize.width; if (screenLoc.x + point.x < screenBounds.x && screenBounds.width - size.width > 2 * (screenLoc.x - screenBounds.x)) // Popup to the left if there's not enough room. point.x = xOffset; } // Determine Y location. Prefer popping down. point.y = size.height + yOffset; if (screenLoc.y + point.y + popupSize.height >= screenBounds.height && screenBounds.height - size.height < 2 * (screenLoc.y - screenBounds.y)) // Position above if there's not enough room below. point.y = - yOffset - popupSize.height; } else { // If submenu. int xOffset = UIManager.getInt("Menu.submenuPopupOffsetX"); int yOffset = UIManager.getInt("Menu.submenuPopupOffsetY"); // Determine X location. if (getComponentOrientation().isLeftToRight()) { // Prefer popup to the right. point.x = size.width + xOffset; if (screenLoc.x + point.x + popupSize.width >= screenBounds.x + screenBounds.width && screenBounds.width - size.width < 2 * (screenLoc.x - screenBounds.x)) // Position to the left if there's not enough room on the right. point.x = - xOffset - popupSize.width; } else { // Prefer popup on the left side. point.x = - xOffset - popupSize.width; if (screenLoc.x + point.x < screenBounds.x && screenBounds.width - size.width > 2 * (screenLoc.x - screenBounds.x)) // Popup to the right if there's not enough room. point.x = size.width + xOffset; } // Determine Y location. Prefer popping down. point.y = yOffset; if (screenLoc.y + point.y + popupSize.height >= screenBounds.y + screenBounds.height && screenBounds.height - size.height < 2 * (screenLoc.y - screenBounds.y)) { // Pop up if there's not enough room below.// @classpath-bugfix 6/9/2006 Martin Husted Hartvig (hagar@jnode.org) : point.y = size.height - yOffset - popupSize.height;// @classpath-bugfix-end } } return point; }
| 6,225
|
public AttributeSet getAttributes() { return elt.getAttributes(); }
|
public AttributeSet getAttributes() { return getElement().getAttributes(); }
| 6,226
|
public int getEndOffset() { return elt.getEndOffset(); }
|
public int getEndOffset() { return getElement().getEndOffset(); }
| 6,228
|
public int getStartOffset() { return elt.getStartOffset(); }
|
public int getStartOffset() { return getElement().getStartOffset(); }
| 6,229
|
public void setParent(View a) { parent = a; }
|
public void setParent(View parent) { parent = a; }
| 6,231
|
public void setParent(View a) { parent = a; }
|
public void setParent(View a) { this.parent = parent; }
| 6,232
|
public void setSize(int w, int h) { width = w; height = h; }
|
public void setSize(int w, int h) { width = w; height = h; }
| 6,233
|
public void scrollPathToVisible(TreePath path) { if (path == null) return; Rectangle rect = getPathBounds(path); if (rect == null) return; scrollRectToVisible(rect); }
|
public void scrollPathToVisible(TreePath path) { if (path == null) return; Rectangle rect = getPathBounds(path); if (rect == null) return; scrollRectToVisible(rect); }
| 6,234
|
public void updateUI() { setUI((TreeUI) UIManager.getUI(this)); revalidate(); repaint(); }
|
public void updateUI() { setUI((TreeUI) UIManager.getUI(this)); revalidate(); repaint(); }
| 6,236
|
public void sendKeys(String text) { if (text == null) { return; } if (keyboardLocked) { if(text.equals("[reset]") || text.equals("[sysreq]") || text.equals("[attn]")) { simulateMnemonic(getMnemonicValue(text)); } else { if (isStatusErrorCode()) { Toolkit.getDefaultToolkit().beep(); return; } keysBuffered = true; setKBIndicatorOn(); if(bufferedKeys == null){ bufferedKeys = text; return; } else { bufferedKeys += text; return; } } } else { if (keysBuffered) { if (text != null) { text = bufferedKeys + text; } keysBuffered = false; setKBIndicatorOff(); bufferedKeys = null; } // check to see if position is in a field and if it is then change // current field to that field isInField(lastPos,true); if (text.length() == 1 && !text.equals("[") && !text.equals("]")) { simulateKeyStroke(text.charAt(0)); } else { strokenizer.setKeyStrokes(text); String s; boolean done = false; while (strokenizer.hasMoreKeyStrokes() && !keyboardLocked && !isStatusErrorCode() && !done) { s = strokenizer.nextKeyStroke(); if (s.length() == 1) { simulateKeyStroke(s.charAt(0)); } else { if (s != null) { simulateMnemonic(getMnemonicValue(s)); } else System.out.println(" send keys mnemonic " + s); } if (keyboardLocked) { bufferedKeys = strokenizer.getUnprocessedKeyStroked(); if (bufferedKeys != null) { keysBuffered = true; setKBIndicatorOn(); } done = true; } } } } }
|
public void sendKeys(String text) { if (text == null) { return; } if (keyboardLocked) { if(text.equals("[reset]") || text.equals("[sysreq]") || text.equals("[attn]")) { simulateMnemonic(getMnemonicValue(text)); } else { if (isStatusErrorCode()) { Toolkit.getDefaultToolkit().beep(); return; } keysBuffered = true; setKBIndicatorOn(); if(bufferedKeys == null){ bufferedKeys = text; return; } else { bufferedKeys += text; return; } } } else { if (keysBuffered) { if (text != null) { text = bufferedKeys + text; } keysBuffered = false; setKBIndicatorOff(); bufferedKeys = null; } // check to see if position is in a field and if it is then change // current field to that field isInField(lastPos,true); if (text.length() == 1 && !text.equals("[") && !text.equals("]")) { simulateKeyStroke(text.charAt(0)); } else { strokenizer.setKeyStrokes(text); String s; boolean done = false; while (strokenizer.hasMoreKeyStrokes() && !keyboardLocked && !isStatusErrorCode() && !done) { s = strokenizer.nextKeyStroke(); if (s.length() == 1) { simulateKeyStroke(s.charAt(0)); } else { if (s != null) { simulateMnemonic(getMnemonicValue(s)); } else System.out.println(" send keys mnemonic " + s); } if (keyboardLocked) { bufferedKeys = strokenizer.getUnprocessedKeyStroked(); if (bufferedKeys != null) { keysBuffered = true; setKBIndicatorOn(); } done = true; } } } } }
| 6,237
|
protected boolean simulateKeyStroke(char c){ if (isStatusErrorCode() && !Character.isISOControl(c) && !keyProcessed) { return false; } boolean updateField = false; boolean numericError = false; boolean updatePos = false; boolean autoEnter = false; if (!Character.isISOControl(c)) { if (screenFields.getCurrentField() != null && screenFields.withinCurrentField(lastPos) && !screenFields.isCurrentFieldBypassField()) { switch (screenFields.getCurrentFieldShift()) { case 0: // Alpha shift case 2: // Numeric Shift case 4: // Kakana Shift updateField = true; break; case 1: // Alpha Only if(Character.isLetter(c) || c == ',' || c == '-' || c == '.' || c == ' ') updateField = true; break; case 3: // Numeric only if(Character.isDigit(c) || c == '+' || c == ',' || c == '-' || c == '.' || c == ' ') updateField = true; else numericError = true; break; case 5: // Digits only if(Character.isDigit(c)) updateField = true; else displayError(ERR_NUMERIC_09); break; case 7: // Signed numeric if(Character.isDigit(c) || c == '+' || c == '-') if (lastPos == screenFields.getCurrentField().endPos() && (c != '+' && c != '-')) displayError(ERR_INVALID_SIGN); else updateField = true; else displayError(ERR_NUMERIC_09); break; } if (updateField) { if (screenFields.isCurrentFieldToUpper()) c = Character.toUpperCase(c); setCursorOff(); updatePos = true; resetDirty(lastPos); if (insertMode) { if (endOfField(false) != screenFields.getCurrentField().endPos()) shiftRight(lastPos); else { displayError(ERR_NO_ROOM_INSERT); updatePos = false; } } if (updatePos) { screenFields.getCurrentField().getKeyPos(getRow(lastPos),getCol(lastPos)); screenFields.getCurrentField().changePos(1); screen[lastPos].setChar(c); screenFields.setCurrentFieldMDT(); // if we have gone passed the end of the field then goto the next field if (!screenFields.withinCurrentField(screenFields.getCurrentFieldPos())) { if (screenFields.isCurrentFieldAutoEnter()) { autoEnter = true; } else if (!screenFields.isCurrentFieldFER()) gotoFieldNext(); } else goto_XY(screenFields.getCurrentField().getCursorRow() + 1,screenFields.getCurrentField().getCursorCol() + 1); } updateImage(dirty); setCursorOn(); if (autoEnter) sendAid(AID_ENTER); } else { if (numericError) { displayError(ERR_NUMERIC_ONLY); } } } else { displayError(ERR_CURSOR_PROTECTED); } } return updatePos; }
|
protected boolean simulateKeyStroke(char c){ if (isStatusErrorCode() && !Character.isISOControl(c) && !keyProcessed) { return false; } boolean updateField = false; boolean numericError = false; boolean updatePos = false; boolean autoEnter = false; if (!Character.isISOControl(c)) { if (screenFields.getCurrentField() != null && screenFields.withinCurrentField(lastPos) && !screenFields.isCurrentFieldBypassField()) { switch (screenFields.getCurrentFieldShift()) { case 0: // Alpha shift case 2: // Numeric Shift case 4: // Kakana Shift updateField = true; break; case 1: // Alpha Only if(Character.isLetter(c) || c == ',' || c == '-' || c == '.' || c == ' ') updateField = true; break; case 3: // Numeric only if(Character.isDigit(c) || c == '+' || c == ',' || c == '-' || c == '.' || c == ' ') updateField = true; else numericError = true; break; case 5: // Digits only if(Character.isDigit(c)) updateField = true; else displayError(ERR_NUMERIC_09); break; case 7: // Signed numeric if(Character.isDigit(c) || c == '+' || c == '-') if (lastPos == screenFields.getCurrentField().endPos() && (c != '+' && c != '-')) displayError(ERR_INVALID_SIGN); else updateField = true; else displayError(ERR_NUMERIC_09); break; } if (updateField) { if (screenFields.isCurrentFieldToUpper()) c = Character.toUpperCase(c); setCursorOff(); updatePos = true; resetDirty(lastPos); if (insertMode) { if (endOfField(false) != screenFields.getCurrentField().endPos()) shiftRight(lastPos); else { displayError(ERR_NO_ROOM_INSERT); updatePos = false; } } if (updatePos) { screenFields.getCurrentField().getKeyPos(getRow(lastPos),getCol(lastPos)); screenFields.getCurrentField().changePos(1); screen[lastPos].setChar(c); screenFields.setCurrentFieldMDT(); // if we have gone passed the end of the field then goto the next field if (!screenFields.withinCurrentField(screenFields.getCurrentFieldPos())) { if (screenFields.isCurrentFieldAutoEnter()) { autoEnter = true; } else if (!screenFields.isCurrentFieldFER()) gotoFieldNext(); } else goto_XY(screenFields.getCurrentField().getCursorRow() + 1,screenFields.getCurrentField().getCursorCol() + 1); } updateImage(dirty); setCursorOn(); if (autoEnter) sendAid(AID_ENTER); } else { if (numericError) { displayError(ERR_NUMERIC_ONLY); } } } else { displayError(ERR_CURSOR_PROTECTED); } } return updatePos; }
| 6,238
|
protected boolean simulateMnemonic(int mnem){ boolean simulated = false; switch (mnem) { case AID_CLEAR : case AID_ENTER : case AID_PF1 : case AID_PF2 : case AID_PF3 : case AID_PF4 : case AID_PF5 : case AID_PF6 : case AID_PF7 : case AID_PF8 : case AID_PF9 : case AID_PF10 : case AID_PF11 : case AID_PF12 : case AID_PF13 : case AID_PF14 : case AID_PF15 : case AID_PF16 : case AID_PF17 : case AID_PF18 : case AID_PF19 : case AID_PF20 : case AID_PF21 : case AID_PF22 : case AID_PF23 : case AID_PF24 : case AID_ROLL_DOWN : case AID_ROLL_UP : case AID_ROLL_LEFT : case AID_ROLL_RIGHT : sendAid(mnem); simulated = true; break; case AID_HELP : sessionVT.sendHelpRequest(); simulated = true; break; case AID_PRINT : sessionVT.hostPrint(1); simulated = true; break; case BACK_SPACE : if (screenFields.getCurrentField() != null && screenFields.withinCurrentField(lastPos) && !screenFields.isCurrentFieldBypassField()) { if (screenFields.getCurrentField().startPos() == lastPos) displayError(ERR_CURSOR_PROTECTED); else { setCursorOff(); screenFields.getCurrentField().getKeyPos(lastPos); screenFields.getCurrentField().changePos(-1); resetDirty(screenFields.getCurrentField().getCurrentPos()); shiftLeft(screenFields.getCurrentField().getCurrentPos()); updateDirty(); setCursorOn(); screenFields.setCurrentFieldMDT(); simulated = true; } } else { displayError(ERR_CURSOR_PROTECTED); } break; case BACK_TAB : if (screenFields.getCurrentField() != null && screenFields.isCurrentFieldHighlightedEntry()) { resetDirty(screenFields.getCurrentField().startPos); gotoFieldPrev(); updateDirty(); } else gotoFieldPrev(); if (screenFields.isCurrentFieldContinued()) { do { gotoFieldPrev(); } while (screenFields.isCurrentFieldContinuedMiddle() || screenFields.isCurrentFieldContinuedLast()); } isInField(lastPos); simulated = true; break; case UP : case MARK_UP : process_XY(lastPos - numCols); simulated = true; break; case DOWN : case MARK_DOWN : process_XY(lastPos + numCols); simulated = true; break; case LEFT : case MARK_LEFT : process_XY(lastPos - 1); simulated = true; break; case RIGHT : case MARK_RIGHT : process_XY(lastPos + 1); simulated = true; break; case NEXTWORD : gotoNextWord(); simulated = true; break; case PREVWORD : gotoPrevWord(); simulated = true; break; case DELETE : if (screenFields.getCurrentField() != null && screenFields.withinCurrentField(lastPos) && !screenFields.isCurrentFieldBypassField()) { setCursorOff(); resetDirty(lastPos); screenFields.getCurrentField().getKeyPos(lastPos); shiftLeft(screenFields.getCurrentFieldPos()); screenFields.setCurrentFieldMDT(); updateDirty(); setCursorOn(); simulated = true; } else { displayError(ERR_CURSOR_PROTECTED); } break; case TAB : if (screenFields.getCurrentField() != null && !screenFields.isCurrentFieldContinued()) { if (screenFields.isCurrentFieldHighlightedEntry()) { resetDirty(screenFields.getCurrentField().startPos); gotoFieldNext(); updateDirty(); } else gotoFieldNext(); } else { do { gotoFieldNext(); } while (screenFields.getCurrentField() != null && (screenFields.isCurrentFieldContinuedMiddle() || screenFields.isCurrentFieldContinuedLast())); } isInField(lastPos); simulated = true; break; case EOF : if (screenFields.getCurrentField() != null && screenFields.withinCurrentField(lastPos) && !screenFields.isCurrentFieldBypassField()) { int where = endOfField(screenFields.getCurrentField().startPos(),true); if (where > 0) { goto_XY((where / numCols) + 1,(where % numCols) + 1); } simulated = true; } else { displayError(ERR_CURSOR_PROTECTED); } resetDirty(lastPos); break; case ERASE_EOF : if (screenFields.getCurrentField() != null && screenFields.withinCurrentField(lastPos) && !screenFields.isCurrentFieldBypassField()) { setCursorOff(); int where = lastPos; resetDirty(lastPos); if (fieldExit()) { screenFields.setCurrentFieldMDT(); if (!screenFields.isCurrentFieldContinued()) { gotoFieldNext(); } else { do { gotoFieldNext(); if (screenFields.isCurrentFieldContinued()) fieldExit(); } while (screenFields.isCurrentFieldContinuedMiddle() || screenFields.isCurrentFieldContinuedLast()); } } updateDirty(); goto_XY(where); setCursorOn(); simulated = true; } else { displayError(ERR_CURSOR_PROTECTED); } break; case ERASE_FIELD : if (screenFields.getCurrentField() != null && screenFields.withinCurrentField(lastPos) && !screenFields.isCurrentFieldBypassField()) { setCursorOff(); int where = lastPos; lastPos = screenFields.getCurrentField().startPos(); resetDirty(lastPos); if (fieldExit()) { screenFields.setCurrentFieldMDT(); if (!screenFields.isCurrentFieldContinued()) { gotoFieldNext(); } else { do { gotoFieldNext(); if (screenFields.isCurrentFieldContinued()) fieldExit(); } while (screenFields.isCurrentFieldContinuedMiddle() || screenFields.isCurrentFieldContinuedLast()); } } updateDirty(); goto_XY(where); setCursorOn(); simulated = true; } else { displayError(ERR_CURSOR_PROTECTED); } break; case INSERT : setCursorOff(); // we toggle it insertMode = insertMode ? false : true; setCursorOn(); break; case HOME : // position to the home position set if (lastPos + numCols + 1 != homePos) { goto_XY(homePos - numCols - 1); // now check if we are in a field isInField(lastPos); } else gotoField(1); break; case KEYPAD_0 : simulated = simulateKeyStroke('0'); break; case KEYPAD_1 : simulated = simulateKeyStroke('1'); break; case KEYPAD_2 : simulated = simulateKeyStroke('2'); break; case KEYPAD_3 : simulated = simulateKeyStroke('3'); break; case KEYPAD_4 : simulated = simulateKeyStroke('4'); break; case KEYPAD_5 : simulated = simulateKeyStroke('5'); break; case KEYPAD_6 : simulated = simulateKeyStroke('6'); break; case KEYPAD_7 : simulated = simulateKeyStroke('7'); break; case KEYPAD_8 : simulated = simulateKeyStroke('8'); break; case KEYPAD_9 : simulated = simulateKeyStroke('9'); break; case KEYPAD_PERIOD : simulated = simulateKeyStroke('.'); break; case KEYPAD_COMMA : simulated = simulateKeyStroke(','); break; case KEYPAD_MINUS : if (screenFields.getCurrentField() != null && screenFields.withinCurrentField(lastPos) && !screenFields.isCurrentFieldBypassField()) { int s = screenFields.getCurrentField().getFieldShift(); if (s == 3 || s == 5 || s == 7) { screen[lastPos].setChar('-'); resetDirty(lastPos); advancePos(); if (fieldExit()) { screenFields.setCurrentFieldMDT(); if (!screenFields.isCurrentFieldContinued()) { gotoFieldNext(); } else { do { gotoFieldNext(); } while (screenFields.isCurrentFieldContinuedMiddle() || screenFields.isCurrentFieldContinuedLast()); } simulated = true; updateDirty(); if (screenFields.isCurrentFieldAutoEnter()) sendAid(AID_ENTER); } } else { displayError(ERR_FIELD_MINUS); } } else { displayError(ERR_CURSOR_PROTECTED); } break; case FIELD_EXIT : if (screenFields.getCurrentField() != null && screenFields.withinCurrentField(lastPos) && !screenFields.isCurrentFieldBypassField()) { setCursorOff(); resetDirty(lastPos); if (fieldExit()) { screenFields.setCurrentFieldMDT(); if (!screenFields.isCurrentFieldContinued()) { gotoFieldNext(); } else { do { gotoFieldNext(); if (screenFields.isCurrentFieldContinued()) fieldExit(); } while (screenFields.isCurrentFieldContinuedMiddle() || screenFields.isCurrentFieldContinuedLast()); } } updateDirty(); setCursorOn(); simulated = true; if (screenFields.isCurrentFieldAutoEnter()) sendAid(AID_ENTER); } else { displayError(ERR_CURSOR_PROTECTED); } break; case FIELD_PLUS : if (screenFields.getCurrentField() != null && screenFields.withinCurrentField(lastPos) && !screenFields.isCurrentFieldBypassField()) { setCursorOff(); resetDirty(lastPos); if (fieldExit()) { screenFields.setCurrentFieldMDT(); if (!screenFields.isCurrentFieldContinued()) { gotoFieldNext(); } else { do { gotoFieldNext(); } while (screenFields.isCurrentFieldContinuedMiddle() || screenFields.isCurrentFieldContinuedLast()); } } updateDirty(); setCursorOn(); simulated = true; if (screenFields.isCurrentFieldAutoEnter()) sendAid(AID_ENTER); } else { displayError(ERR_CURSOR_PROTECTED); } break; case FIELD_MINUS : if (screenFields.getCurrentField() != null && screenFields.withinCurrentField(lastPos) && !screenFields.isCurrentFieldBypassField()) { int s = screenFields.getCurrentField().getFieldShift(); if (s == 3 || s == 5 || s == 7) { setCursorOff(); screen[lastPos].setChar('-'); resetDirty(lastPos); advancePos(); if (fieldExit()) { screenFields.setCurrentFieldMDT(); if (!screenFields.isCurrentFieldContinued()) { gotoFieldNext(); } else { do { gotoFieldNext(); } while (screenFields.isCurrentFieldContinuedMiddle() || screenFields.isCurrentFieldContinuedLast()); } } updateDirty(); setCursorOn(); simulated = true; if (screenFields.isCurrentFieldAutoEnter()) sendAid(AID_ENTER); } else { displayError(ERR_FIELD_MINUS); } } else { displayError(ERR_CURSOR_PROTECTED); } break; case BOF : if (screenFields.getCurrentField() != null && screenFields.withinCurrentField(lastPos) && !screenFields.isCurrentFieldBypassField()) { int where = screenFields.getCurrentField().startPos(); if (where > 0) { goto_XY(where); } simulated = true; } else { displayError(ERR_CURSOR_PROTECTED); } resetDirty(lastPos); break; case SYSREQ : sessionVT.systemRequest(); simulated = true; break; case RESET : if (isStatusErrorCode()) { restoreErrorLine(); setStatus(STATUS_ERROR_CODE,STATUS_VALUE_OFF,""); isInField(lastPos); updateDirty(); setCursorOn(); } else { setPrehelpState(false,isKeyboardLocked(),false); } simulated = true; break; case COPY : copyMe(); break; case PASTE : pasteMe(false); break; case ATTN : sessionVT.sendAttentionKey(); simulated = true; break; case DUP_FIELD : if (screenFields.getCurrentField() != null && screenFields.withinCurrentField(lastPos) && !screenFields.isCurrentFieldBypassField()) { if (screenFields.isCurrentFieldDupEnabled()) { setCursorOff(); resetDirty(lastPos); screenFields.getCurrentField().setFieldChar(lastPos,(char)0x1C); screenFields.setCurrentFieldMDT(); gotoFieldNext(); updateDirty(); setCursorOn(); simulated = true; } else { displayError(ERR_DUP_KEY_NOT_ALLOWED); } } else { displayError(ERR_CURSOR_PROTECTED); } break; case NEW_LINE : if (screenFields.getSize() > 0) { int startRow = getRow(lastPos) + 1; int startPos = lastPos; boolean isthere = false; setCursorOff(); if (startRow == getRows()) startRow = 0; goto_XY(++startRow,1); if (!isInField() && screenFields.getCurrentField() != null && !screenFields.isCurrentFieldBypassField()) { while (!isInField() && screenFields.getCurrentField() != null && !screenFields.isCurrentFieldBypassField()) { // lets keep going advancePos(); // Have we looped the screen? if (lastPos == startPos) { // if so then go back to starting point goto_XY(startPos); break; } } } setCursorOn(); } simulated = true; break; case JUMP_NEXT_SESS : gui.nextSession(); simulated = true; break; case JUMP_PREV_SESS : gui.prevSession(); simulated = true; break; default : System.out.println(" Mnemonic not supported " + mnem); break; } return simulated; }
|
protected boolean simulateMnemonic(int mnem){ boolean simulated = false; switch (mnem) { case AID_CLEAR : case AID_ENTER : case AID_PF1 : case AID_PF2 : case AID_PF3 : case AID_PF4 : case AID_PF5 : case AID_PF6 : case AID_PF7 : case AID_PF8 : case AID_PF9 : case AID_PF10 : case AID_PF11 : case AID_PF12 : case AID_PF13 : case AID_PF14 : case AID_PF15 : case AID_PF16 : case AID_PF17 : case AID_PF18 : case AID_PF19 : case AID_PF20 : case AID_PF21 : case AID_PF22 : case AID_PF23 : case AID_PF24 : case AID_ROLL_DOWN : case AID_ROLL_UP : case AID_ROLL_LEFT : case AID_ROLL_RIGHT : sendAid(mnem); simulated = true; break; case AID_HELP : sessionVT.sendHelpRequest(); simulated = true; break; case AID_PRINT : sessionVT.hostPrint(1); simulated = true; break; case BACK_SPACE : if (screenFields.getCurrentField() != null && screenFields.withinCurrentField(lastPos) && !screenFields.isCurrentFieldBypassField()) { if (screenFields.getCurrentField().startPos() == lastPos) displayError(ERR_CURSOR_PROTECTED); else { setCursorOff(); screenFields.getCurrentField().getKeyPos(lastPos); screenFields.getCurrentField().changePos(-1); resetDirty(screenFields.getCurrentField().getCurrentPos()); shiftLeft(screenFields.getCurrentField().getCurrentPos()); updateDirty(); setCursorOn(); screenFields.setCurrentFieldMDT(); simulated = true; } } else { displayError(ERR_CURSOR_PROTECTED); } break; case BACK_TAB : if (screenFields.getCurrentField() != null && screenFields.isCurrentFieldHighlightedEntry()) { resetDirty(screenFields.getCurrentField().startPos); gotoFieldPrev(); updateDirty(); } else gotoFieldPrev(); if (screenFields.isCurrentFieldContinued()) { do { gotoFieldPrev(); } while (screenFields.isCurrentFieldContinuedMiddle() || screenFields.isCurrentFieldContinuedLast()); } isInField(lastPos); simulated = true; break; case UP : case MARK_UP : process_XY(lastPos - numCols); simulated = true; break; case DOWN : case MARK_DOWN : process_XY(lastPos + numCols); simulated = true; break; case LEFT : case MARK_LEFT : process_XY(lastPos - 1); simulated = true; break; case RIGHT : case MARK_RIGHT : process_XY(lastPos + 1); simulated = true; break; case NEXTWORD : gotoNextWord(); simulated = true; break; case PREVWORD : gotoPrevWord(); simulated = true; break; case DELETE : if (screenFields.getCurrentField() != null && screenFields.withinCurrentField(lastPos) && !screenFields.isCurrentFieldBypassField()) { setCursorOff(); resetDirty(lastPos); screenFields.getCurrentField().getKeyPos(lastPos); shiftLeft(screenFields.getCurrentFieldPos()); screenFields.setCurrentFieldMDT(); updateDirty(); setCursorOn(); simulated = true; } else { displayError(ERR_CURSOR_PROTECTED); } break; case TAB : if (screenFields.getCurrentField() != null && !screenFields.isCurrentFieldContinued()) { if (screenFields.isCurrentFieldHighlightedEntry()) { resetDirty(screenFields.getCurrentField().startPos); gotoFieldNext(); updateDirty(); } else gotoFieldNext(); } else { do { gotoFieldNext(); } while (screenFields.getCurrentField() != null && (screenFields.isCurrentFieldContinuedMiddle() || screenFields.isCurrentFieldContinuedLast())); } isInField(lastPos); simulated = true; break; case EOF : if (screenFields.getCurrentField() != null && screenFields.withinCurrentField(lastPos) && !screenFields.isCurrentFieldBypassField()) { int where = endOfField(screenFields.getCurrentField().startPos(),true); if (where > 0) { goto_XY((where / numCols) + 1,(where % numCols) + 1); } simulated = true; } else { displayError(ERR_CURSOR_PROTECTED); } resetDirty(lastPos); break; case ERASE_EOF : if (screenFields.getCurrentField() != null && screenFields.withinCurrentField(lastPos) && !screenFields.isCurrentFieldBypassField()) { setCursorOff(); int where = lastPos; resetDirty(lastPos); if (fieldExit()) { screenFields.setCurrentFieldMDT(); if (!screenFields.isCurrentFieldContinued()) { gotoFieldNext(); } else { do { gotoFieldNext(); if (screenFields.isCurrentFieldContinued()) fieldExit(); } while (screenFields.isCurrentFieldContinuedMiddle() || screenFields.isCurrentFieldContinuedLast()); } } updateDirty(); goto_XY(where); setCursorOn(); simulated = true; } else { displayError(ERR_CURSOR_PROTECTED); } break; case ERASE_FIELD : if (screenFields.getCurrentField() != null && screenFields.withinCurrentField(lastPos) && !screenFields.isCurrentFieldBypassField()) { setCursorOff(); int where = lastPos; lastPos = screenFields.getCurrentField().startPos(); resetDirty(lastPos); if (fieldExit()) { screenFields.setCurrentFieldMDT(); if (!screenFields.isCurrentFieldContinued()) { gotoFieldNext(); } else { do { gotoFieldNext(); if (screenFields.isCurrentFieldContinued()) fieldExit(); } while (screenFields.isCurrentFieldContinuedMiddle() || screenFields.isCurrentFieldContinuedLast()); } } updateDirty(); goto_XY(where); setCursorOn(); simulated = true; } else { displayError(ERR_CURSOR_PROTECTED); } break; case INSERT : setCursorOff(); // we toggle it insertMode = insertMode ? false : true; setCursorOn(); break; case HOME : // position to the home position set if (lastPos + numCols + 1 != homePos) { goto_XY(homePos - numCols - 1); // now check if we are in a field isInField(lastPos); } else gotoField(1); break; case KEYPAD_0 : simulated = simulateKeyStroke('0'); break; case KEYPAD_1 : simulated = simulateKeyStroke('1'); break; case KEYPAD_2 : simulated = simulateKeyStroke('2'); break; case KEYPAD_3 : simulated = simulateKeyStroke('3'); break; case KEYPAD_4 : simulated = simulateKeyStroke('4'); break; case KEYPAD_5 : simulated = simulateKeyStroke('5'); break; case KEYPAD_6 : simulated = simulateKeyStroke('6'); break; case KEYPAD_7 : simulated = simulateKeyStroke('7'); break; case KEYPAD_8 : simulated = simulateKeyStroke('8'); break; case KEYPAD_9 : simulated = simulateKeyStroke('9'); break; case KEYPAD_PERIOD : simulated = simulateKeyStroke('.'); break; case KEYPAD_COMMA : simulated = simulateKeyStroke(','); break; case KEYPAD_MINUS : if (screenFields.getCurrentField() != null && screenFields.withinCurrentField(lastPos) && !screenFields.isCurrentFieldBypassField()) { int s = screenFields.getCurrentField().getFieldShift(); if (s == 3 || s == 5 || s == 7) { screen[lastPos].setChar('-'); resetDirty(lastPos); advancePos(); if (fieldExit()) { screenFields.setCurrentFieldMDT(); if (!screenFields.isCurrentFieldContinued()) { gotoFieldNext(); } else { do { gotoFieldNext(); } while (screenFields.isCurrentFieldContinuedMiddle() || screenFields.isCurrentFieldContinuedLast()); } simulated = true; updateDirty(); if (screenFields.isCurrentFieldAutoEnter()) sendAid(AID_ENTER); } } else { displayError(ERR_FIELD_MINUS); } } else { displayError(ERR_CURSOR_PROTECTED); } break; case FIELD_EXIT : if (screenFields.getCurrentField() != null && screenFields.withinCurrentField(lastPos) && !screenFields.isCurrentFieldBypassField()) { setCursorOff(); resetDirty(lastPos); if (fieldExit()) { screenFields.setCurrentFieldMDT(); if (!screenFields.isCurrentFieldContinued()) { gotoFieldNext(); } else { do { gotoFieldNext(); if (screenFields.isCurrentFieldContinued()) fieldExit(); } while (screenFields.isCurrentFieldContinuedMiddle() || screenFields.isCurrentFieldContinuedLast()); } } updateDirty(); setCursorOn(); simulated = true; if (screenFields.isCurrentFieldAutoEnter()) sendAid(AID_ENTER); } else { displayError(ERR_CURSOR_PROTECTED); } break; case FIELD_PLUS : if (screenFields.getCurrentField() != null && screenFields.withinCurrentField(lastPos) && !screenFields.isCurrentFieldBypassField()) { setCursorOff(); resetDirty(lastPos); if (fieldExit()) { screenFields.setCurrentFieldMDT(); if (!screenFields.isCurrentFieldContinued()) { gotoFieldNext(); } else { do { gotoFieldNext(); } while (screenFields.isCurrentFieldContinuedMiddle() || screenFields.isCurrentFieldContinuedLast()); } } updateDirty(); setCursorOn(); simulated = true; if (screenFields.isCurrentFieldAutoEnter()) sendAid(AID_ENTER); } else { displayError(ERR_CURSOR_PROTECTED); } break; case FIELD_MINUS : if (screenFields.getCurrentField() != null && screenFields.withinCurrentField(lastPos) && !screenFields.isCurrentFieldBypassField()) { int s = screenFields.getCurrentField().getFieldShift(); if (s == 3 || s == 5 || s == 7) { setCursorOff(); screen[lastPos].setChar('-'); resetDirty(lastPos); advancePos(); if (fieldExit()) { screenFields.setCurrentFieldMDT(); if (!screenFields.isCurrentFieldContinued()) { gotoFieldNext(); } else { do { gotoFieldNext(); } while (screenFields.isCurrentFieldContinuedMiddle() || screenFields.isCurrentFieldContinuedLast()); } } updateDirty(); setCursorOn(); simulated = true; if (screenFields.isCurrentFieldAutoEnter()) sendAid(AID_ENTER); } else { displayError(ERR_FIELD_MINUS); } } else { displayError(ERR_CURSOR_PROTECTED); } break; case BOF : if (screenFields.getCurrentField() != null && screenFields.withinCurrentField(lastPos) && !screenFields.isCurrentFieldBypassField()) { int where = screenFields.getCurrentField().startPos(); if (where > 0) { goto_XY(where); } simulated = true; } else { displayError(ERR_CURSOR_PROTECTED); } resetDirty(lastPos); break; case SYSREQ : sessionVT.systemRequest(); simulated = true; break; case RESET : if (isStatusErrorCode()) { restoreErrorLine(); setStatus(STATUS_ERROR_CODE,STATUS_VALUE_OFF,""); isInField(lastPos); updateDirty(); setCursorOn(); } else { setPrehelpState(false,isKeyboardLocked(),false); } simulated = true; break; case COPY : copyMe(); break; case PASTE : pasteMe(false); break; case ATTN : sessionVT.sendAttentionKey(); simulated = true; break; case DUP_FIELD : if (screenFields.getCurrentField() != null && screenFields.withinCurrentField(lastPos) && !screenFields.isCurrentFieldBypassField()) { if (screenFields.isCurrentFieldDupEnabled()) { setCursorOff(); resetDirty(lastPos); screenFields.getCurrentField().setFieldChar(lastPos,(char)0x1C); screenFields.setCurrentFieldMDT(); gotoFieldNext(); updateDirty(); setCursorOn(); simulated = true; } else { displayError(ERR_DUP_KEY_NOT_ALLOWED); } } else { displayError(ERR_CURSOR_PROTECTED); } break; case NEW_LINE : if (screenFields.getSize() > 0) { int startRow = getRow(lastPos) + 1; int startPos = lastPos; boolean isthere = false; setCursorOff(); if (startRow == getRows()) startRow = 0; goto_XY(++startRow,1); if (!isInField() && screenFields.getCurrentField() != null && !screenFields.isCurrentFieldBypassField()) { while (!isInField() && screenFields.getCurrentField() != null && !screenFields.isCurrentFieldBypassField()) { // lets keep going advancePos(); // Have we looped the screen? if (lastPos == startPos) { // if so then go back to starting point goto_XY(startPos); break; } } } setCursorOn(); } simulated = true; break; case JUMP_NEXT_SESS : gui.nextSession(); simulated = true; break; case JUMP_PREV_SESS : gui.prevSession(); simulated = true; break; default : System.out.println(" Mnemonic not supported " + mnem); break; } return simulated; }
| 6,239
|
public int getNativeFD() { NIODatagramSocket socket = (NIODatagramSocket) ((DatagramChannelImpl) ch).socket(); return socket.getPlainDatagramSocketImpl().getNativeFD(); }
|
public int getNativeFD() { NIODatagramSocket socket = (NIODatagramSocket) ((DatagramChannelImpl) ch).socket(); return socket.getPlainDatagramSocketImpl().getNativeFD(); }
| 6,240
|
protected void setXMLAttributes (AttributeList attrs) { // set object attributes from an AttributeList if (attrs != null) { // whip thru the list, setting each value int size = attrs.getLength(); for (int i = 0; i < size; i++) { String name = attrs.getName(i); String value = attrs.getValue(i); if (name != null && value != null) ((XMLAttribute) this.attribHash.get(name)).setAttribValue(value); } } }
|
protected void setXMLAttributes (AttributeList attrs) { // set object attributes from an AttributeList if (attrs != null) { // whip thru the list, setting each value int size = attrs.getLength(); for (int i = 0; i < size; i++) { String name = attrs.getName(i); String value = attrs.getValue(i); if (name != null && value != null) ((XMLAttribute) this.attribHash.get(name)).setAttribValue(value); } } }
| 6,241
|
protected void installDefaults(JRootPane rp) { // Is this ok? rp.setBackground(UIManager.getColor("control")); }
|
protected void installDefaults(JRootPane rp) { // Is this ok? }
| 6,242
|
public void paintIcon(Component c, Graphics g, int x, int y) { x = x + 5; y = y + 5; if (collapsed) { // TODO: pick up appropriate UI colors g.setColor(Color.black); g.drawLine(x + 2, y, x + 5, y); g.drawLine(x + 6, y + 1, x + 7, y + 2); g.fillRect(x + 7, y + 3, 5, 2); g.drawLine(x + 7, y + 5, x + 6, y + 6); g.drawLine(x + 1, y + 1, x + 1, y + 1); g.drawLine(x, y + 2, x, y + 5); g.drawLine(x + 1, y + 6, x + 1, y + 6); g.drawLine(x + 2, y + 7, x + 5, y + 7); g.fillRect(x + 3, y + 3, 2, 2); g.setColor(new Color(204, 204, 255)); g.drawLine(x + 3, y + 2, x + 4, y + 2); g.drawLine(x + 2, y + 3, x + 2, y + 4); g.drawLine(x + 3, y + 5, x + 3, y + 5); g.drawLine(x + 5, y + 3, x + 5, y + 3); g.setColor(new Color(153, 153, 204)); g.drawLine(x + 2, y + 2, x + 2, y + 2); g.drawLine(x + 2, y + 5, x + 2, y + 5); g.drawLine(x + 2, y + 6, x + 5, y + 6); g.drawLine(x + 5, y + 2, x + 5, y + 2); g.drawLine(x + 6, y + 2, x + 6, y + 5); g.setColor(new Color(102, 102, 153)); g.drawLine(x + 2, y + 1, x + 5, y + 1); g.drawLine(x + 1, y + 2, x + 1, y + 5); } else { // TODO: pick up appropriate UI colors g.setColor(Color.black); g.drawLine(x + 2, y, x + 5, y); g.drawLine(x + 6, y + 1, x + 7, y + 2); g.drawLine(x + 7, y + 2, x + 7, y + 5); g.fillRect(x + 3, y + 7, 2, 5); g.drawLine(x + 7, y + 5, x + 6, y + 6); g.drawLine(x + 1, y + 1, x + 1, y + 1); g.drawLine(x, y + 2, x, y + 5); g.drawLine(x + 1, y + 6, x + 1, y + 6); g.drawLine(x + 2, y + 7, x + 5, y + 7); g.fillRect(x + 3, y + 3, 2, 2); g.setColor(new Color(204, 204, 255)); g.drawLine(x + 3, y + 2, x + 4, y + 2); g.drawLine(x + 2, y + 3, x + 2, y + 4); g.drawLine(x + 3, y + 5, x + 3, y + 5); g.drawLine(x + 5, y + 3, x + 5, y + 3); g.setColor(new Color(153, 153, 204)); g.drawLine(x + 2, y + 2, x + 2, y + 2); g.drawLine(x + 2, y + 5, x + 2, y + 5); g.drawLine(x + 2, y + 6, x + 5, y + 6); g.drawLine(x + 5, y + 2, x + 5, y + 2); g.drawLine(x + 6, y + 2, x + 6, y + 5); g.setColor(new Color(102, 102, 153)); g.drawLine(x + 2, y + 1, x + 5, y + 1); g.drawLine(x + 1, y + 2, x + 1, y + 5); } }
|
public void paintIcon(Component c, Graphics g, int x, int y) { x = x + 5; y = y + 5; if (collapsed) { // TODO: pick up appropriate UI colors g.setColor(Color.black); g.drawLine(x + 2, y, x + 5, y); g.drawLine(x + 6, y + 1, x + 7, y + 2); g.fillRect(x + 7, y + 3, 5, 2); g.drawLine(x + 7, y + 5, x + 6, y + 6); g.drawLine(x + 1, y + 1, x + 1, y + 1); g.drawLine(x, y + 2, x, y + 5); g.drawLine(x + 1, y + 6, x + 1, y + 6); g.drawLine(x + 2, y + 7, x + 5, y + 7); g.fillRect(x + 3, y + 3, 2, 2); g.setColor(new Color(204, 204, 255)); g.drawLine(x + 3, y + 2, x + 4, y + 2); g.drawLine(x + 2, y + 3, x + 2, y + 4); g.drawLine(x + 3, y + 5, x + 3, y + 5); g.drawLine(x + 5, y + 3, x + 5, y + 3); g.setColor(new Color(153, 153, 204)); g.drawLine(x + 2, y + 2, x + 2, y + 2); g.drawLine(x + 2, y + 5, x + 2, y + 5); g.drawLine(x + 2, y + 6, x + 5, y + 6); g.drawLine(x + 5, y + 2, x + 5, y + 2); g.drawLine(x + 6, y + 2, x + 6, y + 5); g.setColor(new Color(102, 102, 153)); g.drawLine(x + 2, y + 1, x + 5, y + 1); g.drawLine(x + 1, y + 2, x + 1, y + 5); } else { // TODO: pick up appropriate UI colors g.setColor(Color.black); g.drawLine(x + 2, y, x + 5, y); g.drawLine(x + 6, y + 1, x + 7, y + 2); g.drawLine(x + 7, y + 2, x + 7, y + 5); g.fillRect(x + 3, y + 7, 2, 5); g.drawLine(x + 7, y + 5, x + 6, y + 6); g.drawLine(x + 1, y + 1, x + 1, y + 1); g.drawLine(x, y + 2, x, y + 5); g.drawLine(x + 1, y + 6, x + 1, y + 6); g.drawLine(x + 2, y + 7, x + 5, y + 7); g.fillRect(x + 3, y + 3, 2, 2); g.setColor(new Color(204, 204, 255)); g.drawLine(x + 3, y + 2, x + 4, y + 2); g.drawLine(x + 2, y + 3, x + 2, y + 4); g.drawLine(x + 3, y + 5, x + 3, y + 5); g.drawLine(x + 5, y + 3, x + 5, y + 3); g.setColor(new Color(153, 153, 204)); g.drawLine(x + 2, y + 2, x + 2, y + 2); g.drawLine(x + 2, y + 5, x + 2, y + 5); g.drawLine(x + 2, y + 6, x + 5, y + 6); g.drawLine(x + 5, y + 2, x + 5, y + 2); g.drawLine(x + 6, y + 2, x + 6, y + 5); g.setColor(new Color(102, 102, 153)); g.drawLine(x + 2, y + 1, x + 5, y + 1); g.drawLine(x + 1, y + 2, x + 1, y + 5); } }
| 6,243
|
public void paintIcon(Component c, Graphics g, int x, int y) { x = x + 5; y = y + 5; if (collapsed) { // TODO: pick up appropriate UI colors g.setColor(Color.black); g.drawLine(x + 2, y, x + 5, y); g.drawLine(x + 6, y + 1, x + 7, y + 2); g.fillRect(x + 7, y + 3, 5, 2); g.drawLine(x + 7, y + 5, x + 6, y + 6); g.drawLine(x + 1, y + 1, x + 1, y + 1); g.drawLine(x, y + 2, x, y + 5); g.drawLine(x + 1, y + 6, x + 1, y + 6); g.drawLine(x + 2, y + 7, x + 5, y + 7); g.fillRect(x + 3, y + 3, 2, 2); g.setColor(new Color(204, 204, 255)); g.drawLine(x + 3, y + 2, x + 4, y + 2); g.drawLine(x + 2, y + 3, x + 2, y + 4); g.drawLine(x + 3, y + 5, x + 3, y + 5); g.drawLine(x + 5, y + 3, x + 5, y + 3); g.setColor(new Color(153, 153, 204)); g.drawLine(x + 2, y + 2, x + 2, y + 2); g.drawLine(x + 2, y + 5, x + 2, y + 5); g.drawLine(x + 2, y + 6, x + 5, y + 6); g.drawLine(x + 5, y + 2, x + 5, y + 2); g.drawLine(x + 6, y + 2, x + 6, y + 5); g.setColor(new Color(102, 102, 153)); g.drawLine(x + 2, y + 1, x + 5, y + 1); g.drawLine(x + 1, y + 2, x + 1, y + 5); } else { // TODO: pick up appropriate UI colors g.setColor(Color.black); g.drawLine(x + 2, y, x + 5, y); g.drawLine(x + 6, y + 1, x + 7, y + 2); g.drawLine(x + 7, y + 2, x + 7, y + 5); g.fillRect(x + 3, y + 7, 2, 5); g.drawLine(x + 7, y + 5, x + 6, y + 6); g.drawLine(x + 1, y + 1, x + 1, y + 1); g.drawLine(x, y + 2, x, y + 5); g.drawLine(x + 1, y + 6, x + 1, y + 6); g.drawLine(x + 2, y + 7, x + 5, y + 7); g.fillRect(x + 3, y + 3, 2, 2); g.setColor(new Color(204, 204, 255)); g.drawLine(x + 3, y + 2, x + 4, y + 2); g.drawLine(x + 2, y + 3, x + 2, y + 4); g.drawLine(x + 3, y + 5, x + 3, y + 5); g.drawLine(x + 5, y + 3, x + 5, y + 3); g.setColor(new Color(153, 153, 204)); g.drawLine(x + 2, y + 2, x + 2, y + 2); g.drawLine(x + 2, y + 5, x + 2, y + 5); g.drawLine(x + 2, y + 6, x + 5, y + 6); g.drawLine(x + 5, y + 2, x + 5, y + 2); g.drawLine(x + 6, y + 2, x + 6, y + 5); g.setColor(new Color(102, 102, 153)); g.drawLine(x + 2, y + 1, x + 5, y + 1); g.drawLine(x + 1, y + 2, x + 1, y + 5); } }
|
public void paintIcon(Component c, Graphics g, int x, int y) { x = x + 5; y = y + 5; if (collapsed) { // TODO: pick up appropriate UI colors g.setColor(Color.black); g.drawLine(x + 2, y, x + 5, y); g.drawLine(x + 6, y + 1, x + 7, y + 2); g.fillRect(x + 7, y + 3, 5, 2); g.drawLine(x + 7, y + 5, x + 6, y + 6); g.drawLine(x + 1, y + 1, x + 1, y + 1); g.drawLine(x, y + 2, x, y + 5); g.drawLine(x + 1, y + 6, x + 1, y + 6); g.drawLine(x + 2, y + 7, x + 5, y + 7); g.fillRect(x + 3, y + 3, 2, 2); g.setColor(new Color(204, 204, 255)); g.drawLine(x + 3, y + 2, x + 4, y + 2); g.drawLine(x + 2, y + 3, x + 2, y + 4); g.drawLine(x + 3, y + 5, x + 3, y + 5); g.drawLine(x + 5, y + 3, x + 5, y + 3); g.setColor(new Color(153, 153, 204)); g.drawLine(x + 2, y + 2, x + 2, y + 2); g.drawLine(x + 2, y + 5, x + 2, y + 5); g.drawLine(x + 2, y + 6, x + 5, y + 6); g.drawLine(x + 5, y + 2, x + 5, y + 2); g.drawLine(x + 6, y + 2, x + 6, y + 5); g.setColor(new Color(102, 102, 153)); g.drawLine(x + 2, y + 1, x + 5, y + 1); g.drawLine(x + 1, y + 2, x + 1, y + 5); } else { // TODO: pick up appropriate UI colors g.setColor(Color.black); g.drawLine(x + 2, y, x + 5, y); g.drawLine(x + 6, y + 1, x + 7, y + 2); g.drawLine(x + 7, y + 2, x + 7, y + 5); g.fillRect(x + 3, y + 7, 2, 5); g.drawLine(x + 7, y + 5, x + 6, y + 6); g.drawLine(x + 1, y + 1, x + 1, y + 1); g.drawLine(x, y + 2, x, y + 5); g.drawLine(x + 1, y + 6, x + 1, y + 6); g.drawLine(x + 2, y + 7, x + 5, y + 7); g.fillRect(x + 3, y + 3, 2, 2); g.setColor(new Color(204, 204, 255)); g.drawLine(x + 3, y + 2, x + 4, y + 2); g.drawLine(x + 2, y + 3, x + 2, y + 4); g.drawLine(x + 3, y + 5, x + 3, y + 5); g.drawLine(x + 5, y + 3, x + 5, y + 3); g.setColor(new Color(153, 153, 204)); g.drawLine(x + 2, y + 2, x + 2, y + 2); g.drawLine(x + 2, y + 5, x + 2, y + 5); g.drawLine(x + 2, y + 6, x + 5, y + 6); g.drawLine(x + 5, y + 2, x + 5, y + 2); g.drawLine(x + 6, y + 2, x + 6, y + 5); g.setColor(new Color(102, 102, 153)); g.drawLine(x + 2, y + 1, x + 5, y + 1); g.drawLine(x + 1, y + 2, x + 1, y + 5); } }
| 6,244
|
public void paintIcon(Component c, Graphics g, int x, int y) { x = x + 5; y = y + 5; if (collapsed) { // TODO: pick up appropriate UI colors g.setColor(Color.black); g.drawLine(x + 2, y, x + 5, y); g.drawLine(x + 6, y + 1, x + 7, y + 2); g.fillRect(x + 7, y + 3, 5, 2); g.drawLine(x + 7, y + 5, x + 6, y + 6); g.drawLine(x + 1, y + 1, x + 1, y + 1); g.drawLine(x, y + 2, x, y + 5); g.drawLine(x + 1, y + 6, x + 1, y + 6); g.drawLine(x + 2, y + 7, x + 5, y + 7); g.fillRect(x + 3, y + 3, 2, 2); g.setColor(new Color(204, 204, 255)); g.drawLine(x + 3, y + 2, x + 4, y + 2); g.drawLine(x + 2, y + 3, x + 2, y + 4); g.drawLine(x + 3, y + 5, x + 3, y + 5); g.drawLine(x + 5, y + 3, x + 5, y + 3); g.setColor(new Color(153, 153, 204)); g.drawLine(x + 2, y + 2, x + 2, y + 2); g.drawLine(x + 2, y + 5, x + 2, y + 5); g.drawLine(x + 2, y + 6, x + 5, y + 6); g.drawLine(x + 5, y + 2, x + 5, y + 2); g.drawLine(x + 6, y + 2, x + 6, y + 5); g.setColor(new Color(102, 102, 153)); g.drawLine(x + 2, y + 1, x + 5, y + 1); g.drawLine(x + 1, y + 2, x + 1, y + 5); } else { // TODO: pick up appropriate UI colors g.setColor(Color.black); g.drawLine(x + 2, y, x + 5, y); g.drawLine(x + 6, y + 1, x + 7, y + 2); g.drawLine(x + 7, y + 2, x + 7, y + 5); g.fillRect(x + 3, y + 7, 2, 5); g.drawLine(x + 7, y + 5, x + 6, y + 6); g.drawLine(x + 1, y + 1, x + 1, y + 1); g.drawLine(x, y + 2, x, y + 5); g.drawLine(x + 1, y + 6, x + 1, y + 6); g.drawLine(x + 2, y + 7, x + 5, y + 7); g.fillRect(x + 3, y + 3, 2, 2); g.setColor(new Color(204, 204, 255)); g.drawLine(x + 3, y + 2, x + 4, y + 2); g.drawLine(x + 2, y + 3, x + 2, y + 4); g.drawLine(x + 3, y + 5, x + 3, y + 5); g.drawLine(x + 5, y + 3, x + 5, y + 3); g.setColor(new Color(153, 153, 204)); g.drawLine(x + 2, y + 2, x + 2, y + 2); g.drawLine(x + 2, y + 5, x + 2, y + 5); g.drawLine(x + 2, y + 6, x + 5, y + 6); g.drawLine(x + 5, y + 2, x + 5, y + 2); g.drawLine(x + 6, y + 2, x + 6, y + 5); g.setColor(new Color(102, 102, 153)); g.drawLine(x + 2, y + 1, x + 5, y + 1); g.drawLine(x + 1, y + 2, x + 1, y + 5); } }
|
public void paintIcon(Component c, Graphics g, int x, int y) { x = x + 5; y = y + 5; if (collapsed) { // TODO: pick up appropriate UI colors g.setColor(Color.black); g.drawLine(x + 2, y, x + 5, y); g.drawLine(x + 6, y + 1, x + 7, y + 2); g.fillRect(x + 7, y + 3, 5, 2); g.drawLine(x + 7, y + 5, x + 6, y + 6); g.drawLine(x + 1, y + 1, x + 1, y + 1); g.drawLine(x, y + 2, x, y + 5); g.drawLine(x + 1, y + 6, x + 1, y + 6); g.drawLine(x + 2, y + 7, x + 5, y + 7); g.fillRect(x + 3, y + 3, 2, 2); g.setColor(new Color(204, 204, 255)); g.drawLine(x + 3, y + 2, x + 4, y + 2); g.drawLine(x + 2, y + 3, x + 2, y + 4); g.drawLine(x + 3, y + 5, x + 3, y + 5); g.drawLine(x + 5, y + 3, x + 5, y + 3); g.setColor(new Color(153, 153, 204)); g.drawLine(x + 2, y + 2, x + 2, y + 2); g.drawLine(x + 2, y + 5, x + 2, y + 5); g.drawLine(x + 2, y + 6, x + 5, y + 6); g.drawLine(x + 5, y + 2, x + 5, y + 2); g.drawLine(x + 6, y + 2, x + 6, y + 5); g.setColor(new Color(102, 102, 153)); g.drawLine(x + 2, y + 1, x + 5, y + 1); g.drawLine(x + 1, y + 2, x + 1, y + 5); } else { // TODO: pick up appropriate UI colors g.setColor(Color.black); g.drawLine(x + 2, y, x + 5, y); g.drawLine(x + 6, y + 1, x + 7, y + 2); g.drawLine(x + 7, y + 2, x + 7, y + 5); g.fillRect(x + 3, y + 7, 2, 5); g.drawLine(x + 7, y + 5, x + 6, y + 6); g.drawLine(x + 1, y + 1, x + 1, y + 1); g.drawLine(x, y + 2, x, y + 5); g.drawLine(x + 1, y + 6, x + 1, y + 6); g.drawLine(x + 2, y + 7, x + 5, y + 7); g.fillRect(x + 3, y + 3, 2, 2); g.setColor(new Color(204, 204, 255)); g.drawLine(x + 3, y + 2, x + 4, y + 2); g.drawLine(x + 2, y + 3, x + 2, y + 4); g.drawLine(x + 3, y + 5, x + 3, y + 5); g.drawLine(x + 5, y + 3, x + 5, y + 3); g.setColor(new Color(153, 153, 204)); g.drawLine(x + 2, y + 2, x + 2, y + 2); g.drawLine(x + 2, y + 5, x + 2, y + 5); g.drawLine(x + 2, y + 6, x + 5, y + 6); g.drawLine(x + 5, y + 2, x + 5, y + 2); g.drawLine(x + 6, y + 2, x + 6, y + 5); g.setColor(new Color(102, 102, 153)); g.drawLine(x + 2, y + 1, x + 5, y + 1); g.drawLine(x + 1, y + 2, x + 1, y + 5); } }
| 6,245
|
public void paintIcon(Component c, Graphics g, int x, int y) { x = x + 5; y = y + 5; if (collapsed) { // TODO: pick up appropriate UI colors g.setColor(Color.black); g.drawLine(x + 2, y, x + 5, y); g.drawLine(x + 6, y + 1, x + 7, y + 2); g.fillRect(x + 7, y + 3, 5, 2); g.drawLine(x + 7, y + 5, x + 6, y + 6); g.drawLine(x + 1, y + 1, x + 1, y + 1); g.drawLine(x, y + 2, x, y + 5); g.drawLine(x + 1, y + 6, x + 1, y + 6); g.drawLine(x + 2, y + 7, x + 5, y + 7); g.fillRect(x + 3, y + 3, 2, 2); g.setColor(new Color(204, 204, 255)); g.drawLine(x + 3, y + 2, x + 4, y + 2); g.drawLine(x + 2, y + 3, x + 2, y + 4); g.drawLine(x + 3, y + 5, x + 3, y + 5); g.drawLine(x + 5, y + 3, x + 5, y + 3); g.setColor(new Color(153, 153, 204)); g.drawLine(x + 2, y + 2, x + 2, y + 2); g.drawLine(x + 2, y + 5, x + 2, y + 5); g.drawLine(x + 2, y + 6, x + 5, y + 6); g.drawLine(x + 5, y + 2, x + 5, y + 2); g.drawLine(x + 6, y + 2, x + 6, y + 5); g.setColor(new Color(102, 102, 153)); g.drawLine(x + 2, y + 1, x + 5, y + 1); g.drawLine(x + 1, y + 2, x + 1, y + 5); } else { // TODO: pick up appropriate UI colors g.setColor(Color.black); g.drawLine(x + 2, y, x + 5, y); g.drawLine(x + 6, y + 1, x + 7, y + 2); g.drawLine(x + 7, y + 2, x + 7, y + 5); g.fillRect(x + 3, y + 7, 2, 5); g.drawLine(x + 7, y + 5, x + 6, y + 6); g.drawLine(x + 1, y + 1, x + 1, y + 1); g.drawLine(x, y + 2, x, y + 5); g.drawLine(x + 1, y + 6, x + 1, y + 6); g.drawLine(x + 2, y + 7, x + 5, y + 7); g.fillRect(x + 3, y + 3, 2, 2); g.setColor(new Color(204, 204, 255)); g.drawLine(x + 3, y + 2, x + 4, y + 2); g.drawLine(x + 2, y + 3, x + 2, y + 4); g.drawLine(x + 3, y + 5, x + 3, y + 5); g.drawLine(x + 5, y + 3, x + 5, y + 3); g.setColor(new Color(153, 153, 204)); g.drawLine(x + 2, y + 2, x + 2, y + 2); g.drawLine(x + 2, y + 5, x + 2, y + 5); g.drawLine(x + 2, y + 6, x + 5, y + 6); g.drawLine(x + 5, y + 2, x + 5, y + 2); g.drawLine(x + 6, y + 2, x + 6, y + 5); g.setColor(new Color(102, 102, 153)); g.drawLine(x + 2, y + 1, x + 5, y + 1); g.drawLine(x + 1, y + 2, x + 1, y + 5); } }
|
public void paintIcon(Component c, Graphics g, int x, int y) { x = x + 5; y = y + 5; if (collapsed) { // TODO: pick up appropriate UI colors g.setColor(Color.black); g.drawLine(x + 2, y, x + 5, y); g.drawLine(x + 6, y + 1, x + 7, y + 2); g.fillRect(x + 7, y + 3, 5, 2); g.drawLine(x + 7, y + 5, x + 6, y + 6); g.drawLine(x + 1, y + 1, x + 1, y + 1); g.drawLine(x, y + 2, x, y + 5); g.drawLine(x + 1, y + 6, x + 1, y + 6); g.drawLine(x + 2, y + 7, x + 5, y + 7); g.fillRect(x + 3, y + 3, 2, 2); g.setColor(new Color(204, 204, 255)); g.drawLine(x + 3, y + 2, x + 4, y + 2); g.drawLine(x + 2, y + 3, x + 2, y + 4); g.drawLine(x + 3, y + 5, x + 3, y + 5); g.drawLine(x + 5, y + 3, x + 5, y + 3); g.setColor(new Color(153, 153, 204)); g.drawLine(x + 2, y + 2, x + 2, y + 2); g.drawLine(x + 2, y + 5, x + 2, y + 5); g.drawLine(x + 2, y + 6, x + 5, y + 6); g.drawLine(x + 5, y + 2, x + 5, y + 2); g.drawLine(x + 6, y + 2, x + 6, y + 5); g.setColor(new Color(102, 102, 153)); g.drawLine(x + 2, y + 1, x + 5, y + 1); g.drawLine(x + 1, y + 2, x + 1, y + 5); } else { // TODO: pick up appropriate UI colors g.setColor(Color.black); g.drawLine(x + 2, y, x + 5, y); g.drawLine(x + 6, y + 1, x + 7, y + 2); g.drawLine(x + 7, y + 2, x + 7, y + 5); g.fillRect(x + 3, y + 7, 2, 5); g.drawLine(x + 7, y + 5, x + 6, y + 6); g.drawLine(x + 1, y + 1, x + 1, y + 1); g.drawLine(x, y + 2, x, y + 5); g.drawLine(x + 1, y + 6, x + 1, y + 6); g.drawLine(x + 2, y + 7, x + 5, y + 7); g.fillRect(x + 3, y + 3, 2, 2); g.setColor(new Color(204, 204, 255)); g.drawLine(x + 3, y + 2, x + 4, y + 2); g.drawLine(x + 2, y + 3, x + 2, y + 4); g.drawLine(x + 3, y + 5, x + 3, y + 5); g.drawLine(x + 5, y + 3, x + 5, y + 3); g.setColor(new Color(153, 153, 204)); g.drawLine(x + 2, y + 2, x + 2, y + 2); g.drawLine(x + 2, y + 5, x + 2, y + 5); g.drawLine(x + 2, y + 6, x + 5, y + 6); g.drawLine(x + 5, y + 2, x + 5, y + 2); g.drawLine(x + 6, y + 2, x + 6, y + 5); g.setColor(new Color(102, 102, 153)); g.drawLine(x + 2, y + 1, x + 5, y + 1); g.drawLine(x + 1, y + 2, x + 1, y + 5); } }
| 6,246
|
public static Icon getHorizontalSliderThumbIcon() { return new HorizontalSliderThumbIcon(); }
|
public static Icon getHorizontalSliderThumbIcon() { if (horizontalSliderThumbIcon == null) horizontalSliderThumbIcon = new HorizontalSliderThumbIcon(); return horizontalSliderThumbIcon; }
| 6,247
|
public static Icon getVerticalSliderThumbIcon() { return new VerticalSliderThumbIcon(); }
|
public static Icon getVerticalSliderThumbIcon() { if (verticalSliderThumbIcon == null) verticalSliderThumbIcon = new VerticalSliderThumbIcon(); return verticalSliderThumbIcon; }
| 6,248
|
public void writePrivateKey(PrivateKey k) throws KeyAgreementException { IKeyPairCodec kpc = KeyPairCodecFactory.getInstance(k); if (kpc == null) { throw new KeyAgreementException(""); } byte[] b = kpc.encodePrivateKey(k); int length = b.length; if (length > Registry.SASL_FOUR_BYTE_MAX_LIMIT) { throw new KeyAgreementException("encoded private key is too long"); } byte[] lengthBytes = { (byte) (length >>> 24), (byte) (length >>> 16), (byte) (length >>> 8), (byte) length }; out.write(lengthBytes, 0, 4); out.write(b, 0, b.length); }
|
public void writePrivateKey(PrivateKey k) throws KeyAgreementException { IKeyPairCodec kpc = KeyPairCodecFactory.getInstance(k); if (kpc == null) { throw new KeyAgreementException(""); } byte[] b = kpc.encodePrivateKey(k); int length = b.length; if (length > Registry.SASL_FOUR_BYTE_MAX_LIMIT) { throw new KeyAgreementException("encoded private key is too long"); } byte[] lengthBytes = { (byte) (length >>> 24), (byte) (length >>> 16), (byte) (length >>> 8), (byte) length }; out.write(lengthBytes, 0, 4); out.write(b, 0, b.length); }
| 6,249
|
public void writePublicKey(PublicKey k) throws KeyAgreementException { IKeyPairCodec kpc = KeyPairCodecFactory.getInstance(k); if (kpc == null) { throw new KeyAgreementException(""); } byte[] b = kpc.encodePublicKey(k); int length = b.length; if (length > Registry.SASL_FOUR_BYTE_MAX_LIMIT) { throw new KeyAgreementException("encoded public key is too long"); } byte[] lengthBytes = { (byte) (length >>> 24), (byte) (length >>> 16), (byte) (length >>> 8), (byte) length }; out.write(lengthBytes, 0, 4); out.write(b, 0, b.length); }
|
public void writePublicKey(PublicKey k) throws KeyAgreementException { IKeyPairCodec kpc = KeyPairCodecFactory.getInstance(k); if (kpc == null) { throw new KeyAgreementException(""); } byte[] b = kpc.encodePublicKey(k); int length = b.length; if (length > Registry.SASL_FOUR_BYTE_MAX_LIMIT) { throw new KeyAgreementException("encoded public key is too long"); } byte[] lengthBytes = { (byte) (length >>> 24), (byte) (length >>> 16), (byte) (length >>> 8), (byte) length }; out.write(lengthBytes, 0, 4); out.write(b, 0, b.length); }
| 6,250
|
public void paint(Graphics g, Shape s) { // Ensure metrics are up-to-date. updateMetrics(); JTextComponent textComponent = (JTextComponent) getContainer(); g.setFont(textComponent.getFont()); selectedColor = textComponent.getSelectedTextColor(); unselectedColor = textComponent.getForeground(); disabledColor = textComponent.getDisabledTextColor(); // FIXME: this is a hack, for some reason textComponent.getSelectedColor // was returning black, which is not visible against a black background selectedColor = Color.WHITE; Rectangle rect = s.getBounds(); int lineHeight = metrics.getHeight(); int end = getEndOffset(); int currStart = getStartOffset(); int currEnd; while (currStart < end) { currEnd = calculateBreakPosition(currStart, end); drawLine(currStart, currEnd, g, rect.x, rect.y); rect.y += lineHeight; if (currEnd == currStart) currStart ++; else currStart = currEnd; } }
|
public void paint(Graphics g, Shape s) { // Ensure metrics are up-to-date. updateMetrics(); JTextComponent textComponent = (JTextComponent) getContainer(); g.setFont(textComponent.getFont()); selectedColor = textComponent.getSelectedTextColor(); unselectedColor = textComponent.getForeground(); disabledColor = textComponent.getDisabledTextColor(); // FIXME: this is a hack, for some reason textComponent.getSelectedColor // was returning black, which is not visible against a black background selectedColor = Color.WHITE; Rectangle rect = s.getBounds(); int lineHeight = metrics.getHeight(); int end = getEndOffset(); int currStart = getStartOffset(); int currEnd; while (currStart < end) { currEnd = calculateBreakPosition(currStart, end); drawLine(currStart, currEnd, g, rect.x, rect.y + metrics.getAscent()); rect.y += lineHeight; if (currEnd == currStart) currStart ++; else currStart = currEnd; } }
| 6,251
|
private void fillQueryTextArea() { queryTextArea.append(queryBuilder.getQuery()); this.hide(); this.dispose(); }
|
private void fillQueryTextArea() { queryTextArea.append(queryBuilder.getQuery()); this.setVisible(false); this.dispose(); }
| 6,252
|
protected StyleSheet getStyleSheet() { // FIXME: Not implemented properly. return new StyleSheet(); }
|
protected StyleSheet getStyleSheet() { // FIXME: Not implemented properly. StyleSheet styleSheet = new StyleSheet(); styleSheet.importStyleSheet(getClass().getResource(HTMLEditorKit.DEFAULT_CSS)); return styleSheet; }
| 6,253
|
public void installUI(JComponent c) { if (c instanceof JTerminal) { this.terminal = (JTerminal)c; boolean graphicsDebugMode = false; if (graphicsDebugMode) { javax.swing.RepaintManager repaintManager = javax.swing.RepaintManager.currentManager(terminal); repaintManager.setDoubleBufferingEnabled(false); terminal.setDebugGraphicsOptions(javax.swing.DebugGraphics.FLASH_OPTION); } this.session = terminal.getSession(); session.setRunningHeadless(true); installComponents(); installListeners(); installDefaults(); installKeyboardActions(); } else throw new Error("TerminalUI needs JTerminal"); }
|
public void installUI(JComponent c) { if (c instanceof JTerminal) { this.terminal = (JTerminal)c; if (graphicsDebugMode) { javax.swing.RepaintManager repaintManager = javax.swing.RepaintManager.currentManager(terminal); repaintManager.setDoubleBufferingEnabled(false); terminal.setDebugGraphicsOptions(javax.swing.DebugGraphics.FLASH_OPTION); } this.session = terminal.getSession(); session.setRunningHeadless(true); installComponents(); installListeners(); installDefaults(); installKeyboardActions(); } else throw new Error("TerminalUI needs JTerminal"); }
| 6,254
|
private void nestedToXDF(OutputStream outputstream, String indent, int which, int stop) { String delimiter = getDelimiter(); String repeatable = getRepeatable(); String recordTerminator = getRecordTerminator(); if (which > stop) { if (Specification.getInstance().isPrettyXDFOutput()) { writeOut(outputstream, Constants.NEW_LINE); writeOut(outputstream, indent); } writeOut(outputstream, "<" + classXDFNodeName); if (delimiter !=null) writeOut(outputstream, " delimiter =\"" + delimiter + "\""); writeOut(outputstream, " repeatable=\"" + repeatable + "\""); if (recordTerminator !=null) writeOut(outputstream, " recordTerminator=\"" + recordTerminator + "\"/>"); } else { if (Specification.getInstance().isPrettyXDFOutput()) { writeOut(outputstream, Constants.NEW_LINE); writeOut(outputstream, indent); } writeOut(outputstream, "<" + UntaggedInstructionNodeName + " axisIdRef=\""); writeOut(outputstream, ((AxisInterface) parentArray.getAxisList().get(which)).getAxisId() + "\">"); which++; nestedToXDF(outputstream, indent + Specification.getInstance().getPrettyXDFOutputIndentation(), which, stop); if (Specification.getInstance().isPrettyXDFOutput()) { writeOut(outputstream, Constants.NEW_LINE); writeOut(outputstream, indent); } writeOut(outputstream, "</" + UntaggedInstructionNodeName + ">"); } }
|
private void nestedToXDF(OutputStream outputstream, String indent, int which, int stop) { String delimiter = getDelimiter(); String repeatable = getRepeatable(); String recordTerminator = getRecordTerminator(); if (which > stop) { if (Specification.getInstance().isPrettyXDFOutput()) { writeOut(outputstream, Constants.NEW_LINE); writeOut(outputstream, indent); } writeOut(outputstream, "<" + classXDFNodeName); if (delimiter !=null) writeOut(outputstream, " delimiter =\"" + delimiter + "\""); writeOut(outputstream, " repeatable=\"" + repeatable + "\""); if (recordTerminator !=null) writeOut(outputstream, " recordTerminator=\"" + recordTerminator + "\"/>"); } else { if (Specification.getInstance().isPrettyXDFOutput()) { writeOut(outputstream, Constants.NEW_LINE); writeOut(outputstream, indent); } writeOut(outputstream, "<" + UntaggedInstructionNodeName + " axisIdRef=\""); writeOut(outputstream, ((AxisInterface) parentArray.getAxisList().get(which)).getAxisId() + "\">"); which++; nestedToXDF(outputstream, indent + Specification.getInstance().getPrettyXDFOutputIndentation(), which, stop); if (Specification.getInstance().isPrettyXDFOutput()) { writeOut(outputstream, Constants.NEW_LINE); writeOut(outputstream, indent); } writeOut(outputstream, "</" + UntaggedInstructionNodeName + ">"); } }
| 6,255
|
protected void repaintScreen() { //drawing = true;// dirty.setBounds(tArea.getBounds()); dirtyScreen.setBounds(0,lenScreen - 1,0,0);// if (gui.getGraphics() != null) { // do not forget to null out gg2d before update or else there will // be a very hard to trace screen resize problem // controllersG2D = null;// updateDirty();// } fireScreenChanged(1); // restore statuses that were on the screen before resize if (oia.getLevel() == ScreenOIA.OIA_LEVEL_INPUT_ERROR) { oia.setInputInhibited(ScreenOIA.INPUTINHIBITED_SYSTEM_WAIT, ScreenOIA.OIA_LEVEL_INPUT_ERROR); } if (oia.getLevel() == ScreenOIA.OIA_LEVEL_INPUT_INHIBITED) { oia.setInputInhibited(ScreenOIA.INPUTINHIBITED_SYSTEM_WAIT, ScreenOIA.OIA_LEVEL_INPUT_INHIBITED); } if (oia.isMessageWait()) oia.setMessageLightOn(); }
|
protected void repaintScreen() { //drawing = true;// dirty.setBounds(tArea.getBounds()); dirtyScreen.setBounds(0,lenScreen - 1,0,0);// if (gui.getGraphics() != null) { // do not forget to null out gg2d before update or else there will // be a very hard to trace screen resize problem // controllersG2D = null;// updateDirty();// } updateDirty(); // restore statuses that were on the screen before resize if (oia.getLevel() == ScreenOIA.OIA_LEVEL_INPUT_ERROR) { oia.setInputInhibited(ScreenOIA.INPUTINHIBITED_SYSTEM_WAIT, ScreenOIA.OIA_LEVEL_INPUT_ERROR); } if (oia.getLevel() == ScreenOIA.OIA_LEVEL_INPUT_INHIBITED) { oia.setInputInhibited(ScreenOIA.INPUTINHIBITED_SYSTEM_WAIT, ScreenOIA.OIA_LEVEL_INPUT_INHIBITED); } if (oia.isMessageWait()) oia.setMessageLightOn(); }
| 6,256
|
public void toXDFOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String indent ) { String myIndent; boolean niceOutput = super.sPrettyXDFOutput; if (indent !=null) { myIndent = indent; } else myIndent = ""; String moreIndent = super.sPrettyXDFOutputIndentation; //open the read block if (niceOutput) writeOut(outputstream, myIndent); writeOut(outputstream, "<"+classXDFNodeName + ">"); if (niceOutput) writeOut(outputstream, Constants.NEW_LINE); String nextIndent = myIndent + moreIndent; List indents = new ArrayList(); List axisList = getParentArray().getAxisList(); String axisId; for (int i = 0; i< axisList.size(); i++) { axisId = ((AxisInterface)axisList.get(i)).getAxisId(); indents.add(nextIndent); if (niceOutput) writeOut(outputstream, nextIndent); writeOut(outputstream,"<"+UntaggedInstructionNodeName + "axisIdRef = \"" + axisId + "\">"); if (niceOutput) writeOut(outputstream, Constants.NEW_LINE); nextIndent += moreIndent; } //now dump ourselves here using the trusty generic method super.toXDFOutputStream(outputstream, null, nextIndent); //close the instruction for (int i = indents.size()-1; i>=0; i++) { if (niceOutput) writeOut(outputstream, (String) indents.get(i)); writeOut(outputstream, "</" + UntaggedInstructionNodeName + ">"); if (niceOutput) writeOut(outputstream, Constants.NEW_LINE); } //close the read block if (niceOutput) writeOut(outputstream, myIndent); writeOut(outputstream, "<//"+classXDFNodeName + ">"); if (niceOutput) writeOut(outputstream, Constants.NEW_LINE); }
|
public void toXDFOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String indent ) { String myIndent; boolean niceOutput = super.sPrettyXDFOutput; if (indent !=null) { myIndent = indent; } else myIndent = ""; String moreIndent = super.sPrettyXDFOutputIndentation; //open the read block if (niceOutput) writeOut(outputstream, myIndent); writeOut(outputstream, "<"+classXDFNodeName + ">"); if (niceOutput) writeOut(outputstream, Constants.NEW_LINE); String nextIndent = myIndent + moreIndent; List indents = new ArrayList(); List axisList = getParentArray().getAxisList(); String axisId; for (int i = 0; i< axisList.size(); i++) { axisId = ((AxisInterface)axisList.get(i)).getAxisId(); indents.add(nextIndent); if (niceOutput) writeOut(outputstream, nextIndent); writeOut(outputstream,"<"+UntaggedInstructionNodeName + "axisIdRef = \"" + axisId + "\">"); if (niceOutput) writeOut(outputstream, Constants.NEW_LINE); nextIndent += moreIndent; } //now dump ourselves here using the trusty generic method super.toXDFOutputStream(outputstream, null, nextIndent); //close the instruction for (int i = indents.size()-1; i>=0; i++) { if (niceOutput) writeOut(outputstream, (String) indents.get(i)); writeOut(outputstream, "</" + UntaggedInstructionNodeName + ">"); if (niceOutput) writeOut(outputstream, Constants.NEW_LINE); } //close the read block if (niceOutput) writeOut(outputstream, myIndent); writeOut(outputstream, "<//"+classXDFNodeName + ">"); if (niceOutput) writeOut(outputstream, Constants.NEW_LINE); }
| 6,258
|
public void toXDFOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String indent ) { String myIndent; boolean niceOutput = super.sPrettyXDFOutput; if (indent !=null) { myIndent = indent; } else myIndent = ""; String moreIndent = super.sPrettyXDFOutputIndentation; //open the read block if (niceOutput) writeOut(outputstream, myIndent); writeOut(outputstream, "<"+classXDFNodeName + ">"); if (niceOutput) writeOut(outputstream, Constants.NEW_LINE); String nextIndent = myIndent + moreIndent; List indents = new ArrayList(); List axisList = getParentArray().getAxisList(); String axisId; for (int i = 0; i< axisList.size(); i++) { axisId = ((AxisInterface)axisList.get(i)).getAxisId(); indents.add(nextIndent); if (niceOutput) writeOut(outputstream, nextIndent); writeOut(outputstream,"<"+UntaggedInstructionNodeName + "axisIdRef = \"" + axisId + "\">"); if (niceOutput) writeOut(outputstream, Constants.NEW_LINE); nextIndent += moreIndent; } //now dump ourselves here using the trusty generic method super.toXDFOutputStream(outputstream, null, nextIndent); //close the instruction for (int i = indents.size()-1; i>=0; i++) { if (niceOutput) writeOut(outputstream, (String) indents.get(i)); writeOut(outputstream, "</" + UntaggedInstructionNodeName + ">"); if (niceOutput) writeOut(outputstream, Constants.NEW_LINE); } //close the read block if (niceOutput) writeOut(outputstream, myIndent); writeOut(outputstream, "<//"+classXDFNodeName + ">"); if (niceOutput) writeOut(outputstream, Constants.NEW_LINE); }
|
public void toXDFOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String indent ) { String myIndent; boolean niceOutput = super.sPrettyXDFOutput; if (indent !=null) { myIndent = indent; else myIndent = ""; String moreIndent = super.sPrettyXDFOutputIndentation; //open the read block if (niceOutput) writeOut(outputstream, myIndent); writeOut(outputstream, "<"+classXDFNodeName + ">"); if (niceOutput) writeOut(outputstream, Constants.NEW_LINE); String nextIndent = myIndent + moreIndent; List indents = new ArrayList(); List axisList = getParentArray().getAxisList(); String axisId; for (int i = 0; i< axisList.size(); i++) { axisId = ((AxisInterface)axisList.get(i)).getAxisId(); indents.add(nextIndent); if (niceOutput) writeOut(outputstream, nextIndent); writeOut(outputstream,"<"+UntaggedInstructionNodeName + "axisIdRef = \"" + axisId + "\">"); if (niceOutput) writeOut(outputstream, Constants.NEW_LINE); nextIndent += moreIndent; //now dump ourselves here using the trusty generic method super.toXDFOutputStream(outputstream, null, nextIndent); //close the instruction for (int i = indents.size()-1; i>=0; i++) { if (niceOutput) writeOut(outputstream, (String) indents.get(i)); writeOut(outputstream, "</" + UntaggedInstructionNodeName + ">"); if (niceOutput) writeOut(outputstream, Constants.NEW_LINE); //close the read block if (niceOutput) writeOut(outputstream, myIndent); writeOut(outputstream, "<//"+classXDFNodeName + ">"); if (niceOutput) writeOut(outputstream, Constants.NEW_LINE);
| 6,259
|
public void toXDFOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String indent ) { String myIndent; boolean niceOutput = super.sPrettyXDFOutput; if (indent !=null) { myIndent = indent; } else myIndent = ""; String moreIndent = super.sPrettyXDFOutputIndentation; //open the read block if (niceOutput) writeOut(outputstream, myIndent); writeOut(outputstream, "<"+classXDFNodeName + ">"); if (niceOutput) writeOut(outputstream, Constants.NEW_LINE); String nextIndent = myIndent + moreIndent; List indents = new ArrayList(); List axisList = getParentArray().getAxisList(); String axisId; for (int i = 0; i< axisList.size(); i++) { axisId = ((AxisInterface)axisList.get(i)).getAxisId(); indents.add(nextIndent); if (niceOutput) writeOut(outputstream, nextIndent); writeOut(outputstream,"<"+UntaggedInstructionNodeName + "axisIdRef = \"" + axisId + "\">"); if (niceOutput) writeOut(outputstream, Constants.NEW_LINE); nextIndent += moreIndent; } //now dump ourselves here using the trusty generic method super.toXDFOutputStream(outputstream, null, nextIndent); //close the instruction for (int i = indents.size()-1; i>=0; i++) { if (niceOutput) writeOut(outputstream, (String) indents.get(i)); writeOut(outputstream, "</" + UntaggedInstructionNodeName + ">"); if (niceOutput) writeOut(outputstream, Constants.NEW_LINE); } //close the read block if (niceOutput) writeOut(outputstream, myIndent); writeOut(outputstream, "<//"+classXDFNodeName + ">"); if (niceOutput) writeOut(outputstream, Constants.NEW_LINE); }
|
public void toXDFOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String indent ) { String myIndent; boolean niceOutput = super.sPrettyXDFOutput; if (indent !=null) { myIndent = indent; } else myIndent = ""; //open the read block if (niceOutput) writeOut(outputstream, myIndent); writeOut(outputstream, "<"+classXDFNodeName + ">"); if (niceOutput) writeOut(outputstream, Constants.NEW_LINE); String nextIndent = myIndent + moreIndent; List indents = new ArrayList(); List axisList = getParentArray().getAxisList(); String axisId; for (int i = 0; i< axisList.size(); i++) { axisId = ((AxisInterface)axisList.get(i)).getAxisId(); indents.add(nextIndent); if (niceOutput) writeOut(outputstream, nextIndent); writeOut(outputstream,"<"+UntaggedInstructionNodeName + "axisIdRef = \"" + axisId + "\">"); if (niceOutput) writeOut(outputstream, Constants.NEW_LINE); nextIndent += moreIndent; } //now dump ourselves here using the trusty generic method super.toXDFOutputStream(outputstream, null, nextIndent); //close the instruction for (int i = indents.size()-1; i>=0; i++) { if (niceOutput) writeOut(outputstream, (String) indents.get(i)); writeOut(outputstream, "</" + UntaggedInstructionNodeName + ">"); if (niceOutput) writeOut(outputstream, Constants.NEW_LINE); } //close the read block if (niceOutput) writeOut(outputstream, myIndent); writeOut(outputstream, "<//"+classXDFNodeName + ">"); if (niceOutput) writeOut(outputstream, Constants.NEW_LINE); }
| 6,260
|
public void toXDFOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String indent ) { String myIndent; boolean niceOutput = super.sPrettyXDFOutput; if (indent !=null) { myIndent = indent; } else myIndent = ""; String moreIndent = super.sPrettyXDFOutputIndentation; //open the read block if (niceOutput) writeOut(outputstream, myIndent); writeOut(outputstream, "<"+classXDFNodeName + ">"); if (niceOutput) writeOut(outputstream, Constants.NEW_LINE); String nextIndent = myIndent + moreIndent; List indents = new ArrayList(); List axisList = getParentArray().getAxisList(); String axisId; for (int i = 0; i< axisList.size(); i++) { axisId = ((AxisInterface)axisList.get(i)).getAxisId(); indents.add(nextIndent); if (niceOutput) writeOut(outputstream, nextIndent); writeOut(outputstream,"<"+UntaggedInstructionNodeName + "axisIdRef = \"" + axisId + "\">"); if (niceOutput) writeOut(outputstream, Constants.NEW_LINE); nextIndent += moreIndent; } //now dump ourselves here using the trusty generic method super.toXDFOutputStream(outputstream, null, nextIndent); //close the instruction for (int i = indents.size()-1; i>=0; i++) { if (niceOutput) writeOut(outputstream, (String) indents.get(i)); writeOut(outputstream, "</" + UntaggedInstructionNodeName + ">"); if (niceOutput) writeOut(outputstream, Constants.NEW_LINE); } //close the read block if (niceOutput) writeOut(outputstream, myIndent); writeOut(outputstream, "<//"+classXDFNodeName + ">"); if (niceOutput) writeOut(outputstream, Constants.NEW_LINE); }
|
public void toXDFOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String indent ) { String myIndent; boolean niceOutput = super.sPrettyXDFOutput; if (indent !=null) { myIndent = indent; } else myIndent = ""; String moreIndent = super.sPrettyXDFOutputIndentation; //open the read block if (niceOutput) writeOut(outputstream, myIndent); writeOut(outputstream, "<"+classXDFNodeName + ">"); if (niceOutput) writeOut(outputstream, Constants.NEW_LINE); String nextIndent = myIndent + moreIndent; List indents = new ArrayList(); List axisList = getParentArray().getAxisList(); String axisId; for (int i = 0; i< axisList.size(); i++) { axisId = ((AxisInterface)axisList.get(i)).getAxisId(); indents.add(nextIndent); if (niceOutput) writeOut(outputstream, nextIndent); writeOut(outputstream,"<"+UntaggedInstructionNodeName + "axisIdRef = \"" + axisId + "\">"); if (niceOutput) writeOut(outputstream, Constants.NEW_LINE); nextIndent += moreIndent; } //now dump ourselves here using the trusty generic method super.toXDFOutputStream(outputstream, null, nextIndent); //close the instruction for (int i = indents.size()-1; i>=0; i++) { if (niceOutput) writeOut(outputstream, (String) indents.get(i)); writeOut(outputstream, "</" + UntaggedInstructionNodeName + ">"); if (niceOutput) writeOut(outputstream, Constants.NEW_LINE); } //close the read block if (niceOutput) writeOut(outputstream, myIndent); writeOut(outputstream, "<//"+classXDFNodeName + ">"); if (niceOutput) writeOut(outputstream, Constants.NEW_LINE); }
| 6,261
|
public void toXDFOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String indent ) { String myIndent; boolean niceOutput = super.sPrettyXDFOutput; if (indent !=null) { myIndent = indent; } else myIndent = ""; String moreIndent = super.sPrettyXDFOutputIndentation; //open the read block if (niceOutput) writeOut(outputstream, myIndent); writeOut(outputstream, "<"+classXDFNodeName + ">"); if (niceOutput) writeOut(outputstream, Constants.NEW_LINE); String nextIndent = myIndent + moreIndent; List indents = new ArrayList(); List axisList = getParentArray().getAxisList(); String axisId; for (int i = 0; i< axisList.size(); i++) { axisId = ((AxisInterface)axisList.get(i)).getAxisId(); indents.add(nextIndent); if (niceOutput) writeOut(outputstream, nextIndent); writeOut(outputstream,"<"+UntaggedInstructionNodeName + "axisIdRef = \"" + axisId + "\">"); if (niceOutput) writeOut(outputstream, Constants.NEW_LINE); nextIndent += moreIndent; } //now dump ourselves here using the trusty generic method super.toXDFOutputStream(outputstream, null, nextIndent); //close the instruction for (int i = indents.size()-1; i>=0; i++) { if (niceOutput) writeOut(outputstream, (String) indents.get(i)); writeOut(outputstream, "</" + UntaggedInstructionNodeName + ">"); if (niceOutput) writeOut(outputstream, Constants.NEW_LINE); } //close the read block if (niceOutput) writeOut(outputstream, myIndent); writeOut(outputstream, "<//"+classXDFNodeName + ">"); if (niceOutput) writeOut(outputstream, Constants.NEW_LINE); }
|
public void toXDFOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String indent ) { String myIndent; boolean niceOutput = super.sPrettyXDFOutput; if (indent !=null) { myIndent = indent; } else myIndent = ""; String moreIndent = super.sPrettyXDFOutputIndentation; //open the read block if (niceOutput) writeOut(outputstream, myIndent); writeOut(outputstream, "<"+classXDFNodeName + ">"); if (niceOutput) writeOut(outputstream, Constants.NEW_LINE); String nextIndent = myIndent + moreIndent; List indents = new ArrayList(); List axisList = getParentArray().getAxisList(); String axisId; for (int i = 0; i< axisList.size(); i++) { axisId = ((AxisInterface)axisList.get(i)).getAxisId(); indents.add(nextIndent); if (niceOutput) writeOut(outputstream, nextIndent); writeOut(outputstream,"<"+UntaggedInstructionNodeName + "axisIdRef = \"" + axisId + "\">"); if (niceOutput) writeOut(outputstream, Constants.NEW_LINE); nextIndent += moreIndent; } //now dump ourselves here using the trusty generic method super.toXDFOutputStream(outputstream, null, nextIndent); //close the instruction for (int i = indents.size()-1; i>=0; i++) { if (niceOutput) writeOut(outputstream, (String) indents.get(i)); writeOut(outputstream, "</" + UntaggedInstructionNodeName + ">"); if (niceOutput) writeOut(outputstream, Constants.NEW_LINE); } //close the read block if (niceOutput) writeOut(outputstream, myIndent); writeOut(outputstream, "<//"+classXDFNodeName + ">"); if (niceOutput) writeOut(outputstream, Constants.NEW_LINE); }
| 6,262
|
public void toXDFOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String indent ) { String myIndent; boolean niceOutput = super.sPrettyXDFOutput; if (indent !=null) { myIndent = indent; } else myIndent = ""; String moreIndent = super.sPrettyXDFOutputIndentation; //open the read block if (niceOutput) writeOut(outputstream, myIndent); writeOut(outputstream, "<"+classXDFNodeName + ">"); if (niceOutput) writeOut(outputstream, Constants.NEW_LINE); String nextIndent = myIndent + moreIndent; List indents = new ArrayList(); List axisList = getParentArray().getAxisList(); String axisId; for (int i = 0; i< axisList.size(); i++) { axisId = ((AxisInterface)axisList.get(i)).getAxisId(); indents.add(nextIndent); if (niceOutput) writeOut(outputstream, nextIndent); writeOut(outputstream,"<"+UntaggedInstructionNodeName + "axisIdRef = \"" + axisId + "\">"); if (niceOutput) writeOut(outputstream, Constants.NEW_LINE); nextIndent += moreIndent; } //now dump ourselves here using the trusty generic method super.toXDFOutputStream(outputstream, null, nextIndent); //close the instruction for (int i = indents.size()-1; i>=0; i++) { if (niceOutput) writeOut(outputstream, (String) indents.get(i)); writeOut(outputstream, "</" + UntaggedInstructionNodeName + ">"); if (niceOutput) writeOut(outputstream, Constants.NEW_LINE); } //close the read block if (niceOutput) writeOut(outputstream, myIndent); writeOut(outputstream, "<//"+classXDFNodeName + ">"); if (niceOutput) writeOut(outputstream, Constants.NEW_LINE); }
|
public void toXDFOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String indent ) { String myIndent; boolean niceOutput = super.sPrettyXDFOutput; if (indent !=null) { myIndent = indent; } else myIndent = ""; String moreIndent = super.sPrettyXDFOutputIndentation; //open the read block if (niceOutput) writeOut(outputstream, myIndent); writeOut(outputstream, "<"+classXDFNodeName + ">"); if (niceOutput) writeOut(outputstream, Constants.NEW_LINE); String nextIndent = myIndent + moreIndent; List indents = new ArrayList(); List axisList = getParentArray().getAxisList(); String axisId; for (int i = 0; i< axisList.size(); i++) { axisId = ((AxisInterface)axisList.get(i)).getAxisId(); indents.add(nextIndent); if (niceOutput) writeOut(outputstream, nextIndent); writeOut(outputstream,"<"+UntaggedInstructionNodeName + "axisIdRef = \"" + axisId + "\">"); if (niceOutput) writeOut(outputstream, Constants.NEW_LINE); nextIndent += moreIndent; } //now dump ourselves here using the trusty generic method super.toXDFOutputStream(outputstream, null, nextIndent); //close the instruction for (int i = indents.size()-1; i>=0; i++) { if (niceOutput) writeOut(outputstream, (String) indents.get(i)); writeOut(outputstream, "</" + UntaggedInstructionNodeName + ">"); if (niceOutput) writeOut(outputstream, Constants.NEW_LINE); } //close the read block if (niceOutput) writeOut(outputstream, myIndent); writeOut(outputstream, "<//"+classXDFNodeName + ">"); if (niceOutput) writeOut(outputstream, Constants.NEW_LINE); }
| 6,263
|
public String toString() { final VmMethod method = sfMethod; final VmType vmClass = (method == null) ? null : method.getDeclaringClass(); final String cname = (vmClass == null) ? "<unknown class>" : vmClass.getName(); final String mname = (method == null) ? "<unknown method>" : method.getName(); final String lineNr = getLineNr(); final String linePrefix; final String line; if (isInterpreted()) { linePrefix = ""; } else { linePrefix = "*"; } /*if (lineNr < 0) { line = "?"; } else { line = String.valueOf(lineNr); }*/ line = lineNr; return cname + "!" + mname + " (" + linePrefix + line + ")"; }
|
public String toString() { final VmMethod method = sfMethod; final VmType vmClass = (method == null) ? null : method.getDeclaringClass(); final String cname = (vmClass == null) ? "<unknown class>" : vmClass.getName(); final String mname = (method == null) ? "<unknown method>" : method.getName(); final String lineNr = getLineNr(); final String linePrefix; final String line; if (isInterpreted()) { linePrefix = ""; } else { linePrefix = "*"; } /*if (lineNr < 0) { line = "?"; } else { line = String.valueOf(lineNr); }*/ line = lineNr; return cname + "!" + mname + " (" + linePrefix + line + ")"; }
| 6,264
|
public String toString() { final VmMethod method = sfMethod; final VmType vmClass = (method == null) ? null : method.getDeclaringClass(); final String cname = (vmClass == null) ? "<unknown class>" : vmClass.getName(); final String mname = (method == null) ? "<unknown method>" : method.getName(); final String lineNr = getLineNr(); final String linePrefix; final String line; if (isInterpreted()) { linePrefix = ""; } else { linePrefix = "*"; } /*if (lineNr < 0) { line = "?"; } else { line = String.valueOf(lineNr); }*/ line = lineNr; return cname + "!" + mname + " (" + linePrefix + line + ")"; }
|
public String toString() { final VmMethod method = sfMethod; final VmType vmClass = (method == null) ? null : method.getDeclaringClass(); final String cname = (vmClass == null) ? "<unknown class>" : vmClass.getName(); final String mname = (method == null) ? "<unknown method>" : method.getName(); final String lineNr = getLineNr(); final String linePrefix; final String line; if (isInterpreted()) { linePrefix = ""; } else { linePrefix = "*"; } /*if (lineNr < 0) { line = "?"; } else { line = String.valueOf(lineNr); }*/ line = lineNr; return cname + "!" + mname + " (" + location + ")"; }
| 6,265
|
public FileDevice(File file, String mode) throws FileNotFoundException, IOException { super(null, "file" + System.currentTimeMillis()); raf = new RandomAccessFile(file, mode); registerAPI(BlockDeviceAPI.class, this); }
|
public FileDevice(File file, String mode) throws FileNotFoundException, IOException { super(null, "file" + System.currentTimeMillis()); raf = new RandomAccessFile(file, mode); registerAPI(FSBlockDeviceAPI.class, this); }
| 6,266
|
public void setCodePage (String newCodePage) { if (!codePage.toLowerCase().equals(newCodePage.toLowerCase())) { codePage = newCodePage; int i = 0; int[] cp = CharMappings.getCodePage(codePage); do { ebcdic[i] = cp[i]; ascii[cp[i]] = i; } while(++i < 256); if (codePage.toLowerCase().startsWith("870")) { unicode = uni1250; convert = true;// System.out.println("using conversion"); } else if(codePage.toLowerCase().startsWith("1025")) { unicode = uni1025; convert = true;// System.out.println("using conversion"); } else { convert = false;// System.out.println("not using conversion"); } } }
|
public void setCodePage (String newCodePage) { if (!codePage.toLowerCase().equals(newCodePage.toLowerCase())) { codePage = newCodePage; int i = 0; int[] cp = CharMappings.getCodePage(codePage); do { ebcdic[i] = cp[i]; ascii[cp[i]] = i; } while(++i < 256); if (codePage.toLowerCase().startsWith("870-pl")) { unicode = uni1250; convert = true;// System.out.println("using conversion"); } else if(codePage.toLowerCase().startsWith("1025")) { unicode = uni1025; convert = true;// System.out.println("using conversion"); } else { convert = false;// System.out.println("not using conversion"); } } }
| 6,267
|
public Offset add (Extent byteSize) { return null; }
|
public Offset add (int byteSize) { return null; }
| 6,269
|
public Gui5250Frame(My5250 m) { me = m; enableEvents(AWTEvent.WINDOW_EVENT_MASK); try { jbInit(); } catch(Exception e) { e.printStackTrace(); } }
|
public Gui5250Frame(My5250 m, int seq) { me = m; enableEvents(AWTEvent.WINDOW_EVENT_MASK); try { jbInit(); } catch(Exception e) { e.printStackTrace(); } }
| 6,270
|
private void jbInit() throws Exception { this.getContentPane().setLayout(borderLayout1); this.setTitle("tn5250j - 0.5.2"); sessionPane.setBorder(BorderFactory.createEtchedBorder()); sessionPane.setBounds(new Rectangle(78, 57, 5, 5)); sessionPane.setOpaque(false); sessionPane.setRequestFocusEnabled(false); sessionPane.setDoubleBuffered(true); this.getContentPane().add(sessionPane, BorderLayout.CENTER); }
|
private void jbInit() throws Exception { this.getContentPane().setLayout(borderLayout1); String release = "0"; String version = ".5"; String subVer= ".2b"; if (sequence > 0) setTitle("tn5250j <" + sequence + ">- " + release + version + subVer); else setTitle("tn5250j - " + release + version + subVer); sessionPane.setBorder(BorderFactory.createEtchedBorder()); sessionPane.setBounds(new Rectangle(78, 57, 5, 5)); sessionPane.setOpaque(false); sessionPane.setRequestFocusEnabled(false); sessionPane.setDoubleBuffered(true); this.getContentPane().add(sessionPane, BorderLayout.CENTER); }
| 6,272
|
synchronized void newSession(String sel,String[] args) { Properties sesProps = new Properties(); String propFileName = null; String session = args[0]; // Start loading properties sesProps.put(SESSION_HOST,session); if (isSpecified("-e",args)) sesProps.put(SESSION_TN_ENHANCED,"1"); if (isSpecified("-p",args)) { sesProps.put(SESSION_HOST_PORT,getParm("-p",args)); } if (isSpecified("-f",args)) propFileName = getParm("-f",args); if (isSpecified("-cp",args)) sesProps.put(SESSION_CODE_PAGE ,getParm("-cp",args)); if (isSpecified("-gui",args)) sesProps.put(SESSION_USE_GUI,"1"); if (isSpecified("-132",args)) sesProps.put(SESSION_SCREEN_SIZE,SCREEN_SIZE_27X132_STR); else sesProps.put(SESSION_SCREEN_SIZE,SCREEN_SIZE_24X80_STR); // are we to use a socks proxy if (isSpecified("-usp",args)) { // socks proxy host argument if (isSpecified("-sph",args)) { sesProps.put(SESSION_PROXY_HOST ,getParm("-sph",args)); } // socks proxy port argument if (isSpecified("-spp",args)) sesProps.put(SESSION_PROXY_PORT ,getParm("-spp",args)); } // are we to use a ssl and if we are what type if (isSpecified("-sslType",args)) { sesProps.put(SSL_TYPE,getParm("-sslType",args)); } // check if device name is specified if (isSpecified("-dn=hostname",args)){ String dnParam; // use IP address as device name try{ dnParam = InetAddress.getLocalHost().getHostName(); } catch(UnknownHostException uhe){ dnParam = "UNKNOWN_HOST"; } sesProps.put(SESSION_DEVICE_NAME ,dnParam); } else if (isSpecified("-dn",args)){ sesProps.put(SESSION_DEVICE_NAME ,getParm("-dn",args)); } if (isSpecified("-hb",args)) sesProps.put(SESSION_HEART_BEAT,"1"); Session5250 s2 = manager.openSession(sesProps,propFileName,sel); SessionGUI s = new SessionGUI(s2); if (!frame1.isVisible()) { splash.updateProgress(++step); if (isSpecified("-noembed",args)) { newView(); } frame1.setVisible(true); splash.setVisible(false); frame1.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); } else { if (isSpecified("-noembed",args)) { splash.updateProgress(++step); newView(); frame1.setVisible(true); splash.setVisible(false); frame1.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); } } if (isSpecified("-t",args)) frame1.addSessionView(sel,s); else frame1.addSessionView(session,s); s.connect(); s.addEmulatorActionListener(this); }
|
synchronized void newSession(String sel,String[] args) { Properties sesProps = new Properties(); String propFileName = null; String session = args[0]; // Start loading properties sesProps.put(SESSION_HOST,session); if (isSpecified("-e",args)) sesProps.put(SESSION_TN_ENHANCED,"1"); if (isSpecified("-p",args)) { sesProps.put(SESSION_HOST_PORT,getParm("-p",args)); } if (isSpecified("-f",args)) propFileName = getParm("-f",args); if (isSpecified("-cp",args)) sesProps.put(SESSION_CODE_PAGE ,getParm("-cp",args)); if (isSpecified("-gui",args)) sesProps.put(SESSION_USE_GUI,"1"); if (isSpecified("-132",args)) sesProps.put(SESSION_SCREEN_SIZE,SCREEN_SIZE_27X132_STR); else sesProps.put(SESSION_SCREEN_SIZE,SCREEN_SIZE_24X80_STR); // are we to use a socks proxy if (isSpecified("-usp",args)) { // socks proxy host argument if (isSpecified("-sph",args)) { sesProps.put(SESSION_PROXY_HOST ,getParm("-sph",args)); } // socks proxy port argument if (isSpecified("-spp",args)) sesProps.put(SESSION_PROXY_PORT ,getParm("-spp",args)); } // are we to use a ssl and if we are what type if (isSpecified("-sslType",args)) { sesProps.put(SSL_TYPE,getParm("-sslType",args)); } // check if device name is specified if (isSpecified("-dn=hostname",args)){ String dnParam; // use IP address as device name try{ dnParam = InetAddress.getLocalHost().getHostName(); } catch(UnknownHostException uhe){ dnParam = "UNKNOWN_HOST"; } sesProps.put(SESSION_DEVICE_NAME ,dnParam); } else if (isSpecified("-dn",args)){ sesProps.put(SESSION_DEVICE_NAME ,getParm("-dn",args)); } if (isSpecified("-hb",args)) sesProps.put(SESSION_HEART_BEAT,"1"); Session5250 s2 = manager.openSession(sesProps,propFileName,sel); SessionGUI s = new SessionGUI(s2); if (!frame1.isVisible()) { splash.updateProgress(++step); if (isSpecified("-noembed",args) && sessionCount > 0) { newView(); } frame1.setVisible(true); splash.setVisible(false); frame1.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); } else { if (isSpecified("-noembed",args) && sessionCount > 0) { splash.updateProgress(++step); newView(); frame1.setVisible(true); splash.setVisible(false); frame1.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); } } if (isSpecified("-t",args)) frame1.addSessionView(sel,s); else frame1.addSessionView(session,s); s.connect(); s.addEmulatorActionListener(this); }
| 6,274
|
public MyInternalFrame() { super("#" + (++openFrameCount), true, //resizable true, //closable true, //maximizable true);//iconifiable //...Create the GUI and put it in the window... //...Then set the window size or call pack... setSize(300,300); //Set the window's location. setLocation(xOffset*openFrameCount, yOffset*openFrameCount); addInternalFrameListener(new InternalFrameAdapter() {// public void internalFrameActivated(InternalFrameEvent e) {// paintme();// // displayMessage("Internal frame activated", e);// } public void internalFrameClosing(InternalFrameEvent e) { displayMessage("Internal frame closing", e); } public void internalFrameClosed(InternalFrameEvent e) { displayMessage("Internal frame closed", e); } public void internalFrameOpened(InternalFrameEvent e) { displayMessage("Internal frame opened", e); } public void internalFrameIconified(InternalFrameEvent e) { displayMessage("Internal frame iconified", e); } public void internalFrameDeiconified(InternalFrameEvent e) { displayMessage("Internal frame deiconified", e); } public void internalFrameActivated(InternalFrameEvent e) { displayMessage("Internal frame activated", e); repaint(); } public void internalFrameDeactivated(InternalFrameEvent e) { displayMessage("Internal frame deactivated", e); } }); }
|
public MyInternalFrame() { super("#" + (++openFrameCount), true, //resizable true, //closable true, //maximizable true);//iconifiable //...Create the GUI and put it in the window... //...Then set the window size or call pack... setSize(300,300); //Set the window's location. setLocation(xOffset*openFrameCount, yOffset*openFrameCount); addInternalFrameListener(new InternalFrameAdapter() {// public void internalFrameActivated(InternalFrameEvent e) {// paintme();// // displayMessage("Internal frame activated", e);// } public void internalFrameClosing(InternalFrameEvent e) { displayMessage("Internal frame closing", e); } public void internalFrameClosed(InternalFrameEvent e) { displayMessage("Internal frame closed", e); } public void internalFrameOpened(InternalFrameEvent e) { displayMessage("Internal frame opened", e); } public void internalFrameIconified(InternalFrameEvent e) { displayMessage("Internal frame iconified", e); } public void internalFrameDeiconified(InternalFrameEvent e) { displayMessage("Internal frame deiconified", e); } public void internalFrameActivated(InternalFrameEvent e) { displayMessage("Internal frame activated", e); repaint(); } public void internalFrameDeactivated(InternalFrameEvent e) { displayMessage("Internal frame deactivated", e); } }); }
| 6,275
|
public MyInternalFrame() { super("#" + (++openFrameCount), true, //resizable true, //closable true, //maximizable true);//iconifiable //...Create the GUI and put it in the window... //...Then set the window size or call pack... setSize(300,300); //Set the window's location. setLocation(xOffset*openFrameCount, yOffset*openFrameCount); addInternalFrameListener(new InternalFrameAdapter() {// public void internalFrameActivated(InternalFrameEvent e) {// paintme();// // displayMessage("Internal frame activated", e);// } public void internalFrameClosing(InternalFrameEvent e) { displayMessage("Internal frame closing", e); } public void internalFrameClosed(InternalFrameEvent e) { displayMessage("Internal frame closed", e); } public void internalFrameOpened(InternalFrameEvent e) { displayMessage("Internal frame opened", e); } public void internalFrameIconified(InternalFrameEvent e) { displayMessage("Internal frame iconified", e); } public void internalFrameDeiconified(InternalFrameEvent e) { displayMessage("Internal frame deiconified", e); } public void internalFrameActivated(InternalFrameEvent e) { displayMessage("Internal frame activated", e); repaint(); } public void internalFrameDeactivated(InternalFrameEvent e) { displayMessage("Internal frame deactivated", e); } }); }
|
public MyInternalFrame() { super("#" + (++openFrameCount), true, //resizable true, //closable true, //maximizable true);//iconifiable //...Create the GUI and put it in the window... //...Then set the window size or call pack... setSize(300,300); //Set the window's location. setLocation(xOffset*openFrameCount, yOffset*openFrameCount); addInternalFrameListener(new InternalFrameAdapter() {// public void internalFrameActivated(InternalFrameEvent e) {// paintme();// // displayMessage("Internal frame activated", e);// } public void internalFrameClosing(InternalFrameEvent e) { displayMessage("Internal frame closing", e); } public void internalFrameClosed(InternalFrameEvent e) { displayMessage("Internal frame closed", e); } public void internalFrameOpened(InternalFrameEvent e) { displayMessage("Internal frame opened", e); } public void internalFrameIconified(InternalFrameEvent e) { displayMessage("Internal frame iconified", e); } public void internalFrameDeiconified(InternalFrameEvent e) { displayMessage("Internal frame deiconified", e); } public void internalFrameActivated(InternalFrameEvent e) { displayMessage("Internal frame activated", e); repaint(); } public void internalFrameDeactivated(InternalFrameEvent e) { displayMessage("Internal frame deactivated", e); } }); }
| 6,276
|
public MyInternalFrame() { super("#" + (++openFrameCount), true, //resizable true, //closable true, //maximizable true);//iconifiable //...Create the GUI and put it in the window... //...Then set the window size or call pack... setSize(300,300); //Set the window's location. setLocation(xOffset*openFrameCount, yOffset*openFrameCount); addInternalFrameListener(new InternalFrameAdapter() {// public void internalFrameActivated(InternalFrameEvent e) {// paintme();// // displayMessage("Internal frame activated", e);// } public void internalFrameClosing(InternalFrameEvent e) { displayMessage("Internal frame closing", e); } public void internalFrameClosed(InternalFrameEvent e) { displayMessage("Internal frame closed", e); } public void internalFrameOpened(InternalFrameEvent e) { displayMessage("Internal frame opened", e); } public void internalFrameIconified(InternalFrameEvent e) { displayMessage("Internal frame iconified", e); } public void internalFrameDeiconified(InternalFrameEvent e) { displayMessage("Internal frame deiconified", e); } public void internalFrameActivated(InternalFrameEvent e) { displayMessage("Internal frame activated", e); repaint(); } public void internalFrameDeactivated(InternalFrameEvent e) { displayMessage("Internal frame deactivated", e); } }); }
|
public MyInternalFrame() { super("#" + (++openFrameCount), true, //resizable true, //closable true, //maximizable true);//iconifiable //...Create the GUI and put it in the window... //...Then set the window size or call pack... setSize(300,300); //Set the window's location. setLocation(xOffset*openFrameCount, yOffset*openFrameCount); addInternalFrameListener(new InternalFrameAdapter() {// public void internalFrameActivated(InternalFrameEvent e) {// paintme();// // displayMessage("Internal frame activated", e);// } public void internalFrameClosing(InternalFrameEvent e) { displayMessage("Internal frame closing", e); } public void internalFrameClosed(InternalFrameEvent e) { displayMessage("Internal frame closed", e); } public void internalFrameOpened(InternalFrameEvent e) { displayMessage("Internal frame opened", e); } public void internalFrameIconified(InternalFrameEvent e) { displayMessage("Internal frame iconified", e); } public void internalFrameDeiconified(InternalFrameEvent e) { displayMessage("Internal frame deiconified", e); } public void internalFrameActivated(InternalFrameEvent e) { displayMessage("Internal frame activated", e); repaint(); } public void internalFrameDeactivated(InternalFrameEvent e) { displayMessage("Internal frame deactivated", e); } }); }
| 6,277
|
public MyInternalFrame() { super("#" + (++openFrameCount), true, //resizable true, //closable true, //maximizable true);//iconifiable //...Create the GUI and put it in the window... //...Then set the window size or call pack... setSize(300,300); //Set the window's location. setLocation(xOffset*openFrameCount, yOffset*openFrameCount); addInternalFrameListener(new InternalFrameAdapter() {// public void internalFrameActivated(InternalFrameEvent e) {// paintme();// // displayMessage("Internal frame activated", e);// } public void internalFrameClosing(InternalFrameEvent e) { displayMessage("Internal frame closing", e); } public void internalFrameClosed(InternalFrameEvent e) { displayMessage("Internal frame closed", e); } public void internalFrameOpened(InternalFrameEvent e) { displayMessage("Internal frame opened", e); } public void internalFrameIconified(InternalFrameEvent e) { displayMessage("Internal frame iconified", e); } public void internalFrameDeiconified(InternalFrameEvent e) { displayMessage("Internal frame deiconified", e); } public void internalFrameActivated(InternalFrameEvent e) { displayMessage("Internal frame activated", e); repaint(); } public void internalFrameDeactivated(InternalFrameEvent e) { displayMessage("Internal frame deactivated", e); } }); }
|
public MyInternalFrame() { super("#" + (++openFrameCount), true, //resizable true, //closable true, //maximizable true);//iconifiable //...Create the GUI and put it in the window... //...Then set the window size or call pack... setSize(300,300); //Set the window's location. setLocation(xOffset*openFrameCount, yOffset*openFrameCount); addInternalFrameListener(new InternalFrameAdapter() {// public void internalFrameActivated(InternalFrameEvent e) {// paintme();// // displayMessage("Internal frame activated", e);// } public void internalFrameClosing(InternalFrameEvent e) { displayMessage("Internal frame closing", e); } public void internalFrameClosed(InternalFrameEvent e) { displayMessage("Internal frame closed", e); } public void internalFrameOpened(InternalFrameEvent e) { displayMessage("Internal frame opened", e); } public void internalFrameIconified(InternalFrameEvent e) { displayMessage("Internal frame iconified", e); } public void internalFrameDeiconified(InternalFrameEvent e) { displayMessage("Internal frame deiconified", e); } public void internalFrameActivated(InternalFrameEvent e) { displayMessage("Internal frame activated", e); repaint(); } public void internalFrameDeactivated(InternalFrameEvent e) { displayMessage("Internal frame deactivated", e); } }); }
| 6,278
|
public MyInternalFrame() { super("#" + (++openFrameCount), true, //resizable true, //closable true, //maximizable true);//iconifiable //...Create the GUI and put it in the window... //...Then set the window size or call pack... setSize(300,300); //Set the window's location. setLocation(xOffset*openFrameCount, yOffset*openFrameCount); addInternalFrameListener(new InternalFrameAdapter() {// public void internalFrameActivated(InternalFrameEvent e) {// paintme();// // displayMessage("Internal frame activated", e);// } public void internalFrameClosing(InternalFrameEvent e) { displayMessage("Internal frame closing", e); } public void internalFrameClosed(InternalFrameEvent e) { displayMessage("Internal frame closed", e); } public void internalFrameOpened(InternalFrameEvent e) { displayMessage("Internal frame opened", e); } public void internalFrameIconified(InternalFrameEvent e) { displayMessage("Internal frame iconified", e); } public void internalFrameDeiconified(InternalFrameEvent e) { displayMessage("Internal frame deiconified", e); } public void internalFrameActivated(InternalFrameEvent e) { displayMessage("Internal frame activated", e); repaint(); } public void internalFrameDeactivated(InternalFrameEvent e) { displayMessage("Internal frame deactivated", e); } }); }
|
public MyInternalFrame() { super("#" + (++openFrameCount), true, //resizable true, //closable true, //maximizable true);//iconifiable //...Create the GUI and put it in the window... //...Then set the window size or call pack... setSize(300,300); //Set the window's location. setLocation(xOffset*openFrameCount, yOffset*openFrameCount); addInternalFrameListener(new InternalFrameAdapter() {// public void internalFrameActivated(InternalFrameEvent e) {// paintme();// // displayMessage("Internal frame activated", e);// } public void internalFrameClosing(InternalFrameEvent e) { displayMessage("Internal frame closing", e); } public void internalFrameClosed(InternalFrameEvent e) { displayMessage("Internal frame closed", e); } public void internalFrameOpened(InternalFrameEvent e) { displayMessage("Internal frame opened", e); } public void internalFrameIconified(InternalFrameEvent e) { displayMessage("Internal frame iconified", e); } public void internalFrameDeiconified(InternalFrameEvent e) { displayMessage("Internal frame deiconified", e); } public void internalFrameActivated(InternalFrameEvent e) { displayMessage("Internal frame activated", e); repaint(); } public void internalFrameDeactivated(InternalFrameEvent e) { displayMessage("Internal frame deactivated", e); } }); }
| 6,279
|
public MyInternalFrame() { super("#" + (++openFrameCount), true, //resizable true, //closable true, //maximizable true);//iconifiable //...Create the GUI and put it in the window... //...Then set the window size or call pack... setSize(300,300); //Set the window's location. setLocation(xOffset*openFrameCount, yOffset*openFrameCount); addInternalFrameListener(new InternalFrameAdapter() {// public void internalFrameActivated(InternalFrameEvent e) {// paintme();// // displayMessage("Internal frame activated", e);// } public void internalFrameClosing(InternalFrameEvent e) { displayMessage("Internal frame closing", e); } public void internalFrameClosed(InternalFrameEvent e) { displayMessage("Internal frame closed", e); } public void internalFrameOpened(InternalFrameEvent e) { displayMessage("Internal frame opened", e); } public void internalFrameIconified(InternalFrameEvent e) { displayMessage("Internal frame iconified", e); } public void internalFrameDeiconified(InternalFrameEvent e) { displayMessage("Internal frame deiconified", e); } public void internalFrameActivated(InternalFrameEvent e) { displayMessage("Internal frame activated", e); repaint(); } public void internalFrameDeactivated(InternalFrameEvent e) { displayMessage("Internal frame deactivated", e); } }); }
|
public MyInternalFrame() { super("#" + (++openFrameCount), true, //resizable true, //closable true, //maximizable true);//iconifiable //...Create the GUI and put it in the window... //...Then set the window size or call pack... setSize(300,300); //Set the window's location. setLocation(xOffset*openFrameCount, yOffset*openFrameCount); addInternalFrameListener(new InternalFrameAdapter() {// public void internalFrameActivated(InternalFrameEvent e) {// paintme();// // displayMessage("Internal frame activated", e);// } public void internalFrameClosing(InternalFrameEvent e) { displayMessage("Internal frame closing", e); } public void internalFrameClosed(InternalFrameEvent e) { displayMessage("Internal frame closed", e); } public void internalFrameOpened(InternalFrameEvent e) { displayMessage("Internal frame opened", e); } public void internalFrameIconified(InternalFrameEvent e) { displayMessage("Internal frame iconified", e); } public void internalFrameDeiconified(InternalFrameEvent e) { displayMessage("Internal frame deiconified", e); } public void internalFrameActivated(InternalFrameEvent e) { displayMessage("Internal frame activated", e); repaint(); } public void internalFrameDeactivated(InternalFrameEvent e) { displayMessage("Internal frame deactivated", e); } }); }
| 6,280
|
private void nextSession() { JInternalFrame[] frames = desktop.getAllFrames(); JInternalFrame miv = desktop.getSelectedFrame(); int index = desktop.getIndexOf(miv); if (index < desktop.getComponentCount() - 1) { try { frames[index + 1].setSelected(true); } catch (java.beans.PropertyVetoException e) { System.out.println(e.getMessage()); } } else { try { frames[0].setSelected(true); } catch (java.beans.PropertyVetoException e) { System.out.println(e.getMessage()); } } }
|
private void nextSession() { JInternalFrame[] frames = desktop.getAllFrames(); JInternalFrame miv = desktop.getSelectedFrame(); int index = desktop.getIndexOf(miv); if (index < desktop.getComponentCount() - 1) { try { frames[index + 1].setSelected(true); } catch (java.beans.PropertyVetoException e) { System.out.println(e.getMessage()); } } else { try { frames[0].setSelected(true); } catch (java.beans.PropertyVetoException e) { System.out.println(e.getMessage()); } } }
| 6,281
|
private void prevSession() { JInternalFrame[] frames = desktop.getAllFrames(); JInternalFrame miv = desktop.getSelectedFrame(); int index = desktop.getIndexOf(miv); if (index == 0) {// desktop.setSelectedFrame(frames[frames.length - 1]); try { frames[frames.length - 1].setSelected(true); frames[frames.length - 1].repaint(); } catch (java.beans.PropertyVetoException e) { System.out.println(e.getMessage()); } } else { try { frames[index - 1].setSelected(true); frames[index - 1].repaint(); } catch (java.beans.PropertyVetoException e) { System.out.println(e.getMessage()); } } }
|
private void prevSession() { JInternalFrame[] frames = desktop.getAllFrames(); JInternalFrame miv = desktop.getSelectedFrame(); int index = desktop.getIndexOf(miv); if (index == 0) {// desktop.setSelectedFrame(frames[frames.length - 1]); try { frames[frames.length - 1].setSelected(true); frames[frames.length - 1].repaint(); } catch (java.beans.PropertyVetoException e) { System.out.println(e.getMessage()); } } else { try { frames[index - 1].setSelected(true); frames[index - 1].repaint(); } catch (java.beans.PropertyVetoException e) { System.out.println(e.getMessage()); } } }
| 6,283
|
public void removeSessionView(Session targetSession) { JInternalFrame[] frames = desktop.getAllFrames(); }
|
public void removeSessionView(Session targetSession) { MyInternalFrame[] frames = (MyInternalFrame[])desktop.getAllFrames(); int index = desktop.getIndexOf(targetSession); System.out.println("session found and closing down " + index); targetSession.removeSessionListener(this); targetSession.removeSessionJumpListener(this); desktop.remove(index); }
| 6,284
|
private boolean popupVisible() { JMenuBar mb = (JMenuBar) ((JMenu)menuItem).getParent(); // check if mb.isSelected because if no menus are selected // we don't have to look through the list for popup menus if (!mb.isSelected()) return false; for (int i=0;i<mb.getMenuCount();i++) if (((JMenu)mb.getComponent(i)).isPopupMenuVisible()) return true; return false; }
|
private boolean popupVisible() { JMenuBar mb = (JMenuBar) ((JMenu)menuItem).getParent(); // check if mb.isSelected because if no menus are selected // we don't have to look through the list for popup menus if (!mb.isSelected()) return false; for (int i=0;i<mb.getMenuCount();i++) if (((JMenu)mb.getComponent(i)).isPopupMenuVisible()) return true; return false; }
| 6,285
|
public Object clone() { return new LineSegment(P1, P2); }
|
public Object clone() { LineSegment segment = null; try { segment = (LineSegment) super.clone(); segment.P1 = (Point2D) P1.clone(); segment.P2 = (Point2D) P2.clone(); } catch (CloneNotSupportedException cnse) { InternalError ie = new InternalError(); ie.initCause(cnse); throw ie; } return segment; }
| 6,287
|
protected Object readResolve() throws InvalidObjectException { if (this.equals (READING)) return READING; if (this.equals (LANGUAGE)) return LANGUAGE; if (this.equals (INPUT_METHOD_SEGMENT)) return INPUT_METHOD_SEGMENT; throw new InvalidObjectException ("Can't resolve Attribute: " + getName()); }
|
protected Object readResolve() throws InvalidObjectException { if (getName().equals(READING.getName())) return READING; if (this.equals (LANGUAGE)) return LANGUAGE; if (this.equals (INPUT_METHOD_SEGMENT)) return INPUT_METHOD_SEGMENT; throw new InvalidObjectException ("Can't resolve Attribute: " + getName()); }
| 6,288
|
protected Object readResolve() throws InvalidObjectException { if (this.equals (READING)) return READING; if (this.equals (LANGUAGE)) return LANGUAGE; if (this.equals (INPUT_METHOD_SEGMENT)) return INPUT_METHOD_SEGMENT; throw new InvalidObjectException ("Can't resolve Attribute: " + getName()); }
|
protected Object readResolve() throws InvalidObjectException { if (this.equals (READING)) return READING; if (getName().equals(LANGUAGE.getName())) return LANGUAGE; if (this.equals (INPUT_METHOD_SEGMENT)) return INPUT_METHOD_SEGMENT; throw new InvalidObjectException ("Can't resolve Attribute: " + getName()); }
| 6,289
|
protected Object readResolve() throws InvalidObjectException { if (this.equals (READING)) return READING; if (this.equals (LANGUAGE)) return LANGUAGE; if (this.equals (INPUT_METHOD_SEGMENT)) return INPUT_METHOD_SEGMENT; throw new InvalidObjectException ("Can't resolve Attribute: " + getName()); }
|
protected Object readResolve() throws InvalidObjectException { if (this.equals (READING)) return READING; if (this.equals (LANGUAGE)) return LANGUAGE; if (getName().equals(INPUT_METHOD_SEGMENT.getName())) return INPUT_METHOD_SEGMENT; throw new InvalidObjectException ("Can't resolve Attribute: " + getName()); }
| 6,290
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.