bugged
stringlengths
6
599k
fixed
stringlengths
6
40.8M
__index_level_0__
int64
0
3.24M
public void processMouseEvent(MouseEvent event) { Component source = ((Component) event.getSource()); // In the case of drag event, event.getSource() returns component // where drag event originated. However menu element processing this // event should be the one over which mouse is currently located, // which is not necessary the source of the drag event. Component mouseOverMenuComp; // find over which menu element the mouse is currently located if (event.getID() == MouseEvent.MOUSE_DRAGGED || event.getID() == MouseEvent.MOUSE_RELEASED) mouseOverMenuComp = componentForPoint(source, event.getPoint()); else mouseOverMenuComp = source; // Process this event only if mouse is located over some menu element if (mouseOverMenuComp != null && (mouseOverMenuComp instanceof MenuElement)) { MenuElement[] path = getPath(mouseOverMenuComp); ((MenuElement) mouseOverMenuComp).processMouseEvent(event, path, manager); // FIXME: Java specification says that mouse events should be // forwarded to subcomponents. The code below does it, but // menu's work fine without it. This code is commented for now. /* MenuElement[] subComponents = ((MenuElement) mouseOverMenuComp) .getSubElements(); for (int i = 0; i < subComponents.length; i++) { subComponents[i].processMouseEvent(event, path, manager); } */ } else { if (event.getID() == MouseEvent.MOUSE_RELEASED) clearSelectedPath(); } }
public void processMouseEvent(MouseEvent event) { Component source = ((Component) event.getSource()); // In the case of drag event, event.getSource() returns component // where drag event originated. However menu element processing this // event should be the one over which mouse is currently located, // which is not necessary the source of the drag event. Component mouseOverMenuComp; // find over which menu element the mouse is currently located if (event.getID() == MouseEvent.MOUSE_DRAGGED || event.getID() == MouseEvent.MOUSE_RELEASED) mouseOverMenuComp = componentForPoint(source, event.getPoint()); else mouseOverMenuComp = source; // Process this event only if mouse is located over some menu element if (mouseOverMenuComp != null && (mouseOverMenuComp instanceof MenuElement)) { MenuElement[] path = getPath(mouseOverMenuComp); ((MenuElement) mouseOverMenuComp).processMouseEvent(event, path, manager); // FIXME: Java specification says that mouse events should be // forwarded to subcomponents. The code below does it, but // menu's work fine without it. This code is commented for now. /* MenuElement[] subComponents = ((MenuElement) mouseOverMenuComp) .getSubElements(); for (int i = 0; i < subComponents.length; i++) { subComponents[i].processMouseEvent(event, path, manager); } */ } else { if (event.getID() == MouseEvent.MOUSE_RELEASED) clearSelectedPath(); } }
2,457
public Object clone() throws CloneNotSupportedException { return super.clone(); }
public Object clone() throws CloneNotSupportedException { BaseMac result = (BaseMac) super.clone(); if (this.underlyingHash != null) result.underlyingHash = (IMessageDigest) this.underlyingHash.clone(); return result; }
2,458
private void checkLegacy() { // we check if the sessions file already exists in the directory // if it does exist we are working with an old install so we // need to set the settings directory to the users directory // SESSIONS is declared as a string, so we just can use the keyword here. if(ses.exists()) { int cfc; cfc = JOptionPane.showConfirmDialog(null, "Dear User,\n\n" + "Seems you are using an old version of tn5250j.\n" + "In meanwhile the application became multi-user capable,\n" + "which means ALL the config- and settings-files are\n" + "placed in your home-dir to avoid further problems in\n" + "the near future.\n\n" + "You have the choice to choose if you want the files\n" + "to be copied or not, please make your choice !\n\n" + "Shall we copy the files to the new location ?", "Old install detected", JOptionPane.WARNING_MESSAGE, JOptionPane.YES_NO_OPTION); if (cfc == 0) { // Here we do a checkdir so we know the destination-dir exists checkDirs(); copyConfigs(SESSIONS); copyConfigs(MACROS); copyConfigs(KEYMAP); } else { JOptionPane.showMessageDialog(null, "Dear User,\n\n" + "You choosed not to copy the file.\n" + "This means the program will end here.\n\n" + "To use this NON-STANDARD behaviour start tn5250j\n" + "with -Demulator.settingsDirectory=<settings-dir> \n" + "as a parameter to avoid this question all the time.", "Using NON-STANDARD behaviour", JOptionPane.WARNING_MESSAGE); System.exit(0); } } }
private void checkLegacy() { // we check if the sessions file already exists in the directory // if it does exist we are working with an old install so we // need to set the settings directory to the users directory // SESSIONS is declared as a string, so we just can use the keyword here. if(ses.exists()) { int cfc; cfc = JOptionPane.showConfirmDialog(null, "Dear User,\n\n" + "Seems you are using an old version of tn5250j.\n" + "In meanwhile the application became multi-user capable,\n" + "which means ALL the config- and settings-files are\n" + "placed in your home-dir to avoid further problems in\n" + "the near future.\n\n" + "You have the choice to choose if you want the files\n" + "to be copied or not, please make your choice !\n\n" + "Shall we copy the files to the new location ?", "Old install detected", JOptionPane.WARNING_MESSAGE, JOptionPane.YES_NO_OPTION); if (cfc == 0) { // Here we do a checkdir so we know the destination-dir exists checkDirs(); copyConfigs(SESSIONS); copyConfigs(MACROS); copyConfigs(KEYMAP); } else { JOptionPane.showMessageDialog(null, "Dear User,\n\n" + "You choosed not to copy the file.\n" + "This means the program will end here.\n\n" + "To use this NON-STANDARD behaviour start tn5250j\n" + "with -Demulator.settingsDirectory=<settings-dir> \n" + "as a parameter to avoid this question all the time.", "Using NON-STANDARD behaviour", JOptionPane.WARNING_MESSAGE); System.exit(0); } } }
2,459
private void checkLegacy() { // we check if the sessions file already exists in the directory // if it does exist we are working with an old install so we // need to set the settings directory to the users directory // SESSIONS is declared as a string, so we just can use the keyword here. if(ses.exists()) { int cfc; cfc = JOptionPane.showConfirmDialog(null, "Dear User,\n\n" + "Seems you are using an old version of tn5250j.\n" + "In meanwhile the application became multi-user capable,\n" + "which means ALL the config- and settings-files are\n" + "placed in your home-dir to avoid further problems in\n" + "the near future.\n\n" + "You have the choice to choose if you want the files\n" + "to be copied or not, please make your choice !\n\n" + "Shall we copy the files to the new location ?", "Old install detected", JOptionPane.WARNING_MESSAGE, JOptionPane.YES_NO_OPTION); if (cfc == 0) { // Here we do a checkdir so we know the destination-dir exists checkDirs(); copyConfigs(SESSIONS); copyConfigs(MACROS); copyConfigs(KEYMAP); } else { JOptionPane.showMessageDialog(null, "Dear User,\n\n" + "You choosed not to copy the file.\n" + "This means the program will end here.\n\n" + "To use this NON-STANDARD behaviour start tn5250j\n" + "with -Demulator.settingsDirectory=<settings-dir> \n" + "as a parameter to avoid this question all the time.", "Using NON-STANDARD behaviour", JOptionPane.WARNING_MESSAGE); System.exit(0); } } }
private void checkLegacy() { // we check if the sessions file already exists in the directory // if it does exist we are working with an old install so we // need to set the settings directory to the users directory // SESSIONS is declared as a string, so we just can use the keyword here. if(ses.exists()) { int cfc; cfc = JOptionPane.showConfirmDialog(null, "Dear User,\n\n" + "Seems you are using an old version of tn5250j.\n" + "In meanwhile the application became multi-user capable,\n" + "which means ALL the config- and settings-files are\n" + "placed in your home-dir to avoid further problems in\n" + "the near future.\n\n" + "You have the choice to choose if you want the files\n" + "to be copied or not, please make your choice !\n\n" + "Shall we copy the files to the new location ?", "Old install detected", JOptionPane.WARNING_MESSAGE, JOptionPane.YES_NO_OPTION); if (cfc == 0) { // Here we do a checkdir so we know the destination-dir exists checkDirs(); copyConfigs(SESSIONS); copyConfigs(MACROS); copyConfigs(KEYMAP); } else { JOptionPane.showMessageDialog(null, "Dear User,\n\n" + "You choosed not to copy the file.\n" + "This means the program will end here.\n\n" + "To use this NON-STANDARD behaviour start tn5250j\n" + "with -Demulator.settingsDirectory=<settings-dir> \n" + "as a parameter to avoid this question all the time.", "Using NON-STANDARD behaviour", JOptionPane.WARNING_MESSAGE); System.exit(0); } } }
2,460
private void copyConfigs(String sesFile) { /** Copy the config-files to the user's home-dir */ String srcFile = System.getProperty("user.dir") + File.separator + sesFile; String dest = System.getProperty("user.home") + File.separator + ".tn5250j" + File.separator + sesFile; File rmvFile = new File(sesFile); try { FileReader r = new FileReader(srcFile); BufferedReader b = new BufferedReader(r); FileWriter w = new FileWriter(dest); PrintWriter p = new PrintWriter(w); String regel = b.readLine(); while (regel != null) { p.println(regel); regel = b.readLine(); } b.close(); p.close(); rmvFile.delete(); } catch (FileNotFoundException e) { log.warn(srcFile + " not found !"); } catch (IOException e) { log.warn("Global io-error !"); } catch (ArrayIndexOutOfBoundsException e) { } }
private void copyConfigs(String sesFile) { /** Copy the config-files to the user's home-dir */ String srcFile = System.getProperty("user.dir") + File.separator + sesFile; String dest = System.getProperty("user.home") + File.separator + ".tn5250j" + File.separator + sesFile; File rmvFile = new File(sesFile); try { FileReader r = new FileReader(srcFile); BufferedReader b = new BufferedReader(r); FileWriter w = new FileWriter(dest); PrintWriter p = new PrintWriter(w); String regel = b.readLine(); while (regel != null) { p.println(regel); regel = b.readLine(); } b.close(); p.close(); rmvFile.delete(); } catch (FileNotFoundException e) { log.warn(srcFile + " not found !"); } catch (IOException e) { log.warn("Global io-error !"); } catch (ArrayIndexOutOfBoundsException e) { } }
2,461
private void copyConfigs(String sesFile) { /** Copy the config-files to the user's home-dir */ String srcFile = System.getProperty("user.dir") + File.separator + sesFile; String dest = System.getProperty("user.home") + File.separator + ".tn5250j" + File.separator + sesFile; File rmvFile = new File(sesFile); try { FileReader r = new FileReader(srcFile); BufferedReader b = new BufferedReader(r); FileWriter w = new FileWriter(dest); PrintWriter p = new PrintWriter(w); String regel = b.readLine(); while (regel != null) { p.println(regel); regel = b.readLine(); } b.close(); p.close(); rmvFile.delete(); } catch (FileNotFoundException e) { log.warn(srcFile + " not found !"); } catch (IOException e) { log.warn("Global io-error !"); } catch (ArrayIndexOutOfBoundsException e) { } }
private void copyConfigs(String sesFile) { /** Copy the config-files to the user's home-dir */ String srcFile = System.getProperty("user.dir") + File.separator + sesFile; String dest = System.getProperty("user.home") + File.separator + ".tn5250j" + File.separator + sesFile; File rmvFile = new File(sesFile); try { FileReader r = new FileReader(srcFile); BufferedReader b = new BufferedReader(r); FileWriter w = new FileWriter(dest); PrintWriter p = new PrintWriter(w); String regel = b.readLine(); while (regel != null) { p.println(regel); regel = b.readLine(); } b.close(); p.close(); rmvFile.delete(); } catch (FileNotFoundException e) { log.warn(srcFile + " not found !"); } catch (IOException e) { log.warn("Global io-error !"); } catch (ArrayIndexOutOfBoundsException e) { } }
2,462
private void loadSettings() { FileInputStream in = null; FileInputStream again = null; settings = new Properties(); // here we will check for a system property is provided first. if (System.getProperties().containsKey("emulator.settingsDirectory")) { settings.setProperty("emulator.settingsDirectory", System.getProperty("emulator.settingsDirectory") + File.separator); checkDirs(); } else { settings.setProperty("emulator.settingsDirectory", System.getProperty("user.home") + File.separator + ".tn5250j" + File.separator); try { in = new FileInputStream(settingsFile); settings.load(in); } catch (FileNotFoundException fnfe) { try { again = new FileInputStream(settingsDirectory() + settingsFile); settings.load(again); } catch (FileNotFoundException fnfea) { log.info(" Information Message: " + fnfea.getMessage() + ". The file " + settingsFile + " will be created for first time use."); checkLegacy(); saveSettings(); } catch (IOException ioea) { log.warn("IO Exception accessing File " + settingsFile + " for the following reason : " + ioea.getMessage()); } catch (SecurityException sea) { log.warn("Security Exception for file " + settingsFile + " This file can not be " + "accessed because : " + sea.getMessage()); } } catch (IOException ioe) { log.warn("IO Exception accessing File " + settingsFile + " for the following reason : " + ioe.getMessage()); } catch (SecurityException se) { log.warn("Security Exception for file " + settingsFile + " This file can not be " + "accessed because : " + se.getMessage()); } } }
private void loadSettings() { FileInputStream in = null; FileInputStream again = null; settings = new Properties(); // here we will check for a system property is provided first. if (System.getProperties().containsKey("emulator.settingsDirectory")) { settings.setProperty("emulator.settingsDirectory", System.getProperty("emulator.settingsDirectory") + File.separator); checkDirs(); } else { settings.setProperty("emulator.settingsDirectory", System.getProperty("user.home") + File.separator + ".tn5250j" + File.separator); try { in = new FileInputStream(settingsFile); settings.load(in); } catch (FileNotFoundException fnfe) { try { again = new FileInputStream(settingsDirectory() + settingsFile); settings.load(again); } catch (FileNotFoundException fnfea) { log.info(" Information Message: " + fnfea.getMessage() + ". The file " + settingsFile + " will be created for first time use."); checkLegacy(); saveSettings(); } catch (IOException ioea) { log.warn("IO Exception accessing File " + settingsFile + " for the following reason : " + ioea.getMessage()); } catch (SecurityException sea) { log.warn("Security Exception for file " + settingsFile + " This file can not be " + "accessed because : " + sea.getMessage()); } } catch (IOException ioe) { log.warn("IO Exception accessing File " + settingsFile + " for the following reason : " + ioe.getMessage()); } catch (SecurityException se) { log.warn("Security Exception for file " + settingsFile + " This file can not be " + "accessed because : " + se.getMessage()); } } }
2,463
private void loadSettings() { FileInputStream in = null; FileInputStream again = null; settings = new Properties(); // here we will check for a system property is provided first. if (System.getProperties().containsKey("emulator.settingsDirectory")) { settings.setProperty("emulator.settingsDirectory", System.getProperty("emulator.settingsDirectory") + File.separator); checkDirs(); } else { settings.setProperty("emulator.settingsDirectory", System.getProperty("user.home") + File.separator + ".tn5250j" + File.separator); try { in = new FileInputStream(settingsFile); settings.load(in); } catch (FileNotFoundException fnfe) { try { again = new FileInputStream(settingsDirectory() + settingsFile); settings.load(again); } catch (FileNotFoundException fnfea) { log.info(" Information Message: " + fnfea.getMessage() + ". The file " + settingsFile + " will be created for first time use."); checkLegacy(); saveSettings(); } catch (IOException ioea) { log.warn("IO Exception accessing File " + settingsFile + " for the following reason : " + ioea.getMessage()); } catch (SecurityException sea) { log.warn("Security Exception for file " + settingsFile + " This file can not be " + "accessed because : " + sea.getMessage()); } } catch (IOException ioe) { log.warn("IO Exception accessing File " + settingsFile + " for the following reason : " + ioe.getMessage()); } catch (SecurityException se) { log.warn("Security Exception for file " + settingsFile + " This file can not be " + "accessed because : " + se.getMessage()); } } }
private void loadSettings() { FileInputStream in = null; FileInputStream again = null; settings = new Properties(); // here we will check for a system property is provided first. if (System.getProperties().containsKey("emulator.settingsDirectory")) { settings.setProperty("emulator.settingsDirectory", System.getProperty("emulator.settingsDirectory") + File.separator); checkDirs(); } else { settings.setProperty("emulator.settingsDirectory", System.getProperty("user.home") + File.separator + ".tn5250j" + File.separator); try { in = new FileInputStream(settingsFile); settings.load(in); } catch (FileNotFoundException fnfe) { try { again = new FileInputStream(settingsDirectory() + settingsFile); settings.load(again); } catch (FileNotFoundException fnfea) { log.info(" Information Message: " + fnfea.getMessage() + ". The file " + settingsFile + " will be created for first time use."); checkLegacy(); saveSettings(); } catch (IOException ioea) { log.warn("IO Exception accessing File " + settingsFile + " for the following reason : " + ioea.getMessage()); } catch (SecurityException sea) { log.warn("Security Exception for file " + settingsFile + " This file can not be " + "accessed because : " + sea.getMessage()); } } catch (IOException ioe) { log.warn("IO Exception accessing File " + settingsFile + " for the following reason : " + ioe.getMessage()); } catch (SecurityException se) { log.warn("Security Exception for file " + settingsFile + " This file can not be " + "accessed because : " + se.getMessage()); } } }
2,464
private void loadSettings() { FileInputStream in = null; FileInputStream again = null; settings = new Properties(); // here we will check for a system property is provided first. if (System.getProperties().containsKey("emulator.settingsDirectory")) { settings.setProperty("emulator.settingsDirectory", System.getProperty("emulator.settingsDirectory") + File.separator); checkDirs(); } else { settings.setProperty("emulator.settingsDirectory", System.getProperty("user.home") + File.separator + ".tn5250j" + File.separator); try { in = new FileInputStream(settingsFile); settings.load(in); } catch (FileNotFoundException fnfe) { try { again = new FileInputStream(settingsDirectory() + settingsFile); settings.load(again); } catch (FileNotFoundException fnfea) { log.info(" Information Message: " + fnfea.getMessage() + ". The file " + settingsFile + " will be created for first time use."); checkLegacy(); saveSettings(); } catch (IOException ioea) { log.warn("IO Exception accessing File " + settingsFile + " for the following reason : " + ioea.getMessage()); } catch (SecurityException sea) { log.warn("Security Exception for file " + settingsFile + " This file can not be " + "accessed because : " + sea.getMessage()); } } catch (IOException ioe) { log.warn("IO Exception accessing File " + settingsFile + " for the following reason : " + ioe.getMessage()); } catch (SecurityException se) { log.warn("Security Exception for file " + settingsFile + " This file can not be " + "accessed because : " + se.getMessage()); } } }
private void loadSettings() { FileInputStream in = null; FileInputStream again = null; settings = new Properties(); // here we will check for a system property is provided first. if (System.getProperties().containsKey("emulator.settingsDirectory")) { settings.setProperty("emulator.settingsDirectory", System.getProperty("emulator.settingsDirectory") + File.separator); checkDirs(); } else { settings.setProperty("emulator.settingsDirectory", System.getProperty("user.home") + File.separator + ".tn5250j" + File.separator); try { in = new FileInputStream(settingsFile); settings.load(in); } catch (FileNotFoundException fnfe) { try { again = new FileInputStream(settingsDirectory() + settingsFile); settings.load(again); } catch (FileNotFoundException fnfea) { log.info(" Information Message: " + fnfea.getMessage() + ". The file " + settingsFile + " will be created for first time use."); checkLegacy(); saveSettings(); } catch (IOException ioea) { log.warn("IO Exception accessing File " + settingsFile + " for the following reason : " + ioea.getMessage()); } catch (SecurityException sea) { log.warn("Security Exception for file " + settingsFile + " This file can not be " + "accessed because : " + sea.getMessage()); } } catch (IOException ioe) { log.warn("IO Exception accessing File " + settingsFile + " for the following reason : " + ioe.getMessage()); } catch (SecurityException se) { log.warn("Security Exception for file " + settingsFile + " This file can not be " + "accessed because : " + se.getMessage()); } } }
2,465
private void loadSettings() { FileInputStream in = null; FileInputStream again = null; settings = new Properties(); // here we will check for a system property is provided first. if (System.getProperties().containsKey("emulator.settingsDirectory")) { settings.setProperty("emulator.settingsDirectory", System.getProperty("emulator.settingsDirectory") + File.separator); checkDirs(); } else { settings.setProperty("emulator.settingsDirectory", System.getProperty("user.home") + File.separator + ".tn5250j" + File.separator); try { in = new FileInputStream(settingsFile); settings.load(in); } catch (FileNotFoundException fnfe) { try { again = new FileInputStream(settingsDirectory() + settingsFile); settings.load(again); } catch (FileNotFoundException fnfea) { log.info(" Information Message: " + fnfea.getMessage() + ". The file " + settingsFile + " will be created for first time use."); checkLegacy(); saveSettings(); } catch (IOException ioea) { log.warn("IO Exception accessing File " + settingsFile + " for the following reason : " + ioea.getMessage()); } catch (SecurityException sea) { log.warn("Security Exception for file " + settingsFile + " This file can not be " + "accessed because : " + sea.getMessage()); } } catch (IOException ioe) { log.warn("IO Exception accessing File " + settingsFile + " for the following reason : " + ioe.getMessage()); } catch (SecurityException se) { log.warn("Security Exception for file " + settingsFile + " This file can not be " + "accessed because : " + se.getMessage()); } } }
private void loadSettings() { FileInputStream in = null; FileInputStream again = null; settings = new Properties(); // here we will check for a system property is provided first. if (System.getProperties().containsKey("emulator.settingsDirectory")) { settings.setProperty("emulator.settingsDirectory", System.getProperty("emulator.settingsDirectory") + File.separator); checkDirs(); } else { settings.setProperty("emulator.settingsDirectory", System.getProperty("user.home") + File.separator + ".tn5250j" + File.separator); try { in = new FileInputStream(settingsFile); settings.load(in); } catch (FileNotFoundException fnfe) { try { again = new FileInputStream(settingsDirectory() + settingsFile); settings.load(again); } catch (FileNotFoundException fnfea) { log.info(" Information Message: " + fnfea.getMessage() + ". The file " + settingsFile + " will be created for first time use."); checkLegacy(); saveSettings(); } catch (IOException ioea) { log.warn("IO Exception accessing File " + settingsFile + " for the following reason : " + ioea.getMessage()); } catch (SecurityException sea) { log.warn("Security Exception for file " + settingsFile + " This file can not be " + "accessed because : " + sea.getMessage()); } } catch (IOException ioe) { log.warn("IO Exception accessing File " + settingsFile + " for the following reason : " + ioe.getMessage()); } catch (SecurityException se) { log.warn("Security Exception for file " + settingsFile + " This file can not be " + "accessed because : " + se.getMessage()); } } }
2,466
private void loadSettings() { FileInputStream in = null; FileInputStream again = null; settings = new Properties(); // here we will check for a system property is provided first. if (System.getProperties().containsKey("emulator.settingsDirectory")) { settings.setProperty("emulator.settingsDirectory", System.getProperty("emulator.settingsDirectory") + File.separator); checkDirs(); } else { settings.setProperty("emulator.settingsDirectory", System.getProperty("user.home") + File.separator + ".tn5250j" + File.separator); try { in = new FileInputStream(settingsFile); settings.load(in); } catch (FileNotFoundException fnfe) { try { again = new FileInputStream(settingsDirectory() + settingsFile); settings.load(again); } catch (FileNotFoundException fnfea) { log.info(" Information Message: " + fnfea.getMessage() + ". The file " + settingsFile + " will be created for first time use."); checkLegacy(); saveSettings(); } catch (IOException ioea) { log.warn("IO Exception accessing File " + settingsFile + " for the following reason : " + ioea.getMessage()); } catch (SecurityException sea) { log.warn("Security Exception for file " + settingsFile + " This file can not be " + "accessed because : " + sea.getMessage()); } } catch (IOException ioe) { log.warn("IO Exception accessing File " + settingsFile + " for the following reason : " + ioe.getMessage()); } catch (SecurityException se) { log.warn("Security Exception for file " + settingsFile + " This file can not be " + "accessed because : " + se.getMessage()); } } }
private void loadSettings() { FileInputStream in = null; FileInputStream again = null; settings = new Properties(); // here we will check for a system property is provided first. if (System.getProperties().containsKey("emulator.settingsDirectory")) { settings.setProperty("emulator.settingsDirectory", System.getProperty("emulator.settingsDirectory") + File.separator); checkDirs(); } else { settings.setProperty("emulator.settingsDirectory", System.getProperty("user.home") + File.separator + ".tn5250j" + File.separator); try { in = new FileInputStream(settingsFile); settings.load(in); } catch (FileNotFoundException fnfe) { try { again = new FileInputStream(settingsDirectory() + settingsFile); settings.load(again); } catch (FileNotFoundException fnfea) { log.info(" Information Message: " + fnfea.getMessage() + ". The file " + settingsFile + " will be created for first time use."); checkLegacy(); saveSettings(); } catch (IOException ioea) { log.warn("IO Exception accessing File " + settingsFile + " for the following reason : " + ioea.getMessage()); } catch (SecurityException sea) { log.warn("Security Exception for file " + settingsFile + " This file can not be " + "accessed because : " + sea.getMessage()); } } catch (IOException ioe) { log.warn("IO Exception accessing File " + settingsFile + " for the following reason : " + ioe.getMessage()); } catch (SecurityException se) { log.warn("Security Exception for file " + settingsFile + " This file can not be " + "accessed because : " + se.getMessage()); } } }
2,467
private void loadSettings() { FileInputStream in = null; FileInputStream again = null; settings = new Properties(); // here we will check for a system property is provided first. if (System.getProperties().containsKey("emulator.settingsDirectory")) { settings.setProperty("emulator.settingsDirectory", System.getProperty("emulator.settingsDirectory") + File.separator); checkDirs(); } else { settings.setProperty("emulator.settingsDirectory", System.getProperty("user.home") + File.separator + ".tn5250j" + File.separator); try { in = new FileInputStream(settingsFile); settings.load(in); } catch (FileNotFoundException fnfe) { try { again = new FileInputStream(settingsDirectory() + settingsFile); settings.load(again); } catch (FileNotFoundException fnfea) { log.info(" Information Message: " + fnfea.getMessage() + ". The file " + settingsFile + " will be created for first time use."); checkLegacy(); saveSettings(); } catch (IOException ioea) { log.warn("IO Exception accessing File " + settingsFile + " for the following reason : " + ioea.getMessage()); } catch (SecurityException sea) { log.warn("Security Exception for file " + settingsFile + " This file can not be " + "accessed because : " + sea.getMessage()); } } catch (IOException ioe) { log.warn("IO Exception accessing File " + settingsFile + " for the following reason : " + ioe.getMessage()); } catch (SecurityException se) { log.warn("Security Exception for file " + settingsFile + " This file can not be " + "accessed because : " + se.getMessage()); } } }
private void loadSettings() { FileInputStream in = null; FileInputStream again = null; settings = new Properties(); // here we will check for a system property is provided first. if (System.getProperties().containsKey("emulator.settingsDirectory")) { settings.setProperty("emulator.settingsDirectory", System.getProperty("emulator.settingsDirectory") + File.separator); checkDirs(); } else { settings.setProperty("emulator.settingsDirectory", System.getProperty("user.home") + File.separator + ".tn5250j" + File.separator); try { in = new FileInputStream(settingsFile); settings.load(in); } catch (FileNotFoundException fnfe) { try { again = new FileInputStream(settingsDirectory() + settingsFile); settings.load(again); } catch (FileNotFoundException fnfea) { log.info(" Information Message: " + fnfea.getMessage() + ". The file " + settingsFile + " will be created for first time use."); checkLegacy(); saveSettings(); } catch (IOException ioea) { log.warn("IO Exception accessing File " + settingsFile + " for the following reason : " + ioea.getMessage()); } catch (SecurityException sea) { log.warn("Security Exception for file " + settingsFile + " This file can not be " + "accessed because : " + sea.getMessage()); } } catch (IOException ioe) { log.warn("IO Exception accessing File " + settingsFile + " for the following reason : " + ioe.getMessage()); } catch (SecurityException se) { log.warn("Security Exception for file " + settingsFile + " This file can not be " + "accessed because : " + se.getMessage()); } } }
2,468
public Number evaluate (Number value) { //NOT IMPLEMENTED YET return (Number) new Integer("0"); }
public double evaluate (double value) { //NOT IMPLEMENTED YET return (Number) new Integer("0"); }
2,469
public Number evaluate (Number value) { //NOT IMPLEMENTED YET return (Number) new Integer("0"); }
public Number evaluate (Number value) { //NOT IMPLEMENTED YET return value; }
2,470
protected void init() { resetAttributes(); classXDFNodeName = "conversion"; // order matters! these are in *reverse* order of their // occurence in the XDF DTD attribOrder.add(0,COMPONENTLIST_XML_ATTRIBUTE_NAME); attribHash.put(COMPONENTLIST_XML_ATTRIBUTE_NAME, new Attribute(Collections.synchronizedList(new ArrayList()), Constants.LIST_TYPE)); }
protected void init() { super.init(); classXDFNodeName = "conversion"; // order matters! these are in *reverse* order of their // occurence in the XDF DTD attribOrder.add(0,COMPONENTLIST_XML_ATTRIBUTE_NAME); attribHash.put(COMPONENTLIST_XML_ATTRIBUTE_NAME, new Attribute(Collections.synchronizedList(new ArrayList()), Constants.LIST_TYPE)); }
2,471
public void toXMLOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String indent, boolean dontCloseNode, String newNodeNameString, String noChildObjectNodeName ) { boolean niceOutput = sPrettyXDFOutput; String myIndent; if (indent!=null) myIndent = indent; else myIndent = ""; String moreIndent = myIndent + sPrettyXDFOutputIndentation; if (niceOutput) writeOut(outputstream, myIndent); //open the read block writeOut(outputstream, "<read"); //write out attributes of read, ie. synchronized(attribHash) { //sync, prevent the attribHash' structure be changed String attrib; if ( (attrib=getEncoding()) !=null) writeOut(outputstream, " encoding=" + attrib); if ( (attrib=getEndian()) !=null) writeOut(outputstream, " endian=" + attrib); if ( (attrib=getReadId()) !=null) writeOut(outputstream, " readId=" + attrib); if ( (attrib=getReadIdRef()) !=null) writeOut(outputstream, " readIdRef=" + attrib); } writeOut(outputstream, ">"); //specific tailoring for childObj: Tagged, Delimited, Formated specificIOStyleToXDF(outputstream, moreIndent); //close the read block if (niceOutput) { writeOut(outputstream, Constants.NEW_LINE); writeOut(outputstream, indent); } writeOut(outputstream, "</read>"); if (niceOutput) { writeOut(outputstream,Constants.NEW_LINE); } }
public void toXMLOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String indent, boolean dontCloseNode, String newNodeNameString, String noChildObjectNodeName ) { boolean niceOutput = sPrettyXDFOutput; String myIndent; if (indent!=null) myIndent = indent; else myIndent = ""; String moreIndent = myIndent + sPrettyXDFOutputIndentation; if (niceOutput) writeOut(outputstream, myIndent); //open the read block writeOut(outputstream, "<read"); //write out attributes of read, ie. synchronized(attribHash) { //sync, prevent the attribHash' structure be changed String attrib; if ( (attrib=getEncoding()) !=null) writeOut(outputstream, " encoding=\"" + attrib+"\""); if ( (attrib=getEndian()) !=null) writeOut(outputstream, " endian=" + attrib); if ( (attrib=getReadId()) !=null) writeOut(outputstream, " readId=" + attrib); if ( (attrib=getReadIdRef()) !=null) writeOut(outputstream, " readIdRef=" + attrib); } writeOut(outputstream, ">"); //specific tailoring for childObj: Tagged, Delimited, Formated specificIOStyleToXDF(outputstream, moreIndent); //close the read block if (niceOutput) { writeOut(outputstream, Constants.NEW_LINE); writeOut(outputstream, indent); } writeOut(outputstream, "</read>"); if (niceOutput) { writeOut(outputstream,Constants.NEW_LINE); } }
2,472
public void toXMLOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String indent, boolean dontCloseNode, String newNodeNameString, String noChildObjectNodeName ) { boolean niceOutput = sPrettyXDFOutput; String myIndent; if (indent!=null) myIndent = indent; else myIndent = ""; String moreIndent = myIndent + sPrettyXDFOutputIndentation; if (niceOutput) writeOut(outputstream, myIndent); //open the read block writeOut(outputstream, "<read"); //write out attributes of read, ie. synchronized(attribHash) { //sync, prevent the attribHash' structure be changed String attrib; if ( (attrib=getEncoding()) !=null) writeOut(outputstream, " encoding=" + attrib); if ( (attrib=getEndian()) !=null) writeOut(outputstream, " endian=" + attrib); if ( (attrib=getReadId()) !=null) writeOut(outputstream, " readId=" + attrib); if ( (attrib=getReadIdRef()) !=null) writeOut(outputstream, " readIdRef=" + attrib); } writeOut(outputstream, ">"); //specific tailoring for childObj: Tagged, Delimited, Formated specificIOStyleToXDF(outputstream, moreIndent); //close the read block if (niceOutput) { writeOut(outputstream, Constants.NEW_LINE); writeOut(outputstream, indent); } writeOut(outputstream, "</read>"); if (niceOutput) { writeOut(outputstream,Constants.NEW_LINE); } }
public void toXMLOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String indent, boolean dontCloseNode, String newNodeNameString, String noChildObjectNodeName ) { boolean niceOutput = sPrettyXDFOutput; String myIndent; if (indent!=null) myIndent = indent; else myIndent = ""; String moreIndent = myIndent + sPrettyXDFOutputIndentation; if (niceOutput) writeOut(outputstream, myIndent); //open the read block writeOut(outputstream, "<read"); //write out attributes of read, ie. synchronized(attribHash) { //sync, prevent the attribHash' structure be changed String attrib; if ( (attrib=getEncoding()) !=null) writeOut(outputstream, " encoding=" + attrib); if ( (attrib=getEndian()) !=null) writeOut(outputstream, " endian=\"" + attrib + "\""); if ( (attrib=getReadId()) !=null) writeOut(outputstream, " readId=" + attrib); if ( (attrib=getReadIdRef()) !=null) writeOut(outputstream, " readIdRef=" + attrib); } writeOut(outputstream, ">"); //specific tailoring for childObj: Tagged, Delimited, Formated specificIOStyleToXDF(outputstream, moreIndent); //close the read block if (niceOutput) { writeOut(outputstream, Constants.NEW_LINE); writeOut(outputstream, indent); } writeOut(outputstream, "</read>"); if (niceOutput) { writeOut(outputstream,Constants.NEW_LINE); } }
2,473
public void toXMLOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String indent, boolean dontCloseNode, String newNodeNameString, String noChildObjectNodeName ) { boolean niceOutput = sPrettyXDFOutput; String myIndent; if (indent!=null) myIndent = indent; else myIndent = ""; String moreIndent = myIndent + sPrettyXDFOutputIndentation; if (niceOutput) writeOut(outputstream, myIndent); //open the read block writeOut(outputstream, "<read"); //write out attributes of read, ie. synchronized(attribHash) { //sync, prevent the attribHash' structure be changed String attrib; if ( (attrib=getEncoding()) !=null) writeOut(outputstream, " encoding=" + attrib); if ( (attrib=getEndian()) !=null) writeOut(outputstream, " endian=" + attrib); if ( (attrib=getReadId()) !=null) writeOut(outputstream, " readId=" + attrib); if ( (attrib=getReadIdRef()) !=null) writeOut(outputstream, " readIdRef=" + attrib); } writeOut(outputstream, ">"); //specific tailoring for childObj: Tagged, Delimited, Formated specificIOStyleToXDF(outputstream, moreIndent); //close the read block if (niceOutput) { writeOut(outputstream, Constants.NEW_LINE); writeOut(outputstream, indent); } writeOut(outputstream, "</read>"); if (niceOutput) { writeOut(outputstream,Constants.NEW_LINE); } }
public void toXMLOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String indent, boolean dontCloseNode, String newNodeNameString, String noChildObjectNodeName ) { boolean niceOutput = sPrettyXDFOutput; String myIndent; if (indent!=null) myIndent = indent; else myIndent = ""; String moreIndent = myIndent + sPrettyXDFOutputIndentation; if (niceOutput) writeOut(outputstream, myIndent); //open the read block writeOut(outputstream, "<read"); //write out attributes of read, ie. synchronized(attribHash) { //sync, prevent the attribHash' structure be changed String attrib; if ( (attrib=getEncoding()) !=null) writeOut(outputstream, " encoding=" + attrib); if ( (attrib=getEndian()) !=null) writeOut(outputstream, " endian=" + attrib); if ( (attrib=getReadId()) !=null) writeOut(outputstream, " readId=\"" + attrib + "\""); if ( (attrib=getReadIdRef()) !=null) writeOut(outputstream, " readIdRef=" + attrib); } writeOut(outputstream, ">"); //specific tailoring for childObj: Tagged, Delimited, Formated specificIOStyleToXDF(outputstream, moreIndent); //close the read block if (niceOutput) { writeOut(outputstream, Constants.NEW_LINE); writeOut(outputstream, indent); } writeOut(outputstream, "</read>"); if (niceOutput) { writeOut(outputstream,Constants.NEW_LINE); } }
2,474
public void toXMLOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String indent, boolean dontCloseNode, String newNodeNameString, String noChildObjectNodeName ) { boolean niceOutput = sPrettyXDFOutput; String myIndent; if (indent!=null) myIndent = indent; else myIndent = ""; String moreIndent = myIndent + sPrettyXDFOutputIndentation; if (niceOutput) writeOut(outputstream, myIndent); //open the read block writeOut(outputstream, "<read"); //write out attributes of read, ie. synchronized(attribHash) { //sync, prevent the attribHash' structure be changed String attrib; if ( (attrib=getEncoding()) !=null) writeOut(outputstream, " encoding=" + attrib); if ( (attrib=getEndian()) !=null) writeOut(outputstream, " endian=" + attrib); if ( (attrib=getReadId()) !=null) writeOut(outputstream, " readId=" + attrib); if ( (attrib=getReadIdRef()) !=null) writeOut(outputstream, " readIdRef=" + attrib); } writeOut(outputstream, ">"); //specific tailoring for childObj: Tagged, Delimited, Formated specificIOStyleToXDF(outputstream, moreIndent); //close the read block if (niceOutput) { writeOut(outputstream, Constants.NEW_LINE); writeOut(outputstream, indent); } writeOut(outputstream, "</read>"); if (niceOutput) { writeOut(outputstream,Constants.NEW_LINE); } }
public void toXMLOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String indent, boolean dontCloseNode, String newNodeNameString, String noChildObjectNodeName ) { boolean niceOutput = sPrettyXDFOutput; String myIndent; if (indent!=null) myIndent = indent; else myIndent = ""; String moreIndent = myIndent + sPrettyXDFOutputIndentation; if (niceOutput) writeOut(outputstream, myIndent); //open the read block writeOut(outputstream, "<read"); //write out attributes of read, ie. synchronized(attribHash) { //sync, prevent the attribHash' structure be changed String attrib; if ( (attrib=getEncoding()) !=null) writeOut(outputstream, " encoding=" + attrib); if ( (attrib=getEndian()) !=null) writeOut(outputstream, " endian=" + attrib); if ( (attrib=getReadId()) !=null) writeOut(outputstream, " readId=" + attrib); if ( (attrib=getReadIdRef()) !=null) writeOut(outputstream, " readIdRef=\"" + attrib + "\""); } writeOut(outputstream, ">"); //specific tailoring for childObj: Tagged, Delimited, Formated specificIOStyleToXDF(outputstream, moreIndent); //close the read block if (niceOutput) { writeOut(outputstream, Constants.NEW_LINE); writeOut(outputstream, indent); } writeOut(outputstream, "</read>"); if (niceOutput) { writeOut(outputstream,Constants.NEW_LINE); } }
2,475
public GnuRSAPrivateKey(final BigInteger p, final BigInteger q, final BigInteger e, final BigInteger d) { // super(p.multiply(q)); super(p.multiply(q), e); this.p = p; this.q = q; // this.e = e; this.d = d; // the exponents dP and dQ are positive integers less than p and q // respectively satisfying // e * dP = 1 (mod p-1); // e * dQ = 1 (mod q-1), dP = e.modInverse(p.subtract(BigInteger.ONE)); dQ = e.modInverse(q.subtract(BigInteger.ONE)); // and the CRT coefficient qInv is a positive integer less than p // satisfying // q * qInv = 1 (mod p). qInv = q.modInverse(p); }
public GnuRSAPrivateKey(final BigInteger p, final BigInteger q, final BigInteger e, final BigInteger d) { // super(p.multiply(q)); super(p.multiply(q), e); this.p = p; this.q = q; // this.e = e; this.d = d; // the exponents dP and dQ are positive integers less than p and q // respectively satisfying // e * dP = 1 (mod p-1); // e * dQ = 1 (mod q-1), dP = e.modInverse(p.subtract(BigInteger.ONE)); dQ = e.modInverse(q.subtract(BigInteger.ONE)); // and the CRT coefficient qInv is a positive integer less than p // satisfying // q * qInv = 1 (mod p). qInv = q.modInverse(p); }
2,476
public GnuRSAPrivateKey(final BigInteger p, final BigInteger q, final BigInteger e, final BigInteger d) { // super(p.multiply(q)); super(p.multiply(q), e); this.p = p; this.q = q; // this.e = e; this.d = d; // the exponents dP and dQ are positive integers less than p and q // respectively satisfying // e * dP = 1 (mod p-1); // e * dQ = 1 (mod q-1), dP = e.modInverse(p.subtract(BigInteger.ONE)); dQ = e.modInverse(q.subtract(BigInteger.ONE)); // and the CRT coefficient qInv is a positive integer less than p // satisfying // q * qInv = 1 (mod p). qInv = q.modInverse(p); }
public GnuRSAPrivateKey(final BigInteger p, final BigInteger q, final BigInteger e, final BigInteger d) { // super(p.multiply(q)); super(p.multiply(q), e); this.p = p; this.q = q; // this.e = e; this.d = d; // the exponents dP and dQ are positive integers less than p and q // respectively satisfying // e * dP = 1 (mod p-1); // e * dQ = 1 (mod q-1), dP = e.modInverse(p.subtract(BigInteger.ONE)); dQ = e.modInverse(q.subtract(BigInteger.ONE)); // and the CRT coefficient qInv is a positive integer less than p // satisfying // q * qInv = 1 (mod p). qInv = q.modInverse(p); }
2,477
public byte[] getEncoded(final int format) { final byte[] result; switch (format) { case IKeyPairCodec.RAW_FORMAT: result = new RSAKeyPairRawCodec().encodePrivateKey(this); break; default: throw new IllegalArgumentException("format"); } return result; }
public byte[] getEncoded(int format) { final byte[] result; switch (format) { case IKeyPairCodec.RAW_FORMAT: result = new RSAKeyPairRawCodec().encodePrivateKey(this); break; default: throw new IllegalArgumentException("format"); } return result; }
2,478
public byte[] getEncoded(final int format) { final byte[] result; switch (format) { case IKeyPairCodec.RAW_FORMAT: result = new RSAKeyPairRawCodec().encodePrivateKey(this); break; default: throw new IllegalArgumentException("format"); } return result; }
public byte[] getEncoded(final int format) { final byte[] result; switch (format) { case IKeyPairCodec.RAW_FORMAT: result = new RSAKeyPairRawCodec().encodePrivateKey(this); break; default: throw new IllegalArgumentException("Unsupported encoding format: " + format); } return result; }
2,479
public static GnuRSAPrivateKey valueOf(final byte[] k) { // check magic... // we should parse here enough bytes to know which codec to use, and // direct the byte array to the appropriate codec. since we only have one // codec, we could have immediately tried it; nevertheless since testing // one byte is cheaper than instatiating a codec that will fail we test // the first byte before we carry on. if (k[0] == Registry.MAGIC_RAW_RSA_PRIVATE_KEY[0]) { // it's likely to be in raw format. get a raw codec and hand it over final IKeyPairCodec codec = new RSAKeyPairRawCodec(); return (GnuRSAPrivateKey) codec.decodePrivateKey(k); } else { throw new IllegalArgumentException("magic"); } }
public static GnuRSAPrivateKey valueOf(final byte[] k) { // check magic... // we should parse here enough bytes to know which codec to use, and // direct the byte array to the appropriate codec. since we only have one // codec, we could have immediately tried it; nevertheless since testing // one byte is cheaper than instatiating a codec that will fail we test // the first byte before we carry on. if (k[0] == Registry.MAGIC_RAW_RSA_PRIVATE_KEY[0]) { // it's likely to be in raw format. get a raw codec and hand it over final IKeyPairCodec codec = new RSAKeyPairRawCodec(); return (GnuRSAPrivateKey) codec.decodePrivateKey(k); } else { throw new IllegalArgumentException("magic"); } }
2,480
public static GnuRSAPrivateKey valueOf(final byte[] k) { // check magic... // we should parse here enough bytes to know which codec to use, and // direct the byte array to the appropriate codec. since we only have one // codec, we could have immediately tried it; nevertheless since testing // one byte is cheaper than instatiating a codec that will fail we test // the first byte before we carry on. if (k[0] == Registry.MAGIC_RAW_RSA_PRIVATE_KEY[0]) { // it's likely to be in raw format. get a raw codec and hand it over final IKeyPairCodec codec = new RSAKeyPairRawCodec(); return (GnuRSAPrivateKey) codec.decodePrivateKey(k); } else { throw new IllegalArgumentException("magic"); } }
public static GnuRSAPrivateKey valueOf(final byte[] k) { // check magic... // we should parse here enough bytes to know which codec to use, and // direct the byte array to the appropriate codec. since we only have one // codec, we could have immediately tried it; nevertheless since testing // one byte is cheaper than instatiating a codec that will fail we test // the first byte before we carry on. if (k[0] == Registry.MAGIC_RAW_RSA_PRIVATE_KEY[0]) { // it's likely to be in raw format. get a raw codec and hand it over final IKeyPairCodec codec = new RSAKeyPairRawCodec(); return (GnuRSAPrivateKey) codec.decodePrivateKey(k); } else { throw new IllegalArgumentException("magic"); } }
2,481
public static GnuRSAPrivateKey valueOf(final byte[] k) { // check magic... // we should parse here enough bytes to know which codec to use, and // direct the byte array to the appropriate codec. since we only have one // codec, we could have immediately tried it; nevertheless since testing // one byte is cheaper than instatiating a codec that will fail we test // the first byte before we carry on. if (k[0] == Registry.MAGIC_RAW_RSA_PRIVATE_KEY[0]) { // it's likely to be in raw format. get a raw codec and hand it over final IKeyPairCodec codec = new RSAKeyPairRawCodec(); return (GnuRSAPrivateKey) codec.decodePrivateKey(k); } else { throw new IllegalArgumentException("magic"); } }
public static GnuRSAPrivateKey valueOf(final byte[] k) { // check magic... // we should parse here enough bytes to know which codec to use, and // direct the byte array to the appropriate codec. since we only have one // codec, we could have immediately tried it; nevertheless since testing // one byte is cheaper than instatiating a codec that will fail we test // the first byte before we carry on. if (k[0] == Registry.MAGIC_RAW_RSA_PRIVATE_KEY[0]) { // it's likely to be in raw format. get a raw codec and hand it over final IKeyPairCodec codec = new RSAKeyPairRawCodec(); return (GnuRSAPrivateKey) codec.decodePrivateKey(k); } catch (IllegalArgumentException ignored) { throw new IllegalArgumentException("magic"); } }
2,482
public static GnuRSAPrivateKey valueOf(final byte[] k) { // check magic... // we should parse here enough bytes to know which codec to use, and // direct the byte array to the appropriate codec. since we only have one // codec, we could have immediately tried it; nevertheless since testing // one byte is cheaper than instatiating a codec that will fail we test // the first byte before we carry on. if (k[0] == Registry.MAGIC_RAW_RSA_PRIVATE_KEY[0]) { // it's likely to be in raw format. get a raw codec and hand it over final IKeyPairCodec codec = new RSAKeyPairRawCodec(); return (GnuRSAPrivateKey) codec.decodePrivateKey(k); } else { throw new IllegalArgumentException("magic"); } }
public static GnuRSAPrivateKey valueOf(final byte[] k) { // check magic... // we should parse here enough bytes to know which codec to use, and // direct the byte array to the appropriate codec. since we only have one // codec, we could have immediately tried it; nevertheless since testing // one byte is cheaper than instatiating a codec that will fail we test // the first byte before we carry on. if (k[0] == Registry.MAGIC_RAW_RSA_PRIVATE_KEY[0]) { // it's likely to be in raw format. get a raw codec and hand it over final IKeyPairCodec codec = new RSAKeyPairRawCodec(); return (GnuRSAPrivateKey) codec.decodePrivateKey(k); } else { } }
2,483
protected String paramString() { return "JCheckBoxMenuItem"; }
protected String paramString() { return super.paramString(); }
2,485
public PrinterThread (ScreenChar[] sc, Font font, int cols, int rows, Color colorBg, Session ses) { setPriority(1); session = ses; screen = new ScreenChar[sc.length]; int len = sc.length; for (int x = 0; x < len; x++) { screen[x] = new ScreenChar(sc[x].s); screen[x].setCharAndAttr(sc[x].getChar(),sc[x].getCharAttr(),sc[x].isAttributePlace()); } numCols = cols; numRows = rows; this.colorBg = colorBg; this.font = font; }
public PrinterThread (ScreenChar[] sc, Font font, int cols, int rows, Color colorBg, boolean toDefaultPrinter, Session ses) { setPriority(1); session = ses; screen = new ScreenChar[sc.length]; int len = sc.length; for (int x = 0; x < len; x++) { screen[x] = new ScreenChar(sc[x].s); screen[x].setCharAndAttr(sc[x].getChar(),sc[x].getCharAttr(),sc[x].isAttributePlace()); } numCols = cols; numRows = rows; this.colorBg = colorBg; this.font = font; }
2,486
public void run () { //--- Create a printerJob object PrinterJob printJob = PrinterJob.getPrinterJob (); printJob.setJobName("tn5250j"); //--- Set the printable class to this one since we //--- are implementing the Printable interface printJob.setPrintable (this); //--- Show a print dialog to the user. If the user //--- clicks the print button, then print, otherwise //--- cancel the print job if (printJob.printDialog()) { try { // we do this because of loosing focus with jdk 1.4.0 session.requestFocus(); printJob.print(); } catch (Exception PrintException) { PrintException.printStackTrace(); } } else { // we do this because of loosing focus with jdk 1.4.0 session.requestFocus(); } session = null; int len = screen.length; for (int x = 0; x < len; x++) { screen[x] = null; } screen = null; }
public void run () { //--- Create a printerJob object PrinterJob printJob = PrinterJob.getPrinterJob (); printJob.setJobName("tn5250j"); //--- Set the printable class to this one since we //--- are implementing the Printable interface printJob.setPrintable (this); //--- Show a print dialog to the user. If the user //--- clicks the print button, then print, otherwise //--- cancel the print job if (printJob.printDialog()) { try { // we do this because of loosing focus with jdk 1.4.0 session.requestFocus(); printJob.print(); } catch (Exception PrintException) { PrintException.printStackTrace(); } } else { // we do this because of loosing focus with jdk 1.4.0 session.requestFocus(); } session = null; int len = screen.length; for (int x = 0; x < len; x++) { screen[x] = null; } screen = null; }
2,488
public IndexOutOfBoundsException(String s) { super(s); }
public IndexOutOfBoundsException(String s) { super(s); }
2,489
public NumberFormatException() { super(); }
public NumberFormatException() { super(); }
2,490
public ArithmeticException() { super(); }
public ArithmeticException() { super(); }
2,491
private void generateFormatPattern ( ) { StringBuffer leftpattern = new StringBuffer(); StringBuffer rightpattern = new StringBuffer(); StringBuffer etemplate = new StringBuffer(); // precision is the size of the exponent excluding 'E' int esize = getPrecision().intValue(); // width including 'E' and exponent int wsize = getWidth().intValue() - esize - 1;Log.errorln("EXPONENT WIDTH:"+wsize+" Precision:"+esize); if(wsize > 2) etemplate.append("#"); leftpattern.append("0."); while (wsize-- > 3) leftpattern.append("0"); rightpattern.append("E0"); while (esize-- > 1) rightpattern.append("0"); // finish building the template etemplate.append(leftpattern.toString()+rightpattern.toString()); etemplate.append(";-"+leftpattern.toString()+rightpattern.toString()); formatPattern = etemplate.toString(); }
private void generateFormatPattern ( ) { StringBuffer leftpattern = new StringBuffer(); StringBuffer rightpattern = new StringBuffer(); StringBuffer etemplate = new StringBuffer(); // precision is the size of the exponent excluding 'E' int esize = getPrecision().intValue(); // width including 'E' and exponent int wsize = getWidth().intValue() - esize - 1; if(wsize > 2) etemplate.append("#"); leftpattern.append("0."); while (wsize-- > 3) leftpattern.append("0"); rightpattern.append("E0"); while (esize-- > 1) rightpattern.append("0"); // finish building the template etemplate.append(leftpattern.toString()+rightpattern.toString()); etemplate.append(";-"+leftpattern.toString()+rightpattern.toString()); formatPattern = etemplate.toString(); }
2,495
public void moveCursor (MouseEvent e) { if(!keyboardLocked) { int pos = getPosFromView(e.getX(),e.getY());// System.out.println((getRow(pos)) + "," + (getCol(pos)));// System.out.println(e.getX() + "," + e.getY()+ "," + fmWidth+ "," + fmHeight); if (pos < 0) return ; // because getRowColFromPoint returns offset of 1,1 we need to // translate to offset 0,0// pos -= (numCols + 1); int g = screen[pos].getWhichGUI(); // lets check for hot spots if (g >= ScreenChar.BUTTON_LEFT && g <= ScreenChar.BUTTON_LAST) { StringBuffer aid = new StringBuffer(); boolean aidFlag = true; switch (g) { case ScreenChar.BUTTON_RIGHT: case ScreenChar.BUTTON_MIDDLE: while (screen[--pos].getWhichGUI() != ScreenChar.BUTTON_LEFT) { } case ScreenChar.BUTTON_LEFT: if (screen[pos].getChar() == 'F') { pos++; } else aidFlag=false; if (screen[pos+1].getChar() != '=' && screen[pos+1].getChar() != '.' && screen[pos+1].getChar() != '/' ) {// System.out.println(" Hotspot clicked!!! we will send characters " +// screen[pos].getChar() +// screen[pos+1].getChar()); aid.append(screen[pos].getChar()); aid.append(screen[pos + 1].getChar()); } else {// System.out.println(" Hotspot clicked!!! we will send character " +// screen[pos].getChar());// aid.append(screen[pos].getChar()); } break; } if (aidFlag) { switch (g) { case ScreenChar.BUTTON_LEFT_UP: case ScreenChar.BUTTON_MIDDLE_UP: case ScreenChar.BUTTON_RIGHT_UP: case ScreenChar.BUTTON_ONE_UP: case ScreenChar.BUTTON_SB_UP: case ScreenChar.BUTTON_SB_GUIDE: gui.sendAidKey(tnvt.AID_ROLL_UP); break; case ScreenChar.BUTTON_LEFT_DN: case ScreenChar.BUTTON_MIDDLE_DN: case ScreenChar.BUTTON_RIGHT_DN: case ScreenChar.BUTTON_ONE_DN: case ScreenChar.BUTTON_SB_DN: case ScreenChar.BUTTON_SB_THUMB: gui.sendAidKey(tnvt.AID_ROLL_DOWN); break; case ScreenChar.BUTTON_LEFT_EB: case ScreenChar.BUTTON_MIDDLE_EB: case ScreenChar.BUTTON_RIGHT_EB: System.out.println("Send to external Browser"); break; default: int aidKey = Integer.parseInt(aid.toString()); if (aidKey >= 1 && aidKey <= 12) gui.sendAidKey(0x30 + aidKey); if (aidKey >= 13 && aidKey <= 24) gui.sendAidKey(0xB0 + (aidKey - 12)); } } else { if (screenFields.getCurrentField() != null) { int xPos = screenFields.getCurrentField().startPos(); for (int x = 0; x < aid.length(); x++) {// System.out.println(sr + "," + (sc + x) + " " + aid.charAt(x)); screen[xPos + x].setChar(aid.charAt(x)); }// System.out.println(aid); screenFields.setCurrentFieldMDT(); gui.sendAidKey(tnvt.AID_ENTER); } } } else { goto_XY(pos); isInField(lastPos); } } gui.requestFocus(); }
public void moveCursor (MouseEvent e) { if(!keyboardLocked) { int pos = getPosFromView(e.getX(),e.getY());// System.out.println((getRow(pos)) + "," + (getCol(pos)));// System.out.println(e.getX() + "," + e.getY()+ "," + fmWidth+ "," + fmHeight); if (pos < 0) return ; // because getRowColFromPoint returns offset of 1,1 we need to // translate to offset 0,0// pos -= (numCols + 1); int g = screen[pos].getWhichGUI(); // lets check for hot spots if (g >= ScreenChar.BUTTON_LEFT && g <= ScreenChar.BUTTON_LAST) { StringBuffer aid = new StringBuffer(); boolean aidFlag = true; switch (g) { case ScreenChar.BUTTON_RIGHT: case ScreenChar.BUTTON_MIDDLE: while (screen[--pos].getWhichGUI() != ScreenChar.BUTTON_LEFT) { } case ScreenChar.BUTTON_LEFT: if (screen[pos].getChar() == 'F') { pos++; } else aidFlag=false; if (screen[pos+1].getChar() != '=' && screen[pos+1].getChar() != '.' && screen[pos+1].getChar() != '/' ) {// System.out.println(" Hotspot clicked!!! we will send characters " +// screen[pos].getChar() +// screen[pos+1].getChar()); aid.append(screen[pos].getChar()); aid.append(screen[pos + 1].getChar()); } else {// System.out.println(" Hotspot clicked!!! we will send character " +// screen[pos].getChar());// aid.append(screen[pos].getChar()); } break; } if (aidFlag) { switch (g) { case ScreenChar.BUTTON_LEFT_UP: case ScreenChar.BUTTON_MIDDLE_UP: case ScreenChar.BUTTON_RIGHT_UP: case ScreenChar.BUTTON_ONE_UP: case ScreenChar.BUTTON_SB_UP: case ScreenChar.BUTTON_SB_GUIDE: gui.sendAidKey(tnvt.AID_ROLL_UP); break; case ScreenChar.BUTTON_LEFT_DN: case ScreenChar.BUTTON_MIDDLE_DN: case ScreenChar.BUTTON_RIGHT_DN: case ScreenChar.BUTTON_ONE_DN: case ScreenChar.BUTTON_SB_DN: case ScreenChar.BUTTON_SB_THUMB: gui.sendAidKey(tnvt.AID_ROLL_DOWN); break; case ScreenChar.BUTTON_LEFT_EB: case ScreenChar.BUTTON_MIDDLE_EB: case ScreenChar.BUTTON_RIGHT_EB: System.out.println("Send to external Browser"); break; default: int aidKey = Integer.parseInt(aid.toString()); if (aidKey >= 1 && aidKey <= 12) gui.sendAidKey(0x30 + aidKey); if (aidKey >= 13 && aidKey <= 24) gui.sendAidKey(0xB0 + (aidKey - 12)); } } else { if (screenFields.getCurrentField() != null) { int xPos = screenFields.getCurrentField().startPos(); for (int x = 0; x < aid.length(); x++) {// System.out.println(sr + "," + (sc + x) + " " + aid.charAt(x)); screen[xPos + x].setChar(aid.charAt(x)); }// System.out.println(aid); screenFields.setCurrentFieldMDT(); gui.sendAidKey(tnvt.AID_ENTER); } } } else { goto_XY(pos); isInField(lastPos); } } gui.requestFocus(); }
2,496
protected final Vector sumThem(boolean which) { StringBuffer s = new StringBuffer(); getBoundingArea(workR); gui.rubberband.reset(); gui.repaint();// System.out.println("Summing"); // obtain the decimal format for parsing DecimalFormat df = (DecimalFormat)NumberFormat.getInstance() ; DecimalFormatSymbols dfs = df.getDecimalFormatSymbols(); if (which) { dfs.setDecimalSeparator('.'); dfs.setGroupingSeparator(','); } else { dfs.setDecimalSeparator(','); dfs.setGroupingSeparator('.'); } df.setDecimalFormatSymbols(dfs); Vector sumVector = new Vector(); // loop through all the screen characters to send them to the clip board int m = workR.x; int i = 0; int t = 0; double sum = 0.0; while (workR.height-- > 0) { t = workR.width; i = workR.y; while (t-- > 0) { // only copy printable numeric characters (in this case >= ' ') char c = screen[getPos(m - 1,i - 1)].getChar(); if (((c >= '0' && c <= '9') || c== '.' || c == ',' || c == '-') && !screen[getPos(m - 1,i - 1)].nonDisplay) { s.append(c); } i++; } if (s.length() > 0) { if (s.charAt(s.length()-1) == '-') { s.insert(0,'-'); s.deleteCharAt(s.length()-1); } try { Number n = df.parse(s.toString());// System.out.println(s + " " + n.doubleValue()); sumVector.add(new Double(n.doubleValue())); sum += n.doubleValue(); } catch (ParseException pe) { System.out.println(pe.getMessage() + " at " + pe.getErrorOffset()); } } s.setLength(0); m++; }// System.out.println(sum); return sumVector; }
protected final Vector sumThem(boolean which) { StringBuffer s = new StringBuffer(); getBoundingArea(workR); gui.rubberband.reset(); gui.repaint();// System.out.println("Summing"); // obtain the decimal format for parsing DecimalFormat df = (DecimalFormat)NumberFormat.getInstance() ; DecimalFormatSymbols dfs = df.getDecimalFormatSymbols(); if (which) { dfs.setDecimalSeparator('.'); dfs.setGroupingSeparator(','); } else { dfs.setDecimalSeparator(','); dfs.setGroupingSeparator('.'); } df.setDecimalFormatSymbols(dfs); Vector sumVector = new Vector(); // loop through all the screen characters to send them to the clip board int m = workR.x; int i = 0; int t = 0; double sum = 0.0; while (workR.height-- > 0) { t = workR.width; i = workR.y; while (t-- > 0) { // only copy printable numeric characters (in this case >= ' ') char c = screen[getPos(m - 1,i - 1)].getChar(); if (((c >= '0' && c <= '9') || c== '.' || c == ',' || c == '-') && !screen[getPos(m - 1,i - 1)].nonDisplay) { s.append(c); } i++; } if (s.length() > 0) { if (s.charAt(s.length()-1) == '-') { s.insert(0,'-'); s.deleteCharAt(s.length()-1); } try { Number n = df.parse(s.toString());// System.out.println(s + " " + n.doubleValue()); sumVector.add(new Double(n.doubleValue())); sum += n.doubleValue(); } catch (ParseException pe) { System.out.println(pe.getMessage() + " at " + pe.getErrorOffset()); } } s.setLength(0); m++; }// System.out.println(sum); return sumVector; }
2,498
protected synchronized void updateImage(int x, int y , int width, int height) { if (gg2d == null) { //System.out.println("was null"); gg2d = (Graphics2D)gui.getGraphics(); } // check for selected area and erase it before updating screen if (gui.rubberband != null && gui.rubberband.isAreaSelected()) { gui.rubberband.erase(); } if (bi == null || gg2d == null) { if (bi == null) System.out.println("bi was null in update image"); if (gg2d == null) System.out.println("gg2d was null in update image"); return; } g2d.setClip(x,y,width,height); if (!cursorActive && x + width <= bi.getWidth(null) && y + height <= (bi.getHeight(null) - fmWidth)) {// if (!cursorActive) { paintComponent2(g2d); }// if (tileimage != null) {//// AlphaComposite ac = AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 0.5f);// g2d.setComposite(ac);// g2d.drawImage(tileimage, null, null);// } // fix for jdk1.4 - found this while testing under jdk1.4 // if the height and or the width are equal to zero we skip the // the updating of the image.// if (gui.isVisible() && height > 0 && width > 0) {// bi.drawImageBuffer(gg2d,x,y,width,height);// } if (gui.isVisible()) { if (height > 0 && width > 0) { // We now redraw the selected area rectangle. if (gui.rubberband != null && gui.rubberband.isAreaSelected()) { gui.rubberband.draw(); } if (!fullRepaint) bi.drawImageBuffer(gg2d,x,y,width,height); else gui.repaint();// System.out.println(" something went right finally " + gui.isVisible() +// " height " + height + " width " + width); }// else { // bi.drawImageBuffer(gg2d);// System.out.println(" something is wrong here " + gui.isVisible() +// " height " + height + " width " + width);// } } }
protectedsynchronizedvoidupdateImage(intx,inty,intwidth,intheight){if(gg2d==null){//System.out.println("wasnull");gg2d=(Graphics2D)gui.getGraphics();}//checkforselectedareaanderaseitbeforeupdatingscreenif(gui.rubberband!=null&&gui.rubberband.isAreaSelected()){gui.rubberband.erase();}if(bi==null||gg2d==null){if(bi==null)System.out.println("biwasnullinupdateimage");if(gg2d==null)System.out.println("gg2dwasnullinupdateimage");return;}g2d.setClip(x,y,width,height);if(!cursorActive&&x+width<=bi.getWidth(null)&&y+height<=(bi.getHeight(null)-fmWidth)){//if(!cursorActive){paintComponent2(g2d);}//if(tileimage!=null){////AlphaCompositeac=AlphaComposite.getInstance(AlphaComposite.SRC_OVER,0.5f);//g2d.setComposite(ac);//g2d.drawImage(tileimage,null,null);//}//fixforjdk1.4-foundthiswhiletestingunderjdk1.4//iftheheightandorthewidthareequaltozeroweskipthe//theupdatingoftheimage.//if(gui.isVisible()&&height>0&&width>0){//bi.drawImageBuffer(gg2d,x,y,width,height);//}if(gui.isVisible()){if(height>0&&width>0){//Wenowredrawtheselectedarearectangle.if(gui.rubberband!=null&&gui.rubberband.isAreaSelected()){gui.rubberband.draw();}if(!fullRepaint)bi.drawImageBuffer(gg2d,x,y,width,height);elsegui.repaint();//System.out.println("somethingwentrightfinally"+gui.isVisible()+//"height"+height+"width"+width);}//else{//bi.drawImageBuffer(gg2d);//System.out.println("somethingiswronghere"+gui.isVisible()+//"height"+height+"width"+width);//}}}
2,499
protected synchronized void updateImage(int x, int y , int width, int height) { if (gg2d == null) { //System.out.println("was null"); gg2d = (Graphics2D)gui.getGraphics(); } // check for selected area and erase it before updating screen if (gui.rubberband != null && gui.rubberband.isAreaSelected()) { gui.rubberband.erase(); } if (bi == null || gg2d == null) { if (bi == null) System.out.println("bi was null in update image"); if (gg2d == null) System.out.println("gg2d was null in update image"); return; } g2d.setClip(x,y,width,height); if (!cursorActive && x + width <= bi.getWidth(null) && y + height <= (bi.getHeight(null) - fmWidth)) {// if (!cursorActive) { paintComponent2(g2d); }// if (tileimage != null) {//// AlphaComposite ac = AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 0.5f);// g2d.setComposite(ac);// g2d.drawImage(tileimage, null, null);// } // fix for jdk1.4 - found this while testing under jdk1.4 // if the height and or the width are equal to zero we skip the // the updating of the image.// if (gui.isVisible() && height > 0 && width > 0) {// bi.drawImageBuffer(gg2d,x,y,width,height);// } if (gui.isVisible()) { if (height > 0 && width > 0) { // We now redraw the selected area rectangle. if (gui.rubberband != null && gui.rubberband.isAreaSelected()) { gui.rubberband.draw(); } if (!fullRepaint) bi.drawImageBuffer(gg2d,x,y,width,height); else gui.repaint();// System.out.println(" something went right finally " + gui.isVisible() +// " height " + height + " width " + width); }// else { // bi.drawImageBuffer(gg2d);// System.out.println(" something is wrong here " + gui.isVisible() +// " height " + height + " width " + width);// } } }
protected synchronized void updateImage(int x, int y , int width, int height) { if (gg2d == null) { //System.out.println("was null"); gg2d = (Graphics2D)gui.getGraphics(); } // check for selected area and erase it before updating screen if (gui.rubberband != null && gui.rubberband.isAreaSelected()) { gui.rubberband.erase(); } if (bi == null || gg2d == null) { if (bi == null) System.out.println("bi was null in update image"); if (gg2d == null) System.out.println("gg2d was null in update image"); return; } g2d.setClip(x,y,width,height); if (!cursorActive && x + width <= bi.getWidth(null) && y + height <= (bi.getHeight(null) - fmWidth)) {// if (!cursorActive) { paintComponent2(g2d); }// if (tileimage != null) {//// AlphaComposite ac = AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 0.5f);// g2d.setComposite(ac);// g2d.drawImage(tileimage, null, null);// } // fix for jdk1.4 - found this while testing under jdk1.4 // if the height and or the width are equal to zero we skip the // the updating of the image.// if (gui.isVisible() && height > 0 && width > 0) {// bi.drawImageBuffer(gg2d,x,y,width,height);// } if (gui.isVisible()) { if (height > 0 && width > 0) { // We now redraw the selected area rectangle. if (gui.rubberband != null && gui.rubberband.isAreaSelected()) { gui.rubberband.draw(); } if (!fullRepaint) { bi.drawImageBuffer(gg2d,x,y,width,height); else gui.repaint();// System.out.println(" something went right finally " + gui.isVisible() +// " height " + height + " width " + width); }// else { // bi.drawImageBuffer(gg2d);// System.out.println(" something is wrong here " + gui.isVisible() +// " height " + height + " width " + width);// } } }
2,500
protected void installDefaults(JLabel c) { UIDefaults defaults = UIManager.getLookAndFeelDefaults(); c.setForeground(defaults.getColor("Label.foreground")); c.setBackground(defaults.getColor("Label.background")); c.setFont(defaults.getFont("Label.font")); c.setBorder(defaults.getBorder("Label.border")); c.setOpaque(true); //XXX: There are properties we don't use called disabledForeground //and disabledShadow. }
protected void installDefaults(JLabel c) { UIDefaults defaults = UIManager.getLookAndFeelDefaults(); c.setForeground(defaults.getColor("Label.foreground")); c.setBackground(defaults.getColor("Label.background")); c.setFont(defaults.getFont("Label.font")); c.setBorder(defaults.getBorder("Label.border")); //XXX: There are properties we don't use called disabledForeground //and disabledShadow. }
2,502
public MenuEvent(Object source) { super(source); } // MenuEvent()
public MenuEvent(Object source) { super(source); } // MenuEvent()
2,504
public MenuEvent(Object source) { super(source); } // MenuEvent()
public MenuEvent(Object source) { super(source); } // MenuEvent()
2,505
public void sendKeys(String text) { if (keysBuffered) { text = bufferedKeys + text; keysBuffered = false; bufferedKeys = ""; } // check to see if position is in a field and if it is then change // current field to that field isInField(lastPos,true); strokenizer.setKeyStrokes(text); String s; boolean done = false; while (strokenizer.hasMoreKeyStrokes() && !done) { s = strokenizer.nextKeyStroke(); if (s.length() == 1) { simulateKeyStroke(s.charAt(0)); } else { if (s != null) simulateMnemonic(getMnemonicValue(s)); else System.out.println(" mnemonic " + s); } if (keyboardLocked) { bufferedKeys = strokenizer.getUnprocessedKeyStroked(); if (bufferedKeys != null) keysBuffered = true; done = true; } } }
public void sendKeys(String text) { if (keysBuffered) { text = bufferedKeys + text; keysBuffered = false; bufferedKeys = ""; } // check to see if position is in a field and if it is then change // current field to that field isInField(lastPos,true); strokenizer.setKeyStrokes(text); String s; boolean done = false; while (strokenizer.hasMoreKeyStrokes() && !done) { s = strokenizer.nextKeyStroke(); if (s.length() == 1) { simulateKeyStroke(s.charAt(0)); } else { if (s != null) simulateMnemonic(getMnemonicValue(s)); else System.out.println(" mnemonic " + s); } if (keyboardLocked) { bufferedKeys = strokenizer.getUnprocessedKeyStroked(); if (bufferedKeys != null) keysBuffered = true; done = true; } } }
2,507
public void sendKeys(String text) { if (keysBuffered) { text = bufferedKeys + text; keysBuffered = false; bufferedKeys = ""; } // check to see if position is in a field and if it is then change // current field to that field isInField(lastPos,true); strokenizer.setKeyStrokes(text); String s; boolean done = false; while (strokenizer.hasMoreKeyStrokes() && !done) { s = strokenizer.nextKeyStroke(); if (s.length() == 1) { simulateKeyStroke(s.charAt(0)); } else { if (s != null) simulateMnemonic(getMnemonicValue(s)); else System.out.println(" mnemonic " + s); } if (keyboardLocked) { bufferedKeys = strokenizer.getUnprocessedKeyStroked(); if (bufferedKeys != null) keysBuffered = true; done = true; } } }
public void sendKeys(String text) { if (keysBuffered) { text = bufferedKeys + text; keysBuffered = false; bufferedKeys = ""; } // check to see if position is in a field and if it is then change // current field to that field isInField(lastPos,true); strokenizer.setKeyStrokes(text); String s; boolean done = false; while (strokenizer.hasMoreKeyStrokes() && !done) { s = strokenizer.nextKeyStroke(); if (s.length() == 1) { simulateKeyStroke(s.charAt(0)); } else { if (s != null) simulateMnemonic(getMnemonicValue(s)); else System.out.println(" mnemonic " + s); } if (keyboardLocked) { bufferedKeys = strokenizer.getUnprocessedKeyStroked(); if (bufferedKeys != null) keysBuffered = true; done = true; } } }
2,508
public void sendKeys(String text) { if (keysBuffered) { text = bufferedKeys + text; keysBuffered = false; bufferedKeys = ""; } // check to see if position is in a field and if it is then change // current field to that field isInField(lastPos,true); strokenizer.setKeyStrokes(text); String s; boolean done = false; while (strokenizer.hasMoreKeyStrokes() && !done) { s = strokenizer.nextKeyStroke(); if (s.length() == 1) { simulateKeyStroke(s.charAt(0)); } else { if (s != null) simulateMnemonic(getMnemonicValue(s)); else System.out.println(" mnemonic " + s); } if (keyboardLocked) { bufferedKeys = strokenizer.getUnprocessedKeyStroked(); if (bufferedKeys != null) keysBuffered = true; done = true; } } }
public void sendKeys(String text) { if (keysBuffered) { text = bufferedKeys + text; keysBuffered = false; bufferedKeys = ""; } // check to see if position is in a field and if it is then change // current field to that field isInField(lastPos,true); strokenizer.setKeyStrokes(text); String s; boolean done = false; while (strokenizer.hasMoreKeyStrokes() && !done) { s = strokenizer.nextKeyStroke(); if (s.length() == 1) { simulateKeyStroke(s.charAt(0)); } else { if (s != null) simulateMnemonic(getMnemonicValue(s)); else System.out.println(" mnemonic " + s); } if (keyboardLocked) { bufferedKeys = strokenizer.getUnprocessedKeyStroked(); if (bufferedKeys != null) keysBuffered = true; done = true; } } }
2,509
public void sendKeys(String text) { if (keysBuffered) { text = bufferedKeys + text; keysBuffered = false; bufferedKeys = ""; } // check to see if position is in a field and if it is then change // current field to that field isInField(lastPos,true); strokenizer.setKeyStrokes(text); String s; boolean done = false; while (strokenizer.hasMoreKeyStrokes() && !done) { s = strokenizer.nextKeyStroke(); if (s.length() == 1) { simulateKeyStroke(s.charAt(0)); } else { if (s != null) simulateMnemonic(getMnemonicValue(s)); else System.out.println(" mnemonic " + s); } if (keyboardLocked) { bufferedKeys = strokenizer.getUnprocessedKeyStroked(); if (bufferedKeys != null) keysBuffered = true; done = true; } } }
public void sendKeys(String text) { if (keysBuffered) { text = bufferedKeys + text; keysBuffered = false; bufferedKeys = ""; } // check to see if position is in a field and if it is then change // current field to that field isInField(lastPos,true); strokenizer.setKeyStrokes(text); String s; boolean done = false; while (strokenizer.hasMoreKeyStrokes() && !done) { s = strokenizer.nextKeyStroke(); if (s.length() == 1) { simulateKeyStroke(s.charAt(0)); } else { if (s != null) simulateMnemonic(getMnemonicValue(s)); else System.out.println(" mnemonic " + s); } if (keyboardLocked) { bufferedKeys = strokenizer.getUnprocessedKeyStroked(); if (bufferedKeys != null) keysBuffered = true; done = true; } } }
2,510
public static final ResourceBundle getBundle(String baseName, Locale locale) { return getBundle(baseName, locale, security.getCallingClassLoader()); }
public static final ResourceBundle getBundle(String baseName, Locale locale) { return getBundle(baseName, locale, security.getCallingClassLoader()); }
2,511
public static final ResourceBundle getBundle(String baseName, Locale locale) { return getBundle(baseName, locale, security.getCallingClassLoader()); }
public static final ResourceBundle getBundle(String baseName, Locale locale) { return getBundle(baseName, Locale.getDefault(), security.getCallingClassLoader()); }
2,512
public String toString() { return null; // TODO } // toString()
public String toString() { return null; // TODO } // toString()
2,514
public void setLevel(int newLevel) { switch (newLevel) { case OFF: Level.toLevel(Level.OFF_INT); break; case DEBUG: log.getLevel().toLevel(org.apache.log4j.Level.DEBUG_INT); break; case INFO: log.getLevel().toLevel(org.apache.log4j.Level.INFO_INT); break; case WARN: log.getLevel().toLevel(org.apache.log4j.Level.WARN_INT); break; case ERROR: log.getLevel().toLevel(org.apache.log4j.Level.ERROR_INT); break; case FATAL: log.getLevel().toLevel(org.apache.log4j.Level.FATAL_INT); break; } }
public void setLevel(int newLevel) { switch (newLevel) { case OFF: Level.toLevel(Level.OFF_INT); break; case DEBUG: Level.toLevel(org.apache.log4j.Level.DEBUG_INT); break; case INFO: log.getLevel().toLevel(org.apache.log4j.Level.INFO_INT); break; case WARN: log.getLevel().toLevel(org.apache.log4j.Level.WARN_INT); break; case ERROR: log.getLevel().toLevel(org.apache.log4j.Level.ERROR_INT); break; case FATAL: log.getLevel().toLevel(org.apache.log4j.Level.FATAL_INT); break; } }
2,516
public void setLevel(int newLevel) { switch (newLevel) { case OFF: Level.toLevel(Level.OFF_INT); break; case DEBUG: log.getLevel().toLevel(org.apache.log4j.Level.DEBUG_INT); break; case INFO: log.getLevel().toLevel(org.apache.log4j.Level.INFO_INT); break; case WARN: log.getLevel().toLevel(org.apache.log4j.Level.WARN_INT); break; case ERROR: log.getLevel().toLevel(org.apache.log4j.Level.ERROR_INT); break; case FATAL: log.getLevel().toLevel(org.apache.log4j.Level.FATAL_INT); break; } }
public void setLevel(int newLevel) { switch (newLevel) { case OFF: Level.toLevel(Level.OFF_INT); break; case DEBUG: log.getLevel().toLevel(org.apache.log4j.Level.DEBUG_INT); break; case INFO: Level.toLevel(org.apache.log4j.Level.INFO_INT); break; case WARN: log.getLevel().toLevel(org.apache.log4j.Level.WARN_INT); break; case ERROR: log.getLevel().toLevel(org.apache.log4j.Level.ERROR_INT); break; case FATAL: log.getLevel().toLevel(org.apache.log4j.Level.FATAL_INT); break; } }
2,517
public void setLevel(int newLevel) { switch (newLevel) { case OFF: Level.toLevel(Level.OFF_INT); break; case DEBUG: log.getLevel().toLevel(org.apache.log4j.Level.DEBUG_INT); break; case INFO: log.getLevel().toLevel(org.apache.log4j.Level.INFO_INT); break; case WARN: log.getLevel().toLevel(org.apache.log4j.Level.WARN_INT); break; case ERROR: log.getLevel().toLevel(org.apache.log4j.Level.ERROR_INT); break; case FATAL: log.getLevel().toLevel(org.apache.log4j.Level.FATAL_INT); break; } }
public void setLevel(int newLevel) { switch (newLevel) { case OFF: Level.toLevel(Level.OFF_INT); break; case DEBUG: log.getLevel().toLevel(org.apache.log4j.Level.DEBUG_INT); break; case INFO: log.getLevel().toLevel(org.apache.log4j.Level.INFO_INT); break; case WARN: Level.toLevel(org.apache.log4j.Level.WARN_INT); break; case ERROR: log.getLevel().toLevel(org.apache.log4j.Level.ERROR_INT); break; case FATAL: log.getLevel().toLevel(org.apache.log4j.Level.FATAL_INT); break; } }
2,518
public void setLevel(int newLevel) { switch (newLevel) { case OFF: Level.toLevel(Level.OFF_INT); break; case DEBUG: log.getLevel().toLevel(org.apache.log4j.Level.DEBUG_INT); break; case INFO: log.getLevel().toLevel(org.apache.log4j.Level.INFO_INT); break; case WARN: log.getLevel().toLevel(org.apache.log4j.Level.WARN_INT); break; case ERROR: log.getLevel().toLevel(org.apache.log4j.Level.ERROR_INT); break; case FATAL: log.getLevel().toLevel(org.apache.log4j.Level.FATAL_INT); break; } }
public void setLevel(int newLevel) { switch (newLevel) { case OFF: Level.toLevel(Level.OFF_INT); break; case DEBUG: log.getLevel().toLevel(org.apache.log4j.Level.DEBUG_INT); break; case INFO: log.getLevel().toLevel(org.apache.log4j.Level.INFO_INT); break; case WARN: log.getLevel().toLevel(org.apache.log4j.Level.WARN_INT); break; case ERROR: Level.toLevel(org.apache.log4j.Level.ERROR_INT); break; case FATAL: log.getLevel().toLevel(org.apache.log4j.Level.FATAL_INT); break; } }
2,519
public void setLevel(int newLevel) { switch (newLevel) { case OFF: Level.toLevel(Level.OFF_INT); break; case DEBUG: log.getLevel().toLevel(org.apache.log4j.Level.DEBUG_INT); break; case INFO: log.getLevel().toLevel(org.apache.log4j.Level.INFO_INT); break; case WARN: log.getLevel().toLevel(org.apache.log4j.Level.WARN_INT); break; case ERROR: log.getLevel().toLevel(org.apache.log4j.Level.ERROR_INT); break; case FATAL: log.getLevel().toLevel(org.apache.log4j.Level.FATAL_INT); break; } }
public void setLevel(int newLevel) { switch (newLevel) { case OFF: Level.toLevel(Level.OFF_INT); break; case DEBUG: log.getLevel().toLevel(org.apache.log4j.Level.DEBUG_INT); break; case INFO: log.getLevel().toLevel(org.apache.log4j.Level.INFO_INT); break; case WARN: log.getLevel().toLevel(org.apache.log4j.Level.WARN_INT); break; case ERROR: log.getLevel().toLevel(org.apache.log4j.Level.ERROR_INT); break; case FATAL: Level.toLevel(org.apache.log4j.Level.FATAL_INT); break; } }
2,520
public void addSelectionInterval(int index0, int index1) { if (index0 == -1 || index1 == -1) return; int lo = Math.min(index0, index1); int hi = Math.max(index0, index1); oldSel = sel.clone(); if (selectionMode == SINGLE_SELECTION) setSelectionInterval(index0, index1); // COMPAT: Like Sun (but not like IBM), we allow calls to // addSelectionInterval when selectionMode is // SINGLE_SELECTION_INTERVAL iff the interval being added // is adjacent to an already selected interval if (selectionMode == SINGLE_INTERVAL_SELECTION) if (!(isSelectedIndex(index0) || isSelectedIndex(index1) || isSelectedIndex(Math.max(lo-1,0)) || isSelectedIndex(Math.min(hi+1,sel.size())))) sel.clear(); // We have to update the anchorSelectionIndex and leadSelectionIndex // variables // The next if statements breaks down to "if this selection is adjacent // to the previous selection and going in the same direction" if ((isSelectedIndex(leadSelectionIndex)) && ((index0 - 1 == leadSelectionIndex && (index1 >= index0) && (leadSelectionIndex >= anchorSelectionIndex)) || (index0 + 1 == leadSelectionIndex && (index1 <= index0) && (leadSelectionIndex <= anchorSelectionIndex))) && (anchorSelectionIndex != -1 || leadSelectionIndex != -1)) { // setting setLeadCalledFromAdd to true tells setLeadSelectionIndex // not to update oldSel setLeadCalledFromAdd = true; setLeadSelectionIndex(index1); setLeadCalledFromAdd = false; } else { leadSelectionIndex = index1; anchorSelectionIndex = index0; sel.set(lo, hi+1); fireDifference(sel, (BitSet) oldSel); } }
public void addSelectionInterval(int index0, int index1) { if (index0 == -1 || index1 == -1) return; int lo = Math.min(index0, index1); int hi = Math.max(index0, index1); oldSel = sel.clone(); if (selectionMode == SINGLE_SELECTION) setSelectionInterval(index0, index1); // COMPAT: Like Sun (but not like IBM), we allow calls to // addSelectionInterval when selectionMode is // SINGLE_SELECTION_INTERVAL iff the interval being added // is adjacent to an already selected interval if (selectionMode == SINGLE_INTERVAL_SELECTION) if (!(isSelectedIndex(index0) || isSelectedIndex(index1) || isSelectedIndex(Math.max(lo-1,0)) || isSelectedIndex(Math.min(hi+1,sel.size())))) sel.clear(); // We have to update the anchorSelectionIndex and leadSelectionIndex // variables // The next if statements breaks down to "if this selection is adjacent // to the previous selection and going in the same direction" if ((isSelectedIndex(leadSelectionIndex)) && ((index0 - 1 == leadSelectionIndex && (index1 >= index0) && (leadSelectionIndex >= anchorSelectionIndex)) || (index0 + 1 == leadSelectionIndex && (index1 <= index0) && (leadSelectionIndex <= anchorSelectionIndex))) && (anchorSelectionIndex != -1 || leadSelectionIndex != -1)) { // setting setLeadCalledFromAdd to true tells setLeadSelectionIndex // not to update oldSel setLeadCalledFromAdd = true; setLeadSelectionIndex(index1); setLeadCalledFromAdd = false; } else { leadSelectionIndex = index1; anchorSelectionIndex = index0; sel.set(lo, hi+1); fireDifference(sel, (BitSet) oldSel); } }
2,521
public void setAnchorSelectionIndex(int anchorIndex) { anchorSelectionIndex = anchorIndex; }
public void setAnchorSelectionIndex(int index) { anchorSelectionIndex = anchorIndex; }
2,523
public void setAnchorSelectionIndex(int anchorIndex) { anchorSelectionIndex = anchorIndex; }
public void setAnchorSelectionIndex(int anchorIndex) { if (anchorSelectionIndex != index) { int old = anchorSelectionIndex; anchorSelectionIndex = index; if (leadAnchorNotificationEnabled) fireValueChanged(index, old); } }
2,524
public void setSelectionInterval(int index0, int index1) { if (index0 == -1 || index1 == -1) return; BitSet oldSel = (BitSet) sel.clone(); sel.clear(); if (selectionMode == SINGLE_SELECTION) index0 = index1; int lo = Math.min(index0, index1); int hi = Math.max(index0, index1); sel.set(lo, hi+1); // update the anchorSelectionIndex and leadSelectionIndex variables setAnchorSelectionIndex(index0); leadSelectionIndex=index1; fireDifference(sel, oldSel); }
public void setSelectionInterval(int anchor, int lead) { if (index0 == -1 || index1 == -1) return; BitSet oldSel = (BitSet) sel.clone(); sel.clear(); if (selectionMode == SINGLE_SELECTION) index0 = index1; int lo = Math.min(index0, index1); int hi = Math.max(index0, index1); sel.set(lo, hi+1); // update the anchorSelectionIndex and leadSelectionIndex variables setAnchorSelectionIndex(index0); leadSelectionIndex=index1; fireDifference(sel, oldSel); }
2,525
public void setSelectionInterval(int index0, int index1) { if (index0 == -1 || index1 == -1) return; BitSet oldSel = (BitSet) sel.clone(); sel.clear(); if (selectionMode == SINGLE_SELECTION) index0 = index1; int lo = Math.min(index0, index1); int hi = Math.max(index0, index1); sel.set(lo, hi+1); // update the anchorSelectionIndex and leadSelectionIndex variables setAnchorSelectionIndex(index0); leadSelectionIndex=index1; fireDifference(sel, oldSel); }
public void setSelectionInterval(int index0, int index1) { if (anchor == -1 || lead == -1) return; BitSet oldSel = (BitSet) sel.clone(); sel.clear(); if (selectionMode == SINGLE_SELECTION) index0 = index1; int lo = Math.min(index0, index1); int hi = Math.max(index0, index1); sel.set(lo, hi+1); // update the anchorSelectionIndex and leadSelectionIndex variables setAnchorSelectionIndex(index0); leadSelectionIndex=index1; fireDifference(sel, oldSel); }
2,526
public void setSelectionInterval(int index0, int index1) { if (index0 == -1 || index1 == -1) return; BitSet oldSel = (BitSet) sel.clone(); sel.clear(); if (selectionMode == SINGLE_SELECTION) index0 = index1; int lo = Math.min(index0, index1); int hi = Math.max(index0, index1); sel.set(lo, hi+1); // update the anchorSelectionIndex and leadSelectionIndex variables setAnchorSelectionIndex(index0); leadSelectionIndex=index1; fireDifference(sel, oldSel); }
public void setSelectionInterval(int index0, int index1) { if (index0 == -1 || index1 == -1) return; BitSet oldSel = (BitSet) sel.clone(); sel.clear(); if (selectionMode == SINGLE_SELECTION) anchor = lead; int lo = Math.min(index0, index1); int hi = Math.max(index0, index1); sel.set(lo, hi+1); // update the anchorSelectionIndex and leadSelectionIndex variables setAnchorSelectionIndex(index0); leadSelectionIndex=index1; fireDifference(sel, oldSel); }
2,527
public void setSelectionInterval(int index0, int index1) { if (index0 == -1 || index1 == -1) return; BitSet oldSel = (BitSet) sel.clone(); sel.clear(); if (selectionMode == SINGLE_SELECTION) index0 = index1; int lo = Math.min(index0, index1); int hi = Math.max(index0, index1); sel.set(lo, hi+1); // update the anchorSelectionIndex and leadSelectionIndex variables setAnchorSelectionIndex(index0); leadSelectionIndex=index1; fireDifference(sel, oldSel); }
public void setSelectionInterval(int index0, int index1) { if (index0 == -1 || index1 == -1) return; BitSet oldSel = (BitSet) sel.clone(); sel.clear(); if (selectionMode == SINGLE_SELECTION) index0 = index1; int lo = Math.min(index0, index1); int hi = Math.max(index0, index1); sel.set(lo, hi+1); // update the anchorSelectionIndex and leadSelectionIndex variables setAnchorSelectionIndex(index0); leadSelectionIndex=index1; fireDifference(sel, oldSel); }
2,528
public void setSelectionInterval(int index0, int index1) { if (index0 == -1 || index1 == -1) return; BitSet oldSel = (BitSet) sel.clone(); sel.clear(); if (selectionMode == SINGLE_SELECTION) index0 = index1; int lo = Math.min(index0, index1); int hi = Math.max(index0, index1); sel.set(lo, hi+1); // update the anchorSelectionIndex and leadSelectionIndex variables setAnchorSelectionIndex(index0); leadSelectionIndex=index1; fireDifference(sel, oldSel); }
public void setSelectionInterval(int index0, int index1) { if (index0 == -1 || index1 == -1) return; BitSet oldSel = (BitSet) sel.clone(); sel.clear(); if (selectionMode == SINGLE_SELECTION) index0 = index1; int lo = Math.min(index0, index1); int hi = Math.max(index0, index1); sel.set(lo, hi+1); // update the anchorSelectionIndex and leadSelectionIndex variables setAnchorSelectionIndex(index0); leadSelectionIndex=index1; fireDifference(sel, oldSel); }
2,529
void insertIndexInterval(int index, int length, boolean before);
void insertIndexInterval(int index, int length, boolean before);
2,531
void removeIndexInterval(int index0, int index1);
void removeIndexInterval(int index0, int index1);
2,532
public static Image createDisabledImage(Image src) { return (Toolkit.getDefaultToolkit(). createImage(new FilteredImageSource(src.getSource(), new GrayFilter(false, 100)))); }
public static Image createDisabledImage(Image src) { return (Toolkit.getDefaultToolkit(). createImage(new FilteredImageSource(src.getSource(), new GrayFilter(true, 0)))); }
2,534
public Socket createSocket(String destination, int port) { try { if (sslType.equals(SSLConstants.SSL_TYPE_NONE)) { System.out.println("Creating Socket"); // for jdk 1.4// return SocketFactory.getDefault().createSocket(destination,port); return new Socket(destination,port); } //Using SSL Socket SSLInterface o = null; try { Class c = Class.forName("org.tn5250j.transport.SSL.SSLImplementation"); o = (SSLInterface)c.newInstance(); o.setSSLType(sslType); return o.createSSLSocket(destination,port); } catch (Exception e) { System.err.println(e); } } catch (Exception e) { System.err.println("SocketConnector: createSocket: " + e.getMessage()); } return null; }
public Socket createSocket(String destination, int port) { try { if (sslType.equals(SSLConstants.SSL_TYPE_NONE)) { System.out.println("Creating Socket"); // for jdk 1.4// return SocketFactory.getDefault().createSocket(destination,port); return new Socket(destination,port); } //Using SSL Socket SSLInterface o = null; try { Class c = Class.forName("org.tn5250j.framework.transport.SSL.SSLImplementation"); o = (SSLInterface)c.newInstance(); o.setSSLType(sslType); return o.createSSLSocket(destination,port); } catch (Exception e) { System.err.println(e); } } catch (Exception e) { System.err.println("SocketConnector: createSocket: " + e.getMessage()); } return null; }
2,535
public static void setTabSet(MutableAttributeSet a, javax.swing.text.TabSet tabs) { a.addAttribute(StyleConstants.TabSet, tabs); }
public static void setTabSet(MutableAttributeSet a, javax.swing.text.TabSet tabs) { a.addAttribute(StyleConstants.TabSet, tabs); }
2,541
public void areaBounded(RubberBand band, int x1, int y1, int x2, int y2) {// repaint(x1,y1,x2-1,y2-1); repaint();// System.out.println(" bound " + band.getEndPoint()); }
log.debug(" bound " + band.getEndPoint()); log.debug(" bound " + band.getEndPoint()); log.debug(" bound " + band.getEndPoint()); publiclog.debug(" bound " + band.getEndPoint()); voidlog.debug(" bound " + band.getEndPoint()); areaBounded(RubberBandlog.debug(" bound " + band.getEndPoint()); band,log.debug(" bound " + band.getEndPoint()); intlog.debug(" bound " + band.getEndPoint()); x1,log.debug(" bound " + band.getEndPoint()); intlog.debug(" bound " + band.getEndPoint()); y1,log.debug(" bound " + band.getEndPoint()); intlog.debug(" bound " + band.getEndPoint()); x2,log.debug(" bound " + band.getEndPoint()); intlog.debug(" bound " + band.getEndPoint()); y2)log.debug(" bound " + band.getEndPoint()); {//log.debug(" bound " + band.getEndPoint()); log.debug(" bound " + band.getEndPoint()); log.debug(" bound " + band.getEndPoint()); log.debug(" bound " + band.getEndPoint()); log.debug(" bound " + band.getEndPoint()); log.debug(" bound " + band.getEndPoint()); repaint(x1,y1,x2-1,y2-1);log.debug(" bound " + band.getEndPoint()); log.debug(" bound " + band.getEndPoint()); log.debug(" bound " + band.getEndPoint()); log.debug(" bound " + band.getEndPoint()); log.debug(" bound " + band.getEndPoint()); log.debug(" bound " + band.getEndPoint()); repaint();//log.debug(" bound " + band.getEndPoint()); log.debug(" bound " + band.getEndPoint()); log.debug(" bound " + band.getEndPoint()); log.debug(" bound " + band.getEndPoint()); log.debug(" bound " + band.getEndPoint()); log.debug(" bound " + band.getEndPoint()); System.out.println("log.debug(" bound " + band.getEndPoint()); boundlog.debug(" bound " + band.getEndPoint()); "log.debug(" bound " + band.getEndPoint()); +log.debug(" bound " + band.getEndPoint()); band.getEndPoint());log.debug(" bound " + band.getEndPoint()); log.debug(" bound " + band.getEndPoint()); log.debug(" bound " + band.getEndPoint()); }
2,542
private void doTransfer(java.io.File file) { try { Properties props = new Properties(); props.load(new java.io.FileInputStream(file)); org.tn5250j.tools.XTFRFile tfr = new org.tn5250j.tools.XTFRFile(null, vt, (Session)this,props); } catch (Exception exc) {} }
private void doTransfer(java.io.File file) { try { Properties props = new Properties(); props.load(new java.io.FileInputStream(file)); org.tn5250j.tools.XTFRFile tfr = new org.tn5250j.tools.XTFRFile(null, vt, (Session)this,props); } catch (Exception exc) { log.warn(""+exc.getMessage()); } }
2,543
private void jbInit() throws Exception { this.setLayout(borderLayout1);// this.setOpaque(false);// setDoubleBuffered(true); s.setOpaque(false); s.setDoubleBuffered(false); screen = new Screen5250(this,sesConfig); this.addComponentListener(this); if (!sesConfig.isPropertyExists("width") || !sesConfig.isPropertyExists("height")) // set the initialize size this.setSize(screen.getPreferredSize()); else { this.setSize(sesConfig.getIntegerProperty("width"), sesConfig.getIntegerProperty("height")); } addMouseListener(new MouseAdapter() { public void mousePressed(MouseEvent e) { /** @todo check for popup trigger on linux * */// if (e.isPopupTrigger()) { // using SwingUtilities because popuptrigger does not work on linux if (SwingUtilities.isRightMouseButton(e)) { doPopup(e); } } public void mouseReleased(MouseEvent e) {// System.out.println("Mouse Released"); } public void mouseClicked(MouseEvent e) { if (e.getClickCount() == 2 & doubleClick) { screen.sendKeys("[enter]"); } else { screen.moveCursor(e); repaint(); getFocusForMe(); } } }); scroller = new SessionScroller().getScrollerInstance((Session)this); if (!sesConfig.getStringProperty("mouseWheel").equals("Yes")) scroller.removeMouseWheelListener((Session)this); keyHandler = KeyboardHandler.getKeyboardHandlerInstance((Session)this); macros = new Macronizer(); Macronizer.init(); keyPad.addActionListener(this); if (sesConfig.getStringProperty("keypad").equals("Yes")) keyPad.setVisible(true); else keyPad.setVisible(false); // Warning do not change the the order of the adding of keypad and // the screen. This will cause resizing problems because it will // resize the screen first and during the resize we need to calculate // the bouding area based on the height of the keyPad. // See resizeMe() and getDrawingBounds() this.add(keyPad,BorderLayout.SOUTH); this.add(s,BorderLayout.CENTER); setRubberBand(new TNRubberBand(this)); this.requestFocus(); jumpEvent = new SessionJumpEvent(this); // check if double click sends enter if (sesConfig.getStringProperty("doubleClick").equals("Yes")) doubleClick = true; else doubleClick = false; DropTargetAdapter dta = new DropTargetAdapter() { public void drop(DropTargetDropEvent dtde) { Transferable tr = dtde.getTransferable(); dtde.acceptDrop(DnDConstants.ACTION_COPY_OR_MOVE); DataFlavor[] dfs = dtde.getCurrentDataFlavors(); if(tr.isDataFlavorSupported(DataFlavor.javaFileListFlavor)) { try { System.out.println("dtde drop it2 "); java.util.List fileList = (java.util.List)tr.getTransferData(DataFlavor.javaFileListFlavor); // implementation for when we are able to process a list // of files.// Iterator iterator = fileList.iterator();// if (iterator.hasNext()) {// File file = (File)iterator.next();// } java.io.File file = (java.io.File)fileList.get(0); System.out.println(file.toString()); dtde.dropComplete(true); doTransfer(file); return; } catch (UnsupportedFlavorException ufe) { System.out.println("importData: unsupported data flavor"); } catch (java.io.IOException ieo) { System.out.println("importData: I/O exception"); } catch (Exception ex) { System.out.println(ex.getMessage()); } finally { dtde.dropComplete(false); } } } }; DropTarget dt = new DropTarget((JPanel)this,dta); setDropTarget(dt); }
log.debug("Initializing macros"); log.debug("Initializing macros"); privatelog.debug("Initializing macros"); voidlog.debug("Initializing macros"); jbInit()log.debug("Initializing macros"); throwslog.debug("Initializing macros"); Exceptionlog.debug("Initializing macros"); log.debug("Initializing macros"); {log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); this.setLayout(borderLayout1);//log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); this.setOpaque(false);//log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); setDoubleBuffered(true);log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); s.setOpaque(false);log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); s.setDoubleBuffered(false);log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); screenlog.debug("Initializing macros"); =log.debug("Initializing macros"); newlog.debug("Initializing macros"); Screen5250(this,sesConfig);log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); this.addComponentListener(this);log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); iflog.debug("Initializing macros"); (!sesConfig.isPropertyExists("width")log.debug("Initializing macros"); ||log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); !sesConfig.isPropertyExists("height"))log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); //log.debug("Initializing macros"); setlog.debug("Initializing macros"); thelog.debug("Initializing macros"); initializelog.debug("Initializing macros"); sizelog.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); this.setSize(screen.getPreferredSize());log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); elselog.debug("Initializing macros"); {log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); this.setSize(sesConfig.getIntegerProperty("width"),log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); sesConfig.getIntegerProperty("height"));log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); }log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); addMouseListener(newlog.debug("Initializing macros"); MouseAdapter()log.debug("Initializing macros"); {log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); publiclog.debug("Initializing macros"); voidlog.debug("Initializing macros"); mousePressed(MouseEventlog.debug("Initializing macros"); e)log.debug("Initializing macros"); {log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); /**log.debug("Initializing macros"); @todolog.debug("Initializing macros"); checklog.debug("Initializing macros"); forlog.debug("Initializing macros"); popuplog.debug("Initializing macros"); triggerlog.debug("Initializing macros"); onlog.debug("Initializing macros"); linuxlog.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); *log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); *///log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); iflog.debug("Initializing macros"); (e.isPopupTrigger())log.debug("Initializing macros"); {log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); //log.debug("Initializing macros"); usinglog.debug("Initializing macros"); SwingUtilitieslog.debug("Initializing macros"); becauselog.debug("Initializing macros"); popuptriggerlog.debug("Initializing macros"); doeslog.debug("Initializing macros"); notlog.debug("Initializing macros"); worklog.debug("Initializing macros"); onlog.debug("Initializing macros"); linuxlog.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); iflog.debug("Initializing macros"); (SwingUtilities.isRightMouseButton(e))log.debug("Initializing macros"); {log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); doPopup(e);log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); }log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); }log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); publiclog.debug("Initializing macros"); voidlog.debug("Initializing macros"); mouseReleased(MouseEventlog.debug("Initializing macros"); e)log.debug("Initializing macros"); {//log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); System.out.println("Mouselog.debug("Initializing macros"); Released");log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); }log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); publiclog.debug("Initializing macros"); voidlog.debug("Initializing macros"); mouseClicked(MouseEventlog.debug("Initializing macros"); e)log.debug("Initializing macros"); {log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); iflog.debug("Initializing macros"); (e.getClickCount()log.debug("Initializing macros"); ==log.debug("Initializing macros"); 2log.debug("Initializing macros"); &log.debug("Initializing macros"); doubleClick)log.debug("Initializing macros"); {log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); screen.sendKeys("[enter]");log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); }log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); elselog.debug("Initializing macros"); {log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); screen.moveCursor(e);log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); repaint();log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); getFocusForMe();log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); }log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); }log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); });log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); scrollerlog.debug("Initializing macros"); =log.debug("Initializing macros"); newlog.debug("Initializing macros"); SessionScroller().getScrollerInstance((Session)this);log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); iflog.debug("Initializing macros"); (!sesConfig.getStringProperty("mouseWheel").equals("Yes"))log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); scroller.removeMouseWheelListener((Session)this);log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); keyHandlerlog.debug("Initializing macros"); =log.debug("Initializing macros"); KeyboardHandler.getKeyboardHandlerInstance((Session)this);log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); macroslog.debug("Initializing macros"); =log.debug("Initializing macros"); newlog.debug("Initializing macros"); Macronizer();log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); Macronizer.init();log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); keyPad.addActionListener(this);log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); iflog.debug("Initializing macros"); (sesConfig.getStringProperty("keypad").equals("Yes"))log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); keyPad.setVisible(true);log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); elselog.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); keyPad.setVisible(false);log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); //log.debug("Initializing macros"); Warninglog.debug("Initializing macros"); dolog.debug("Initializing macros"); notlog.debug("Initializing macros"); changelog.debug("Initializing macros"); thelog.debug("Initializing macros"); thelog.debug("Initializing macros"); orderlog.debug("Initializing macros"); oflog.debug("Initializing macros"); thelog.debug("Initializing macros"); addinglog.debug("Initializing macros"); oflog.debug("Initializing macros"); keypadlog.debug("Initializing macros"); andlog.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); //log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); thelog.debug("Initializing macros"); screen.log.debug("Initializing macros"); log.debug("Initializing macros"); Thislog.debug("Initializing macros"); willlog.debug("Initializing macros"); causelog.debug("Initializing macros"); resizinglog.debug("Initializing macros"); problemslog.debug("Initializing macros"); becauselog.debug("Initializing macros"); itlog.debug("Initializing macros"); willlog.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); //log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); resizelog.debug("Initializing macros"); thelog.debug("Initializing macros"); screenlog.debug("Initializing macros"); firstlog.debug("Initializing macros"); andlog.debug("Initializing macros"); duringlog.debug("Initializing macros"); thelog.debug("Initializing macros"); resizelog.debug("Initializing macros"); welog.debug("Initializing macros"); needlog.debug("Initializing macros"); tolog.debug("Initializing macros"); calculatelog.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); //log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); thelog.debug("Initializing macros"); boudinglog.debug("Initializing macros"); arealog.debug("Initializing macros"); basedlog.debug("Initializing macros"); onlog.debug("Initializing macros"); thelog.debug("Initializing macros"); heightlog.debug("Initializing macros"); oflog.debug("Initializing macros"); thelog.debug("Initializing macros"); keyPad.log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); //log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); Seelog.debug("Initializing macros"); resizeMe()log.debug("Initializing macros"); andlog.debug("Initializing macros"); getDrawingBounds()log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); this.add(keyPad,BorderLayout.SOUTH);log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); this.add(s,BorderLayout.CENTER);log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); setRubberBand(newlog.debug("Initializing macros"); TNRubberBand(this));log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); this.requestFocus();log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); jumpEventlog.debug("Initializing macros"); =log.debug("Initializing macros"); newlog.debug("Initializing macros"); SessionJumpEvent(this);log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); //log.debug("Initializing macros"); checklog.debug("Initializing macros"); iflog.debug("Initializing macros"); doublelog.debug("Initializing macros"); clicklog.debug("Initializing macros"); sendslog.debug("Initializing macros"); enterlog.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); iflog.debug("Initializing macros"); (sesConfig.getStringProperty("doubleClick").equals("Yes"))log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); doubleClicklog.debug("Initializing macros"); =log.debug("Initializing macros"); true;log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); elselog.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); doubleClicklog.debug("Initializing macros"); =log.debug("Initializing macros"); false;log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); DropTargetAdapterlog.debug("Initializing macros"); dtalog.debug("Initializing macros"); =log.debug("Initializing macros"); newlog.debug("Initializing macros"); DropTargetAdapter()log.debug("Initializing macros"); {log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); publiclog.debug("Initializing macros"); voidlog.debug("Initializing macros"); drop(DropTargetDropEventlog.debug("Initializing macros"); dtde)log.debug("Initializing macros"); {log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); Transferablelog.debug("Initializing macros"); trlog.debug("Initializing macros"); =log.debug("Initializing macros"); dtde.getTransferable();log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); dtde.acceptDrop(DnDConstants.ACTION_COPY_OR_MOVE);log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); DataFlavor[]log.debug("Initializing macros"); dfslog.debug("Initializing macros"); =log.debug("Initializing macros"); dtde.getCurrentDataFlavors();log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); if(tr.isDataFlavorSupported(DataFlavor.javaFileListFlavor))log.debug("Initializing macros"); {log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); trylog.debug("Initializing macros"); {log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); System.out.println("dtdelog.debug("Initializing macros"); droplog.debug("Initializing macros"); it2log.debug("Initializing macros"); ");log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); java.util.Listlog.debug("Initializing macros"); fileListlog.debug("Initializing macros"); =log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); (java.util.List)tr.getTransferData(DataFlavor.javaFileListFlavor);log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); //log.debug("Initializing macros"); implementationlog.debug("Initializing macros"); forlog.debug("Initializing macros"); whenlog.debug("Initializing macros"); welog.debug("Initializing macros"); arelog.debug("Initializing macros"); ablelog.debug("Initializing macros"); tolog.debug("Initializing macros"); processlog.debug("Initializing macros"); alog.debug("Initializing macros"); listlog.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); //log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); oflog.debug("Initializing macros"); files.//log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); Iteratorlog.debug("Initializing macros"); iteratorlog.debug("Initializing macros"); =log.debug("Initializing macros"); fileList.iterator();//log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); iflog.debug("Initializing macros"); (iterator.hasNext())log.debug("Initializing macros"); {//log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); Filelog.debug("Initializing macros"); filelog.debug("Initializing macros"); =log.debug("Initializing macros"); (File)iterator.next();//log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); }log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); java.io.Filelog.debug("Initializing macros"); filelog.debug("Initializing macros"); =log.debug("Initializing macros"); (java.io.File)fileList.get(0);log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); System.out.println(file.toString());log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); dtde.dropComplete(true);log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); doTransfer(file);log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); return;log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); }log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); catchlog.debug("Initializing macros"); (UnsupportedFlavorExceptionlog.debug("Initializing macros"); ufe)log.debug("Initializing macros"); {log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); System.out.println("importData:log.debug("Initializing macros"); unsupportedlog.debug("Initializing macros"); datalog.debug("Initializing macros"); flavor");log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); }log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); catchlog.debug("Initializing macros"); (java.io.IOExceptionlog.debug("Initializing macros"); ieo)log.debug("Initializing macros"); {log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); System.out.println("importData:log.debug("Initializing macros"); I/Olog.debug("Initializing macros"); exception");log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); }log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); catchlog.debug("Initializing macros"); (Exceptionlog.debug("Initializing macros"); ex)log.debug("Initializing macros"); {log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); System.out.println(ex.getMessage());log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); }log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); finallylog.debug("Initializing macros"); {log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); dtde.dropComplete(false);log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); }log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); }log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); }log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); };log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); DropTargetlog.debug("Initializing macros"); dtlog.debug("Initializing macros"); =log.debug("Initializing macros"); newlog.debug("Initializing macros"); DropTarget((JPanel)this,dta);log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); setDropTarget(dt);log.debug("Initializing macros"); log.debug("Initializing macros"); log.debug("Initializing macros"); }
2,544
private void jbInit() throws Exception { this.setLayout(borderLayout1);// this.setOpaque(false);// setDoubleBuffered(true); s.setOpaque(false); s.setDoubleBuffered(false); screen = new Screen5250(this,sesConfig); this.addComponentListener(this); if (!sesConfig.isPropertyExists("width") || !sesConfig.isPropertyExists("height")) // set the initialize size this.setSize(screen.getPreferredSize()); else { this.setSize(sesConfig.getIntegerProperty("width"), sesConfig.getIntegerProperty("height")); } addMouseListener(new MouseAdapter() { public void mousePressed(MouseEvent e) { /** @todo check for popup trigger on linux * */// if (e.isPopupTrigger()) { // using SwingUtilities because popuptrigger does not work on linux if (SwingUtilities.isRightMouseButton(e)) { doPopup(e); } } public void mouseReleased(MouseEvent e) {// System.out.println("Mouse Released"); } public void mouseClicked(MouseEvent e) { if (e.getClickCount() == 2 & doubleClick) { screen.sendKeys("[enter]"); } else { screen.moveCursor(e); repaint(); getFocusForMe(); } } }); scroller = new SessionScroller().getScrollerInstance((Session)this); if (!sesConfig.getStringProperty("mouseWheel").equals("Yes")) scroller.removeMouseWheelListener((Session)this); keyHandler = KeyboardHandler.getKeyboardHandlerInstance((Session)this); macros = new Macronizer(); Macronizer.init(); keyPad.addActionListener(this); if (sesConfig.getStringProperty("keypad").equals("Yes")) keyPad.setVisible(true); else keyPad.setVisible(false); // Warning do not change the the order of the adding of keypad and // the screen. This will cause resizing problems because it will // resize the screen first and during the resize we need to calculate // the bouding area based on the height of the keyPad. // See resizeMe() and getDrawingBounds() this.add(keyPad,BorderLayout.SOUTH); this.add(s,BorderLayout.CENTER); setRubberBand(new TNRubberBand(this)); this.requestFocus(); jumpEvent = new SessionJumpEvent(this); // check if double click sends enter if (sesConfig.getStringProperty("doubleClick").equals("Yes")) doubleClick = true; else doubleClick = false; DropTargetAdapter dta = new DropTargetAdapter() { public void drop(DropTargetDropEvent dtde) { Transferable tr = dtde.getTransferable(); dtde.acceptDrop(DnDConstants.ACTION_COPY_OR_MOVE); DataFlavor[] dfs = dtde.getCurrentDataFlavors(); if(tr.isDataFlavorSupported(DataFlavor.javaFileListFlavor)) { try { System.out.println("dtde drop it2 "); java.util.List fileList = (java.util.List)tr.getTransferData(DataFlavor.javaFileListFlavor); // implementation for when we are able to process a list // of files.// Iterator iterator = fileList.iterator();// if (iterator.hasNext()) {// File file = (File)iterator.next();// } java.io.File file = (java.io.File)fileList.get(0); System.out.println(file.toString()); dtde.dropComplete(true); doTransfer(file); return; } catch (UnsupportedFlavorException ufe) { System.out.println("importData: unsupported data flavor"); } catch (java.io.IOException ieo) { System.out.println("importData: I/O exception"); } catch (Exception ex) { System.out.println(ex.getMessage()); } finally { dtde.dropComplete(false); } } } }; DropTarget dt = new DropTarget((JPanel)this,dta); setDropTarget(dt); }
private void jbInit() throws Exception { this.setLayout(borderLayout1);// this.setOpaque(false);// setDoubleBuffered(true); s.setOpaque(false); s.setDoubleBuffered(false); screen = new Screen5250(this,sesConfig); this.addComponentListener(this); if (!sesConfig.isPropertyExists("width") || !sesConfig.isPropertyExists("height")) // set the initialize size this.setSize(screen.getPreferredSize()); else { this.setSize(sesConfig.getIntegerProperty("width"), sesConfig.getIntegerProperty("height")); } addMouseListener(new MouseAdapter() { public void mousePressed(MouseEvent e) { /** @todo check for popup trigger on linux * */// if (e.isPopupTrigger()) { // using SwingUtilities because popuptrigger does not work on linux if (SwingUtilities.isRightMouseButton(e)) { doPopup(e); } } public void mouseReleased(MouseEvent e) {// System.out.println("Mouse Released"); } public void mouseClicked(MouseEvent e) { if (e.getClickCount() == 2 & doubleClick) { screen.sendKeys("[enter]"); } else { screen.moveCursor(e); repaint(); getFocusForMe(); } } }); scroller = new SessionScroller().getScrollerInstance((Session)this); if (!sesConfig.getStringProperty("mouseWheel").equals("Yes")) scroller.removeMouseWheelListener((Session)this); keyHandler = KeyboardHandler.getKeyboardHandlerInstance((Session)this); macros = new Macronizer(); Macronizer.init(); keyPad.addActionListener(this); if (sesConfig.getStringProperty("keypad").equals("Yes")) keyPad.setVisible(true); else keyPad.setVisible(false); // Warning do not change the the order of the adding of keypad and // the screen. This will cause resizing problems because it will // resize the screen first and during the resize we need to calculate // the bouding area based on the height of the keyPad. // See resizeMe() and getDrawingBounds() this.add(keyPad,BorderLayout.SOUTH); this.add(s,BorderLayout.CENTER); setRubberBand(new TNRubberBand(this)); this.requestFocus(); jumpEvent = new SessionJumpEvent(this); // check if double click sends enter if (sesConfig.getStringProperty("doubleClick").equals("Yes")) doubleClick = true; else doubleClick = false; DropTargetAdapter dta = new DropTargetAdapter() { public void drop(DropTargetDropEvent dtde) { Transferable tr = dtde.getTransferable(); dtde.acceptDrop(DnDConstants.ACTION_COPY_OR_MOVE); DataFlavor[] dfs = dtde.getCurrentDataFlavors(); if(tr.isDataFlavorSupported(DataFlavor.javaFileListFlavor)) { try { log.debug("dtde drop it2 "); java.util.List fileList = (java.util.List)tr.getTransferData(DataFlavor.javaFileListFlavor); // implementation for when we are able to process a list // of files.// Iterator iterator = fileList.iterator();// if (iterator.hasNext()) {// File file = (File)iterator.next();// } java.io.File file = (java.io.File)fileList.get(0); System.out.println(file.toString()); dtde.dropComplete(true); doTransfer(file); return; } catch (UnsupportedFlavorException ufe) { System.out.println("importData: unsupported data flavor"); } catch (java.io.IOException ieo) { System.out.println("importData: I/O exception"); } catch (Exception ex) { System.out.println(ex.getMessage()); } finally { dtde.dropComplete(false); } } } }; DropTarget dt = new DropTarget((JPanel)this,dta); setDropTarget(dt); }
2,545
private void jbInit() throws Exception { this.setLayout(borderLayout1);// this.setOpaque(false);// setDoubleBuffered(true); s.setOpaque(false); s.setDoubleBuffered(false); screen = new Screen5250(this,sesConfig); this.addComponentListener(this); if (!sesConfig.isPropertyExists("width") || !sesConfig.isPropertyExists("height")) // set the initialize size this.setSize(screen.getPreferredSize()); else { this.setSize(sesConfig.getIntegerProperty("width"), sesConfig.getIntegerProperty("height")); } addMouseListener(new MouseAdapter() { public void mousePressed(MouseEvent e) { /** @todo check for popup trigger on linux * */// if (e.isPopupTrigger()) { // using SwingUtilities because popuptrigger does not work on linux if (SwingUtilities.isRightMouseButton(e)) { doPopup(e); } } public void mouseReleased(MouseEvent e) {// System.out.println("Mouse Released"); } public void mouseClicked(MouseEvent e) { if (e.getClickCount() == 2 & doubleClick) { screen.sendKeys("[enter]"); } else { screen.moveCursor(e); repaint(); getFocusForMe(); } } }); scroller = new SessionScroller().getScrollerInstance((Session)this); if (!sesConfig.getStringProperty("mouseWheel").equals("Yes")) scroller.removeMouseWheelListener((Session)this); keyHandler = KeyboardHandler.getKeyboardHandlerInstance((Session)this); macros = new Macronizer(); Macronizer.init(); keyPad.addActionListener(this); if (sesConfig.getStringProperty("keypad").equals("Yes")) keyPad.setVisible(true); else keyPad.setVisible(false); // Warning do not change the the order of the adding of keypad and // the screen. This will cause resizing problems because it will // resize the screen first and during the resize we need to calculate // the bouding area based on the height of the keyPad. // See resizeMe() and getDrawingBounds() this.add(keyPad,BorderLayout.SOUTH); this.add(s,BorderLayout.CENTER); setRubberBand(new TNRubberBand(this)); this.requestFocus(); jumpEvent = new SessionJumpEvent(this); // check if double click sends enter if (sesConfig.getStringProperty("doubleClick").equals("Yes")) doubleClick = true; else doubleClick = false; DropTargetAdapter dta = new DropTargetAdapter() { public void drop(DropTargetDropEvent dtde) { Transferable tr = dtde.getTransferable(); dtde.acceptDrop(DnDConstants.ACTION_COPY_OR_MOVE); DataFlavor[] dfs = dtde.getCurrentDataFlavors(); if(tr.isDataFlavorSupported(DataFlavor.javaFileListFlavor)) { try { System.out.println("dtde drop it2 "); java.util.List fileList = (java.util.List)tr.getTransferData(DataFlavor.javaFileListFlavor); // implementation for when we are able to process a list // of files.// Iterator iterator = fileList.iterator();// if (iterator.hasNext()) {// File file = (File)iterator.next();// } java.io.File file = (java.io.File)fileList.get(0); System.out.println(file.toString()); dtde.dropComplete(true); doTransfer(file); return; } catch (UnsupportedFlavorException ufe) { System.out.println("importData: unsupported data flavor"); } catch (java.io.IOException ieo) { System.out.println("importData: I/O exception"); } catch (Exception ex) { System.out.println(ex.getMessage()); } finally { dtde.dropComplete(false); } } } }; DropTarget dt = new DropTarget((JPanel)this,dta); setDropTarget(dt); }
private void jbInit() throws Exception { this.setLayout(borderLayout1);// this.setOpaque(false);// setDoubleBuffered(true); s.setOpaque(false); s.setDoubleBuffered(false); screen = new Screen5250(this,sesConfig); this.addComponentListener(this); if (!sesConfig.isPropertyExists("width") || !sesConfig.isPropertyExists("height")) // set the initialize size this.setSize(screen.getPreferredSize()); else { this.setSize(sesConfig.getIntegerProperty("width"), sesConfig.getIntegerProperty("height")); } addMouseListener(new MouseAdapter() { public void mousePressed(MouseEvent e) { /** @todo check for popup trigger on linux * */// if (e.isPopupTrigger()) { // using SwingUtilities because popuptrigger does not work on linux if (SwingUtilities.isRightMouseButton(e)) { doPopup(e); } } public void mouseReleased(MouseEvent e) {// System.out.println("Mouse Released"); } public void mouseClicked(MouseEvent e) { if (e.getClickCount() == 2 & doubleClick) { screen.sendKeys("[enter]"); } else { screen.moveCursor(e); repaint(); getFocusForMe(); } } }); scroller = new SessionScroller().getScrollerInstance((Session)this); if (!sesConfig.getStringProperty("mouseWheel").equals("Yes")) scroller.removeMouseWheelListener((Session)this); keyHandler = KeyboardHandler.getKeyboardHandlerInstance((Session)this); macros = new Macronizer(); Macronizer.init(); keyPad.addActionListener(this); if (sesConfig.getStringProperty("keypad").equals("Yes")) keyPad.setVisible(true); else keyPad.setVisible(false); // Warning do not change the the order of the adding of keypad and // the screen. This will cause resizing problems because it will // resize the screen first and during the resize we need to calculate // the bouding area based on the height of the keyPad. // See resizeMe() and getDrawingBounds() this.add(keyPad,BorderLayout.SOUTH); this.add(s,BorderLayout.CENTER); setRubberBand(new TNRubberBand(this)); this.requestFocus(); jumpEvent = new SessionJumpEvent(this); // check if double click sends enter if (sesConfig.getStringProperty("doubleClick").equals("Yes")) doubleClick = true; else doubleClick = false; DropTargetAdapter dta = new DropTargetAdapter() { public void drop(DropTargetDropEvent dtde) { Transferable tr = dtde.getTransferable(); dtde.acceptDrop(DnDConstants.ACTION_COPY_OR_MOVE); DataFlavor[] dfs = dtde.getCurrentDataFlavors(); if(tr.isDataFlavorSupported(DataFlavor.javaFileListFlavor)) { try { System.out.println("dtde drop it2 "); java.util.List fileList = (java.util.List)tr.getTransferData(DataFlavor.javaFileListFlavor); // implementation for when we are able to process a list // of files.// Iterator iterator = fileList.iterator();// if (iterator.hasNext()) {// File file = (File)iterator.next();// } java.io.File file = (java.io.File)fileList.get(0); System.out.println(file.toString()); dtde.dropComplete(true); doTransfer(file); return; } catch (UnsupportedFlavorException ufe) { log.info("importData: unsupported data flavor"); } catch (java.io.IOException ieo) { System.out.println("importData: I/O exception"); } catch (Exception ex) { System.out.println(ex.getMessage()); } finally { dtde.dropComplete(false); } } } }; DropTarget dt = new DropTarget((JPanel)this,dta); setDropTarget(dt); }
2,546
private void jbInit() throws Exception { this.setLayout(borderLayout1);// this.setOpaque(false);// setDoubleBuffered(true); s.setOpaque(false); s.setDoubleBuffered(false); screen = new Screen5250(this,sesConfig); this.addComponentListener(this); if (!sesConfig.isPropertyExists("width") || !sesConfig.isPropertyExists("height")) // set the initialize size this.setSize(screen.getPreferredSize()); else { this.setSize(sesConfig.getIntegerProperty("width"), sesConfig.getIntegerProperty("height")); } addMouseListener(new MouseAdapter() { public void mousePressed(MouseEvent e) { /** @todo check for popup trigger on linux * */// if (e.isPopupTrigger()) { // using SwingUtilities because popuptrigger does not work on linux if (SwingUtilities.isRightMouseButton(e)) { doPopup(e); } } public void mouseReleased(MouseEvent e) {// System.out.println("Mouse Released"); } public void mouseClicked(MouseEvent e) { if (e.getClickCount() == 2 & doubleClick) { screen.sendKeys("[enter]"); } else { screen.moveCursor(e); repaint(); getFocusForMe(); } } }); scroller = new SessionScroller().getScrollerInstance((Session)this); if (!sesConfig.getStringProperty("mouseWheel").equals("Yes")) scroller.removeMouseWheelListener((Session)this); keyHandler = KeyboardHandler.getKeyboardHandlerInstance((Session)this); macros = new Macronizer(); Macronizer.init(); keyPad.addActionListener(this); if (sesConfig.getStringProperty("keypad").equals("Yes")) keyPad.setVisible(true); else keyPad.setVisible(false); // Warning do not change the the order of the adding of keypad and // the screen. This will cause resizing problems because it will // resize the screen first and during the resize we need to calculate // the bouding area based on the height of the keyPad. // See resizeMe() and getDrawingBounds() this.add(keyPad,BorderLayout.SOUTH); this.add(s,BorderLayout.CENTER); setRubberBand(new TNRubberBand(this)); this.requestFocus(); jumpEvent = new SessionJumpEvent(this); // check if double click sends enter if (sesConfig.getStringProperty("doubleClick").equals("Yes")) doubleClick = true; else doubleClick = false; DropTargetAdapter dta = new DropTargetAdapter() { public void drop(DropTargetDropEvent dtde) { Transferable tr = dtde.getTransferable(); dtde.acceptDrop(DnDConstants.ACTION_COPY_OR_MOVE); DataFlavor[] dfs = dtde.getCurrentDataFlavors(); if(tr.isDataFlavorSupported(DataFlavor.javaFileListFlavor)) { try { System.out.println("dtde drop it2 "); java.util.List fileList = (java.util.List)tr.getTransferData(DataFlavor.javaFileListFlavor); // implementation for when we are able to process a list // of files.// Iterator iterator = fileList.iterator();// if (iterator.hasNext()) {// File file = (File)iterator.next();// } java.io.File file = (java.io.File)fileList.get(0); System.out.println(file.toString()); dtde.dropComplete(true); doTransfer(file); return; } catch (UnsupportedFlavorException ufe) { System.out.println("importData: unsupported data flavor"); } catch (java.io.IOException ieo) { System.out.println("importData: I/O exception"); } catch (Exception ex) { System.out.println(ex.getMessage()); } finally { dtde.dropComplete(false); } } } }; DropTarget dt = new DropTarget((JPanel)this,dta); setDropTarget(dt); }
private void jbInit() throws Exception { this.setLayout(borderLayout1);// this.setOpaque(false);// setDoubleBuffered(true); s.setOpaque(false); s.setDoubleBuffered(false); screen = new Screen5250(this,sesConfig); this.addComponentListener(this); if (!sesConfig.isPropertyExists("width") || !sesConfig.isPropertyExists("height")) // set the initialize size this.setSize(screen.getPreferredSize()); else { this.setSize(sesConfig.getIntegerProperty("width"), sesConfig.getIntegerProperty("height")); } addMouseListener(new MouseAdapter() { public void mousePressed(MouseEvent e) { /** @todo check for popup trigger on linux * */// if (e.isPopupTrigger()) { // using SwingUtilities because popuptrigger does not work on linux if (SwingUtilities.isRightMouseButton(e)) { doPopup(e); } } public void mouseReleased(MouseEvent e) {// System.out.println("Mouse Released"); } public void mouseClicked(MouseEvent e) { if (e.getClickCount() == 2 & doubleClick) { screen.sendKeys("[enter]"); } else { screen.moveCursor(e); repaint(); getFocusForMe(); } } }); scroller = new SessionScroller().getScrollerInstance((Session)this); if (!sesConfig.getStringProperty("mouseWheel").equals("Yes")) scroller.removeMouseWheelListener((Session)this); keyHandler = KeyboardHandler.getKeyboardHandlerInstance((Session)this); macros = new Macronizer(); Macronizer.init(); keyPad.addActionListener(this); if (sesConfig.getStringProperty("keypad").equals("Yes")) keyPad.setVisible(true); else keyPad.setVisible(false); // Warning do not change the the order of the adding of keypad and // the screen. This will cause resizing problems because it will // resize the screen first and during the resize we need to calculate // the bouding area based on the height of the keyPad. // See resizeMe() and getDrawingBounds() this.add(keyPad,BorderLayout.SOUTH); this.add(s,BorderLayout.CENTER); setRubberBand(new TNRubberBand(this)); this.requestFocus(); jumpEvent = new SessionJumpEvent(this); // check if double click sends enter if (sesConfig.getStringProperty("doubleClick").equals("Yes")) doubleClick = true; else doubleClick = false; DropTargetAdapter dta = new DropTargetAdapter() { public void drop(DropTargetDropEvent dtde) { Transferable tr = dtde.getTransferable(); dtde.acceptDrop(DnDConstants.ACTION_COPY_OR_MOVE); DataFlavor[] dfs = dtde.getCurrentDataFlavors(); if(tr.isDataFlavorSupported(DataFlavor.javaFileListFlavor)) { try { System.out.println("dtde drop it2 "); java.util.List fileList = (java.util.List)tr.getTransferData(DataFlavor.javaFileListFlavor); // implementation for when we are able to process a list // of files.// Iterator iterator = fileList.iterator();// if (iterator.hasNext()) {// File file = (File)iterator.next();// } java.io.File file = (java.io.File)fileList.get(0); System.out.println(file.toString()); dtde.dropComplete(true); doTransfer(file); return; } catch (UnsupportedFlavorException ufe) { System.out.println("importData: unsupported data flavor"); } catch (java.io.IOException ieo) { log.warn("importData: I/O exception"); } catch (Exception ex) { System.out.println(ex.getMessage()); } finally { dtde.dropComplete(false); } } } }; DropTarget dt = new DropTarget((JPanel)this,dta); setDropTarget(dt); }
2,547
private void jbInit() throws Exception { this.setLayout(borderLayout1);// this.setOpaque(false);// setDoubleBuffered(true); s.setOpaque(false); s.setDoubleBuffered(false); screen = new Screen5250(this,sesConfig); this.addComponentListener(this); if (!sesConfig.isPropertyExists("width") || !sesConfig.isPropertyExists("height")) // set the initialize size this.setSize(screen.getPreferredSize()); else { this.setSize(sesConfig.getIntegerProperty("width"), sesConfig.getIntegerProperty("height")); } addMouseListener(new MouseAdapter() { public void mousePressed(MouseEvent e) { /** @todo check for popup trigger on linux * */// if (e.isPopupTrigger()) { // using SwingUtilities because popuptrigger does not work on linux if (SwingUtilities.isRightMouseButton(e)) { doPopup(e); } } public void mouseReleased(MouseEvent e) {// System.out.println("Mouse Released"); } public void mouseClicked(MouseEvent e) { if (e.getClickCount() == 2 & doubleClick) { screen.sendKeys("[enter]"); } else { screen.moveCursor(e); repaint(); getFocusForMe(); } } }); scroller = new SessionScroller().getScrollerInstance((Session)this); if (!sesConfig.getStringProperty("mouseWheel").equals("Yes")) scroller.removeMouseWheelListener((Session)this); keyHandler = KeyboardHandler.getKeyboardHandlerInstance((Session)this); macros = new Macronizer(); Macronizer.init(); keyPad.addActionListener(this); if (sesConfig.getStringProperty("keypad").equals("Yes")) keyPad.setVisible(true); else keyPad.setVisible(false); // Warning do not change the the order of the adding of keypad and // the screen. This will cause resizing problems because it will // resize the screen first and during the resize we need to calculate // the bouding area based on the height of the keyPad. // See resizeMe() and getDrawingBounds() this.add(keyPad,BorderLayout.SOUTH); this.add(s,BorderLayout.CENTER); setRubberBand(new TNRubberBand(this)); this.requestFocus(); jumpEvent = new SessionJumpEvent(this); // check if double click sends enter if (sesConfig.getStringProperty("doubleClick").equals("Yes")) doubleClick = true; else doubleClick = false; DropTargetAdapter dta = new DropTargetAdapter() { public void drop(DropTargetDropEvent dtde) { Transferable tr = dtde.getTransferable(); dtde.acceptDrop(DnDConstants.ACTION_COPY_OR_MOVE); DataFlavor[] dfs = dtde.getCurrentDataFlavors(); if(tr.isDataFlavorSupported(DataFlavor.javaFileListFlavor)) { try { System.out.println("dtde drop it2 "); java.util.List fileList = (java.util.List)tr.getTransferData(DataFlavor.javaFileListFlavor); // implementation for when we are able to process a list // of files.// Iterator iterator = fileList.iterator();// if (iterator.hasNext()) {// File file = (File)iterator.next();// } java.io.File file = (java.io.File)fileList.get(0); System.out.println(file.toString()); dtde.dropComplete(true); doTransfer(file); return; } catch (UnsupportedFlavorException ufe) { System.out.println("importData: unsupported data flavor"); } catch (java.io.IOException ieo) { System.out.println("importData: I/O exception"); } catch (Exception ex) { System.out.println(ex.getMessage()); } finally { dtde.dropComplete(false); } } } }; DropTarget dt = new DropTarget((JPanel)this,dta); setDropTarget(dt); }
private void jbInit() throws Exception { this.setLayout(borderLayout1);// this.setOpaque(false);// setDoubleBuffered(true); s.setOpaque(false); s.setDoubleBuffered(false); screen = new Screen5250(this,sesConfig); this.addComponentListener(this); if (!sesConfig.isPropertyExists("width") || !sesConfig.isPropertyExists("height")) // set the initialize size this.setSize(screen.getPreferredSize()); else { this.setSize(sesConfig.getIntegerProperty("width"), sesConfig.getIntegerProperty("height")); } addMouseListener(new MouseAdapter() { public void mousePressed(MouseEvent e) { /** @todo check for popup trigger on linux * */// if (e.isPopupTrigger()) { // using SwingUtilities because popuptrigger does not work on linux if (SwingUtilities.isRightMouseButton(e)) { doPopup(e); } } public void mouseReleased(MouseEvent e) {// System.out.println("Mouse Released"); } public void mouseClicked(MouseEvent e) { if (e.getClickCount() == 2 & doubleClick) { screen.sendKeys("[enter]"); } else { screen.moveCursor(e); repaint(); getFocusForMe(); } } }); scroller = new SessionScroller().getScrollerInstance((Session)this); if (!sesConfig.getStringProperty("mouseWheel").equals("Yes")) scroller.removeMouseWheelListener((Session)this); keyHandler = KeyboardHandler.getKeyboardHandlerInstance((Session)this); macros = new Macronizer(); Macronizer.init(); keyPad.addActionListener(this); if (sesConfig.getStringProperty("keypad").equals("Yes")) keyPad.setVisible(true); else keyPad.setVisible(false); // Warning do not change the the order of the adding of keypad and // the screen. This will cause resizing problems because it will // resize the screen first and during the resize we need to calculate // the bouding area based on the height of the keyPad. // See resizeMe() and getDrawingBounds() this.add(keyPad,BorderLayout.SOUTH); this.add(s,BorderLayout.CENTER); setRubberBand(new TNRubberBand(this)); this.requestFocus(); jumpEvent = new SessionJumpEvent(this); // check if double click sends enter if (sesConfig.getStringProperty("doubleClick").equals("Yes")) doubleClick = true; else doubleClick = false; DropTargetAdapter dta = new DropTargetAdapter() { public void drop(DropTargetDropEvent dtde) { Transferable tr = dtde.getTransferable(); dtde.acceptDrop(DnDConstants.ACTION_COPY_OR_MOVE); DataFlavor[] dfs = dtde.getCurrentDataFlavors(); if(tr.isDataFlavorSupported(DataFlavor.javaFileListFlavor)) { try { System.out.println("dtde drop it2 "); java.util.List fileList = (java.util.List)tr.getTransferData(DataFlavor.javaFileListFlavor); // implementation for when we are able to process a list // of files.// Iterator iterator = fileList.iterator();// if (iterator.hasNext()) {// File file = (File)iterator.next();// } java.io.File file = (java.io.File)fileList.get(0); System.out.println(file.toString()); dtde.dropComplete(true); doTransfer(file); return; } catch (UnsupportedFlavorException ufe) { System.out.println("importData: unsupported data flavor"); } catch (java.io.IOException ieo) { System.out.println("importData: I/O exception"); } catch (Exception ex) { log.warn(""+ex.getMessage()); } finally { dtde.dropComplete(false); } } } }; DropTarget dt = new DropTarget((JPanel)this,dta); setDropTarget(dt); }
2,548
public void drop(DropTargetDropEvent dtde) { Transferable tr = dtde.getTransferable(); dtde.acceptDrop(DnDConstants.ACTION_COPY_OR_MOVE); DataFlavor[] dfs = dtde.getCurrentDataFlavors(); if(tr.isDataFlavorSupported(DataFlavor.javaFileListFlavor)) { try { System.out.println("dtde drop it2 "); java.util.List fileList = (java.util.List)tr.getTransferData(DataFlavor.javaFileListFlavor); // implementation for when we are able to process a list // of files.// Iterator iterator = fileList.iterator();// if (iterator.hasNext()) {// File file = (File)iterator.next();// } java.io.File file = (java.io.File)fileList.get(0); System.out.println(file.toString()); dtde.dropComplete(true); doTransfer(file); return; } catch (UnsupportedFlavorException ufe) { System.out.println("importData: unsupported data flavor"); } catch (java.io.IOException ieo) { System.out.println("importData: I/O exception"); } catch (Exception ex) { System.out.println(ex.getMessage()); } finally { dtde.dropComplete(false); } } }
public void drop(DropTargetDropEvent dtde) { Transferable tr = dtde.getTransferable(); dtde.acceptDrop(DnDConstants.ACTION_COPY_OR_MOVE); DataFlavor[] dfs = dtde.getCurrentDataFlavors(); if(tr.isDataFlavorSupported(DataFlavor.javaFileListFlavor)) { try { log.debug("dtde drop it2 "); java.util.List fileList = (java.util.List)tr.getTransferData(DataFlavor.javaFileListFlavor); // implementation for when we are able to process a list // of files.// Iterator iterator = fileList.iterator();// if (iterator.hasNext()) {// File file = (File)iterator.next();// } java.io.File file = (java.io.File)fileList.get(0); System.out.println(file.toString()); dtde.dropComplete(true); doTransfer(file); return; } catch (UnsupportedFlavorException ufe) { System.out.println("importData: unsupported data flavor"); } catch (java.io.IOException ieo) { System.out.println("importData: I/O exception"); } catch (Exception ex) { System.out.println(ex.getMessage()); } finally { dtde.dropComplete(false); } } }
2,549
public void drop(DropTargetDropEvent dtde) { Transferable tr = dtde.getTransferable(); dtde.acceptDrop(DnDConstants.ACTION_COPY_OR_MOVE); DataFlavor[] dfs = dtde.getCurrentDataFlavors(); if(tr.isDataFlavorSupported(DataFlavor.javaFileListFlavor)) { try { System.out.println("dtde drop it2 "); java.util.List fileList = (java.util.List)tr.getTransferData(DataFlavor.javaFileListFlavor); // implementation for when we are able to process a list // of files.// Iterator iterator = fileList.iterator();// if (iterator.hasNext()) {// File file = (File)iterator.next();// } java.io.File file = (java.io.File)fileList.get(0); System.out.println(file.toString()); dtde.dropComplete(true); doTransfer(file); return; } catch (UnsupportedFlavorException ufe) { System.out.println("importData: unsupported data flavor"); } catch (java.io.IOException ieo) { System.out.println("importData: I/O exception"); } catch (Exception ex) { System.out.println(ex.getMessage()); } finally { dtde.dropComplete(false); } } }
public void drop(DropTargetDropEvent dtde) { Transferable tr = dtde.getTransferable(); dtde.acceptDrop(DnDConstants.ACTION_COPY_OR_MOVE); DataFlavor[] dfs = dtde.getCurrentDataFlavors(); if(tr.isDataFlavorSupported(DataFlavor.javaFileListFlavor)) { try { System.out.println("dtde drop it2 "); java.util.List fileList = (java.util.List)tr.getTransferData(DataFlavor.javaFileListFlavor); // implementation for when we are able to process a list // of files.// Iterator iterator = fileList.iterator();// if (iterator.hasNext()) {// File file = (File)iterator.next();// } java.io.File file = (java.io.File)fileList.get(0); System.out.println(file.toString()); dtde.dropComplete(true); doTransfer(file); return; } catch (UnsupportedFlavorException ufe) { log.info("importData: unsupported data flavor"); } catch (java.io.IOException ieo) { System.out.println("importData: I/O exception"); } catch (Exception ex) { System.out.println(ex.getMessage()); } finally { dtde.dropComplete(false); } } }
2,550
public void drop(DropTargetDropEvent dtde) { Transferable tr = dtde.getTransferable(); dtde.acceptDrop(DnDConstants.ACTION_COPY_OR_MOVE); DataFlavor[] dfs = dtde.getCurrentDataFlavors(); if(tr.isDataFlavorSupported(DataFlavor.javaFileListFlavor)) { try { System.out.println("dtde drop it2 "); java.util.List fileList = (java.util.List)tr.getTransferData(DataFlavor.javaFileListFlavor); // implementation for when we are able to process a list // of files.// Iterator iterator = fileList.iterator();// if (iterator.hasNext()) {// File file = (File)iterator.next();// } java.io.File file = (java.io.File)fileList.get(0); System.out.println(file.toString()); dtde.dropComplete(true); doTransfer(file); return; } catch (UnsupportedFlavorException ufe) { System.out.println("importData: unsupported data flavor"); } catch (java.io.IOException ieo) { System.out.println("importData: I/O exception"); } catch (Exception ex) { System.out.println(ex.getMessage()); } finally { dtde.dropComplete(false); } } }
public void drop(DropTargetDropEvent dtde) { Transferable tr = dtde.getTransferable(); dtde.acceptDrop(DnDConstants.ACTION_COPY_OR_MOVE); DataFlavor[] dfs = dtde.getCurrentDataFlavors(); if(tr.isDataFlavorSupported(DataFlavor.javaFileListFlavor)) { try { System.out.println("dtde drop it2 "); java.util.List fileList = (java.util.List)tr.getTransferData(DataFlavor.javaFileListFlavor); // implementation for when we are able to process a list // of files.// Iterator iterator = fileList.iterator();// if (iterator.hasNext()) {// File file = (File)iterator.next();// } java.io.File file = (java.io.File)fileList.get(0); System.out.println(file.toString()); dtde.dropComplete(true); doTransfer(file); return; } catch (UnsupportedFlavorException ufe) { System.out.println("importData: unsupported data flavor"); } catch (java.io.IOException ieo) { log.warn("importData: I/O exception"); } catch (Exception ex) { System.out.println(ex.getMessage()); } finally { dtde.dropComplete(false); } } }
2,551
public void drop(DropTargetDropEvent dtde) { Transferable tr = dtde.getTransferable(); dtde.acceptDrop(DnDConstants.ACTION_COPY_OR_MOVE); DataFlavor[] dfs = dtde.getCurrentDataFlavors(); if(tr.isDataFlavorSupported(DataFlavor.javaFileListFlavor)) { try { System.out.println("dtde drop it2 "); java.util.List fileList = (java.util.List)tr.getTransferData(DataFlavor.javaFileListFlavor); // implementation for when we are able to process a list // of files.// Iterator iterator = fileList.iterator();// if (iterator.hasNext()) {// File file = (File)iterator.next();// } java.io.File file = (java.io.File)fileList.get(0); System.out.println(file.toString()); dtde.dropComplete(true); doTransfer(file); return; } catch (UnsupportedFlavorException ufe) { System.out.println("importData: unsupported data flavor"); } catch (java.io.IOException ieo) { System.out.println("importData: I/O exception"); } catch (Exception ex) { System.out.println(ex.getMessage()); } finally { dtde.dropComplete(false); } } }
public void drop(DropTargetDropEvent dtde) { Transferable tr = dtde.getTransferable(); dtde.acceptDrop(DnDConstants.ACTION_COPY_OR_MOVE); DataFlavor[] dfs = dtde.getCurrentDataFlavors(); if(tr.isDataFlavorSupported(DataFlavor.javaFileListFlavor)) { try { System.out.println("dtde drop it2 "); java.util.List fileList = (java.util.List)tr.getTransferData(DataFlavor.javaFileListFlavor); // implementation for when we are able to process a list // of files.// Iterator iterator = fileList.iterator();// if (iterator.hasNext()) {// File file = (File)iterator.next();// } java.io.File file = (java.io.File)fileList.get(0); System.out.println(file.toString()); dtde.dropComplete(true); doTransfer(file); return; } catch (UnsupportedFlavorException ufe) { System.out.println("importData: unsupported data flavor"); } catch (java.io.IOException ieo) { System.out.println("importData: I/O exception"); } catch (Exception ex) { log.warn(""+ex.getMessage()); } finally { dtde.dropComplete(false); } } }
2,552
protected void paintComponent(Graphics g) {// System.out.println("paint from screen"); screen.paintComponent3(g); if (rubberband.isAreaSelected() && !rubberband.isDragging()) { rubberband.erase(); rubberband.draw(); } keyPad.repaint(); }
log.debug("paint from screen"); log.debug("paint from screen"); log.debug("paint from screen"); protectedlog.debug("paint from screen"); voidlog.debug("paint from screen"); paintComponent(Graphicslog.debug("paint from screen"); g)log.debug("paint from screen"); {//log.debug("paint from screen"); log.debug("paint from screen"); log.debug("paint from screen"); log.debug("paint from screen"); log.debug("paint from screen"); log.debug("paint from screen"); System.out.println("paintlog.debug("paint from screen"); fromlog.debug("paint from screen"); screen");log.debug("paint from screen"); log.debug("paint from screen"); log.debug("paint from screen"); log.debug("paint from screen"); log.debug("paint from screen"); log.debug("paint from screen"); screen.paintComponent3(g);log.debug("paint from screen"); log.debug("paint from screen"); log.debug("paint from screen"); log.debug("paint from screen"); log.debug("paint from screen"); log.debug("paint from screen"); iflog.debug("paint from screen"); (rubberband.isAreaSelected()log.debug("paint from screen"); &&log.debug("paint from screen"); !rubberband.isDragging())log.debug("paint from screen"); {log.debug("paint from screen"); log.debug("paint from screen"); log.debug("paint from screen"); log.debug("paint from screen"); log.debug("paint from screen"); log.debug("paint from screen"); log.debug("paint from screen"); log.debug("paint from screen"); log.debug("paint from screen"); rubberband.erase();log.debug("paint from screen"); log.debug("paint from screen"); log.debug("paint from screen"); log.debug("paint from screen"); log.debug("paint from screen"); log.debug("paint from screen"); log.debug("paint from screen"); log.debug("paint from screen"); log.debug("paint from screen"); rubberband.draw();log.debug("paint from screen"); log.debug("paint from screen"); log.debug("paint from screen"); log.debug("paint from screen"); log.debug("paint from screen"); log.debug("paint from screen"); }log.debug("paint from screen"); log.debug("paint from screen"); log.debug("paint from screen"); log.debug("paint from screen"); log.debug("paint from screen"); log.debug("paint from screen"); keyPad.repaint();log.debug("paint from screen"); log.debug("paint from screen"); log.debug("paint from screen"); }
2,553
protected void startRecordingMe() { String macName = (String)JOptionPane.showInputDialog(null, LangTool.getString("macro.message"), LangTool.getString("macro.title"), JOptionPane.PLAIN_MESSAGE); if (macName != null) { macName = macName.trim(); if (macName.length() > 0) { System.out.println(macName); newMacName = macName; keyHandler.startRecording(); } } }
protected void startRecordingMe() { String macName = (String)JOptionPane.showInputDialog(null, LangTool.getString("macro.message"), LangTool.getString("macro.title"), JOptionPane.PLAIN_MESSAGE); if (macName != null) { macName = macName.trim(); if (macName.length() > 0) { log.info(macName); newMacName = macName; keyHandler.startRecording(); } } }
2,554
protected void stopRecordingMe() { if (keyHandler.getRecordBuffer().length() > 0) { Macronizer.setMacro(newMacName,keyHandler.getRecordBuffer()); System.out.println(keyHandler.getRecordBuffer()); } keyHandler.stopRecording(); }
protected void stopRecordingMe() { if (keyHandler.getRecordBuffer().length() > 0) { Macronizer.setMacro(newMacName,keyHandler.getRecordBuffer()); log.debug(keyHandler.getRecordBuffer()); } keyHandler.stopRecording(); }
2,555
public void toggleDebug() { vt.toggleDebug(); try { vt.sendHeartBeat(); } catch (Exception exc) { System.out.println(exc.getMessage()); } }
public void toggleDebug() { vt.toggleDebug(); try { vt.sendHeartBeat(); } catch (Exception exc) { log.warn(exc.getMessage()); } }
2,556
public void update(Graphics g) {// System.out.println("paint from gui"); paint(g); }
log.debug("paint from gui"); log.debug("paint from gui"); log.debug("paint from gui"); publiclog.debug("paint from gui"); voidlog.debug("paint from gui"); update(Graphicslog.debug("paint from gui"); g)log.debug("paint from gui"); {//log.debug("paint from gui"); log.debug("paint from gui"); log.debug("paint from gui"); log.debug("paint from gui"); log.debug("paint from gui"); log.debug("paint from gui"); System.out.println("paintlog.debug("paint from gui"); fromlog.debug("paint from gui"); gui");log.debug("paint from gui"); log.debug("paint from gui"); log.debug("paint from gui"); log.debug("paint from gui"); log.debug("paint from gui"); log.debug("paint from gui"); paint(g);log.debug("paint from gui"); log.debug("paint from gui"); log.debug("paint from gui"); }
2,557
public SessionPopup(Session ses, MouseEvent me) { JMenuItem menuItem; Action action; JPopupMenu popup = new JPopupMenu(); session = ses; vt = session.getVT();// final Gui5250 g = session; screen = session.getScreen(); JMenuItem mi; final int pos = screen.getPosFromView(me.getX(),me.getY()); if (!session.rubberband.isAreaSelected() && screen.isInField(pos,false) ) { action = new AbstractAction(LangTool.getString("popup.copy")) { public void actionPerformed(ActionEvent e) { screen.copyField(pos); session.getFocusForMe(); } }; popup.add(createMenuItem(action,MNEMONIC_COPY)); action = new AbstractAction(LangTool.getString("popup.paste")) { public void actionPerformed(ActionEvent e) { screen.pasteMe(false); session.getFocusForMe(); } }; popup.add(createMenuItem(action,MNEMONIC_PASTE)); action = new AbstractAction(LangTool.getString("popup.pasteSpecial")) { public void actionPerformed(ActionEvent e) { screen.pasteMe(true); session.getFocusForMe(); } }; popup.add(action); popup.addSeparator(); } else { action = new AbstractAction(LangTool.getString("popup.copy")) { public void actionPerformed(ActionEvent e) { screen.copyMe(); session.getFocusForMe(); } }; popup.add(createMenuItem(action,MNEMONIC_COPY)); action = new AbstractAction(LangTool.getString("popup.paste")) { public void actionPerformed(ActionEvent e) { screen.sendKeys(MNEMONIC_PASTE); session.getFocusForMe(); } }; popup.add(createMenuItem(action,MNEMONIC_PASTE)); action = new AbstractAction(LangTool.getString("popup.pasteSpecial")) { public void actionPerformed(ActionEvent e) { screen.pasteMe(true); session.getFocusForMe(); } }; popup.add(action); Rectangle workR = new Rectangle(); if (session.rubberband.isAreaSelected()) { // get the bounded area of the selection screen.getBoundingArea(workR); popup.addSeparator(); menuItem = new JMenuItem(LangTool.getString("popup.selectedColumns") + " " + workR.width); menuItem.setArmed(false); popup.add(menuItem); menuItem = new JMenuItem(LangTool.getString("popup.selectedRows") + " " + workR.height); menuItem.setArmed(false); popup.add(menuItem); JMenu sumMenu = new JMenu(LangTool.getString("popup.calc")); popup.add(sumMenu); action = new AbstractAction(LangTool.getString("popup.calcGroupCD")) { public void actionPerformed(ActionEvent e) { sumArea(true); } }; sumMenu.add(action); action = new AbstractAction(LangTool.getString("popup.calcGroupDC")) { public void actionPerformed(ActionEvent e) { sumArea(false); } }; sumMenu.add(action); } popup.addSeparator(); action = new AbstractAction(LangTool.getString("popup.printScreen")) { public void actionPerformed(ActionEvent e) { screen.printMe(); session.getFocusForMe(); } }; popup.add(createMenuItem(action,MNEMONIC_PRINT_SCREEN)); popup.addSeparator(); JMenu kbMenu = new JMenu(LangTool.getString("popup.keyboard")); popup.add(kbMenu); action = new AbstractAction(LangTool.getString("popup.mapKeys")) { public void actionPerformed(ActionEvent e) { mapMeKeys(); } }; kbMenu.add(action); kbMenu.addSeparator(); createKeyboardItem(kbMenu,MNEMONIC_ATTN); createKeyboardItem(kbMenu,MNEMONIC_RESET); createKeyboardItem(kbMenu,MNEMONIC_SYSREQ); if (screen.isMessageWait() && OptionAccessFactory.getInstance().isValidOption(MNEMONIC_DISP_MESSAGES)) { action = new AbstractAction(LangTool.getString("popup.displayMessages")) { public void actionPerformed(ActionEvent e) { vt.systemRequest('4'); } }; kbMenu.add(createMenuItem(action,MNEMONIC_DISP_MESSAGES)); } kbMenu.addSeparator(); createKeyboardItem(kbMenu,MNEMONIC_DUP_FIELD); createKeyboardItem(kbMenu,MNEMONIC_HELP); createKeyboardItem(kbMenu,MNEMONIC_ERASE_EOF); createKeyboardItem(kbMenu,MNEMONIC_FIELD_PLUS); createKeyboardItem(kbMenu,MNEMONIC_FIELD_MINUS); createKeyboardItem(kbMenu,MNEMONIC_NEW_LINE); if (OptionAccessFactory.getInstance().isValidOption(MNEMONIC_PRINT)) { action = new AbstractAction(LangTool.getString("popup.hostPrint")) { public void actionPerformed(ActionEvent e) { vt.hostPrint(1); } }; kbMenu.add(createMenuItem(action,MNEMONIC_PRINT)); } createShortCutItems(kbMenu); if (screen.isMessageWait() && OptionAccessFactory.getInstance().isValidOption(MNEMONIC_DISP_MESSAGES)) { action = new AbstractAction(LangTool.getString("popup.displayMessages")) { public void actionPerformed(ActionEvent e) { vt.systemRequest('4'); } }; popup.add(createMenuItem(action,MNEMONIC_DISP_MESSAGES)); } popup.addSeparator(); action = new AbstractAction(LangTool.getString("popup.hexMap")) { public void actionPerformed(ActionEvent e) { showHexMap(); session.getFocusForMe(); } }; popup.add(createMenuItem(action,"")); action = new AbstractAction(LangTool.getString("popup.mapKeys")) { public void actionPerformed(ActionEvent e) { mapMeKeys(); session.getFocusForMe(); } }; popup.add(createMenuItem(action,"")); if (OptionAccessFactory.getInstance().isValidOption(MNEMONIC_DISP_ATTRIBUTES)) { action = new AbstractAction(LangTool.getString("popup.settings")) { public void actionPerformed(ActionEvent e) { session.doAttributes(); session.getFocusForMe(); } }; popup.add(createMenuItem(action,MNEMONIC_DISP_ATTRIBUTES)); } popup.addSeparator(); if (session.isMacroRunning()) { action = new AbstractAction(LangTool.getString("popup.stopScript")) { public void actionPerformed(ActionEvent e) { session.setStopMacroRequested(); } }; popup.add(action); } else { JMenu macMenu = new JMenu(LangTool.getString("popup.macros")); if (session.isSessionRecording()) { action = new AbstractAction(LangTool.getString("popup.stop")) { public void actionPerformed(ActionEvent e) { session.stopRecordingMe(); session.getFocusForMe(); } }; } else { action = new AbstractAction(LangTool.getString("popup.record")) { public void actionPerformed(ActionEvent e) { session.startRecordingMe(); session.getFocusForMe(); } }; } macMenu.add(action); if (Macronizer.isMacrosExist()) { // this will add a sorted list of the macros to the macro menu addMacros(macMenu); } popup.add(macMenu); } popup.addSeparator(); JMenu xtfrMenu = new JMenu(LangTool.getString("popup.export")); if (OptionAccessFactory.getInstance().isValidOption(MNEMONIC_FILE_TRANSFER)) { action = new AbstractAction(LangTool.getString("popup.xtfrFile")) { public void actionPerformed(ActionEvent e) { doMeTransfer(); session.getFocusForMe(); } }; xtfrMenu.add(createMenuItem(action,MNEMONIC_FILE_TRANSFER)); } if (OptionAccessFactory.getInstance().isValidOption(MNEMONIC_SPOOL_FILE)) { action = new AbstractAction(LangTool.getString("popup.xtfrSpool")) { public void actionPerformed(ActionEvent e) { doMeSpool(); session.getFocusForMe(); } }; xtfrMenu.add(action); } popup.add(xtfrMenu); JMenu sendMenu = new JMenu(LangTool.getString("popup.send")); popup.add(sendMenu); if (OptionAccessFactory.getInstance().isValidOption(MNEMONIC_QUICK_MAIL)) { action = new AbstractAction(LangTool.getString("popup.quickmail")) { public void actionPerformed(ActionEvent e) { sendQuickEMail(); session.getFocusForMe(); } }; sendMenu.add(createMenuItem(action,MNEMONIC_QUICK_MAIL)); } if (OptionAccessFactory.getInstance().isValidOption(MNEMONIC_E_MAIL)) { action = new AbstractAction(LangTool.getString("popup.email")) { public void actionPerformed(ActionEvent e) { sendScreenEMail(); session.getFocusForMe(); } }; sendMenu.add(createMenuItem(action,MNEMONIC_E_MAIL)); } action = new AbstractAction(LangTool.getString("popup.file")) { public void actionPerformed(ActionEvent e) { sendMeToFile(); } }; sendMenu.add(action); action = new AbstractAction(LangTool.getString("popup.toImage")) { public void actionPerformed(ActionEvent e) { sendMeToImageFile(); } }; sendMenu.add(action); popup.addSeparator(); } if (OptionAccessFactory.getInstance().isValidOption(MNEMONIC_OPEN_NEW)) { action = new AbstractAction(LangTool.getString("popup.connections")) { public void actionPerformed(ActionEvent e) { session.doConnections(); } }; popup.add(createMenuItem(action,MNEMONIC_OPEN_NEW)); } popup.addSeparator(); if (OptionAccessFactory.getInstance().isValidOption(MNEMONIC_TOGGLE_CONNECTION)) { if (vt.isConnected()) { action = new AbstractAction(LangTool.getString("popup.disconnect")) { public void actionPerformed(ActionEvent e) { changeConnection(); session.getFocusForMe(); } }; } else { action = new AbstractAction(LangTool.getString("popup.connect")) { public void actionPerformed(ActionEvent e) { changeConnection(); session.getFocusForMe(); } }; } popup.add(createMenuItem(action,MNEMONIC_TOGGLE_CONNECTION)); } if (OptionAccessFactory.getInstance().isValidOption(MNEMONIC_CLOSE)) { action = new AbstractAction(LangTool.getString("popup.close")) { public void actionPerformed(ActionEvent e) { session.closeSession(); } }; popup.add(createMenuItem(action,MNEMONIC_CLOSE)); } GUIGraphicsUtils.positionPopup(me.getComponent(),popup, me.getX(),me.getY()); }
publicSessionPopup(Sessionses,MouseEventme){JMenuItemmenuItem;Actionaction;JPopupMenupopup=newJPopupMenu();session=ses;vt=session.getVT();//finalGui5250g=session;screen=session.getScreen();JMenuItemmi;finalintpos=screen.getPosFromView(me.getX(),me.getY());if(!session.rubberband.isAreaSelected()&&screen.isInField(pos,false)){action=newAbstractAction(LangTool.getString("popup.copy")){publicvoidactionPerformed(ActionEvente){screen.copyField(pos);session.getFocusForMe();}};popup.add(createMenuItem(action,MNEMONIC_COPY));action=newAbstractAction(LangTool.getString("popup.paste")){publicvoidactionPerformed(ActionEvente){screen.pasteMe(false);session.getFocusForMe();}};popup.add(createMenuItem(action,MNEMONIC_PASTE));action=newAbstractAction(LangTool.getString("popup.pasteSpecial")){publicvoidactionPerformed(ActionEvente){screen.pasteMe(true);session.getFocusForMe();}};popup.add(action);popup.addSeparator();}else{action=newAbstractAction(LangTool.getString("popup.copy")){publicvoidactionPerformed(ActionEvente){screen.copyMe();session.getFocusForMe();}};popup.add(createMenuItem(action,MNEMONIC_COPY));action=newAbstractAction(LangTool.getString("popup.paste")){publicvoidactionPerformed(ActionEvente){screen.sendKeys(MNEMONIC_PASTE);session.getFocusForMe();}};popup.add(createMenuItem(action,MNEMONIC_PASTE));action=newAbstractAction(LangTool.getString("popup.pasteSpecial")){publicvoidactionPerformed(ActionEvente){screen.pasteMe(true);session.getFocusForMe();}};popup.add(action);RectangleworkR=newRectangle();if(session.rubberband.isAreaSelected()){//gettheboundedareaoftheselectionscreen.getBoundingArea(workR);popup.addSeparator();menuItem=newJMenuItem(LangTool.getString("popup.selectedColumns")+""+workR.width);menuItem.setArmed(false);popup.add(menuItem);menuItem=newJMenuItem(LangTool.getString("popup.selectedRows")+""+workR.height);menuItem.setArmed(false);popup.add(menuItem);JMenusumMenu=newJMenu(LangTool.getString("popup.calc"));popup.add(sumMenu);action=newAbstractAction(LangTool.getString("popup.calcGroupCD")){publicvoidactionPerformed(ActionEvente){sumArea(true);}};sumMenu.add(action);action=newAbstractAction(LangTool.getString("popup.calcGroupDC")){publicvoidactionPerformed(ActionEvente){sumArea(false);}};sumMenu.add(action);}popup.addSeparator();action=newAbstractAction(LangTool.getString("popup.printScreen")){publicvoidactionPerformed(ActionEvente){screen.printMe();session.getFocusForMe();}};popup.add(createMenuItem(action,MNEMONIC_PRINT_SCREEN));popup.addSeparator();JMenukbMenu=newJMenu(LangTool.getString("popup.keyboard"));popup.add(kbMenu);action=newAbstractAction(LangTool.getString("popup.mapKeys")){publicvoidactionPerformed(ActionEvente){mapMeKeys();}};kbMenu.add(action);kbMenu.addSeparator();createKeyboardItem(kbMenu,MNEMONIC_ATTN);createKeyboardItem(kbMenu,MNEMONIC_RESET);createKeyboardItem(kbMenu,MNEMONIC_SYSREQ);if(screen.isMessageWait()&&OptionAccessFactory.getInstance().isValidOption(MNEMONIC_DISP_MESSAGES)){action=newAbstractAction(LangTool.getString("popup.displayMessages")){publicvoidactionPerformed(ActionEvente){vt.systemRequest('4');}};kbMenu.add(createMenuItem(action,MNEMONIC_DISP_MESSAGES));}kbMenu.addSeparator();createKeyboardItem(kbMenu,MNEMONIC_DUP_FIELD);createKeyboardItem(kbMenu,MNEMONIC_HELP);createKeyboardItem(kbMenu,MNEMONIC_ERASE_EOF);createKeyboardItem(kbMenu,MNEMONIC_FIELD_PLUS);createKeyboardItem(kbMenu,MNEMONIC_FIELD_MINUS);createKeyboardItem(kbMenu,MNEMONIC_NEW_LINE);if(OptionAccessFactory.getInstance().isValidOption(MNEMONIC_PRINT)){action=newAbstractAction(LangTool.getString("popup.hostPrint")){publicvoidactionPerformed(ActionEvente){vt.hostPrint(1);}};kbMenu.add(createMenuItem(action,MNEMONIC_PRINT));}createShortCutItems(kbMenu);if(screen.isMessageWait()&&OptionAccessFactory.getInstance().isValidOption(MNEMONIC_DISP_MESSAGES)){action=newAbstractAction(LangTool.getString("popup.displayMessages")){publicvoidactionPerformed(ActionEvente){vt.systemRequest('4');}};popup.add(createMenuItem(action,MNEMONIC_DISP_MESSAGES));}popup.addSeparator();action=newAbstractAction(LangTool.getString("popup.hexMap")){publicvoidactionPerformed(ActionEvente){showHexMap();session.getFocusForMe();}};popup.add(createMenuItem(action,""));action=newAbstractAction(LangTool.getString("popup.mapKeys")){publicvoidactionPerformed(ActionEvente){mapMeKeys();session.getFocusForMe();}};popup.add(createMenuItem(action,""));if(OptionAccessFactory.getInstance().isValidOption(MNEMONIC_DISP_ATTRIBUTES)){action=newAbstractAction(LangTool.getString("popup.settings")){publicvoidactionPerformed(ActionEvente){session.doAttributes();session.getFocusForMe();}};popup.add(createMenuItem(action,MNEMONIC_DISP_ATTRIBUTES));}popup.addSeparator();if(session.isMacroRunning()){action=newAbstractAction(LangTool.getString("popup.stopScript")){publicvoidactionPerformed(ActionEvente){session.setStopMacroRequested();}};popup.add(action);}else{JMenumacMenu=newJMenu(LangTool.getString("popup.macros"));if(session.isSessionRecording()){action=newAbstractAction(LangTool.getString("popup.stop")){publicvoidactionPerformed(ActionEvente){session.stopRecordingMe();session.getFocusForMe();}};}else{action=newAbstractAction(LangTool.getString("popup.record")){publicvoidactionPerformed(ActionEvente){session.startRecordingMe();session.getFocusForMe();}};}macMenu.add(action);if(Macronizer.isMacrosExist()){//thiswilladdasortedlistofthemacrostothemacromenuaddMacros(macMenu);}popup.add(macMenu);}popup.addSeparator();JMenuxtfrMenu=newJMenu(LangTool.getString("popup.export"));if(OptionAccessFactory.getInstance().isValidOption(MNEMONIC_FILE_TRANSFER)){action=newAbstractAction(LangTool.getString("popup.xtfrFile")){publicvoidactionPerformed(ActionEvente){doMeTransfer();session.getFocusForMe();}};xtfrMenu.add(createMenuItem(action,MNEMONIC_FILE_TRANSFER));}if(OptionAccessFactory.getInstance().isValidOption(MNEMONIC_SPOOL_FILE)){action=newAbstractAction(LangTool.getString("popup.xtfrSpool")){publicvoidactionPerformed(ActionEvente){doMeSpool();session.getFocusForMe();}};xtfrMenu.add(action);}popup.add(xtfrMenu);JMenusendMenu=newJMenu(LangTool.getString("popup.send"));popup.add(sendMenu);if(OptionAccessFactory.getInstance().isValidOption(MNEMONIC_QUICK_MAIL)){action=newAbstractAction(LangTool.getString("popup.quickmail")){publicvoidactionPerformed(ActionEvente){sendQuickEMail();session.getFocusForMe();}}; sendMenu.add(createMenuItem(action,MNEMONIC_QUICK_MAIL));}if(OptionAccessFactory.getInstance().isValidOption(MNEMONIC_E_MAIL)){action=newAbstractAction(LangTool.getString("popup.email")){publicvoidactionPerformed(ActionEvente){sendScreenEMail();session.getFocusForMe();}};sendMenu.add(createMenuItem(action,MNEMONIC_E_MAIL));}action=newAbstractAction(LangTool.getString("popup.file")){publicvoidactionPerformed(ActionEvente){sendMeToFile();}};sendMenu.add(action);action=newAbstractAction(LangTool.getString("popup.toImage")){publicvoidactionPerformed(ActionEvente){sendMeToImageFile();}};sendMenu.add(action);popup.addSeparator();}if(OptionAccessFactory.getInstance().isValidOption(MNEMONIC_OPEN_NEW)){action=newAbstractAction(LangTool.getString("popup.connections")){publicvoidactionPerformed(ActionEvente){session.doConnections();}};popup.add(createMenuItem(action,MNEMONIC_OPEN_NEW));}popup.addSeparator();if(OptionAccessFactory.getInstance().isValidOption(MNEMONIC_TOGGLE_CONNECTION)){if(vt.isConnected()){action=newAbstractAction(LangTool.getString("popup.disconnect")){publicvoidactionPerformed(ActionEvente){changeConnection();session.getFocusForMe();}};}else{action=newAbstractAction(LangTool.getString("popup.connect")){publicvoidactionPerformed(ActionEvente){changeConnection();session.getFocusForMe();}};}popup.add(createMenuItem(action,MNEMONIC_TOGGLE_CONNECTION));}if(OptionAccessFactory.getInstance().isValidOption(MNEMONIC_CLOSE)){action=newAbstractAction(LangTool.getString("popup.close")){publicvoidactionPerformed(ActionEvente){session.closeSession();}};popup.add(createMenuItem(action,MNEMONIC_CLOSE));}GUIGraphicsUtils.positionPopup(me.getComponent(),popup,me.getX(),me.getY());}
2,558
public SessionPopup(Session ses, MouseEvent me) { JMenuItem menuItem; Action action; JPopupMenu popup = new JPopupMenu(); session = ses; vt = session.getVT();// final Gui5250 g = session; screen = session.getScreen(); JMenuItem mi; final int pos = screen.getPosFromView(me.getX(),me.getY()); if (!session.rubberband.isAreaSelected() && screen.isInField(pos,false) ) { action = new AbstractAction(LangTool.getString("popup.copy")) { public void actionPerformed(ActionEvent e) { screen.copyField(pos); session.getFocusForMe(); } }; popup.add(createMenuItem(action,MNEMONIC_COPY)); action = new AbstractAction(LangTool.getString("popup.paste")) { public void actionPerformed(ActionEvent e) { screen.pasteMe(false); session.getFocusForMe(); } }; popup.add(createMenuItem(action,MNEMONIC_PASTE)); action = new AbstractAction(LangTool.getString("popup.pasteSpecial")) { public void actionPerformed(ActionEvent e) { screen.pasteMe(true); session.getFocusForMe(); } }; popup.add(action); popup.addSeparator(); } else { action = new AbstractAction(LangTool.getString("popup.copy")) { public void actionPerformed(ActionEvent e) { screen.copyMe(); session.getFocusForMe(); } }; popup.add(createMenuItem(action,MNEMONIC_COPY)); action = new AbstractAction(LangTool.getString("popup.paste")) { public void actionPerformed(ActionEvent e) { screen.sendKeys(MNEMONIC_PASTE); session.getFocusForMe(); } }; popup.add(createMenuItem(action,MNEMONIC_PASTE)); action = new AbstractAction(LangTool.getString("popup.pasteSpecial")) { public void actionPerformed(ActionEvent e) { screen.pasteMe(true); session.getFocusForMe(); } }; popup.add(action); Rectangle workR = new Rectangle(); if (session.rubberband.isAreaSelected()) { // get the bounded area of the selection screen.getBoundingArea(workR); popup.addSeparator(); menuItem = new JMenuItem(LangTool.getString("popup.selectedColumns") + " " + workR.width); menuItem.setArmed(false); popup.add(menuItem); menuItem = new JMenuItem(LangTool.getString("popup.selectedRows") + " " + workR.height); menuItem.setArmed(false); popup.add(menuItem); JMenu sumMenu = new JMenu(LangTool.getString("popup.calc")); popup.add(sumMenu); action = new AbstractAction(LangTool.getString("popup.calcGroupCD")) { public void actionPerformed(ActionEvent e) { sumArea(true); } }; sumMenu.add(action); action = new AbstractAction(LangTool.getString("popup.calcGroupDC")) { public void actionPerformed(ActionEvent e) { sumArea(false); } }; sumMenu.add(action); } popup.addSeparator(); action = new AbstractAction(LangTool.getString("popup.printScreen")) { public void actionPerformed(ActionEvent e) { screen.printMe(); session.getFocusForMe(); } }; popup.add(createMenuItem(action,MNEMONIC_PRINT_SCREEN)); popup.addSeparator(); JMenu kbMenu = new JMenu(LangTool.getString("popup.keyboard")); popup.add(kbMenu); action = new AbstractAction(LangTool.getString("popup.mapKeys")) { public void actionPerformed(ActionEvent e) { mapMeKeys(); } }; kbMenu.add(action); kbMenu.addSeparator(); createKeyboardItem(kbMenu,MNEMONIC_ATTN); createKeyboardItem(kbMenu,MNEMONIC_RESET); createKeyboardItem(kbMenu,MNEMONIC_SYSREQ); if (screen.isMessageWait() && OptionAccessFactory.getInstance().isValidOption(MNEMONIC_DISP_MESSAGES)) { action = new AbstractAction(LangTool.getString("popup.displayMessages")) { public void actionPerformed(ActionEvent e) { vt.systemRequest('4'); } }; kbMenu.add(createMenuItem(action,MNEMONIC_DISP_MESSAGES)); } kbMenu.addSeparator(); createKeyboardItem(kbMenu,MNEMONIC_DUP_FIELD); createKeyboardItem(kbMenu,MNEMONIC_HELP); createKeyboardItem(kbMenu,MNEMONIC_ERASE_EOF); createKeyboardItem(kbMenu,MNEMONIC_FIELD_PLUS); createKeyboardItem(kbMenu,MNEMONIC_FIELD_MINUS); createKeyboardItem(kbMenu,MNEMONIC_NEW_LINE); if (OptionAccessFactory.getInstance().isValidOption(MNEMONIC_PRINT)) { action = new AbstractAction(LangTool.getString("popup.hostPrint")) { public void actionPerformed(ActionEvent e) { vt.hostPrint(1); } }; kbMenu.add(createMenuItem(action,MNEMONIC_PRINT)); } createShortCutItems(kbMenu); if (screen.isMessageWait() && OptionAccessFactory.getInstance().isValidOption(MNEMONIC_DISP_MESSAGES)) { action = new AbstractAction(LangTool.getString("popup.displayMessages")) { public void actionPerformed(ActionEvent e) { vt.systemRequest('4'); } }; popup.add(createMenuItem(action,MNEMONIC_DISP_MESSAGES)); } popup.addSeparator(); action = new AbstractAction(LangTool.getString("popup.hexMap")) { public void actionPerformed(ActionEvent e) { showHexMap(); session.getFocusForMe(); } }; popup.add(createMenuItem(action,"")); action = new AbstractAction(LangTool.getString("popup.mapKeys")) { public void actionPerformed(ActionEvent e) { mapMeKeys(); session.getFocusForMe(); } }; popup.add(createMenuItem(action,"")); if (OptionAccessFactory.getInstance().isValidOption(MNEMONIC_DISP_ATTRIBUTES)) { action = new AbstractAction(LangTool.getString("popup.settings")) { public void actionPerformed(ActionEvent e) { session.doAttributes(); session.getFocusForMe(); } }; popup.add(createMenuItem(action,MNEMONIC_DISP_ATTRIBUTES)); } popup.addSeparator(); if (session.isMacroRunning()) { action = new AbstractAction(LangTool.getString("popup.stopScript")) { public void actionPerformed(ActionEvent e) { session.setStopMacroRequested(); } }; popup.add(action); } else { JMenu macMenu = new JMenu(LangTool.getString("popup.macros")); if (session.isSessionRecording()) { action = new AbstractAction(LangTool.getString("popup.stop")) { public void actionPerformed(ActionEvent e) { session.stopRecordingMe(); session.getFocusForMe(); } }; } else { action = new AbstractAction(LangTool.getString("popup.record")) { public void actionPerformed(ActionEvent e) { session.startRecordingMe(); session.getFocusForMe(); } }; } macMenu.add(action); if (Macronizer.isMacrosExist()) { // this will add a sorted list of the macros to the macro menu addMacros(macMenu); } popup.add(macMenu); } popup.addSeparator(); JMenu xtfrMenu = new JMenu(LangTool.getString("popup.export")); if (OptionAccessFactory.getInstance().isValidOption(MNEMONIC_FILE_TRANSFER)) { action = new AbstractAction(LangTool.getString("popup.xtfrFile")) { public void actionPerformed(ActionEvent e) { doMeTransfer(); session.getFocusForMe(); } }; xtfrMenu.add(createMenuItem(action,MNEMONIC_FILE_TRANSFER)); } if (OptionAccessFactory.getInstance().isValidOption(MNEMONIC_SPOOL_FILE)) { action = new AbstractAction(LangTool.getString("popup.xtfrSpool")) { public void actionPerformed(ActionEvent e) { doMeSpool(); session.getFocusForMe(); } }; xtfrMenu.add(action); } popup.add(xtfrMenu); JMenu sendMenu = new JMenu(LangTool.getString("popup.send")); popup.add(sendMenu); if (OptionAccessFactory.getInstance().isValidOption(MNEMONIC_QUICK_MAIL)) { action = new AbstractAction(LangTool.getString("popup.quickmail")) { public void actionPerformed(ActionEvent e) { sendQuickEMail(); session.getFocusForMe(); } }; sendMenu.add(createMenuItem(action,MNEMONIC_QUICK_MAIL)); } if (OptionAccessFactory.getInstance().isValidOption(MNEMONIC_E_MAIL)) { action = new AbstractAction(LangTool.getString("popup.email")) { public void actionPerformed(ActionEvent e) { sendScreenEMail(); session.getFocusForMe(); } }; sendMenu.add(createMenuItem(action,MNEMONIC_E_MAIL)); } action = new AbstractAction(LangTool.getString("popup.file")) { public void actionPerformed(ActionEvent e) { sendMeToFile(); } }; sendMenu.add(action); action = new AbstractAction(LangTool.getString("popup.toImage")) { public void actionPerformed(ActionEvent e) { sendMeToImageFile(); } }; sendMenu.add(action); popup.addSeparator(); } if (OptionAccessFactory.getInstance().isValidOption(MNEMONIC_OPEN_NEW)) { action = new AbstractAction(LangTool.getString("popup.connections")) { public void actionPerformed(ActionEvent e) { session.doConnections(); } }; popup.add(createMenuItem(action,MNEMONIC_OPEN_NEW)); } popup.addSeparator(); if (OptionAccessFactory.getInstance().isValidOption(MNEMONIC_TOGGLE_CONNECTION)) { if (vt.isConnected()) { action = new AbstractAction(LangTool.getString("popup.disconnect")) { public void actionPerformed(ActionEvent e) { changeConnection(); session.getFocusForMe(); } }; } else { action = new AbstractAction(LangTool.getString("popup.connect")) { public void actionPerformed(ActionEvent e) { changeConnection(); session.getFocusForMe(); } }; } popup.add(createMenuItem(action,MNEMONIC_TOGGLE_CONNECTION)); } if (OptionAccessFactory.getInstance().isValidOption(MNEMONIC_CLOSE)) { action = new AbstractAction(LangTool.getString("popup.close")) { public void actionPerformed(ActionEvent e) { session.closeSession(); } }; popup.add(createMenuItem(action,MNEMONIC_CLOSE)); } GUIGraphicsUtils.positionPopup(me.getComponent(),popup, me.getX(),me.getY()); }
public SessionPopup(Session ses, MouseEvent me) { JMenuItem menuItem; Action action; JPopupMenu popup = new JPopupMenu(); session = ses; vt = session.getVT();// final Gui5250 g = session; screen = session.getScreen(); JMenuItem mi; final int pos = screen.getPosFromView(me.getX(),me.getY()); if (!session.rubberband.isAreaSelected() && screen.isInField(pos,false) ) { action = new AbstractAction(LangTool.getString("popup.copy")) { public void actionPerformed(ActionEvent e) { screen.copyField(pos); session.getFocusForMe(); } }; popup.add(createMenuItem(action,MNEMONIC_COPY)); action = new AbstractAction(LangTool.getString("popup.paste")) { public void actionPerformed(ActionEvent e) { screen.pasteMe(false); session.getFocusForMe(); } }; popup.add(createMenuItem(action,MNEMONIC_PASTE)); action = new AbstractAction(LangTool.getString("popup.pasteSpecial")) { public void actionPerformed(ActionEvent e) { screen.pasteMe(true); session.getFocusForMe(); } }; popup.add(action); popup.addSeparator(); } else { action = new AbstractAction(LangTool.getString("popup.copy")) { public void actionPerformed(ActionEvent e) { screen.copyMe(); session.getFocusForMe(); } }; popup.add(createMenuItem(action,MNEMONIC_COPY)); action = new AbstractAction(LangTool.getString("popup.paste")) { public void actionPerformed(ActionEvent e) { screen.sendKeys(MNEMONIC_PASTE); session.getFocusForMe(); } }; popup.add(createMenuItem(action,MNEMONIC_PASTE)); action = new AbstractAction(LangTool.getString("popup.pasteSpecial")) { public void actionPerformed(ActionEvent e) { screen.pasteMe(true); session.getFocusForMe(); } }; popup.add(action); Rectangle workR = new Rectangle(); if (session.rubberband.isAreaSelected()) { // get the bounded area of the selection screen.getBoundingArea(workR); popup.addSeparator(); menuItem = new JMenuItem(LangTool.getString("popup.selectedColumns") + " " + workR.width); menuItem.setArmed(false); popup.add(menuItem); menuItem = new JMenuItem(LangTool.getString("popup.selectedRows") + " " + workR.height); menuItem.setArmed(false); popup.add(menuItem); JMenu sumMenu = new JMenu(LangTool.getString("popup.calc")); popup.add(sumMenu); action = new AbstractAction(LangTool.getString("popup.calcGroupCD")) { public void actionPerformed(ActionEvent e) { sumArea(true); } }; sumMenu.add(action); action = new AbstractAction(LangTool.getString("popup.calcGroupDC")) { public void actionPerformed(ActionEvent e) { sumArea(false); } }; sumMenu.add(action); } popup.addSeparator(); action = new AbstractAction(LangTool.getString("popup.printScreen")) { public void actionPerformed(ActionEvent e) { screen.printMe(); session.getFocusForMe(); } }; popup.add(createMenuItem(action,MNEMONIC_PRINT_SCREEN)); popup.addSeparator(); JMenu kbMenu = new JMenu(LangTool.getString("popup.keyboard")); popup.add(kbMenu); action = new AbstractAction(LangTool.getString("popup.mapKeys")) { public void actionPerformed(ActionEvent e) { mapMeKeys(); } }; kbMenu.add(action); kbMenu.addSeparator(); createKeyboardItem(kbMenu,MNEMONIC_ATTN); createKeyboardItem(kbMenu,MNEMONIC_RESET); createKeyboardItem(kbMenu,MNEMONIC_SYSREQ); if (screen.isMessageWait() && OptionAccessFactory.getInstance().isValidOption(MNEMONIC_DISP_MESSAGES)) { action = new AbstractAction(LangTool.getString("popup.displayMessages")) { public void actionPerformed(ActionEvent e) { vt.systemRequest('4'); } }; kbMenu.add(createMenuItem(action,MNEMONIC_DISP_MESSAGES)); } kbMenu.addSeparator(); createKeyboardItem(kbMenu,MNEMONIC_DUP_FIELD); createKeyboardItem(kbMenu,MNEMONIC_HELP); createKeyboardItem(kbMenu,MNEMONIC_ERASE_EOF); createKeyboardItem(kbMenu,MNEMONIC_FIELD_PLUS); createKeyboardItem(kbMenu,MNEMONIC_FIELD_MINUS); createKeyboardItem(kbMenu,MNEMONIC_NEW_LINE); if (OptionAccessFactory.getInstance().isValidOption(MNEMONIC_PRINT)) { action = new AbstractAction(LangTool.getString("popup.hostPrint")) { public void actionPerformed(ActionEvent e) { vt.hostPrint(1); } }; kbMenu.add(createMenuItem(action,MNEMONIC_PRINT)); } createShortCutItems(kbMenu); if (screen.isMessageWait() && OptionAccessFactory.getInstance().isValidOption(MNEMONIC_DISP_MESSAGES)) { action = new AbstractAction(LangTool.getString("popup.displayMessages")) { public void actionPerformed(ActionEvent e) { vt.systemRequest('4'); } }; popup.add(createMenuItem(action,MNEMONIC_DISP_MESSAGES)); } popup.addSeparator(); action = new AbstractAction(LangTool.getString("popup.hexMap")) { public void actionPerformed(ActionEvent e) { showHexMap(); session.getFocusForMe(); } }; popup.add(createMenuItem(action,"")); action = new AbstractAction(LangTool.getString("popup.mapKeys")) { public void actionPerformed(ActionEvent e) { mapMeKeys(); session.getFocusForMe(); } }; popup.add(createMenuItem(action,"")); if (OptionAccessFactory.getInstance().isValidOption(MNEMONIC_DISP_ATTRIBUTES)) { action = new AbstractAction(LangTool.getString("popup.settings")) { public void actionPerformed(ActionEvent e) { session.doAttributes(); session.getFocusForMe(); } }; popup.add(createMenuItem(action,MNEMONIC_DISP_ATTRIBUTES)); } popup.addSeparator(); if (session.isMacroRunning()) { action = new AbstractAction(LangTool.getString("popup.stopScript")) { public void actionPerformed(ActionEvent e) { session.setStopMacroRequested(); } }; popup.add(action); } else { JMenu macMenu = new JMenu(LangTool.getString("popup.macros")); if (session.isSessionRecording()) { action = new AbstractAction(LangTool.getString("popup.stop")) { public void actionPerformed(ActionEvent e) { session.stopRecordingMe(); session.getFocusForMe(); } }; } else { action = new AbstractAction(LangTool.getString("popup.record")) { public void actionPerformed(ActionEvent e) { session.startRecordingMe(); session.getFocusForMe(); } }; } macMenu.add(action); if (Macronizer.isMacrosExist()) { // this will add a sorted list of the macros to the macro menu addMacros(macMenu); } popup.add(macMenu); } popup.addSeparator(); JMenu xtfrMenu = new JMenu(LangTool.getString("popup.export")); if (OptionAccessFactory.getInstance().isValidOption(MNEMONIC_FILE_TRANSFER)) { action = new AbstractAction(LangTool.getString("popup.xtfrFile")) { public void actionPerformed(ActionEvent e) { doMeTransfer(); session.getFocusForMe(); } }; xtfrMenu.add(createMenuItem(action,MNEMONIC_FILE_TRANSFER)); } if (OptionAccessFactory.getInstance().isValidOption(MNEMONIC_SPOOL_FILE)) { action = new AbstractAction(LangTool.getString("popup.xtfrSpool")) { public void actionPerformed(ActionEvent e) { doMeSpool(); session.getFocusForMe(); } }; xtfrMenu.add(action); } popup.add(xtfrMenu); JMenu sendMenu = new JMenu(LangTool.getString("popup.send")); popup.add(sendMenu); if (OptionAccessFactory.getInstance().isValidOption(MNEMONIC_QUICK_MAIL)) { action = new AbstractAction(LangTool.getString("popup.quickmail")) { public void actionPerformed(ActionEvent e) { sendQuickEMail(); session.getFocusForMe(); } }; sendMenu.add(createMenuItem(action,MNEMONIC_QUICK_MAIL)); } if (OptionAccessFactory.getInstance().isValidOption(MNEMONIC_E_MAIL)) { action = new AbstractAction(LangTool.getString("popup.email")) { public void actionPerformed(ActionEvent e) { sendScreenEMail(); session.getFocusForMe(); } }; sendMenu.add(createMenuItem(action,MNEMONIC_E_MAIL)); } action = new AbstractAction(LangTool.getString("popup.file")) { public void actionPerformed(ActionEvent e) { sendMeToFile(); } }; sendMenu.add(action); action = new AbstractAction(LangTool.getString("popup.toImage")) { public void actionPerformed(ActionEvent e) { sendMeToImageFile(); } }; sendMenu.add(action); popup.addSeparator(); } if (OptionAccessFactory.getInstance().isValidOption(MNEMONIC_OPEN_NEW)) { action = new AbstractAction(LangTool.getString("popup.connections")) { public void actionPerformed(ActionEvent e) { session.startNewSession(); } }; popup.add(createMenuItem(action,MNEMONIC_OPEN_NEW)); } popup.addSeparator(); if (OptionAccessFactory.getInstance().isValidOption(MNEMONIC_TOGGLE_CONNECTION)) { if (vt.isConnected()) { action = new AbstractAction(LangTool.getString("popup.disconnect")) { public void actionPerformed(ActionEvent e) { changeConnection(); session.getFocusForMe(); } }; } else { action = new AbstractAction(LangTool.getString("popup.connect")) { public void actionPerformed(ActionEvent e) { changeConnection(); session.getFocusForMe(); } }; } popup.add(createMenuItem(action,MNEMONIC_TOGGLE_CONNECTION)); } if (OptionAccessFactory.getInstance().isValidOption(MNEMONIC_CLOSE)) { action = new AbstractAction(LangTool.getString("popup.close")) { public void actionPerformed(ActionEvent e) { session.closeSession(); } }; popup.add(createMenuItem(action,MNEMONIC_CLOSE)); } GUIGraphicsUtils.positionPopup(me.getComponent(),popup, me.getX(),me.getY()); }
2,559
public DropTarget (Component c, DropTargetListener dtl) { this (c, 0, dtl, true, null); }
public DropTarget () { this (c, 0, dtl, true, null); }
2,560
public DropTarget (Component c, DropTargetListener dtl) { this (c, 0, dtl, true, null); }
public DropTarget (Component c, DropTargetListener dtl) { this (null, 0, null, true, null); }
2,561
protected void closeConnection() throws IOException { if (socket != null) { try { socket.close(); } finally { socket = null; } } }
protected synchronized void closeConnection() throws IOException { if (socket != null) { try { socket.close(); } finally { socket = null; } } }
2,562
protected InputStream getInputStream() throws IOException { if (socket == null) { getSocket(); } return in; }
protected synchronized InputStream getInputStream() throws IOException { if (socket == null) { getSocket(); } return in; }
2,563
protected OutputStream getOutputStream() throws IOException { if (socket == null) { getSocket(); } return out; }
protected synchronized OutputStream getOutputStream() throws IOException { if (socket == null) { getSocket(); } return out; }
2,564
protected Socket getSocket() throws IOException { if (socket == null) { String connectHostname = hostname; int connectPort = port; if (isUsingProxy()) { connectHostname = proxyHostname; connectPort = proxyPort; } socket = new Socket(); InetSocketAddress address = new InetSocketAddress(connectHostname, connectPort); if (connectionTimeout > 0) { socket.connect(address, connectionTimeout); } else { socket.connect(address); } if (timeout > 0) { socket.setSoTimeout(timeout); } if (secure) { try { SSLSocketFactory factory = getSSLSocketFactory(); SSLSocket ss = (SSLSocket) factory.createSocket(socket, connectHostname, connectPort, true); String[] protocols = { "TLSv1", "SSLv3" }; ss.setEnabledProtocols(protocols); ss.setUseClientMode(true); synchronized (handshakeCompletedListeners) { if (!handshakeCompletedListeners.isEmpty()) { for (Iterator i = handshakeCompletedListeners.iterator(); i.hasNext(); ) { HandshakeCompletedListener l = (HandshakeCompletedListener) i.next(); ss.addHandshakeCompletedListener(l); } } } ss.startHandshake(); socket = ss; } catch (GeneralSecurityException e) { throw new IOException(e.getMessage()); } } in = socket.getInputStream(); in = new BufferedInputStream(in); out = socket.getOutputStream(); out = new BufferedOutputStream(out); } return socket; }
protected synchronized Socket getSocket() throws IOException { if (socket == null) { String connectHostname = hostname; int connectPort = port; if (isUsingProxy()) { connectHostname = proxyHostname; connectPort = proxyPort; } socket = new Socket(); InetSocketAddress address = new InetSocketAddress(connectHostname, connectPort); if (connectionTimeout > 0) { socket.connect(address, connectionTimeout); } else { socket.connect(address); } if (timeout > 0) { socket.setSoTimeout(timeout); } if (secure) { try { SSLSocketFactory factory = getSSLSocketFactory(); SSLSocket ss = (SSLSocket) factory.createSocket(socket, connectHostname, connectPort, true); String[] protocols = { "TLSv1", "SSLv3" }; ss.setEnabledProtocols(protocols); ss.setUseClientMode(true); synchronized (handshakeCompletedListeners) { if (!handshakeCompletedListeners.isEmpty()) { for (Iterator i = handshakeCompletedListeners.iterator(); i.hasNext(); ) { HandshakeCompletedListener l = (HandshakeCompletedListener) i.next(); ss.addHandshakeCompletedListener(l); } } } ss.startHandshake(); socket = ss; } catch (GeneralSecurityException e) { throw new IOException(e.getMessage()); } } in = socket.getInputStream(); in = new BufferedInputStream(in); out = socket.getOutputStream(); out = new BufferedOutputStream(out); } return socket; }
2,565
public void connect(SocketAddress endpoint, int timeout) throws IOException { if (isClosed()) throw new SocketException("socket is closed"); if (! (endpoint instanceof InetSocketAddress)) throw new IllegalArgumentException("unsupported address type"); // The Sun spec says that if we have an associated channel and // it is in non-blocking mode, we throw an IllegalBlockingModeException. // However, in our implementation if the channel itself initiated this // operation, then we must honor it regardless of its blocking mode. if (getChannel() != null && ! getChannel().isBlocking() && ! ((PlainSocketImpl) getImpl()).isInChannelOperation()) throw new IllegalBlockingModeException(); if (! isBound()) bind(null); try { getImpl().connect(endpoint, timeout); } catch (IOException exception) { close(); throw exception; } catch (RuntimeException exception) { close(); throw exception; } catch (Error error) { close(); throw error; } }
public void connect(SocketAddress endpoint, int timeout) throws IOException { if (isClosed()) throw new SocketException("socket is closed"); if (! (endpoint instanceof InetSocketAddress)) throw new IllegalArgumentException("unsupported address type"); // The Sun spec says that if we have an associated channel and // it is in non-blocking mode, we throw an IllegalBlockingModeException. // However, in our implementation if the channel itself initiated this // operation, then we must honor it regardless of its blocking mode. if (getChannel() != null && ! getChannel().isBlocking() && ! ((PlainSocketImpl) getImpl()).isInChannelOperation()) throw new IllegalBlockingModeException(); if (! isBound()) bind(null); try { getImpl().connect(endpoint, timeout); } catch (IOException exception) { close(); throw exception; } catch (RuntimeException exception) { close(); throw exception; } catch (Error error) { close(); throw error; } }
2,566
public void connect(SocketAddress endpoint, int timeout) throws IOException { if (isClosed()) throw new SocketException("socket is closed"); if (! (endpoint instanceof InetSocketAddress)) throw new IllegalArgumentException("unsupported address type"); // The Sun spec says that if we have an associated channel and // it is in non-blocking mode, we throw an IllegalBlockingModeException. // However, in our implementation if the channel itself initiated this // operation, then we must honor it regardless of its blocking mode. if (getChannel() != null && ! getChannel().isBlocking() && ! ((PlainSocketImpl) getImpl()).isInChannelOperation()) throw new IllegalBlockingModeException(); if (! isBound()) bind(null); try { getImpl().connect(endpoint, timeout); } catch (IOException exception) { close(); throw exception; } catch (RuntimeException exception) { close(); throw exception; } catch (Error error) { close(); throw error; } }
public void connect(SocketAddress endpoint, int timeout) throws IOException { if (isClosed()) throw new SocketException("socket is closed"); if (! (endpoint instanceof InetSocketAddress)) throw new IllegalArgumentException("unsupported address type"); // The Sun spec says that if we have an associated channel and // it is in non-blocking mode, we throw an IllegalBlockingModeException. // However, in our implementation if the channel itself initiated this // operation, then we must honor it regardless of its blocking mode. if (getChannel() != null && ! getChannel().isBlocking() && ! ((PlainSocketImpl) getImpl()).isInChannelOperation()) throw new IllegalBlockingModeException(); if (! isBound()) bind(null); try { getImpl().connect(endpoint, timeout); } catch (IOException exception) { close(); throw exception; } catch (RuntimeException exception) { close(); throw exception; } catch (Error error) { close(); throw error; } }
2,567
public Axis addAxis(Axis axis) { if (!canAddAxisObjToArray(axis)) //check if the axis can be added return null; getDataCube().incrementDimension(axis ); //increment the DataCube dimension by 1 getAxisList().add(axis); //update the locators that is related to this Array object int stop = locators.size(); for (int i = 0; i < stop; i++) { ((Locator) locators.get(i)).addAxis(axis); } updateNotesLocationOrder(); // reset to the current order of the axes return axis; }
public Axis addAxis(Axis axis) { if (!canAddAxisObjToArray(axis)) //check if the axis can be added return null; getDataCube().incrementDimension(axis ); //increment the DataCube dimension by 1 getAxisList().add(axis); //update the locators that is related to this Array object int stop = locators.size(); for (int i = 0; i < stop; i++) { ((Locator) locators.get(i)).addAxis(axis); } updateNotesLocationOrder(); // reset to the current order of the axes return axis; }
2,568
public FieldAxis addFieldAxis(FieldAxis fieldAxis) { if (!canAddAxisObjToArray(fieldAxis)) return null; if (getFieldAxis() !=null) { List axisList = getAxisList(); axisList.remove(0); axisList.add(0, fieldAxis); //replace the old fieldAxis with the new one } else { //add fieldAxis and increment dimension getAxisList().add(0, fieldAxis); getDataCube().incrementDimension(fieldAxis); } hasFieldAxis = true; //update the locators that are related to this Array object int stop = locators.size(); for (int i = 0; i < stop; i++) { ((Locator) locators.get(i)).addAxis(fieldAxis); } //array doenst hold a dataformat anymore //each field along the fieldAxis should have dataformat setDataFormat(null); return fieldAxis; }
public FieldAxis addFieldAxis(FieldAxis fieldAxis) { if (!canAddAxisObjToArray(fieldAxis)) return null; if (getFieldAxis() !=null) { List axisList = getAxisList(); axisList.remove(0); axisList.add(0, fieldAxis); //replace the old fieldAxis with the new one } else { //add fieldAxis and increment dimension getAxisList().add(0, fieldAxis); getDataCube().incrementDimension(fieldAxis); } hasFieldAxis = true; //update the locators that are related to this Array object int stop = locators.size(); for (int i = 0; i < stop; i++) { ((Locator) locators.get(i)).addAxis(fieldAxis); } //array doenst hold a dataformat anymore //each field along the fieldAxis should have dataformat setDataFormat(null); return fieldAxis; }
2,569
public void appendData (Locator locator, String strValue) throws SetDataException{ getDataCube().appendData(locator, strValue); }
public void appendData (Locator locator, String strValue) throws SetDataException { getDataCube().appendData(locator, strValue); }
2,570
private boolean canAddAxisObjToArray(AxisInterface axisToAdd) { if (axisToAdd.getAxisId() == null) { Log.warnln("Warning: Can't add Axis Object without axisId attribute defined"); return false; } return true; }
private boolean canAddAxisObjToArray (AxisInterface axisToAdd) { if (axisToAdd.getAxisId() == null) { Log.warnln("Warning: Can't add Axis Object without axisId attribute defined"); return false; } return true; }
2,571
public Object clone() throws CloneNotSupportedException { Array cloneObj = (Array) super.clone(); //deep clone for DataCube cloneObj.setDataCube((DataCube) this.getDataCube().clone()); //there are no locators that are related to the cloned Array object cloneObj.locators = new Vector(); //set the parentArray correctly for child object cloneObj.getDataCube().setParentArray(cloneObj); cloneObj.getXMLDataIOStyle().setParentArray(cloneObj); synchronized (this.paramGroupOwnedHash) { synchronized(cloneObj.paramGroupOwnedHash) { cloneObj.paramGroupOwnedHash = Collections.synchronizedSet(new HashSet(this.paramGroupOwnedHash.size())); Iterator iter = this.paramGroupOwnedHash.iterator(); while (iter.hasNext()) { cloneObj.paramGroupOwnedHash.add(((Group) iter.next()).clone()); } } } return cloneObj; } //end of clone
public Object clone() throws CloneNotSupportedException { Array cloneObj = (Array) super.clone(); //deep clone for DataCube cloneObj.setDataCube((DataCube) this.getDataCube().clone()); //there are no locators that are related to the cloned Array object cloneObj.locatorList = new Vector(); //set the parentArray correctly for child object cloneObj.getDataCube().setParentArray(cloneObj); cloneObj.getXMLDataIOStyle().setParentArray(cloneObj); synchronized (this.paramGroupOwnedHash) { synchronized(cloneObj.paramGroupOwnedHash) { cloneObj.paramGroupOwnedHash = Collections.synchronizedSet(new HashSet(this.paramGroupOwnedHash.size())); Iterator iter = this.paramGroupOwnedHash.iterator(); while (iter.hasNext()) { cloneObj.paramGroupOwnedHash.add(((Group) iter.next()).clone()); } } } return cloneObj; } //end of clone
2,572
public Locator createLocator() { Locator locatorObj = new Locator(this); //add this locator to the list of locators this Array object monitors locators.add(locatorObj); return locatorObj; }
public Locator createLocator() { Locator locatorObj = new Locator(this); //add this locator to the list of locators this Array object monitors locatorList.add(locatorObj); return locatorObj; }
2,573
public boolean removeAxis(Axis what) { boolean isRemoveSuccess = removeFromList(what, getAxisList(), "axisList"); if (isRemoveSuccess) //remove successful getDataCube().decrementDimension(); //decrease the dimension by 1 return isRemoveSuccess; }
public boolean removeAxis(Axis what) { boolean isRemoveSuccess = removeFromList(what, getAxisList(), "axisList"); if (isRemoveSuccess) //remove successful getDataCube().decrementDimension(); //decrease the dimension by 1 return isRemoveSuccess; }
2,574
public Note addNote (Note note ) { if (note == null) { Log.warn("in Notes.addNote(), the Note passed in is null"); return null; } getNoteList().add(note); return note; }
public Note addNote (Note note ) { if (note == null) { Log.warn("in Notes.addNote(), the Note passed in is null"); return null; } getNoteList().add(note); return note; }
2,576