bugged
stringlengths
6
599k
fixed
stringlengths
6
40.8M
__index_level_0__
int64
0
3.24M
public void setCount(Integer numCount) { ((XMLAttribute) attribHash.get("count")).setAttribValue(numCount); }
public void setCount(Integer numCount) { if (numCount.intValue() < 1) { Log.warnln("Cant set repeatFormattedIOCmd count to less than 1, ignoring set request."); } else { ((XMLAttribute) attribHash.get("count")).setAttribValue(numCount); } }
4,516
public static final ISignature getInstance(String ssa) { if (ssa == null) { return null; } ssa = ssa.trim(); ISignature result = null; if (ssa.equalsIgnoreCase(Registry.DSA_SIG) || ssa.equals(Registry.DSS_SIG)) { result = new DSSSignature(); } else if (ssa.equalsIgnoreCase(Registry.RSA_PSS_SIG)) { result = new RSAPSSSignature(); } else if (ssa.equalsIgnoreCase(Registry.RSA_PKCS1_V1_5_SIG)) { result = new RSAPKCS1V1_5Signature(); } return result; }
public static final ISignature getInstance(String ssa) { if (ssa == null) { return null; } ssa = ssa.trim(); ISignature result = null; if (ssa.equalsIgnoreCase(Registry.DSA_SIG) || ssa.equals(Registry.DSS_SIG)) { result = new DSSSignature(); } else if (ssa.equalsIgnoreCase(Registry.RSA_PSS_SIG)) { result = new RSAPSSSignature(); } else if (ssa.equalsIgnoreCase(Registry.RSA_PKCS1_V1_5_SIG)) { result = new RSAPKCS1V1_5Signature(); } return result; }
4,517
public static final Set getNames() { HashSet hs = new HashSet(); hs.add(Registry.DSS_SIG); hs.add(Registry.RSA_PSS_SIG); hs.add(Registry.RSA_PKCS1_V1_5_SIG); return Collections.unmodifiableSet(hs); }
public static synchronized final Set getNames() { if (names == null) { HashSet hs = new HashSet(); hs.add(Registry.DSS_SIG); hs.add(Registry.RSA_PSS_SIG); hs.add(Registry.RSA_PKCS1_V1_5_SIG); return Collections.unmodifiableSet(hs); }
4,518
public static final Set getNames() { HashSet hs = new HashSet(); hs.add(Registry.DSS_SIG); hs.add(Registry.RSA_PSS_SIG); hs.add(Registry.RSA_PKCS1_V1_5_SIG); return Collections.unmodifiableSet(hs); }
public static final Set getNames() { HashSet hs = new HashSet(); hs.add(Registry.DSS_SIG); hs.add(Registry.RSA_PSS_SIG); hs.add(Registry.RSA_PKCS1_V1_5_SIG); return Collections.unmodifiableSet(hs); }
4,519
public static final Set getNames() { HashSet hs = new HashSet(); hs.add(Registry.DSS_SIG); hs.add(Registry.RSA_PSS_SIG); hs.add(Registry.RSA_PKCS1_V1_5_SIG); return Collections.unmodifiableSet(hs); }
public static final Set getNames() { HashSet hs = new HashSet(); hs.add(Registry.DSS_SIG); hs.add(Registry.RSA_PSS_SIG); hs.add(Registry.RSA_PKCS1_V1_5_SIG); names = Collections.unmodifiableSet(hs); }
4,520
public SendEMailDialog(Frame parent, Session session ) { if (!isEMailAvailable()) { JOptionPane.showMessageDialog(parent, LangTool.getString("messages.noEmailAPI"), "Error", JOptionPane.ERROR_MESSAGE,null); } else { this.session = session; Screen5250 screen = session.getScreen(); Object[] message = new Object[1]; message[0] = setupMailPanel("tn5250j.txt"); String[] options = new String[3]; int result = 0; while (result == 0 || result == 2) { // setup the dialog options setOptions(options); result = JOptionPane.showOptionDialog( parent, // the parent that the dialog blocks message, // the dialog message array LangTool.getString("em.title"), // the title of the dialog window JOptionPane.DEFAULT_OPTION, // option type JOptionPane.QUESTION_MESSAGE, // message type null, // optional icon, use null to use the default icon options, // options string array, will be made into buttons// options[0] // option that should be made into a default button ); switch(result) { case 0: // Send it SendEMail sem = new SendEMail(); sem.setConfigFile("SMTPProperties.cfg"); sem.setTo((String)toAddress.getSelectedItem()); sem.setSubject(subject.getText()); if (bodyText.getText().length() >0) sem.setMessage(bodyText.getText()); if (attachmentName.getText().length() > 0) sem.setAttachmentName(attachmentName.getText()); StringBuffer sb = new StringBuffer(); char[] s = screen.getScreenAsChars(); int c = screen.getCols(); int l = screen.getRows() * c; int col = 0; for (int x = 0; x < l; x++,col++) { sb.append(s[x]); if (col == c) { sb.append('\n'); col = 0; } } sem.setAttachment(sb.toString()); // send the information sendIt(parent,sem); sem.release(); sem = null; break; case 1: // Cancel // System.out.println("Cancel"); break; case 2: // Configure SMTP configureSMTP(parent); // System.out.println("Cancel"); break; default: break; } } } }
public SendEMailDialog(Frame parent, Session session) { if (!isEMailAvailable()) { JOptionPane.showMessageDialog(parent, LangTool.getString("messages.noEmailAPI"), "Error", JOptionPane.ERROR_MESSAGE,null); } else { this.session = session; Screen5250 screen = session.getScreen(); Object[] message = new Object[1]; message[0] = setupMailPanel("tn5250j.txt"); String[] options = new String[3]; int result = 0; while (result == 0 || result == 2) { // setup the dialog options setOptions(options); result = JOptionPane.showOptionDialog( parent, // the parent that the dialog blocks message, // the dialog message array LangTool.getString("em.title"), // the title of the dialog window JOptionPane.DEFAULT_OPTION, // option type JOptionPane.QUESTION_MESSAGE, // message type null, // optional icon, use null to use the default icon options, // options string array, will be made into buttons// options[0] // option that should be made into a default button ); switch(result) { case 0: // Send it SendEMail sem = new SendEMail(); sem.setConfigFile("SMTPProperties.cfg"); sem.setTo((String)toAddress.getSelectedItem()); sem.setSubject(subject.getText()); if (bodyText.getText().length() >0) sem.setMessage(bodyText.getText()); if (attachmentName.getText().length() > 0) sem.setAttachmentName(attachmentName.getText()); StringBuffer sb = new StringBuffer(); char[] s = screen.getScreenAsChars(); int c = screen.getCols(); int l = screen.getRows() * c; int col = 0; for (int x = 0; x < l; x++,col++) { sb.append(s[x]); if (col == c) { sb.append('\n'); col = 0; } } sem.setAttachment(sb.toString()); // send the information sendIt(parent,sem); sem.release(); sem = null; break; case 1: // Cancel // System.out.println("Cancel"); break; case 2: // Configure SMTP configureSMTP(parent); // System.out.println("Cancel"); break; default: break; } } } }
4,522
public SendEMailDialog(Frame parent, Session session ) { if (!isEMailAvailable()) { JOptionPane.showMessageDialog(parent, LangTool.getString("messages.noEmailAPI"), "Error", JOptionPane.ERROR_MESSAGE,null); } else { this.session = session; Screen5250 screen = session.getScreen(); Object[] message = new Object[1]; message[0] = setupMailPanel("tn5250j.txt"); String[] options = new String[3]; int result = 0; while (result == 0 || result == 2) { // setup the dialog options setOptions(options); result = JOptionPane.showOptionDialog( parent, // the parent that the dialog blocks message, // the dialog message array LangTool.getString("em.title"), // the title of the dialog window JOptionPane.DEFAULT_OPTION, // option type JOptionPane.QUESTION_MESSAGE, // message type null, // optional icon, use null to use the default icon options, // options string array, will be made into buttons// options[0] // option that should be made into a default button ); switch(result) { case 0: // Send it SendEMail sem = new SendEMail(); sem.setConfigFile("SMTPProperties.cfg"); sem.setTo((String)toAddress.getSelectedItem()); sem.setSubject(subject.getText()); if (bodyText.getText().length() >0) sem.setMessage(bodyText.getText()); if (attachmentName.getText().length() > 0) sem.setAttachmentName(attachmentName.getText()); StringBuffer sb = new StringBuffer(); char[] s = screen.getScreenAsChars(); int c = screen.getCols(); int l = screen.getRows() * c; int col = 0; for (int x = 0; x < l; x++,col++) { sb.append(s[x]); if (col == c) { sb.append('\n'); col = 0; } } sem.setAttachment(sb.toString()); // send the information sendIt(parent,sem); sem.release(); sem = null; break; case 1: // Cancel // System.out.println("Cancel"); break; case 2: // Configure SMTP configureSMTP(parent); // System.out.println("Cancel"); break; default: break; } } } }
public SendEMailDialog(Frame parent, Session session ) { if (!isEMailAvailable()) { JOptionPane.showMessageDialog(parent, LangTool.getString("messages.noEmailAPI"), "Error", JOptionPane.ERROR_MESSAGE,null); } else { this.session = session; Screen5250 screen = session.getScreen(); Object[] message = new Object[1]; message[0] = setupMailPanel("tn5250j.txt"); String[] options = new String[3]; int result = 0; while (result == 0 || result == 2) { // setup the dialog options setOptions(options); result = JOptionPane.showOptionDialog( parent, // the parent that the dialog blocks message, // the dialog message array LangTool.getString("em.title"), // the title of the dialog window JOptionPane.DEFAULT_OPTION, // option type JOptionPane.QUESTION_MESSAGE, // message type null, // optional icon, use null to use the default icon options, // options string array, will be made into buttons// options[0] // option that should be made into a default button ); switch(result) { case 0: // Send it SendEMail sem = new SendEMail(); sem.setConfigFile("SMTPProperties.cfg"); sem.setTo((String)toAddress.getSelectedItem()); sem.setSubject(subject.getText()); if (bodyText.getText().length() >0) sem.setMessage(bodyText.getText()); if (attachmentName.getText().length() > 0) sem.setAttachmentName(attachmentName.getText()); StringBuffer sb = new StringBuffer(); char[] s = screen.getScreenAsChars(); int c = screen.getCols(); int l = screen.getRows() * c; int col = 0; for (int x = 0; x < l; x++,col++) { sb.append(s[x]); if (col == c) { sb.append('\n'); col = 0; } } sem.setAttachment(sb.toString()); // send the information sendIt(parent,sem); sem.release(); sem = null; break; case 1: // Cancel // System.out.println("Cancel"); break; case 2: // Configure SMTP configureSMTP(parent); // System.out.println("Cancel"); break; default: break; } } } }
4,523
public SendEMailDialog(Frame parent, Session session ) { if (!isEMailAvailable()) { JOptionPane.showMessageDialog(parent, LangTool.getString("messages.noEmailAPI"), "Error", JOptionPane.ERROR_MESSAGE,null); } else { this.session = session; Screen5250 screen = session.getScreen(); Object[] message = new Object[1]; message[0] = setupMailPanel("tn5250j.txt"); String[] options = new String[3]; int result = 0; while (result == 0 || result == 2) { // setup the dialog options setOptions(options); result = JOptionPane.showOptionDialog( parent, // the parent that the dialog blocks message, // the dialog message array LangTool.getString("em.title"), // the title of the dialog window JOptionPane.DEFAULT_OPTION, // option type JOptionPane.QUESTION_MESSAGE, // message type null, // optional icon, use null to use the default icon options, // options string array, will be made into buttons// options[0] // option that should be made into a default button ); switch(result) { case 0: // Send it SendEMail sem = new SendEMail(); sem.setConfigFile("SMTPProperties.cfg"); sem.setTo((String)toAddress.getSelectedItem()); sem.setSubject(subject.getText()); if (bodyText.getText().length() >0) sem.setMessage(bodyText.getText()); if (attachmentName.getText().length() > 0) sem.setAttachmentName(attachmentName.getText()); StringBuffer sb = new StringBuffer(); char[] s = screen.getScreenAsChars(); int c = screen.getCols(); int l = screen.getRows() * c; int col = 0; for (int x = 0; x < l; x++,col++) { sb.append(s[x]); if (col == c) { sb.append('\n'); col = 0; } } sem.setAttachment(sb.toString()); // send the information sendIt(parent,sem); sem.release(); sem = null; break; case 1: // Cancel // System.out.println("Cancel"); break; case 2: // Configure SMTP configureSMTP(parent); // System.out.println("Cancel"); break; default: break; } } } }
public SendEMailDialog(Frame parent, Session session ) { if (!isEMailAvailable()) { JOptionPane.showMessageDialog(parent, LangTool.getString("messages.noEmailAPI"), "Error", JOptionPane.ERROR_MESSAGE,null); } else { this.session = session; Screen5250 screen = session.getScreen(); Object[] message = new Object[1]; message[0] = setupMailPanel("tn5250j.txt"); String[] options = new String[3]; int result = 0; while (result == 0 || result == 2) { // setup the dialog options setOptions(options); result = JOptionPane.showOptionDialog( parent, // the parent that the dialog blocks message, // the dialog message array LangTool.getString("em.title"), // the title of the dialog window JOptionPane.DEFAULT_OPTION, // option type JOptionPane.QUESTION_MESSAGE, // message type null, // optional icon, use null to use the default icon options, // options string array, will be made into buttons// options[0] // option that should be made into a default button ); switch(result) { case 0: // Send it SendEMail sem = new SendEMail(); sem.setConfigFile("SMTPProperties.cfg"); sem.setTo((String)toAddress.getSelectedItem()); sem.setSubject(subject.getText()); if (bodyText.getText().length() >0) sem.setMessage(bodyText.getText()); if (attachmentName.getText().length() > 0) sem.setAttachmentName(attachmentName.getText()); StringBuffer sb = new StringBuffer(); char[] s = screen.getScreenAsChars(); int c = screen.getCols(); int l = screen.getRows() * c; int col = 0; for (int x = 0; x < l; x++,col++) { sb.append(s[x]); if (col == c) { sb.append('\n'); col = 0; } } sem.setAttachment(sb.toString()); // send the information sendIt(parent,sem); sem.release(); sem = null; break; case 1: // Cancel // System.out.println("Cancel"); break; case 2: // Configure SMTP configureSMTP(parent); // System.out.println("Cancel"); break; default: break; } } } }
4,524
public SendEMailDialog(Frame parent, Session session ) { if (!isEMailAvailable()) { JOptionPane.showMessageDialog(parent, LangTool.getString("messages.noEmailAPI"), "Error", JOptionPane.ERROR_MESSAGE,null); } else { this.session = session; Screen5250 screen = session.getScreen(); Object[] message = new Object[1]; message[0] = setupMailPanel("tn5250j.txt"); String[] options = new String[3]; int result = 0; while (result == 0 || result == 2) { // setup the dialog options setOptions(options); result = JOptionPane.showOptionDialog( parent, // the parent that the dialog blocks message, // the dialog message array LangTool.getString("em.title"), // the title of the dialog window JOptionPane.DEFAULT_OPTION, // option type JOptionPane.QUESTION_MESSAGE, // message type null, // optional icon, use null to use the default icon options, // options string array, will be made into buttons// options[0] // option that should be made into a default button ); switch(result) { case 0: // Send it SendEMail sem = new SendEMail(); sem.setConfigFile("SMTPProperties.cfg"); sem.setTo((String)toAddress.getSelectedItem()); sem.setSubject(subject.getText()); if (bodyText.getText().length() >0) sem.setMessage(bodyText.getText()); if (attachmentName.getText().length() > 0) sem.setAttachmentName(attachmentName.getText()); StringBuffer sb = new StringBuffer(); char[] s = screen.getScreenAsChars(); int c = screen.getCols(); int l = screen.getRows() * c; int col = 0; for (int x = 0; x < l; x++,col++) { sb.append(s[x]); if (col == c) { sb.append('\n'); col = 0; } } sem.setAttachment(sb.toString()); // send the information sendIt(parent,sem); sem.release(); sem = null; break; case 1: // Cancel // System.out.println("Cancel"); break; case 2: // Configure SMTP configureSMTP(parent); // System.out.println("Cancel"); break; default: break; } } } }
public SendEMailDialog(Frame parent, Session session ) { if (!isEMailAvailable()) { JOptionPane.showMessageDialog(parent, LangTool.getString("messages.noEmailAPI"), "Error", JOptionPane.ERROR_MESSAGE,null); } else { this.session = session; Screen5250 screen = session.getScreen(); Object[] message = new Object[1]; message[0] = setupMailPanel("tn5250j.txt"); String[] options = new String[3]; int result = 0; while (result == 0 || result == 2) { // setup the dialog options setOptions(options); result = JOptionPane.showOptionDialog( parent, // the parent that the dialog blocks message, // the dialog message array LangTool.getString("em.title"), // the title of the dialog window JOptionPane.DEFAULT_OPTION, // option type JOptionPane.QUESTION_MESSAGE, // message type null, // optional icon, use null to use the default icon options, // options string array, will be made into buttons// options[0] // option that should be made into a default button ); switch(result) { case 0: // Send it SendEMail sem = new SendEMail(); sem.setConfigFile("SMTPProperties.cfg"); sem.setTo((String)toAddress.getSelectedItem()); sem.setSubject(subject.getText()); if (bodyText.getText().length() >0) sem.setMessage(bodyText.getText()); if (attachmentName.getText().length() > 0) sem.setAttachmentName(attachmentName.getText()); StringBuffer sb = new StringBuffer(); char[] s = screen.getScreenAsChars(); int c = screen.getCols(); int l = screen.getRows() * c; int col = 0; for (int x = 0; x < l; x++,col++) { sb.append(s[x]); if (col == c) { sb.append('\n'); col = 0; } } sem.setAttachment(sb.toString()); // send the information sendIt(parent,sem); sem.release(); sem = null; break; case 1: // Cancel // System.out.println("Cancel"); break; case 2: // Configure SMTP configureSMTP(parent); // System.out.println("Cancel"); break; default: break; } } } }
4,525
public SendEMailDialog(Frame parent, Session session ) { if (!isEMailAvailable()) { JOptionPane.showMessageDialog(parent, LangTool.getString("messages.noEmailAPI"), "Error", JOptionPane.ERROR_MESSAGE,null); } else { this.session = session; Screen5250 screen = session.getScreen(); Object[] message = new Object[1]; message[0] = setupMailPanel("tn5250j.txt"); String[] options = new String[3]; int result = 0; while (result == 0 || result == 2) { // setup the dialog options setOptions(options); result = JOptionPane.showOptionDialog( parent, // the parent that the dialog blocks message, // the dialog message array LangTool.getString("em.title"), // the title of the dialog window JOptionPane.DEFAULT_OPTION, // option type JOptionPane.QUESTION_MESSAGE, // message type null, // optional icon, use null to use the default icon options, // options string array, will be made into buttons// options[0] // option that should be made into a default button ); switch(result) { case 0: // Send it SendEMail sem = new SendEMail(); sem.setConfigFile("SMTPProperties.cfg"); sem.setTo((String)toAddress.getSelectedItem()); sem.setSubject(subject.getText()); if (bodyText.getText().length() >0) sem.setMessage(bodyText.getText()); if (attachmentName.getText().length() > 0) sem.setAttachmentName(attachmentName.getText()); StringBuffer sb = new StringBuffer(); char[] s = screen.getScreenAsChars(); int c = screen.getCols(); int l = screen.getRows() * c; int col = 0; for (int x = 0; x < l; x++,col++) { sb.append(s[x]); if (col == c) { sb.append('\n'); col = 0; } } sem.setAttachment(sb.toString()); // send the information sendIt(parent,sem); sem.release(); sem = null; break; case 1: // Cancel // System.out.println("Cancel"); break; case 2: // Configure SMTP configureSMTP(parent); // System.out.println("Cancel"); break; default: break; } } } }
public SendEMailDialog(Frame parent, Session session ) { if (!isEMailAvailable()) { JOptionPane.showMessageDialog(parent, LangTool.getString("messages.noEmailAPI"), "Error", JOptionPane.ERROR_MESSAGE,null); } else { this.session = session; Screen5250 screen = session.getScreen(); Object[] message = new Object[1]; message[0] = setupMailPanel("tn5250j.txt"); String[] options = new String[3]; int result = 0; while (result == 0 || result == 2) { // setup the dialog options setOptions(options); result = JOptionPane.showOptionDialog( parent, // the parent that the dialog blocks message, // the dialog message array LangTool.getString("em.title"), // the title of the dialog window JOptionPane.DEFAULT_OPTION, // option type JOptionPane.QUESTION_MESSAGE, // message type null, // optional icon, use null to use the default icon options, // options string array, will be made into buttons// options[0] // option that should be made into a default button ); switch(result) { case 0: // Send it SendEMail sem = new SendEMail(); sem.setConfigFile("SMTPProperties.cfg"); sem.setTo((String)toAddress.getSelectedItem()); sem.setSubject(subject.getText()); if (bodyText.getText().length() >0) sem.setMessage(bodyText.getText()); if (attachmentName.getText().length() > 0) sem.setAttachmentName(attachmentName.getText()); StringBuffer sb = new StringBuffer(); char[] s = screen.getScreenAsChars(); int c = screen.getCols(); int l = screen.getRows() * c; int col = 0; for (int x = 0; x < l; x++,col++) { sb.append(s[x]); if (col == c) { sb.append('\n'); col = 0; } } sem.setAttachment(sb.toString()); // send the information sendIt(parent,sem); sem.release(); sem = null; break; case 1: // Cancel // System.out.println("Cancel"); break; case 2: // Configure SMTP configureSMTP(parent); // System.out.println("Cancel"); break; default: break; } } } }
4,526
public SendEMailDialog(Frame parent, Session session ) { if (!isEMailAvailable()) { JOptionPane.showMessageDialog(parent, LangTool.getString("messages.noEmailAPI"), "Error", JOptionPane.ERROR_MESSAGE,null); } else { this.session = session; Screen5250 screen = session.getScreen(); Object[] message = new Object[1]; message[0] = setupMailPanel("tn5250j.txt"); String[] options = new String[3]; int result = 0; while (result == 0 || result == 2) { // setup the dialog options setOptions(options); result = JOptionPane.showOptionDialog( parent, // the parent that the dialog blocks message, // the dialog message array LangTool.getString("em.title"), // the title of the dialog window JOptionPane.DEFAULT_OPTION, // option type JOptionPane.QUESTION_MESSAGE, // message type null, // optional icon, use null to use the default icon options, // options string array, will be made into buttons// options[0] // option that should be made into a default button ); switch(result) { case 0: // Send it SendEMail sem = new SendEMail(); sem.setConfigFile("SMTPProperties.cfg"); sem.setTo((String)toAddress.getSelectedItem()); sem.setSubject(subject.getText()); if (bodyText.getText().length() >0) sem.setMessage(bodyText.getText()); if (attachmentName.getText().length() > 0) sem.setAttachmentName(attachmentName.getText()); StringBuffer sb = new StringBuffer(); char[] s = screen.getScreenAsChars(); int c = screen.getCols(); int l = screen.getRows() * c; int col = 0; for (int x = 0; x < l; x++,col++) { sb.append(s[x]); if (col == c) { sb.append('\n'); col = 0; } } sem.setAttachment(sb.toString()); // send the information sendIt(parent,sem); sem.release(); sem = null; break; case 1: // Cancel // System.out.println("Cancel"); break; case 2: // Configure SMTP configureSMTP(parent); // System.out.println("Cancel"); break; default: break; } } } }
public SendEMailDialog(Frame parent, Session session ) { if (!isEMailAvailable()) { JOptionPane.showMessageDialog(parent, LangTool.getString("messages.noEmailAPI"), "Error", JOptionPane.ERROR_MESSAGE,null); } else { this.session = session; Screen5250 screen = session.getScreen(); Object[] message = new Object[1]; message[0] = setupMailPanel("tn5250j.txt"); String[] options = new String[3]; int result = 0; while (result == 0 || result == 2) { // setup the dialog options setOptions(options); result = JOptionPane.showOptionDialog( parent, // the parent that the dialog blocks message, // the dialog message array LangTool.getString("em.title"), // the title of the dialog window JOptionPane.DEFAULT_OPTION, // option type JOptionPane.QUESTION_MESSAGE, // message type null, // optional icon, use null to use the default icon options, // options string array, will be made into buttons// options[0] // option that should be made into a default button ); switch(result) { case 0: // Send it SendEMail sem = new SendEMail(); sem.setConfigFile("SMTPProperties.cfg"); sem.setTo((String)toAddress.getSelectedItem()); sem.setSubject(subject.getText()); if (bodyText.getText().length() >0) sem.setMessage(bodyText.getText()); if (attachmentName.getText().length() > 0) sem.setAttachmentName(attachmentName.getText()); StringBuffer sb = new StringBuffer(); char[] s = screen.getScreenAsChars(); int c = screen.getCols(); int l = screen.getRows() * c; int col = 0; for (int x = 0; x < l; x++,col++) { sb.append(s[x]); if (col == c) { sb.append('\n'); col = 0; } } sem.setAttachment(sb.toString()); // send the information sendIt(parent,sem); sem.release(); sem = null; break; case 1: // Cancel // System.out.println("Cancel"); break; case 2: // Configure SMTP configureSMTP(parent); // System.out.println("Cancel"); break; default: break; } } } }
4,527
public SendEMailDialog(Frame parent, Session session ) { if (!isEMailAvailable()) { JOptionPane.showMessageDialog(parent, LangTool.getString("messages.noEmailAPI"), "Error", JOptionPane.ERROR_MESSAGE,null); } else { this.session = session; Screen5250 screen = session.getScreen(); Object[] message = new Object[1]; message[0] = setupMailPanel("tn5250j.txt"); String[] options = new String[3]; int result = 0; while (result == 0 || result == 2) { // setup the dialog options setOptions(options); result = JOptionPane.showOptionDialog( parent, // the parent that the dialog blocks message, // the dialog message array LangTool.getString("em.title"), // the title of the dialog window JOptionPane.DEFAULT_OPTION, // option type JOptionPane.QUESTION_MESSAGE, // message type null, // optional icon, use null to use the default icon options, // options string array, will be made into buttons// options[0] // option that should be made into a default button ); switch(result) { case 0: // Send it SendEMail sem = new SendEMail(); sem.setConfigFile("SMTPProperties.cfg"); sem.setTo((String)toAddress.getSelectedItem()); sem.setSubject(subject.getText()); if (bodyText.getText().length() >0) sem.setMessage(bodyText.getText()); if (attachmentName.getText().length() > 0) sem.setAttachmentName(attachmentName.getText()); StringBuffer sb = new StringBuffer(); char[] s = screen.getScreenAsChars(); int c = screen.getCols(); int l = screen.getRows() * c; int col = 0; for (int x = 0; x < l; x++,col++) { sb.append(s[x]); if (col == c) { sb.append('\n'); col = 0; } } sem.setAttachment(sb.toString()); // send the information sendIt(parent,sem); sem.release(); sem = null; break; case 1: // Cancel // System.out.println("Cancel"); break; case 2: // Configure SMTP configureSMTP(parent); // System.out.println("Cancel"); break; default: break; } } } }
public SendEMailDialog(Frame parent, Session session ) { if (!isEMailAvailable()) { JOptionPane.showMessageDialog(parent, LangTool.getString("messages.noEmailAPI"), "Error", JOptionPane.ERROR_MESSAGE,null); } else { this.session = session; Screen5250 screen = session.getScreen(); Object[] message = new Object[1]; message[0] = setupMailPanel("tn5250j.txt"); String[] options = new String[3]; int result = 0; while (result == 0 || result == 2) { // setup the dialog options setOptions(options); result = JOptionPane.showOptionDialog( parent, // the parent that the dialog blocks message, // the dialog message array LangTool.getString("em.title"), // the title of the dialog window JOptionPane.DEFAULT_OPTION, // option type JOptionPane.QUESTION_MESSAGE, // message type null, // optional icon, use null to use the default icon options, // options string array, will be made into buttons// options[0] // option that should be made into a default button ); switch(result) { case 0: // Send it SendEMail sem = new SendEMail(); sem.setConfigFile("SMTPProperties.cfg"); sem.setTo((String)toAddress.getSelectedItem()); sem.setSubject(subject.getText()); if (bodyText.getText().length() >0) sem.setMessage(bodyText.getText()); if (attachmentName.getText().length() > 0) sem.setAttachmentName(attachmentName.getText()); StringBuffer sb = new StringBuffer(); char[] s = screen.getScreenAsChars(); int c = screen.getCols(); int l = screen.getRows() * c; int col = 0; for (int x = 0; x < l; x++,col++) { sb.append(s[x]); if (col == c) { sb.append('\n'); col = 0; } } sem.setAttachment(sb.toString()); // send the information sendIt(parent,sem); sem.release(); sem = null; break; case 1: // Cancel // System.out.println("Cancel"); break; case 2: // Configure SMTP configureSMTP(parent); // System.out.println("Cancel"); break; default: break; } } } }
4,528
public SendEMailDialog(Frame parent, Session session ) { if (!isEMailAvailable()) { JOptionPane.showMessageDialog(parent, LangTool.getString("messages.noEmailAPI"), "Error", JOptionPane.ERROR_MESSAGE,null); } else { this.session = session; Screen5250 screen = session.getScreen(); Object[] message = new Object[1]; message[0] = setupMailPanel("tn5250j.txt"); String[] options = new String[3]; int result = 0; while (result == 0 || result == 2) { // setup the dialog options setOptions(options); result = JOptionPane.showOptionDialog( parent, // the parent that the dialog blocks message, // the dialog message array LangTool.getString("em.title"), // the title of the dialog window JOptionPane.DEFAULT_OPTION, // option type JOptionPane.QUESTION_MESSAGE, // message type null, // optional icon, use null to use the default icon options, // options string array, will be made into buttons// options[0] // option that should be made into a default button ); switch(result) { case 0: // Send it SendEMail sem = new SendEMail(); sem.setConfigFile("SMTPProperties.cfg"); sem.setTo((String)toAddress.getSelectedItem()); sem.setSubject(subject.getText()); if (bodyText.getText().length() >0) sem.setMessage(bodyText.getText()); if (attachmentName.getText().length() > 0) sem.setAttachmentName(attachmentName.getText()); StringBuffer sb = new StringBuffer(); char[] s = screen.getScreenAsChars(); int c = screen.getCols(); int l = screen.getRows() * c; int col = 0; for (int x = 0; x < l; x++,col++) { sb.append(s[x]); if (col == c) { sb.append('\n'); col = 0; } } sem.setAttachment(sb.toString()); // send the information sendIt(parent,sem); sem.release(); sem = null; break; case 1: // Cancel // System.out.println("Cancel"); break; case 2: // Configure SMTP configureSMTP(parent); // System.out.println("Cancel"); break; default: break; } } } }
public SendEMailDialog(Frame parent, Session session ) { if (!isEMailAvailable()) { JOptionPane.showMessageDialog(parent, LangTool.getString("messages.noEmailAPI"), "Error", JOptionPane.ERROR_MESSAGE,null); } else { this.session = session; Screen5250 screen = session.getScreen(); Object[] message = new Object[1]; message[0] = setupMailPanel("tn5250j.txt"); String[] options = new String[3]; int result = 0; while (result == 0 || result == 2) { // setup the dialog options setOptions(options); result = JOptionPane.showOptionDialog( parent, // the parent that the dialog blocks message, // the dialog message array LangTool.getString("em.title"), // the title of the dialog window JOptionPane.DEFAULT_OPTION, // option type JOptionPane.QUESTION_MESSAGE, // message type null, // optional icon, use null to use the default icon options, // options string array, will be made into buttons// options[0] // option that should be made into a default button ); switch(result) { case 0: // Send it SendEMail sem = new SendEMail(); sem.setConfigFile("SMTPProperties.cfg"); sem.setTo((String)toAddress.getSelectedItem()); sem.setSubject(subject.getText()); if (bodyText.getText().length() >0) sem.setMessage(bodyText.getText()); if (attachmentName.getText().length() > 0) sem.setAttachmentName(attachmentName.getText()); StringBuffer sb = new StringBuffer(); char[] s = screen.getScreenAsChars(); int c = screen.getCols(); int l = screen.getRows() * c; int col = 0; for (int x = 0; x < l; x++,col++) { sb.append(s[x]); if (col == c) { sb.append('\n'); col = 0; } } sem.setAttachment(sb.toString()); // send the information sendIt(parent,sem); sem.release(); sem = null; break; case 1: // Cancel // System.out.println("Cancel"); break; case 2: // Configure SMTP configureSMTP(parent); // System.out.println("Cancel"); break; default: break; } } } }
4,529
public SendEMailDialog(Frame parent, Session session ) { if (!isEMailAvailable()) { JOptionPane.showMessageDialog(parent, LangTool.getString("messages.noEmailAPI"), "Error", JOptionPane.ERROR_MESSAGE,null); } else { this.session = session; Screen5250 screen = session.getScreen(); Object[] message = new Object[1]; message[0] = setupMailPanel("tn5250j.txt"); String[] options = new String[3]; int result = 0; while (result == 0 || result == 2) { // setup the dialog options setOptions(options); result = JOptionPane.showOptionDialog( parent, // the parent that the dialog blocks message, // the dialog message array LangTool.getString("em.title"), // the title of the dialog window JOptionPane.DEFAULT_OPTION, // option type JOptionPane.QUESTION_MESSAGE, // message type null, // optional icon, use null to use the default icon options, // options string array, will be made into buttons// options[0] // option that should be made into a default button ); switch(result) { case 0: // Send it SendEMail sem = new SendEMail(); sem.setConfigFile("SMTPProperties.cfg"); sem.setTo((String)toAddress.getSelectedItem()); sem.setSubject(subject.getText()); if (bodyText.getText().length() >0) sem.setMessage(bodyText.getText()); if (attachmentName.getText().length() > 0) sem.setAttachmentName(attachmentName.getText()); StringBuffer sb = new StringBuffer(); char[] s = screen.getScreenAsChars(); int c = screen.getCols(); int l = screen.getRows() * c; int col = 0; for (int x = 0; x < l; x++,col++) { sb.append(s[x]); if (col == c) { sb.append('\n'); col = 0; } } sem.setAttachment(sb.toString()); // send the information sendIt(parent,sem); sem.release(); sem = null; break; case 1: // Cancel // System.out.println("Cancel"); break; case 2: // Configure SMTP configureSMTP(parent); // System.out.println("Cancel"); break; default: break; } } } }
public SendEMailDialog(Frame parent, Session session ) { if (!isEMailAvailable()) { JOptionPane.showMessageDialog(parent, LangTool.getString("messages.noEmailAPI"), "Error", JOptionPane.ERROR_MESSAGE,null); } else { this.session = session; Screen5250 screen = session.getScreen(); Object[] message = new Object[1]; message[0] = setupMailPanel("tn5250j.txt"); String[] options = new String[3]; int result = 0; while (result == 0 || result == 2) { // setup the dialog options setOptions(options); result = JOptionPane.showOptionDialog( parent, // the parent that the dialog blocks message, // the dialog message array LangTool.getString("em.title"), // the title of the dialog window JOptionPane.DEFAULT_OPTION, // option type JOptionPane.QUESTION_MESSAGE, // message type null, // optional icon, use null to use the default icon options, // options string array, will be made into buttons// options[0] // option that should be made into a default button ); switch(result) { case 0: // Send it SendEMail sem = new SendEMail(); sem.setConfigFile("SMTPProperties.cfg"); sem.setTo((String)toAddress.getSelectedItem()); sem.setSubject(subject.getText()); if (bodyText.getText().length() >0) sem.setMessage(bodyText.getText()); if (attachmentName.getText().length() > 0) sem.setAttachmentName(attachmentName.getText()); StringBuffer sb = new StringBuffer(); char[] s = screen.getScreenAsChars(); int c = screen.getCols(); int l = screen.getRows() * c; int col = 0; for (int x = 0; x < l; x++,col++) { sb.append(s[x]); if (col == c) { sb.append('\n'); col = 0; } } sem.setAttachment(sb.toString()); // send the information sendIt(parent,sem); sem.release(); sem = null; break; case 1: // Cancel // System.out.println("Cancel"); break; case 2: // Configure SMTP configureSMTP(parent); // System.out.println("Cancel"); break; default: break; } } } }
4,530
public SendEMailDialog(Frame parent, Session session ) { if (!isEMailAvailable()) { JOptionPane.showMessageDialog(parent, LangTool.getString("messages.noEmailAPI"), "Error", JOptionPane.ERROR_MESSAGE,null); } else { this.session = session; Screen5250 screen = session.getScreen(); Object[] message = new Object[1]; message[0] = setupMailPanel("tn5250j.txt"); String[] options = new String[3]; int result = 0; while (result == 0 || result == 2) { // setup the dialog options setOptions(options); result = JOptionPane.showOptionDialog( parent, // the parent that the dialog blocks message, // the dialog message array LangTool.getString("em.title"), // the title of the dialog window JOptionPane.DEFAULT_OPTION, // option type JOptionPane.QUESTION_MESSAGE, // message type null, // optional icon, use null to use the default icon options, // options string array, will be made into buttons// options[0] // option that should be made into a default button ); switch(result) { case 0: // Send it SendEMail sem = new SendEMail(); sem.setConfigFile("SMTPProperties.cfg"); sem.setTo((String)toAddress.getSelectedItem()); sem.setSubject(subject.getText()); if (bodyText.getText().length() >0) sem.setMessage(bodyText.getText()); if (attachmentName.getText().length() > 0) sem.setAttachmentName(attachmentName.getText()); StringBuffer sb = new StringBuffer(); char[] s = screen.getScreenAsChars(); int c = screen.getCols(); int l = screen.getRows() * c; int col = 0; for (int x = 0; x < l; x++,col++) { sb.append(s[x]); if (col == c) { sb.append('\n'); col = 0; } } sem.setAttachment(sb.toString()); // send the information sendIt(parent,sem); sem.release(); sem = null; break; case 1: // Cancel // System.out.println("Cancel"); break; case 2: // Configure SMTP configureSMTP(parent); // System.out.println("Cancel"); break; default: break; } } } }
public SendEMailDialog(Frame parent, Session session ) { if (!isEMailAvailable()) { JOptionPane.showMessageDialog(parent, LangTool.getString("messages.noEmailAPI"), "Error", JOptionPane.ERROR_MESSAGE,null); } else { this.session = session; Screen5250 screen = session.getScreen(); Object[] message = new Object[1]; message[0] = setupMailPanel("tn5250j.txt"); String[] options = new String[3]; int result = 0; while (result == 0 || result == 2) { // setup the dialog options setOptions(options); result = JOptionPane.showOptionDialog( parent, // the parent that the dialog blocks message, // the dialog message array LangTool.getString("em.title"), // the title of the dialog window JOptionPane.DEFAULT_OPTION, // option type JOptionPane.QUESTION_MESSAGE, // message type null, // optional icon, use null to use the default icon options, // options string array, will be made into buttons// options[0] // option that should be made into a default button ); switch(result) { case 0: // Send it SendEMail sem = new SendEMail(); sem.setConfigFile("SMTPProperties.cfg"); sem.setTo((String)toAddress.getSelectedItem()); sem.setSubject(subject.getText()); if (bodyText.getText().length() >0) sem.setMessage(bodyText.getText()); if (attachmentName.getText().length() > 0) sem.setAttachmentName(attachmentName.getText()); StringBuffer sb = new StringBuffer(); char[] s = screen.getScreenAsChars(); int c = screen.getCols(); int l = screen.getRows() * c; int col = 0; for (int x = 0; x < l; x++,col++) { sb.append(s[x]); if (col == c) { sb.append('\n'); col = 0; } } sem.setAttachment(sb.toString()); // send the information sendIt(parent,sem); sem.release(); sem = null; break; case 1: // Cancel // System.out.println("Cancel"); break; case 2: // Configure SMTP configureSMTP(parent); // System.out.println("Cancel"); break; default: break; } } } }
4,531
public SendEMailDialog(Frame parent, Session session ) { if (!isEMailAvailable()) { JOptionPane.showMessageDialog(parent, LangTool.getString("messages.noEmailAPI"), "Error", JOptionPane.ERROR_MESSAGE,null); } else { this.session = session; Screen5250 screen = session.getScreen(); Object[] message = new Object[1]; message[0] = setupMailPanel("tn5250j.txt"); String[] options = new String[3]; int result = 0; while (result == 0 || result == 2) { // setup the dialog options setOptions(options); result = JOptionPane.showOptionDialog( parent, // the parent that the dialog blocks message, // the dialog message array LangTool.getString("em.title"), // the title of the dialog window JOptionPane.DEFAULT_OPTION, // option type JOptionPane.QUESTION_MESSAGE, // message type null, // optional icon, use null to use the default icon options, // options string array, will be made into buttons// options[0] // option that should be made into a default button ); switch(result) { case 0: // Send it SendEMail sem = new SendEMail(); sem.setConfigFile("SMTPProperties.cfg"); sem.setTo((String)toAddress.getSelectedItem()); sem.setSubject(subject.getText()); if (bodyText.getText().length() >0) sem.setMessage(bodyText.getText()); if (attachmentName.getText().length() > 0) sem.setAttachmentName(attachmentName.getText()); StringBuffer sb = new StringBuffer(); char[] s = screen.getScreenAsChars(); int c = screen.getCols(); int l = screen.getRows() * c; int col = 0; for (int x = 0; x < l; x++,col++) { sb.append(s[x]); if (col == c) { sb.append('\n'); col = 0; } } sem.setAttachment(sb.toString()); // send the information sendIt(parent,sem); sem.release(); sem = null; break; case 1: // Cancel // System.out.println("Cancel"); break; case 2: // Configure SMTP configureSMTP(parent); // System.out.println("Cancel"); break; default: break; } } } }
public SendEMailDialog(Frame parent, Session session ) { if (!isEMailAvailable()) { JOptionPane.showMessageDialog(parent, LangTool.getString("messages.noEmailAPI"), "Error", JOptionPane.ERROR_MESSAGE,null); } else { this.session = session; Screen5250 screen = session.getScreen(); Object[] message = new Object[1]; message[0] = setupMailPanel("tn5250j.txt"); String[] options = new String[3]; int result = 0; while (result == 0 || result == 2) { // setup the dialog options setOptions(options); result = JOptionPane.showOptionDialog( parent, // the parent that the dialog blocks message, // the dialog message array LangTool.getString("em.title"), // the title of the dialog window JOptionPane.DEFAULT_OPTION, // option type JOptionPane.QUESTION_MESSAGE, // message type null, // optional icon, use null to use the default icon options, // options string array, will be made into buttons// options[0] // option that should be made into a default button ); switch(result) { case 0: // Send it SendEMail sem = new SendEMail(); sem.setConfigFile("SMTPProperties.cfg"); sem.setTo((String)toAddress.getSelectedItem()); sem.setSubject(subject.getText()); if (bodyText.getText().length() >0) sem.setMessage(bodyText.getText()); if (attachmentName.getText().length() > 0) sem.setAttachmentName(attachmentName.getText()); StringBuffer sb = new StringBuffer(); char[] s = screen.getScreenAsChars(); int c = screen.getCols(); int l = screen.getRows() * c; int col = 0; for (int x = 0; x < l; x++,col++) { sb.append(s[x]); if (col == c) { sb.append('\n'); col = 0; } } sem.setAttachment(sb.toString()); // send the information sendIt(parent,sem); sem.release(); sem = null; break; case 1: // Cancel // System.out.println("Cancel"); break; case 2: // Configure SMTP configureSMTP(parent); // System.out.println("Cancel"); break; default: break; } } } }
4,532
public SendEMailDialog(Frame parent, Session session ) { if (!isEMailAvailable()) { JOptionPane.showMessageDialog(parent, LangTool.getString("messages.noEmailAPI"), "Error", JOptionPane.ERROR_MESSAGE,null); } else { this.session = session; Screen5250 screen = session.getScreen(); Object[] message = new Object[1]; message[0] = setupMailPanel("tn5250j.txt"); String[] options = new String[3]; int result = 0; while (result == 0 || result == 2) { // setup the dialog options setOptions(options); result = JOptionPane.showOptionDialog( parent, // the parent that the dialog blocks message, // the dialog message array LangTool.getString("em.title"), // the title of the dialog window JOptionPane.DEFAULT_OPTION, // option type JOptionPane.QUESTION_MESSAGE, // message type null, // optional icon, use null to use the default icon options, // options string array, will be made into buttons// options[0] // option that should be made into a default button ); switch(result) { case 0: // Send it SendEMail sem = new SendEMail(); sem.setConfigFile("SMTPProperties.cfg"); sem.setTo((String)toAddress.getSelectedItem()); sem.setSubject(subject.getText()); if (bodyText.getText().length() >0) sem.setMessage(bodyText.getText()); if (attachmentName.getText().length() > 0) sem.setAttachmentName(attachmentName.getText()); StringBuffer sb = new StringBuffer(); char[] s = screen.getScreenAsChars(); int c = screen.getCols(); int l = screen.getRows() * c; int col = 0; for (int x = 0; x < l; x++,col++) { sb.append(s[x]); if (col == c) { sb.append('\n'); col = 0; } } sem.setAttachment(sb.toString()); // send the information sendIt(parent,sem); sem.release(); sem = null; break; case 1: // Cancel // System.out.println("Cancel"); break; case 2: // Configure SMTP configureSMTP(parent); // System.out.println("Cancel"); break; default: break; } } } }
public SendEMailDialog(Frame parent, Session session ) { if (!isEMailAvailable()) { JOptionPane.showMessageDialog(parent, LangTool.getString("messages.noEmailAPI"), "Error", JOptionPane.ERROR_MESSAGE,null); } else { this.session = session; Screen5250 screen = session.getScreen(); Object[] message = new Object[1]; message[0] = setupMailPanel("tn5250j.txt"); String[] options = new String[3]; int result = 0; while (result == 0 || result == 2) { // setup the dialog options setOptions(options); result = JOptionPane.showOptionDialog( parent, // the parent that the dialog blocks message, // the dialog message array LangTool.getString("em.title"), // the title of the dialog window JOptionPane.DEFAULT_OPTION, // option type JOptionPane.QUESTION_MESSAGE, // message type null, // optional icon, use null to use the default icon options, // options string array, will be made into buttons// options[0] // option that should be made into a default button ); switch(result) { case 0: // Send it SendEMail sem = new SendEMail(); sem.setConfigFile("SMTPProperties.cfg"); sem.setTo((String)toAddress.getSelectedItem()); sem.setSubject(subject.getText()); if (bodyText.getText().length() >0) sem.setMessage(bodyText.getText()); if (attachmentName.getText().length() > 0) sem.setAttachmentName(attachmentName.getText()); StringBuffer sb = new StringBuffer(); char[] s = screen.getScreenAsChars(); int c = screen.getCols(); int l = screen.getRows() * c; int col = 0; for (int x = 0; x < l; x++,col++) { sb.append(s[x]); if (col == c) { sb.append('\n'); col = 0; } } sem.setAttachment(sb.toString()); // send the information sendIt(parent,sem); sem.release(); sem = null; break; case 1: // Cancel // System.out.println("Cancel"); break; case 2: // Configure SMTP configureSMTP(parent); // System.out.println("Cancel"); break; default: break; } } } }
4,533
public SendEMailDialog(Frame parent, Session session ) { if (!isEMailAvailable()) { JOptionPane.showMessageDialog(parent, LangTool.getString("messages.noEmailAPI"), "Error", JOptionPane.ERROR_MESSAGE,null); } else { this.session = session; Screen5250 screen = session.getScreen(); Object[] message = new Object[1]; message[0] = setupMailPanel("tn5250j.txt"); String[] options = new String[3]; int result = 0; while (result == 0 || result == 2) { // setup the dialog options setOptions(options); result = JOptionPane.showOptionDialog( parent, // the parent that the dialog blocks message, // the dialog message array LangTool.getString("em.title"), // the title of the dialog window JOptionPane.DEFAULT_OPTION, // option type JOptionPane.QUESTION_MESSAGE, // message type null, // optional icon, use null to use the default icon options, // options string array, will be made into buttons// options[0] // option that should be made into a default button ); switch(result) { case 0: // Send it SendEMail sem = new SendEMail(); sem.setConfigFile("SMTPProperties.cfg"); sem.setTo((String)toAddress.getSelectedItem()); sem.setSubject(subject.getText()); if (bodyText.getText().length() >0) sem.setMessage(bodyText.getText()); if (attachmentName.getText().length() > 0) sem.setAttachmentName(attachmentName.getText()); StringBuffer sb = new StringBuffer(); char[] s = screen.getScreenAsChars(); int c = screen.getCols(); int l = screen.getRows() * c; int col = 0; for (int x = 0; x < l; x++,col++) { sb.append(s[x]); if (col == c) { sb.append('\n'); col = 0; } } sem.setAttachment(sb.toString()); // send the information sendIt(parent,sem); sem.release(); sem = null; break; case 1: // Cancel // System.out.println("Cancel"); break; case 2: // Configure SMTP configureSMTP(parent); // System.out.println("Cancel"); break; default: break; } } } }
public SendEMailDialog(Frame parent, Session session ) { if (!isEMailAvailable()) { JOptionPane.showMessageDialog(parent, LangTool.getString("messages.noEmailAPI"), "Error", JOptionPane.ERROR_MESSAGE,null); } else { this.session = session; Screen5250 screen = session.getScreen(); Object[] message = new Object[1]; message[0] = setupMailPanel("tn5250j.txt"); String[] options = new String[3]; int result = 0; while (result == 0 || result == 2) { // setup the dialog options setOptions(options); result = JOptionPane.showOptionDialog( parent, // the parent that the dialog blocks message, // the dialog message array LangTool.getString("em.title"), // the title of the dialog window JOptionPane.DEFAULT_OPTION, // option type JOptionPane.QUESTION_MESSAGE, // message type null, // optional icon, use null to use the default icon options, // options string array, will be made into buttons// options[0] // option that should be made into a default button ); switch(result) { case 0: // Send it SendEMail sem = new SendEMail(); sem.setConfigFile("SMTPProperties.cfg"); sem.setTo((String)toAddress.getSelectedItem()); sem.setSubject(subject.getText()); if (bodyText.getText().length() >0) sem.setMessage(bodyText.getText()); if (attachmentName.getText().length() > 0) sem.setAttachmentName(attachmentName.getText()); StringBuffer sb = new StringBuffer(); char[] s = screen.getScreenAsChars(); int c = screen.getCols(); int l = screen.getRows() * c; int col = 0; for (int x = 0; x < l; x++,col++) { sb.append(s[x]); if (col == c) { sb.append('\n'); col = 0; } } sem.setAttachment(sb.toString()); // send the information sendIt(parent,sem); sem.release(); sem = null; break; case 1: // Cancel // System.out.println("Cancel"); break; case 2: // Configure SMTP configureSMTP(parent); // System.out.println("Cancel"); break; default: break; } } } }
4,534
public SendEMailDialog(Frame parent, Session session ) { if (!isEMailAvailable()) { JOptionPane.showMessageDialog(parent, LangTool.getString("messages.noEmailAPI"), "Error", JOptionPane.ERROR_MESSAGE,null); } else { this.session = session; Screen5250 screen = session.getScreen(); Object[] message = new Object[1]; message[0] = setupMailPanel("tn5250j.txt"); String[] options = new String[3]; int result = 0; while (result == 0 || result == 2) { // setup the dialog options setOptions(options); result = JOptionPane.showOptionDialog( parent, // the parent that the dialog blocks message, // the dialog message array LangTool.getString("em.title"), // the title of the dialog window JOptionPane.DEFAULT_OPTION, // option type JOptionPane.QUESTION_MESSAGE, // message type null, // optional icon, use null to use the default icon options, // options string array, will be made into buttons// options[0] // option that should be made into a default button ); switch(result) { case 0: // Send it SendEMail sem = new SendEMail(); sem.setConfigFile("SMTPProperties.cfg"); sem.setTo((String)toAddress.getSelectedItem()); sem.setSubject(subject.getText()); if (bodyText.getText().length() >0) sem.setMessage(bodyText.getText()); if (attachmentName.getText().length() > 0) sem.setAttachmentName(attachmentName.getText()); StringBuffer sb = new StringBuffer(); char[] s = screen.getScreenAsChars(); int c = screen.getCols(); int l = screen.getRows() * c; int col = 0; for (int x = 0; x < l; x++,col++) { sb.append(s[x]); if (col == c) { sb.append('\n'); col = 0; } } sem.setAttachment(sb.toString()); // send the information sendIt(parent,sem); sem.release(); sem = null; break; case 1: // Cancel // System.out.println("Cancel"); break; case 2: // Configure SMTP configureSMTP(parent); // System.out.println("Cancel"); break; default: break; } } } }
public SendEMailDialog(Frame parent, Session session ) { if (!isEMailAvailable()) { JOptionPane.showMessageDialog(parent, LangTool.getString("messages.noEmailAPI"), "Error", JOptionPane.ERROR_MESSAGE,null); } else { this.session = session; Screen5250 screen = session.getScreen(); Object[] message = new Object[1]; message[0] = setupMailPanel("tn5250j.txt"); String[] options = new String[3]; int result = 0; while (result == 0 || result == 2) { // setup the dialog options setOptions(options); result = JOptionPane.showOptionDialog( parent, // the parent that the dialog blocks message, // the dialog message array LangTool.getString("em.title"), // the title of the dialog window JOptionPane.DEFAULT_OPTION, // option type JOptionPane.QUESTION_MESSAGE, // message type null, // optional icon, use null to use the default icon options, // options string array, will be made into buttons// options[0] // option that should be made into a default button ); switch(result) { case 0: // Send it SendEMail sem = new SendEMail(); sem.setConfigFile("SMTPProperties.cfg"); sem.setTo((String)toAddress.getSelectedItem()); sem.setSubject(subject.getText()); if (bodyText.getText().length() >0) sem.setMessage(bodyText.getText()); if (attachmentName.getText().length() > 0) sem.setAttachmentName(attachmentName.getText()); StringBuffer sb = new StringBuffer(); char[] s = screen.getScreenAsChars(); int c = screen.getCols(); int l = screen.getRows() * c; int col = 0; for (int x = 0; x < l; x++,col++) { sb.append(s[x]); if (col == c) { sb.append('\n'); col = 0; } } StringBuffer sb = new StringBuffer(); char[] s = screen.getScreenAsChars(); int c = screen.getCols(); int l = screen.getRows() * c; int col = 0; for (int x = 0; x < l; x++, col++) { sb.append(s[x]); if (col == c) { sb.append('\n'); col = 0; } } // send the information sendIt(parent,sem); sem.release(); sem = null; break; case 1: // Cancel // System.out.println("Cancel"); break; case 2: // Configure SMTP configureSMTP(parent); // System.out.println("Cancel"); break; default: break; } } } }
4,535
public SendEMailDialog(Frame parent, Session session ) { if (!isEMailAvailable()) { JOptionPane.showMessageDialog(parent, LangTool.getString("messages.noEmailAPI"), "Error", JOptionPane.ERROR_MESSAGE,null); } else { this.session = session; Screen5250 screen = session.getScreen(); Object[] message = new Object[1]; message[0] = setupMailPanel("tn5250j.txt"); String[] options = new String[3]; int result = 0; while (result == 0 || result == 2) { // setup the dialog options setOptions(options); result = JOptionPane.showOptionDialog( parent, // the parent that the dialog blocks message, // the dialog message array LangTool.getString("em.title"), // the title of the dialog window JOptionPane.DEFAULT_OPTION, // option type JOptionPane.QUESTION_MESSAGE, // message type null, // optional icon, use null to use the default icon options, // options string array, will be made into buttons// options[0] // option that should be made into a default button ); switch(result) { case 0: // Send it SendEMail sem = new SendEMail(); sem.setConfigFile("SMTPProperties.cfg"); sem.setTo((String)toAddress.getSelectedItem()); sem.setSubject(subject.getText()); if (bodyText.getText().length() >0) sem.setMessage(bodyText.getText()); if (attachmentName.getText().length() > 0) sem.setAttachmentName(attachmentName.getText()); StringBuffer sb = new StringBuffer(); char[] s = screen.getScreenAsChars(); int c = screen.getCols(); int l = screen.getRows() * c; int col = 0; for (int x = 0; x < l; x++,col++) { sb.append(s[x]); if (col == c) { sb.append('\n'); col = 0; } } sem.setAttachment(sb.toString()); // send the information sendIt(parent,sem); sem.release(); sem = null; break; case 1: // Cancel // System.out.println("Cancel"); break; case 2: // Configure SMTP configureSMTP(parent); // System.out.println("Cancel"); break; default: break; } } } }
public SendEMailDialog(Frame parent, Session session ) { if (!isEMailAvailable()) { JOptionPane.showMessageDialog(parent, LangTool.getString("messages.noEmailAPI"), "Error", JOptionPane.ERROR_MESSAGE,null); } else { this.session = session; Screen5250 screen = session.getScreen(); Object[] message = new Object[1]; message[0] = setupMailPanel("tn5250j.txt"); String[] options = new String[3]; int result = 0; while (result == 0 || result == 2) { // setup the dialog options setOptions(options); result = JOptionPane.showOptionDialog( parent, // the parent that the dialog blocks message, // the dialog message array LangTool.getString("em.title"), // the title of the dialog window JOptionPane.DEFAULT_OPTION, // option type JOptionPane.QUESTION_MESSAGE, // message type null, // optional icon, use null to use the default icon options, // options string array, will be made into buttons// options[0] // option that should be made into a default button ); switch(result) { case 0: // Send it SendEMail sem = new SendEMail(); sem.setConfigFile("SMTPProperties.cfg"); sem.setTo((String)toAddress.getSelectedItem()); sem.setSubject(subject.getText()); if (bodyText.getText().length() >0) sem.setMessage(bodyText.getText()); if (attachmentName.getText().length() > 0) sem.setAttachmentName(attachmentName.getText()); StringBuffer sb = new StringBuffer(); char[] s = screen.getScreenAsChars(); int c = screen.getCols(); int l = screen.getRows() * c; int col = 0; for (int x = 0; x < l; x++,col++) { sb.append(s[x]); if (col == c) { sb.append('\n'); col = 0; } } sem.setAttachment(sb.toString()); // send the information sem.setAttachment(sb.toString()); } else { sem.release(); sem = null; break; case 1: // Cancel // System.out.println("Cancel"); break; case 2: // Configure SMTP configureSMTP(parent); // System.out.println("Cancel"); break; default: break; } } } }
4,536
public SendEMailDialog(Frame parent, Session session ) { if (!isEMailAvailable()) { JOptionPane.showMessageDialog(parent, LangTool.getString("messages.noEmailAPI"), "Error", JOptionPane.ERROR_MESSAGE,null); } else { this.session = session; Screen5250 screen = session.getScreen(); Object[] message = new Object[1]; message[0] = setupMailPanel("tn5250j.txt"); String[] options = new String[3]; int result = 0; while (result == 0 || result == 2) { // setup the dialog options setOptions(options); result = JOptionPane.showOptionDialog( parent, // the parent that the dialog blocks message, // the dialog message array LangTool.getString("em.title"), // the title of the dialog window JOptionPane.DEFAULT_OPTION, // option type JOptionPane.QUESTION_MESSAGE, // message type null, // optional icon, use null to use the default icon options, // options string array, will be made into buttons// options[0] // option that should be made into a default button ); switch(result) { case 0: // Send it SendEMail sem = new SendEMail(); sem.setConfigFile("SMTPProperties.cfg"); sem.setTo((String)toAddress.getSelectedItem()); sem.setSubject(subject.getText()); if (bodyText.getText().length() >0) sem.setMessage(bodyText.getText()); if (attachmentName.getText().length() > 0) sem.setAttachmentName(attachmentName.getText()); StringBuffer sb = new StringBuffer(); char[] s = screen.getScreenAsChars(); int c = screen.getCols(); int l = screen.getRows() * c; int col = 0; for (int x = 0; x < l; x++,col++) { sb.append(s[x]); if (col == c) { sb.append('\n'); col = 0; } } sem.setAttachment(sb.toString()); // send the information sendIt(parent,sem); sem.release(); sem = null; break; case 1: // Cancel // System.out.println("Cancel"); break; case 2: // Configure SMTP configureSMTP(parent); // System.out.println("Cancel"); break; default: break; } } } }
public SendEMailDialog(Frame parent, Session session ) { if (!isEMailAvailable()) { JOptionPane.showMessageDialog(parent, LangTool.getString("messages.noEmailAPI"), "Error", JOptionPane.ERROR_MESSAGE,null); } else { this.session = session; Screen5250 screen = session.getScreen(); Object[] message = new Object[1]; message[0] = setupMailPanel("tn5250j.txt"); String[] options = new String[3]; int result = 0; while (result == 0 || result == 2) { // setup the dialog options setOptions(options); result = JOptionPane.showOptionDialog( parent, // the parent that the dialog blocks message, // the dialog message array LangTool.getString("em.title"), // the title of the dialog window JOptionPane.DEFAULT_OPTION, // option type JOptionPane.QUESTION_MESSAGE, // message type null, // optional icon, use null to use the default icon options, // options string array, will be made into buttons// options[0] // option that should be made into a default button ); switch(result) { case 0: // Send it SendEMail sem = new SendEMail(); sem.setConfigFile("SMTPProperties.cfg"); sem.setTo((String)toAddress.getSelectedItem()); sem.setSubject(subject.getText()); if (bodyText.getText().length() >0) sem.setMessage(bodyText.getText()); if (attachmentName.getText().length() > 0) sem.setAttachmentName(attachmentName.getText()); StringBuffer sb = new StringBuffer(); char[] s = screen.getScreenAsChars(); int c = screen.getCols(); int l = screen.getRows() * c; int col = 0; for (int x = 0; x < l; x++,col++) { sb.append(s[x]); if (col == c) { sb.append('\n'); col = 0; } } sem.setAttachment(sb.toString()); // send the information sendIt(parent,sem); sem.release(); sem = null; break; case 1: // Cancel // System.out.println("Cancel"); break; case 2: // Configure SMTP configureSMTP(parent); // System.out.println("Cancel"); break; default: break; } } } }
4,537
public SendEMailDialog(Frame parent, Session session ) { if (!isEMailAvailable()) { JOptionPane.showMessageDialog(parent, LangTool.getString("messages.noEmailAPI"), "Error", JOptionPane.ERROR_MESSAGE,null); } else { this.session = session; Screen5250 screen = session.getScreen(); Object[] message = new Object[1]; message[0] = setupMailPanel("tn5250j.txt"); String[] options = new String[3]; int result = 0; while (result == 0 || result == 2) { // setup the dialog options setOptions(options); result = JOptionPane.showOptionDialog( parent, // the parent that the dialog blocks message, // the dialog message array LangTool.getString("em.title"), // the title of the dialog window JOptionPane.DEFAULT_OPTION, // option type JOptionPane.QUESTION_MESSAGE, // message type null, // optional icon, use null to use the default icon options, // options string array, will be made into buttons// options[0] // option that should be made into a default button ); switch(result) { case 0: // Send it SendEMail sem = new SendEMail(); sem.setConfigFile("SMTPProperties.cfg"); sem.setTo((String)toAddress.getSelectedItem()); sem.setSubject(subject.getText()); if (bodyText.getText().length() >0) sem.setMessage(bodyText.getText()); if (attachmentName.getText().length() > 0) sem.setAttachmentName(attachmentName.getText()); StringBuffer sb = new StringBuffer(); char[] s = screen.getScreenAsChars(); int c = screen.getCols(); int l = screen.getRows() * c; int col = 0; for (int x = 0; x < l; x++,col++) { sb.append(s[x]); if (col == c) { sb.append('\n'); col = 0; } } sem.setAttachment(sb.toString()); // send the information sendIt(parent,sem); sem.release(); sem = null; break; case 1: // Cancel // System.out.println("Cancel"); break; case 2: // Configure SMTP configureSMTP(parent); // System.out.println("Cancel"); break; default: break; } } } }
public SendEMailDialog(Frame parent, Session session ) { if (!isEMailAvailable()) { JOptionPane.showMessageDialog(parent, LangTool.getString("messages.noEmailAPI"), "Error", JOptionPane.ERROR_MESSAGE,null); } else { this.session = session; Screen5250 screen = session.getScreen(); Object[] message = new Object[1]; message[0] = setupMailPanel("tn5250j.txt"); String[] options = new String[3]; int result = 0; while (result == 0 || result == 2) { // setup the dialog options setOptions(options); result = JOptionPane.showOptionDialog( parent, // the parent that the dialog blocks message, // the dialog message array LangTool.getString("em.title"), // the title of the dialog window JOptionPane.DEFAULT_OPTION, // option type JOptionPane.QUESTION_MESSAGE, // message type null, // optional icon, use null to use the default icon options, // options string array, will be made into buttons// options[0] // option that should be made into a default button ); switch(result) { case 0: // Send it SendEMail sem = new SendEMail(); sem.setConfigFile("SMTPProperties.cfg"); sem.setTo((String)toAddress.getSelectedItem()); sem.setSubject(subject.getText()); if (bodyText.getText().length() >0) sem.setMessage(bodyText.getText()); if (attachmentName.getText().length() > 0) sem.setAttachmentName(attachmentName.getText()); StringBuffer sb = new StringBuffer(); char[] s = screen.getScreenAsChars(); int c = screen.getCols(); int l = screen.getRows() * c; int col = 0; for (int x = 0; x < l; x++,col++) { sb.append(s[x]); if (col == c) { sb.append('\n'); col = 0; } } sem.setAttachment(sb.toString()); // send the information sendIt(parent,sem); sem.release(); sem = null; break; case 1: // Cancel // System.out.println("Cancel"); break; case 2: // Configure SMTP configureSMTP(parent); // System.out.println("Cancel"); break; default: break; } } } }
4,538
private void configureSMTP(Frame parent) { if (parent == null) parent = new JFrame(); SMTPConfig smtp = new SMTPConfig(parent,"",true); smtp.setVisible(true); smtp.dispose(); }
private void configureSMTP(Frame parent) { if (parent == null) parent = new JFrame(); SMTPConfig smtp = new SMTPConfig(parent,"",true); smtp.setVisible(true); smtp.dispose(); }
4,539
private void configureSMTP(Frame parent) { if (parent == null) parent = new JFrame(); SMTPConfig smtp = new SMTPConfig(parent,"",true); smtp.setVisible(true); smtp.dispose(); }
private void configureSMTP(Frame parent) { if (parent == null) parent = new JFrame(); SMTPConfig smtp = new SMTPConfig(parent,"",true); smtp.setVisible(true); smtp.dispose(); }
4,540
private void configureSMTP(Frame parent) { if (parent == null) parent = new JFrame(); SMTPConfig smtp = new SMTPConfig(parent,"",true); smtp.setVisible(true); smtp.dispose(); }
private void configureSMTP(Frame parent) { if (parent == null) parent = new JFrame(); SMTPConfig smtp = new SMTPConfig(parent,"",true); smtp.setVisible(true); smtp.dispose(); }
4,541
private String getToTokens(String to, JComboBox boxen) { StringBuffer sb = new StringBuffer(); String selected = (String)boxen.getSelectedItem(); sb.append(selected + '|'); int c = boxen.getItemCount(); for (int x = 0; x < c; x++) { if (!selected.equals((String)boxen.getItemAt(x))) sb.append((String)boxen.getItemAt(x) + '|'); } return sb.toString(); }
private String getToTokens(String to, JComboBox boxen) { StringBuffer sb = new StringBuffer(); String selected = (String)boxen.getSelectedItem(); sb.append(selected + '|'); int c = boxen.getItemCount(); for (int x = 0; x < c; x++) { if (!selected.equals((String)boxen.getItemAt(x))) sb.append((String)boxen.getItemAt(x) + '|'); } return sb.toString(); }
4,542
private String getToTokens(String to, JComboBox boxen) { StringBuffer sb = new StringBuffer(); String selected = (String)boxen.getSelectedItem(); sb.append(selected + '|'); int c = boxen.getItemCount(); for (int x = 0; x < c; x++) { if (!selected.equals((String)boxen.getItemAt(x))) sb.append((String)boxen.getItemAt(x) + '|'); } return sb.toString(); }
private String getToTokens(String to, JComboBox boxen) { StringBuffer sb = new StringBuffer(); String selected = (String)boxen.getSelectedItem(); sb.append(selected + '|'); int c = boxen.getItemCount(); for (int x = 0; x < c; x++) { if (!selected.equals((String)boxen.getItemAt(x))) sb.append((String)boxen.getItemAt(x) + '|'); } return sb.toString(); }
4,543
private String getToTokens(String to, JComboBox boxen) { StringBuffer sb = new StringBuffer(); String selected = (String)boxen.getSelectedItem(); sb.append(selected + '|'); int c = boxen.getItemCount(); for (int x = 0; x < c; x++) { if (!selected.equals((String)boxen.getItemAt(x))) sb.append((String)boxen.getItemAt(x) + '|'); } return sb.toString(); }
private String getToTokens(String to, JComboBox boxen) { StringBuffer sb = new StringBuffer(); String selected = (String)boxen.getSelectedItem(); sb.append(selected + '|'); int c = boxen.getItemCount(); for (int x = 0; x < c; x++) { if (!selected.equals((String)boxen.getItemAt(x))) sb.append((String)boxen.getItemAt(x) + '|'); } return sb.toString(); }
4,544
private String getToTokens(String to, JComboBox boxen) { StringBuffer sb = new StringBuffer(); String selected = (String)boxen.getSelectedItem(); sb.append(selected + '|'); int c = boxen.getItemCount(); for (int x = 0; x < c; x++) { if (!selected.equals((String)boxen.getItemAt(x))) sb.append((String)boxen.getItemAt(x) + '|'); } return sb.toString(); }
private String getToTokens(String to, JComboBox boxen) { StringBuffer sb = new StringBuffer(); String selected = (String)boxen.getSelectedItem(); sb.append(selected + '|'); int c = boxen.getItemCount(); for (int x = 0; x < c; x++) { if (!selected.equals((String)boxen.getItemAt(x))) sb.append((String)boxen.getItemAt(x) + '|'); } return sb.toString(); }
4,545
private boolean isEMailAvailable() { try { Class.forName("javax.mail.Message"); return true; } catch (Exception ex) { System.out.println(" not there " + ex.getMessage()); return false; } }
private boolean isEMailAvailable() { try { Class.forName("javax.mail.Message"); return true; } catch (Exception ex) { System.out.println(" not there " + ex.getMessage()); return false; } }
4,546
private boolean isEMailAvailable() { try { Class.forName("javax.mail.Message"); return true; } catch (Exception ex) { System.out.println(" not there " + ex.getMessage()); return false; } }
private boolean isEMailAvailable() { try { Class.forName("javax.mail.Message"); return true; } catch (Exception ex) { System.out.println(" not there " + ex.getMessage()); return false; } }
4,547
private void sendIt (Frame parent, SendEMail sem) { if (parent == null) parent = new JFrame(); try { if (sem.send()) { JOptionPane.showMessageDialog(parent, LangTool.getString("em.confirmationMessage") + " " + (String)toAddress.getSelectedItem(), LangTool.getString("em.titleConfirmation"), JOptionPane.INFORMATION_MESSAGE); if (session != null) { config.setProperty("emailTo", getToTokens(config.getStringProperty("emailTo"), toAddress)); config.saveSessionProps(); setToCombo(config.getStringProperty("emailTo"),toAddress); } } } catch (IOException ioe) { System.out.println(ioe.getMessage()); } catch (Exception ex) { System.out.println(ex.getMessage()); } }
private void sendIt(Frame parent, SendEMail sem) { if (parent == null) parent = new JFrame(); try { if (sem.send()) { JOptionPane.showMessageDialog(parent, LangTool.getString("em.confirmationMessage") + " " + (String)toAddress.getSelectedItem(), LangTool.getString("em.titleConfirmation"), JOptionPane.INFORMATION_MESSAGE); if (session != null) { config.setProperty("emailTo", getToTokens(config.getStringProperty("emailTo"), toAddress)); config.saveSessionProps(); setToCombo(config.getStringProperty("emailTo"),toAddress); } } } catch (IOException ioe) { System.out.println(ioe.getMessage()); } catch (Exception ex) { System.out.println(ex.getMessage()); } }
4,548
private void sendIt (Frame parent, SendEMail sem) { if (parent == null) parent = new JFrame(); try { if (sem.send()) { JOptionPane.showMessageDialog(parent, LangTool.getString("em.confirmationMessage") + " " + (String)toAddress.getSelectedItem(), LangTool.getString("em.titleConfirmation"), JOptionPane.INFORMATION_MESSAGE); if (session != null) { config.setProperty("emailTo", getToTokens(config.getStringProperty("emailTo"), toAddress)); config.saveSessionProps(); setToCombo(config.getStringProperty("emailTo"),toAddress); } } } catch (IOException ioe) { System.out.println(ioe.getMessage()); } catch (Exception ex) { System.out.println(ex.getMessage()); } }
private void sendIt (Frame parent, SendEMail sem) { if (parent == null) parent = new JFrame(); try { if (sem.send()) { JOptionPane.showMessageDialog(parent, LangTool.getString("em.confirmationMessage") + " " + (String)toAddress.getSelectedItem(), LangTool.getString("em.titleConfirmation"), JOptionPane.INFORMATION_MESSAGE); if (session != null) { config.setProperty("emailTo", getToTokens(config.getStringProperty("emailTo"), toAddress)); config.saveSessionProps(); setToCombo(config.getStringProperty("emailTo"),toAddress); } } } catch (IOException ioe) { System.out.println(ioe.getMessage()); } catch (Exception ex) { System.out.println(ex.getMessage()); } }
4,549
private void sendIt (Frame parent, SendEMail sem) { if (parent == null) parent = new JFrame(); try { if (sem.send()) { JOptionPane.showMessageDialog(parent, LangTool.getString("em.confirmationMessage") + " " + (String)toAddress.getSelectedItem(), LangTool.getString("em.titleConfirmation"), JOptionPane.INFORMATION_MESSAGE); if (session != null) { config.setProperty("emailTo", getToTokens(config.getStringProperty("emailTo"), toAddress)); config.saveSessionProps(); setToCombo(config.getStringProperty("emailTo"),toAddress); } } } catch (IOException ioe) { System.out.println(ioe.getMessage()); } catch (Exception ex) { System.out.println(ex.getMessage()); } }
private void sendIt (Frame parent, SendEMail sem) { if (parent == null) parent = new JFrame(); try { if (sem.send()) { JOptionPane.showMessageDialog(parent, LangTool.getString("em.confirmationMessage") + " " + (String)toAddress.getSelectedItem(), LangTool.getString("em.titleConfirmation"), JOptionPane.INFORMATION_MESSAGE); if (session != null) { config.setProperty("emailTo", getToTokens(config.getStringProperty("emailTo"), toAddress)); config.saveSessionProps(); setToCombo(config.getStringProperty("emailTo"),toAddress); } } } catch (IOException ioe) { System.out.println(ioe.getMessage()); } catch (Exception ex) { System.out.println(ex.getMessage()); } }
4,550
private void sendIt (Frame parent, SendEMail sem) { if (parent == null) parent = new JFrame(); try { if (sem.send()) { JOptionPane.showMessageDialog(parent, LangTool.getString("em.confirmationMessage") + " " + (String)toAddress.getSelectedItem(), LangTool.getString("em.titleConfirmation"), JOptionPane.INFORMATION_MESSAGE); if (session != null) { config.setProperty("emailTo", getToTokens(config.getStringProperty("emailTo"), toAddress)); config.saveSessionProps(); setToCombo(config.getStringProperty("emailTo"),toAddress); } } } catch (IOException ioe) { System.out.println(ioe.getMessage()); } catch (Exception ex) { System.out.println(ex.getMessage()); } }
private void sendIt (Frame parent, SendEMail sem) { if (parent == null) parent = new JFrame(); try { if (sem.send()) { JOptionPane.showMessageDialog(parent, LangTool.getString("em.confirmationMessage") + " " + (String)toAddress.getSelectedItem(), LangTool.getString("em.titleConfirmation"), JOptionPane.INFORMATION_MESSAGE); if (session != null) { config.setProperty("emailTo", getToTokens(config.getStringProperty("emailTo"), toAddress)); config.saveSessionProps(); setToCombo(config.getStringProperty("emailTo"),toAddress); } } } catch (IOException ioe) { System.out.println(ioe.getMessage()); } catch (Exception ex) { System.out.println(ex.getMessage()); } }
4,551
private void sendIt (Frame parent, SendEMail sem) { if (parent == null) parent = new JFrame(); try { if (sem.send()) { JOptionPane.showMessageDialog(parent, LangTool.getString("em.confirmationMessage") + " " + (String)toAddress.getSelectedItem(), LangTool.getString("em.titleConfirmation"), JOptionPane.INFORMATION_MESSAGE); if (session != null) { config.setProperty("emailTo", getToTokens(config.getStringProperty("emailTo"), toAddress)); config.saveSessionProps(); setToCombo(config.getStringProperty("emailTo"),toAddress); } } } catch (IOException ioe) { System.out.println(ioe.getMessage()); } catch (Exception ex) { System.out.println(ex.getMessage()); } }
private void sendIt (Frame parent, SendEMail sem) { if (parent == null) parent = new JFrame(); try { if (sem.send()) { JOptionPane.showMessageDialog(parent, LangTool.getString("em.confirmationMessage") + " " + (String)toAddress.getSelectedItem(), LangTool.getString("em.titleConfirmation"), JOptionPane.INFORMATION_MESSAGE); if (session != null) { config.setProperty("emailTo", getToTokens(config.getStringProperty("emailTo"), toAddress)); config.saveSessionProps(); setToCombo(config.getStringProperty("emailTo"),toAddress); } } } catch (IOException ioe) { System.out.println(ioe.getMessage()); } catch (Exception ex) { System.out.println(ex.getMessage()); } }
4,552
private void setOptions(String[] options) { options[0] = LangTool.getString("em.optSendLabel"); options[1] = LangTool.getString("em.optCancelLabel"); File smtp = new File("SMTPProperties.cfg"); if (smtp.exists()) options[2] = LangTool.getString("em.optEditLabel"); else options[2] = LangTool.getString("em.optConfigureLabel"); }
private void setOptions(String[] options) { options[0] = LangTool.getString("em.optSendLabel"); options[1] = LangTool.getString("em.optCancelLabel"); File smtp = new File("SMTPProperties.cfg"); if (smtp.exists()) options[2] = LangTool.getString("em.optEditLabel"); else options[2] = LangTool.getString("em.optConfigureLabel"); }
4,553
private void setOptions(String[] options) { options[0] = LangTool.getString("em.optSendLabel"); options[1] = LangTool.getString("em.optCancelLabel"); File smtp = new File("SMTPProperties.cfg"); if (smtp.exists()) options[2] = LangTool.getString("em.optEditLabel"); else options[2] = LangTool.getString("em.optConfigureLabel"); }
private void setOptions(String[] options) { options[0] = LangTool.getString("em.optSendLabel"); options[1] = LangTool.getString("em.optCancelLabel"); if (smtp.exists()) options[2] = LangTool.getString("em.optEditLabel"); else options[2] = LangTool.getString("em.optConfigureLabel"); if (smtp.exists()) options[2] = LangTool.getString("em.optEditLabel"); else options[2] = LangTool.getString("em.optConfigureLabel"); }
4,554
private void setOptions(String[] options) { options[0] = LangTool.getString("em.optSendLabel"); options[1] = LangTool.getString("em.optCancelLabel"); File smtp = new File("SMTPProperties.cfg"); if (smtp.exists()) options[2] = LangTool.getString("em.optEditLabel"); else options[2] = LangTool.getString("em.optConfigureLabel"); }
private void setOptions(String[] options) { options[0] = LangTool.getString("em.optSendLabel"); options[1] = LangTool.getString("em.optCancelLabel"); File smtp = new File("SMTPProperties.cfg"); if (smtp.exists()) options[2] = LangTool.getString("em.optEditLabel"); else options[2] = LangTool.getString("em.optConfigureLabel"); }
4,555
private void setToCombo(String to, JComboBox boxen) { StringTokenizer tokenizer = new StringTokenizer(to, "|"); boxen.removeAllItems(); while(tokenizer.hasMoreTokens()) { boxen.addItem(tokenizer.nextToken()); } }
private void setToCombo(String to, JComboBox boxen) { StringTokenizer tokenizer = new StringTokenizer(to, "|"); boxen.removeAllItems(); while(tokenizer.hasMoreTokens()) { boxen.addItem(tokenizer.nextToken()); } }
4,556
private void setToCombo(String to, JComboBox boxen) { StringTokenizer tokenizer = new StringTokenizer(to, "|"); boxen.removeAllItems(); while(tokenizer.hasMoreTokens()) { boxen.addItem(tokenizer.nextToken()); } }
private void setToCombo(String to, JComboBox boxen) { StringTokenizer tokenizer = new StringTokenizer(to, "|"); boxen.removeAllItems(); while(tokenizer.hasMoreTokens()) { boxen.addItem(tokenizer.nextToken()); } }
4,557
private void setToCombo(String to, JComboBox boxen) { StringTokenizer tokenizer = new StringTokenizer(to, "|"); boxen.removeAllItems(); while(tokenizer.hasMoreTokens()) { boxen.addItem(tokenizer.nextToken()); } }
private void setToCombo(String to, JComboBox boxen) { StringTokenizer tokenizer = new StringTokenizer(to, "|"); boxen.removeAllItems(); while(tokenizer.hasMoreTokens()) { boxen.addItem(tokenizer.nextToken()); } }
4,558
private JPanel setupMailPanel (String fileName) { JPanel semp = new JPanel(); semp.setLayout(new AlignLayout(2,5,5)); JLabel tol = new JLabel(LangTool.getString("em.to")); JLabel subl = new JLabel(LangTool.getString("em.subject")); JLabel bodyl = new JLabel(LangTool.getString("em.body")); JLabel fnl = new JLabel(LangTool.getString("em.fileName")); toAddress = new JComboBox(); toAddress.setEditable(true); subject = new JTextField(30); bodyText = new JTextArea(6,30); JScrollPane bodyScrollPane = new JScrollPane(bodyText); bodyScrollPane.setHorizontalScrollBarPolicy( JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED); bodyScrollPane.setVerticalScrollBarPolicy( JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED); attachmentName = new JTextField(fileName,30); config = null; if (session != null) { config = session.getConfiguration(); if (config.isPropertyExists("emailTo")) { setToCombo(config.getStringProperty("emailTo"),toAddress); } } semp.add(tol); semp.add(toAddress); semp.add(subl); semp.add(subject); semp.add(bodyl); semp.add(bodyScrollPane); semp.add(fnl); semp.add(attachmentName); return semp; }
private JPanel setupMailPanel(String fileName) { JPanel semp = new JPanel(); semp.setLayout(new AlignLayout(2,5,5)); JLabel tol = new JLabel(LangTool.getString("em.to")); JLabel subl = new JLabel(LangTool.getString("em.subject")); JLabel bodyl = new JLabel(LangTool.getString("em.body")); JLabel fnl = new JLabel(LangTool.getString("em.fileName")); toAddress = new JComboBox(); toAddress.setEditable(true); subject = new JTextField(30); bodyText = new JTextArea(6,30); JScrollPane bodyScrollPane = new JScrollPane(bodyText); bodyScrollPane.setHorizontalScrollBarPolicy( JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED); bodyScrollPane.setVerticalScrollBarPolicy( JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED); attachmentName = new JTextField(fileName,30); config = null; if (session != null) { config = session.getConfiguration(); if (config.isPropertyExists("emailTo")) { setToCombo(config.getStringProperty("emailTo"),toAddress); } } semp.add(tol); semp.add(toAddress); semp.add(subl); semp.add(subject); semp.add(bodyl); semp.add(bodyScrollPane); semp.add(fnl); semp.add(attachmentName); return semp; }
4,559
private JPanel setupMailPanel (String fileName) { JPanel semp = new JPanel(); semp.setLayout(new AlignLayout(2,5,5)); JLabel tol = new JLabel(LangTool.getString("em.to")); JLabel subl = new JLabel(LangTool.getString("em.subject")); JLabel bodyl = new JLabel(LangTool.getString("em.body")); JLabel fnl = new JLabel(LangTool.getString("em.fileName")); toAddress = new JComboBox(); toAddress.setEditable(true); subject = new JTextField(30); bodyText = new JTextArea(6,30); JScrollPane bodyScrollPane = new JScrollPane(bodyText); bodyScrollPane.setHorizontalScrollBarPolicy( JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED); bodyScrollPane.setVerticalScrollBarPolicy( JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED); attachmentName = new JTextField(fileName,30); config = null; if (session != null) { config = session.getConfiguration(); if (config.isPropertyExists("emailTo")) { setToCombo(config.getStringProperty("emailTo"),toAddress); } } semp.add(tol); semp.add(toAddress); semp.add(subl); semp.add(subject); semp.add(bodyl); semp.add(bodyScrollPane); semp.add(fnl); semp.add(attachmentName); return semp; }
private JPanel setupMailPanel (String fileName) { JPanel semp = new JPanel(); semp.setLayout(new AlignLayout(2,5,5)); JLabel tol = new JLabel(LangTool.getString("em.to")); JLabel subl = new JLabel(LangTool.getString("em.subject")); JLabel bodyl = new JLabel(LangTool.getString("em.body")); JLabel fnl = new JLabel(LangTool.getString("em.fileName")); toAddress = new JComboBox(); toAddress.setEditable(true); subject = new JTextField(30); bodyText = new JTextArea(6,30); JScrollPane bodyScrollPane = new JScrollPane(bodyText); bodyScrollPane.setHorizontalScrollBarPolicy( JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED); bodyScrollPane.setVerticalScrollBarPolicy( JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED); attachmentName = new JTextField(fileName,30); config = null; if (session != null) { config = session.getConfiguration(); if (config.isPropertyExists("emailTo")) { setToCombo(config.getStringProperty("emailTo"),toAddress); } } semp.add(tol); semp.add(toAddress); semp.add(subl); semp.add(subject); semp.add(bodyl); semp.add(bodyScrollPane); semp.add(fnl); semp.add(attachmentName); return semp; }
4,560
private JPanel setupMailPanel (String fileName) { JPanel semp = new JPanel(); semp.setLayout(new AlignLayout(2,5,5)); JLabel tol = new JLabel(LangTool.getString("em.to")); JLabel subl = new JLabel(LangTool.getString("em.subject")); JLabel bodyl = new JLabel(LangTool.getString("em.body")); JLabel fnl = new JLabel(LangTool.getString("em.fileName")); toAddress = new JComboBox(); toAddress.setEditable(true); subject = new JTextField(30); bodyText = new JTextArea(6,30); JScrollPane bodyScrollPane = new JScrollPane(bodyText); bodyScrollPane.setHorizontalScrollBarPolicy( JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED); bodyScrollPane.setVerticalScrollBarPolicy( JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED); attachmentName = new JTextField(fileName,30); config = null; if (session != null) { config = session.getConfiguration(); if (config.isPropertyExists("emailTo")) { setToCombo(config.getStringProperty("emailTo"),toAddress); } } semp.add(tol); semp.add(toAddress); semp.add(subl); semp.add(subject); semp.add(bodyl); semp.add(bodyScrollPane); semp.add(fnl); semp.add(attachmentName); return semp; }
private JPanel setupMailPanel (String fileName) { JPanel semp = new JPanel(); semp.setLayout(new AlignLayout(2,5,5)); JLabel tol = new JLabel(LangTool.getString("em.to")); JLabel subl = new JLabel(LangTool.getString("em.subject")); JLabel bodyl = new JLabel(LangTool.getString("em.body")); JLabel fnl = new JLabel(LangTool.getString("em.fileName")); toAddress = new JComboBox(); toAddress.setEditable(true); subject = new JTextField(30); bodyText = new JTextArea(6,30); JScrollPane bodyScrollPane = new JScrollPane(bodyText); bodyScrollPane.setHorizontalScrollBarPolicy( JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED); bodyScrollPane.setVerticalScrollBarPolicy( JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED); attachmentName = new JTextField(fileName,30); config = null; if (session != null) { config = session.getConfiguration(); if (config.isPropertyExists("emailTo")) { setToCombo(config.getStringProperty("emailTo"),toAddress); } } semp.add(tol); semp.add(toAddress); semp.add(subl); semp.add(subject); semp.add(bodyl); semp.add(bodyScrollPane); semp.add(fnl); semp.add(attachmentName); return semp; }
4,561
private JPanel setupMailPanel (String fileName) { JPanel semp = new JPanel(); semp.setLayout(new AlignLayout(2,5,5)); JLabel tol = new JLabel(LangTool.getString("em.to")); JLabel subl = new JLabel(LangTool.getString("em.subject")); JLabel bodyl = new JLabel(LangTool.getString("em.body")); JLabel fnl = new JLabel(LangTool.getString("em.fileName")); toAddress = new JComboBox(); toAddress.setEditable(true); subject = new JTextField(30); bodyText = new JTextArea(6,30); JScrollPane bodyScrollPane = new JScrollPane(bodyText); bodyScrollPane.setHorizontalScrollBarPolicy( JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED); bodyScrollPane.setVerticalScrollBarPolicy( JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED); attachmentName = new JTextField(fileName,30); config = null; if (session != null) { config = session.getConfiguration(); if (config.isPropertyExists("emailTo")) { setToCombo(config.getStringProperty("emailTo"),toAddress); } } semp.add(tol); semp.add(toAddress); semp.add(subl); semp.add(subject); semp.add(bodyl); semp.add(bodyScrollPane); semp.add(fnl); semp.add(attachmentName); return semp; }
private JPanel setupMailPanel (String fileName) { JPanel semp = new JPanel(); semp.setLayout(new AlignLayout(2,5,5)); JLabel tol = new JLabel(LangTool.getString("em.to")); JLabel subl = new JLabel(LangTool.getString("em.subject")); JLabel bodyl = new JLabel(LangTool.getString("em.body")); JLabel fnl = new JLabel(LangTool.getString("em.fileName")); toAddress = new JComboBox(); toAddress.setEditable(true); subject = new JTextField(30); bodyText = new JTextArea(6,30); JScrollPane bodyScrollPane = new JScrollPane(bodyText); bodyScrollPane.setHorizontalScrollBarPolicy( JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED); bodyScrollPane.setVerticalScrollBarPolicy( JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED); attachmentName = new JTextField(fileName,30); config = null; if (session != null) { config = session.getConfiguration(); if (config.isPropertyExists("emailTo")) { setToCombo(config.getStringProperty("emailTo"),toAddress); } } semp.add(tol); semp.add(toAddress); semp.add(subl); semp.add(subject); semp.add(bodyl); semp.add(bodyScrollPane); semp.add(fnl); semp.add(attachmentName); return semp; }
4,562
private JPanel setupMailPanel (String fileName) { JPanel semp = new JPanel(); semp.setLayout(new AlignLayout(2,5,5)); JLabel tol = new JLabel(LangTool.getString("em.to")); JLabel subl = new JLabel(LangTool.getString("em.subject")); JLabel bodyl = new JLabel(LangTool.getString("em.body")); JLabel fnl = new JLabel(LangTool.getString("em.fileName")); toAddress = new JComboBox(); toAddress.setEditable(true); subject = new JTextField(30); bodyText = new JTextArea(6,30); JScrollPane bodyScrollPane = new JScrollPane(bodyText); bodyScrollPane.setHorizontalScrollBarPolicy( JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED); bodyScrollPane.setVerticalScrollBarPolicy( JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED); attachmentName = new JTextField(fileName,30); config = null; if (session != null) { config = session.getConfiguration(); if (config.isPropertyExists("emailTo")) { setToCombo(config.getStringProperty("emailTo"),toAddress); } } semp.add(tol); semp.add(toAddress); semp.add(subl); semp.add(subject); semp.add(bodyl); semp.add(bodyScrollPane); semp.add(fnl); semp.add(attachmentName); return semp; }
private JPanel setupMailPanel (String fileName) { JPanel semp = new JPanel(); semp.setLayout(new AlignLayout(2,5,5)); JLabel tol = new JLabel(LangTool.getString("em.to")); JLabel subl = new JLabel(LangTool.getString("em.subject")); JLabel bodyl = new JLabel(LangTool.getString("em.body")); JLabel fnl = new JLabel(LangTool.getString("em.fileName")); toAddress = new JComboBox(); toAddress.setEditable(true); subject = new JTextField(30); bodyText = new JTextArea(6,30); JScrollPane bodyScrollPane = new JScrollPane(bodyText); bodyScrollPane.setHorizontalScrollBarPolicy( JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED); bodyScrollPane.setVerticalScrollBarPolicy( JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED); attachmentName = new JTextField(fileName,30); config = null; if (session != null) { config = session.getConfiguration(); if (config.isPropertyExists("emailTo")) { setToCombo(config.getStringProperty("emailTo"),toAddress); } } semp.add(tol); semp.add(toAddress); semp.add(subl); semp.add(subject); semp.add(bodyl); semp.add(bodyScrollPane); semp.add(fnl); semp.add(attachmentName); return semp; }
4,563
private JPanel setupMailPanel (String fileName) { JPanel semp = new JPanel(); semp.setLayout(new AlignLayout(2,5,5)); JLabel tol = new JLabel(LangTool.getString("em.to")); JLabel subl = new JLabel(LangTool.getString("em.subject")); JLabel bodyl = new JLabel(LangTool.getString("em.body")); JLabel fnl = new JLabel(LangTool.getString("em.fileName")); toAddress = new JComboBox(); toAddress.setEditable(true); subject = new JTextField(30); bodyText = new JTextArea(6,30); JScrollPane bodyScrollPane = new JScrollPane(bodyText); bodyScrollPane.setHorizontalScrollBarPolicy( JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED); bodyScrollPane.setVerticalScrollBarPolicy( JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED); attachmentName = new JTextField(fileName,30); config = null; if (session != null) { config = session.getConfiguration(); if (config.isPropertyExists("emailTo")) { setToCombo(config.getStringProperty("emailTo"),toAddress); } } semp.add(tol); semp.add(toAddress); semp.add(subl); semp.add(subject); semp.add(bodyl); semp.add(bodyScrollPane); semp.add(fnl); semp.add(attachmentName); return semp; }
private JPanel setupMailPanel (String fileName) { JPanel semp = new JPanel(); semp.setLayout(new AlignLayout(2,5,5)); JLabel tol = new JLabel(LangTool.getString("em.to")); JLabel subl = new JLabel(LangTool.getString("em.subject")); JLabel bodyl = new JLabel(LangTool.getString("em.body")); JLabel fnl = new JLabel(LangTool.getString("em.fileName")); toAddress = new JComboBox(); toAddress.setEditable(true); subject = new JTextField(30); bodyText = new JTextArea(6,30); JScrollPane bodyScrollPane = new JScrollPane(bodyText); bodyScrollPane.setHorizontalScrollBarPolicy( JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED); bodyScrollPane.setVerticalScrollBarPolicy( JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED); attachmentName = new JTextField(fileName,30); JLabel screenDump = new JLabel(LangTool.getString("em.screendump")); JLabel tol = new JLabel(LangTool.getString("em.to")); JLabel subl = new JLabel(LangTool.getString("em.subject")); JLabel bodyl = new JLabel(LangTool.getString("em.body")); JLabel fnl = new JLabel(LangTool.getString("em.fileName")); if (session != null) { config = session.getConfiguration(); if (config.isPropertyExists("emailTo")) { setToCombo(config.getStringProperty("emailTo"),toAddress); } } semp.add(tol); semp.add(toAddress); semp.add(subl); semp.add(subject); semp.add(bodyl); semp.add(bodyScrollPane); semp.add(fnl); semp.add(attachmentName); return semp; }
4,564
private JPanel setupMailPanel (String fileName) { JPanel semp = new JPanel(); semp.setLayout(new AlignLayout(2,5,5)); JLabel tol = new JLabel(LangTool.getString("em.to")); JLabel subl = new JLabel(LangTool.getString("em.subject")); JLabel bodyl = new JLabel(LangTool.getString("em.body")); JLabel fnl = new JLabel(LangTool.getString("em.fileName")); toAddress = new JComboBox(); toAddress.setEditable(true); subject = new JTextField(30); bodyText = new JTextArea(6,30); JScrollPane bodyScrollPane = new JScrollPane(bodyText); bodyScrollPane.setHorizontalScrollBarPolicy( JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED); bodyScrollPane.setVerticalScrollBarPolicy( JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED); attachmentName = new JTextField(fileName,30); config = null; if (session != null) { config = session.getConfiguration(); if (config.isPropertyExists("emailTo")) { setToCombo(config.getStringProperty("emailTo"),toAddress); } } semp.add(tol); semp.add(toAddress); semp.add(subl); semp.add(subject); semp.add(bodyl); semp.add(bodyScrollPane); semp.add(fnl); semp.add(attachmentName); return semp; }
private JPanel setupMailPanel (String fileName) { JPanel semp = new JPanel(); semp.setLayout(new AlignLayout(2,5,5)); JLabel tol = new JLabel(LangTool.getString("em.to")); JLabel subl = new JLabel(LangTool.getString("em.subject")); JLabel bodyl = new JLabel(LangTool.getString("em.body")); JLabel fnl = new JLabel(LangTool.getString("em.fileName")); toAddress = new JComboBox(); toAddress.setEditable(true); subject = new JTextField(30); bodyText = new JTextArea(6,30); JScrollPane bodyScrollPane = new JScrollPane(bodyText); bodyScrollPane.setHorizontalScrollBarPolicy( JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED); bodyScrollPane.setVerticalScrollBarPolicy( JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED); attachmentName = new JTextField(fileName,30); config = null; if (session != null) { config = session.getConfiguration(); if (config.isPropertyExists("emailTo")) { setToCombo(config.getStringProperty("emailTo"),toAddress); } } semp.add(tol); semp.add(toAddress); semp.add(subl); semp.add(subject); semp.add(bodyl); semp.add(bodyScrollPane); semp.add(fnl); semp.add(attachmentName); return semp; }
4,565
private JPanel setupMailPanel (String fileName) { JPanel semp = new JPanel(); semp.setLayout(new AlignLayout(2,5,5)); JLabel tol = new JLabel(LangTool.getString("em.to")); JLabel subl = new JLabel(LangTool.getString("em.subject")); JLabel bodyl = new JLabel(LangTool.getString("em.body")); JLabel fnl = new JLabel(LangTool.getString("em.fileName")); toAddress = new JComboBox(); toAddress.setEditable(true); subject = new JTextField(30); bodyText = new JTextArea(6,30); JScrollPane bodyScrollPane = new JScrollPane(bodyText); bodyScrollPane.setHorizontalScrollBarPolicy( JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED); bodyScrollPane.setVerticalScrollBarPolicy( JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED); attachmentName = new JTextField(fileName,30); config = null; if (session != null) { config = session.getConfiguration(); if (config.isPropertyExists("emailTo")) { setToCombo(config.getStringProperty("emailTo"),toAddress); } } semp.add(tol); semp.add(toAddress); semp.add(subl); semp.add(subject); semp.add(bodyl); semp.add(bodyScrollPane); semp.add(fnl); semp.add(attachmentName); return semp; }
private JPanel setupMailPanel (String fileName) { JPanel semp = new JPanel(); semp.setLayout(new AlignLayout(2,5,5)); JLabel tol = new JLabel(LangTool.getString("em.to")); JLabel subl = new JLabel(LangTool.getString("em.subject")); JLabel bodyl = new JLabel(LangTool.getString("em.body")); JLabel fnl = new JLabel(LangTool.getString("em.fileName")); toAddress = new JComboBox(); toAddress.setEditable(true); subject = new JTextField(30); bodyText = new JTextArea(6,30); JScrollPane bodyScrollPane = new JScrollPane(bodyText); bodyScrollPane.setHorizontalScrollBarPolicy( JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED); bodyScrollPane.setVerticalScrollBarPolicy( JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED); attachmentName = new JTextField(fileName,30); config = null; if (session != null) { config = session.getConfiguration(); if (config.isPropertyExists("emailTo")) { setToCombo(config.getStringProperty("emailTo"),toAddress); } } semp.add(tol); semp.add(toAddress); semp.add(subl); semp.add(subject); semp.add(bodyl); semp.add(bodyScrollPane); semp.add(fnl); semp.add(attachmentName); return semp; }
4,566
private JPanel setupMailPanel (String fileName) { JPanel semp = new JPanel(); semp.setLayout(new AlignLayout(2,5,5)); JLabel tol = new JLabel(LangTool.getString("em.to")); JLabel subl = new JLabel(LangTool.getString("em.subject")); JLabel bodyl = new JLabel(LangTool.getString("em.body")); JLabel fnl = new JLabel(LangTool.getString("em.fileName")); toAddress = new JComboBox(); toAddress.setEditable(true); subject = new JTextField(30); bodyText = new JTextArea(6,30); JScrollPane bodyScrollPane = new JScrollPane(bodyText); bodyScrollPane.setHorizontalScrollBarPolicy( JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED); bodyScrollPane.setVerticalScrollBarPolicy( JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED); attachmentName = new JTextField(fileName,30); config = null; if (session != null) { config = session.getConfiguration(); if (config.isPropertyExists("emailTo")) { setToCombo(config.getStringProperty("emailTo"),toAddress); } } semp.add(tol); semp.add(toAddress); semp.add(subl); semp.add(subject); semp.add(bodyl); semp.add(bodyScrollPane); semp.add(fnl); semp.add(attachmentName); return semp; }
private JPanel setupMailPanel (String fileName) { JPanel semp = new JPanel(); semp.setLayout(new AlignLayout(2,5,5)); JLabel tol = new JLabel(LangTool.getString("em.to")); JLabel subl = new JLabel(LangTool.getString("em.subject")); JLabel bodyl = new JLabel(LangTool.getString("em.body")); JLabel fnl = new JLabel(LangTool.getString("em.fileName")); toAddress = new JComboBox(); toAddress.setEditable(true); subject = new JTextField(30); bodyText = new JTextArea(6,30); JScrollPane bodyScrollPane = new JScrollPane(bodyText); bodyScrollPane.setHorizontalScrollBarPolicy( JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED); bodyScrollPane.setVerticalScrollBarPolicy( JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED); attachmentName = new JTextField(fileName,30); config = null; if (session != null) { config = session.getConfiguration(); if (config.isPropertyExists("emailTo")) { setToCombo(config.getStringProperty("emailTo"),toAddress); } } semp.add(tol); semp.add(toAddress); semp.add(subl); semp.add(subject); semp.add(bodyl); semp.add(bodyScrollPane); semp.add(fnl); semp.add(attachmentName); return semp; }
4,567
private JPanel setupMailPanel (String fileName) { JPanel semp = new JPanel(); semp.setLayout(new AlignLayout(2,5,5)); JLabel tol = new JLabel(LangTool.getString("em.to")); JLabel subl = new JLabel(LangTool.getString("em.subject")); JLabel bodyl = new JLabel(LangTool.getString("em.body")); JLabel fnl = new JLabel(LangTool.getString("em.fileName")); toAddress = new JComboBox(); toAddress.setEditable(true); subject = new JTextField(30); bodyText = new JTextArea(6,30); JScrollPane bodyScrollPane = new JScrollPane(bodyText); bodyScrollPane.setHorizontalScrollBarPolicy( JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED); bodyScrollPane.setVerticalScrollBarPolicy( JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED); attachmentName = new JTextField(fileName,30); config = null; if (session != null) { config = session.getConfiguration(); if (config.isPropertyExists("emailTo")) { setToCombo(config.getStringProperty("emailTo"),toAddress); } } semp.add(tol); semp.add(toAddress); semp.add(subl); semp.add(subject); semp.add(bodyl); semp.add(bodyScrollPane); semp.add(fnl); semp.add(attachmentName); return semp; }
private JPanel setupMailPanel (String fileName) { JPanel semp = new JPanel(); semp.setLayout(new AlignLayout(2,5,5)); JLabel tol = new JLabel(LangTool.getString("em.to")); JLabel subl = new JLabel(LangTool.getString("em.subject")); JLabel bodyl = new JLabel(LangTool.getString("em.body")); JLabel fnl = new JLabel(LangTool.getString("em.fileName")); toAddress = new JComboBox(); toAddress.setEditable(true); subject = new JTextField(30); bodyText = new JTextArea(6,30); JScrollPane bodyScrollPane = new JScrollPane(bodyText); bodyScrollPane.setHorizontalScrollBarPolicy( JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED); bodyScrollPane.setVerticalScrollBarPolicy( JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED); attachmentName = new JTextField(fileName,30); config = null; if (session != null) { config = session.getConfiguration(); if (config.isPropertyExists("emailTo")) { setToCombo(config.getStringProperty("emailTo"),toAddress); } } semp.add(tol); semp.add(toAddress); semp.add(subl); semp.add(subject); semp.add(bodyl); semp.add(bodyScrollPane); semp.add(fnl); semp.add(attachmentName); config = null; }
4,568
private JPanel setupMailPanel (String fileName) { JPanel semp = new JPanel(); semp.setLayout(new AlignLayout(2,5,5)); JLabel tol = new JLabel(LangTool.getString("em.to")); JLabel subl = new JLabel(LangTool.getString("em.subject")); JLabel bodyl = new JLabel(LangTool.getString("em.body")); JLabel fnl = new JLabel(LangTool.getString("em.fileName")); toAddress = new JComboBox(); toAddress.setEditable(true); subject = new JTextField(30); bodyText = new JTextArea(6,30); JScrollPane bodyScrollPane = new JScrollPane(bodyText); bodyScrollPane.setHorizontalScrollBarPolicy( JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED); bodyScrollPane.setVerticalScrollBarPolicy( JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED); attachmentName = new JTextField(fileName,30); config = null; if (session != null) { config = session.getConfiguration(); if (config.isPropertyExists("emailTo")) { setToCombo(config.getStringProperty("emailTo"),toAddress); } } semp.add(tol); semp.add(toAddress); semp.add(subl); semp.add(subject); semp.add(bodyl); semp.add(bodyScrollPane); semp.add(fnl); semp.add(attachmentName); return semp; }
private JPanel setupMailPanel (String fileName) { JPanel semp = new JPanel(); semp.setLayout(new AlignLayout(2,5,5)); JLabel tol = new JLabel(LangTool.getString("em.to")); JLabel subl = new JLabel(LangTool.getString("em.subject")); JLabel bodyl = new JLabel(LangTool.getString("em.body")); JLabel fnl = new JLabel(LangTool.getString("em.fileName")); toAddress = new JComboBox(); toAddress.setEditable(true); subject = new JTextField(30); bodyText = new JTextArea(6,30); JScrollPane bodyScrollPane = new JScrollPane(bodyText); bodyScrollPane.setHorizontalScrollBarPolicy( JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED); bodyScrollPane.setVerticalScrollBarPolicy( JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED); attachmentName = new JTextField(fileName,30); config = null; if (session != null) { config = session.getConfiguration(); if (config.isPropertyExists("emailTo")) { setToCombo(config.getStringProperty("emailTo"),toAddress); if (session != null) { config = session.getConfiguration(); if (config.isPropertyExists("emailTo")) { setToCombo(config.getStringProperty("emailTo"), toAddress); } } gbc = new GridBagConstraints(); gbc.gridx = 0; gbc.gridy = 0; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(0, 10, 5, 5); semp.add(screenDump, gbc); gbc = new GridBagConstraints(); gbc.gridx = 1; gbc.gridy = 0; gbc.anchor = GridBagConstraints.CENTER; gbc.insets = new Insets(0, 5, 5, 5); semp.add(text, gbc); gbc = new GridBagConstraints(); gbc.gridx = 2; gbc.gridy = 0; gbc.anchor = GridBagConstraints.CENTER; gbc.insets = new Insets(0, 5, 5, 10); semp.add(graphic, gbc); gbc = new GridBagConstraints(); gbc.gridx = 0; gbc.gridy = 1; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 10, 5, 5); semp.add(tol, gbc); gbc = new GridBagConstraints(); gbc.gridx = 1; gbc.gridy = 1; gbc.gridwidth = 2; gbc.fill = GridBagConstraints.HORIZONTAL; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 5, 5, 10); semp.add(toAddress, gbc); gbc = new GridBagConstraints(); gbc.gridx = 0; gbc.gridy = 2; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 10, 5, 5); semp.add(subl, gbc); gbc = new GridBagConstraints(); gbc.gridx = 1; gbc.gridy = 2; gbc.gridwidth = 2; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 5, 5, 10); semp.add(subject, gbc); gbc = new GridBagConstraints(); gbc.gridx = 0; gbc.gridy = 4; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 10, 5, 5); semp.add(bodyl, gbc); gbc = new GridBagConstraints(); gbc.gridx = 1; gbc.gridy = 3; gbc.gridwidth = 2; gbc.gridheight = 3; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 5, 5, 10); semp.add(bodyScrollPane, gbc); gbc = new GridBagConstraints(); gbc.gridx = 0; gbc.gridy = 6; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 10, 5, 5); semp.add(fnl, gbc); gbc = new GridBagConstraints(); gbc.gridx = 1; gbc.gridy = 6; gbc.gridwidth = 2; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 5, 5, 10); semp.add(attachmentName, gbc); return semp; } if (session != null) { config = session.getConfiguration(); if (config.isPropertyExists("emailTo")) { setToCombo(config.getStringProperty("emailTo"), toAddress); } } gbc = new GridBagConstraints(); gbc.gridx = 0; gbc.gridy = 0; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(0, 10, 5, 5); semp.add(screenDump, gbc); gbc = new GridBagConstraints(); gbc.gridx = 1; gbc.gridy = 0; gbc.anchor = GridBagConstraints.CENTER; gbc.insets = new Insets(0, 5, 5, 5); semp.add(text, gbc); gbc = new GridBagConstraints(); gbc.gridx = 2; gbc.gridy = 0; gbc.anchor = GridBagConstraints.CENTER; gbc.insets = new Insets(0, 5, 5, 10); semp.add(graphic, gbc); gbc = new GridBagConstraints(); gbc.gridx = 0; gbc.gridy = 1; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 10, 5, 5); semp.add(tol, gbc); gbc = new GridBagConstraints(); gbc.gridx = 1; gbc.gridy = 1; gbc.gridwidth = 2; gbc.fill = GridBagConstraints.HORIZONTAL; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 5, 5, 10); semp.add(toAddress, gbc); gbc = new GridBagConstraints(); gbc.gridx = 0; gbc.gridy = 2; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 10, 5, 5); semp.add(subl, gbc); gbc = new GridBagConstraints(); gbc.gridx = 1; gbc.gridy = 2; gbc.gridwidth = 2; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 5, 5, 10); semp.add(subject, gbc); gbc = new GridBagConstraints(); gbc.gridx = 0; gbc.gridy = 4; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 10, 5, 5); semp.add(bodyl, gbc); gbc = new GridBagConstraints(); gbc.gridx = 1; gbc.gridy = 3; gbc.gridwidth = 2; gbc.gridheight = 3; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 5, 5, 10); semp.add(bodyScrollPane, gbc); gbc = new GridBagConstraints(); gbc.gridx = 0; gbc.gridy = 6; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 10, 5, 5); semp.add(fnl, gbc); gbc = new GridBagConstraints(); gbc.gridx = 1; gbc.gridy = 6; gbc.gridwidth = 2; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 5, 5, 10); semp.add(attachmentName, gbc); return semp; } semp.add(tol); semp.add(toAddress); semp.add(subl); semp.add(subject); semp.add(bodyl); semp.add(bodyScrollPane); semp.add(fnl); semp.add(attachmentName); return semp; }
4,569
public synchronized void getChars(int srcOffset, int srcEnd, char[] dst, int dstOffset) { int todo = srcEnd - srcOffset; if (srcOffset < 0 || srcEnd > count || todo < 0) throw new StringIndexOutOfBoundsException(); System.arraycopy(value, srcOffset, dst, dstOffset, todo); }
public synchronized void getChars(int srcOffset, int srcEnd, char[] dst, int dstOffset) { int todo = srcEnd - srcOffset; if (srcOffset < 0 || srcEnd > count || todo < 0) throw new StringIndexOutOfBoundsException(); System.arraycopy(value, srcOffset, dst, dstOffset, todo); }
4,570
public synchronized void getChars(int srcOffset, int srcEnd, char[] dst, int dstOffset) { int todo = srcEnd - srcOffset; if (srcOffset < 0 || srcEnd > count || todo < 0) throw new StringIndexOutOfBoundsException(); System.arraycopy(value, srcOffset, dst, dstOffset, todo); }
public synchronized void getChars(int srcOffset, int srcEnd, char[] dst, int dstOffset) { int todo = srcEnd - srcOffset; if (srcOffset < 0 || srcEnd > count || todo < 0) throw new StringIndexOutOfBoundsException(); System.arraycopy(value, srcOffset, dst, dstOffset, srcEnd - srcOffset); }
4,571
public synchronized StringBuffer insert(int offset, char[] str, int str_offset, int len) { if (offset < 0 || offset > count || len < 0 || str_offset < 0 || str_offset + len > str.length) throw new StringIndexOutOfBoundsException(); ensureCapacity_unsynchronized(count + len); System.arraycopy(value, offset, value, offset + len, count - offset); System.arraycopy(str, str_offset, value, offset, len); count += len; return this; }
public synchronized StringBuffer insert(int offset, char[] str, int str_offset, int len) { if (offset < 0 || offset > count || len < 0 || str_offset < 0 || str_offset > str.length - len) throw new StringIndexOutOfBoundsException(); ensureCapacity_unsynchronized(count + len); System.arraycopy(value, offset, value, offset + len, count - offset); System.arraycopy(str, str_offset, value, offset, len); count += len; return this; }
4,572
public synchronized void setLength(int newLength) { if (newLength < 0) throw new StringIndexOutOfBoundsException(newLength); ensureCapacity_unsynchronized(newLength); while (count < newLength) value[count++] = '\0'; count = newLength; }
public synchronized void setLength(int newLength) { if (newLength < 0) throw new StringIndexOutOfBoundsException(newLength); ensureCapacity_unsynchronized(newLength); while (count < newLength) value[count++] = '\0'; } }
4,573
public final void setAttributes(KeyEvent ke) { keyCode = ke.getKeyCode(); isShiftDown = ke.isShiftDown(); isControlDown = ke.isControlDown(); isAltDown = ke.isAltDown(); hashCode = keyCode + (isShiftDown ? 1 : 0) + (isControlDown ? 1 : 0) + (isAltDown ? 1 : 0) + (isAltGrDown ? 1 : 0); }
public final void setAttributes(int keyCode, boolean isShiftDown, boolean isControlDown, boolean isAltDown, boolean isAltGrDown) { keyCode = ke.getKeyCode(); isShiftDown = ke.isShiftDown(); isControlDown = ke.isControlDown(); isAltDown = ke.isAltDown(); hashCode = keyCode + (isShiftDown ? 1 : 0) + (isControlDown ? 1 : 0) + (isAltDown ? 1 : 0) + (isAltGrDown ? 1 : 0); }
4,574
public final void setAttributes(KeyEvent ke) { keyCode = ke.getKeyCode(); isShiftDown = ke.isShiftDown(); isControlDown = ke.isControlDown(); isAltDown = ke.isAltDown(); hashCode = keyCode + (isShiftDown ? 1 : 0) + (isControlDown ? 1 : 0) + (isAltDown ? 1 : 0) + (isAltGrDown ? 1 : 0); }
public final void setAttributes(KeyEvent ke) { keyCode = ke.getKeyCode(); isShiftDown = ke.isShiftDown(); isControlDown = ke.isControlDown(); isAltDown = ke.isAltDown(); hashCode = keyCode + (isShiftDown ? 1 : 0) + (isControlDown ? 1 : 0) + (isAltDown ? 1 : 0) + (isAltGrDown ? 1 : 0); }
4,575
public final void setAttributes(KeyEvent ke) { keyCode = ke.getKeyCode(); isShiftDown = ke.isShiftDown(); isControlDown = ke.isControlDown(); isAltDown = ke.isAltDown(); hashCode = keyCode + (isShiftDown ? 1 : 0) + (isControlDown ? 1 : 0) + (isAltDown ? 1 : 0) + (isAltGrDown ? 1 : 0); }
public final void setAttributes(KeyEvent ke) { keyCode = ke.getKeyCode(); isShiftDown = ke.isShiftDown(); isControlDown = ke.isControlDown(); isAltDown = ke.isAltDown(); hashCode = keyCode + (isShiftDown ? 1 : 0) + (isControlDown ? 1 : 0) + (isAltDown ? 1 : 0) + (isAltGrDown ? 1 : 0); }
4,576
public Dimension getMinimumSize(JComponent c) { MetalComboBoxButton b = (MetalComboBoxButton) arrowButton; Icon icon = b.getComboIcon(); Insets insets = b.getInsets(); Dimension d = getDisplaySize(); int insetsH = insets.top + insets.bottom; int insetsW = insets.left + insets.right; int iconWidth = icon.getIconWidth() + 6; return new Dimension(d.width + insetsW + iconWidth, d.height + insetsH); }
public Dimension getMinimumSize(JComponent c) { MetalComboBoxButton b = (MetalComboBoxButton) arrowButton; Insets insets = b.getInsets(); Dimension d = getDisplaySize(); int insetsH = insets.top + insets.bottom; int insetsW = insets.left + insets.right; int iconWidth = icon.getIconWidth() + 6; return new Dimension(d.width + insetsW + iconWidth, d.height + insetsH); }
4,577
public Dimension getMinimumSize(JComponent c) { MetalComboBoxButton b = (MetalComboBoxButton) arrowButton; Icon icon = b.getComboIcon(); Insets insets = b.getInsets(); Dimension d = getDisplaySize(); int insetsH = insets.top + insets.bottom; int insetsW = insets.left + insets.right; int iconWidth = icon.getIconWidth() + 6; return new Dimension(d.width + insetsW + iconWidth, d.height + insetsH); }
public Dimension getMinimumSize(JComponent c) { MetalComboBoxButton b = (MetalComboBoxButton) arrowButton; Icon icon = b.getComboIcon(); Insets insets = b.getInsets(); int insetsH = insets.top + insets.bottom; int insetsW = insets.left + insets.right; int iconWidth = icon.getIconWidth() + 6; return new Dimension(d.width + insetsW + iconWidth, d.height + insetsH); }
4,578
public Dimension getMinimumSize(JComponent c) { MetalComboBoxButton b = (MetalComboBoxButton) arrowButton; Icon icon = b.getComboIcon(); Insets insets = b.getInsets(); Dimension d = getDisplaySize(); int insetsH = insets.top + insets.bottom; int insetsW = insets.left + insets.right; int iconWidth = icon.getIconWidth() + 6; return new Dimension(d.width + insetsW + iconWidth, d.height + insetsH); }
public Dimension getMinimumSize(JComponent c) { MetalComboBoxButton b = (MetalComboBoxButton) arrowButton; Icon icon = b.getComboIcon(); Insets insets = b.getInsets(); Dimension d = getDisplaySize(); int insetsH = insets.top + insets.bottom; int insetsW = insets.left + insets.right; int iconWidth = icon.getIconWidth() + 6; return new Dimension(d.width + insetsW + iconWidth, d.height + insetsH); }
4,579
public NetworkArgument(String name, String description) { super(name, description); }
public NetworkArgument(String name, String description) { super(name, description); }
4,580
private int getLineLength(int line) { Element lineEl = getElement().getElement(line); Segment buffer = getLineBuffer(); try { Document doc = getDocument(); doc.getText(lineEl.getStartOffset(), lineEl.getEndOffset() - lineEl.getStartOffset() - 1, buffer); } catch (BadLocationException ex) { AssertionError err = new AssertionError("Unexpected bad location"); err.initCause(ex); throw err; } return Utilities.getTabbedTextWidth(buffer, metrics, 0, this, lineEl.getStartOffset()); }
private int getLineLength(int line) { Element lineEl = getElement().getElement(line); Segment buffer = getLineBuffer(); try { Document doc = getDocument(); doc.getText(lineEl.getStartOffset(), lineEl.getEndOffset() - lineEl.getStartOffset() - 1, buffer); } catch (BadLocationException ex) { AssertionError err = new AssertionError("Unexpected bad location"); err.initCause(ex); throw err; } return Utilities.getTabbedTextWidth(buffer, metrics, tabBase, this, lineEl.getStartOffset()); }
4,581
protected Rectangle lineToRect(Shape a, int line) { // Ensure metrics are up-to-date. updateMetrics(); Rectangle rect = a.getBounds(); int fontHeight = metrics.getHeight(); return new Rectangle(rect.x, rect.y + (line * fontHeight), rect.width, fontHeight); }
protected Rectangle lineToRect(Shape a, int line) { // Ensure metrics are up-to-date. updateMetrics(); Rectangle rect = a instanceof Rectangle ? (Rectangle) a : a.getBounds(); int fontHeight = metrics.getHeight(); return new Rectangle(rect.x, rect.y + (line * fontHeight), rect.width, fontHeight); }
4,582
public Shape modelToView(int position, Shape a, Position.Bias b) throws BadLocationException { // Ensure metrics are up-to-date. updateMetrics(); Document document = getDocument(); // Get rectangle of the line containing position. int lineIndex = getElement().getElementIndex(position); Rectangle rect = lineToRect(a, lineIndex); // Get the rectangle for position. Element line = getElement().getElement(lineIndex); int lineStart = line.getStartOffset(); Segment segment = getLineBuffer(); document.getText(lineStart, position - lineStart, segment); int xoffset = Utilities.getTabbedTextWidth(segment, metrics, rect.x, this, lineStart); // Calc the real rectangle. rect.x += xoffset; rect.width = 1; rect.height = metrics.getHeight(); return rect; }
public Shape modelToView(int position, Shape a, Position.Bias b) throws BadLocationException { // Ensure metrics are up-to-date. updateMetrics(); Document document = getDocument(); // Get rectangle of the line containing position. int lineIndex = getElement().getElementIndex(position); Rectangle rect = lineToRect(a, lineIndex); // Get the rectangle for position. Element line = getElement().getElement(lineIndex); int lineStart = line.getStartOffset(); Segment segment = getLineBuffer(); document.getText(lineStart, position - lineStart, segment); int xoffset = Utilities.getTabbedTextWidth(segment, metrics, rect.x, this, lineStart); // Calc the real rectangle. rect.x += xoffset; rect.width = 1; rect.height = metrics.getHeight(); return rect; }
4,583
public float nextTabStop(float x, int tabStop) { float tabSizePixels = getTabSize() * metrics.charWidth('m'); return (float) (Math.floor(x / tabSizePixels) + 1) * tabSizePixels; }
public float nextTabStop(float x, int tabStop) { float tabSizePixels = getTabSize() * metrics.charWidth('m'); return (float) (Math.floor(x / tabSizePixels) + 1) * tabSizePixels; }
4,584
public void paint(Graphics g, Shape s) { // Ensure metrics are up-to-date. updateMetrics(); JTextComponent textComponent = (JTextComponent) getContainer(); selectedColor = textComponent.getSelectedTextColor(); unselectedColor = textComponent.getForeground(); disabledColor = textComponent.getDisabledTextColor(); selectionStart = textComponent.getSelectionStart(); selectionEnd = textComponent.getSelectionEnd(); Rectangle rect = s.getBounds(); // FIXME: Text may be scrolled. Document document = textComponent.getDocument(); Element root = document.getDefaultRootElement(); int y = rect.y + metrics.getAscent(); int height = metrics.getHeight(); int count = root.getElementCount(); for (int i = 0; i < count; i++) { drawLine(i, g, rect.x, y); y += height; } }
public void paint(Graphics g, Shape s) { // Ensure metrics are up-to-date. updateMetrics(); JTextComponent textComponent = (JTextComponent) getContainer(); selectedColor = textComponent.getSelectedTextColor(); unselectedColor = textComponent.getForeground(); disabledColor = textComponent.getDisabledTextColor(); selectionStart = textComponent.getSelectionStart(); selectionEnd = textComponent.getSelectionEnd(); Rectangle rect = s instanceof Rectangle ? (Rectangle) s : s.getBounds(); tabBase = rect.x; // FIXME: Text may be scrolled. Document document = textComponent.getDocument(); Element root = document.getDefaultRootElement(); int y = rect.y + metrics.getAscent(); int height = metrics.getHeight(); int count = root.getElementCount(); for (int i = 0; i < count; i++) { drawLine(i, g, rect.x, y); y += height; } }
4,585
public void paint(Graphics g, Shape s) { // Ensure metrics are up-to-date. updateMetrics(); JTextComponent textComponent = (JTextComponent) getContainer(); selectedColor = textComponent.getSelectedTextColor(); unselectedColor = textComponent.getForeground(); disabledColor = textComponent.getDisabledTextColor(); selectionStart = textComponent.getSelectionStart(); selectionEnd = textComponent.getSelectionEnd(); Rectangle rect = s.getBounds(); // FIXME: Text may be scrolled. Document document = textComponent.getDocument(); Element root = document.getDefaultRootElement(); int y = rect.y + metrics.getAscent(); int height = metrics.getHeight(); int count = root.getElementCount(); for (int i = 0; i < count; i++) { drawLine(i, g, rect.x, y); y += height; } }
public void paint(Graphics g, Shape s) { // Ensure metrics are up-to-date. updateMetrics(); JTextComponent textComponent = (JTextComponent) getContainer(); selectedColor = textComponent.getSelectedTextColor(); unselectedColor = textComponent.getForeground(); disabledColor = textComponent.getDisabledTextColor(); selectionStart = textComponent.getSelectionStart(); selectionEnd = textComponent.getSelectionEnd(); Rectangle rect = s.getBounds(); // FIXME: Text may be scrolled. Document document = textComponent.getDocument(); Element root = document.getDefaultRootElement(); int y = rect.y + metrics.getAscent(); int height = metrics.getHeight(); int count = root.getElementCount(); for (int i = 0; i < count; i++) { drawLine(i, g, rect.x, y); y += height; } }
4,586
public void paint(Graphics g, Shape s) { // Ensure metrics are up-to-date. updateMetrics(); JTextComponent textComponent = (JTextComponent) getContainer(); selectedColor = textComponent.getSelectedTextColor(); unselectedColor = textComponent.getForeground(); disabledColor = textComponent.getDisabledTextColor(); selectionStart = textComponent.getSelectionStart(); selectionEnd = textComponent.getSelectionEnd(); Rectangle rect = s.getBounds(); // FIXME: Text may be scrolled. Document document = textComponent.getDocument(); Element root = document.getDefaultRootElement(); int y = rect.y + metrics.getAscent(); int height = metrics.getHeight(); int count = root.getElementCount(); for (int i = 0; i < count; i++) { drawLine(i, g, rect.x, y); y += height; } }
public void paint(Graphics g, Shape s) { // Ensure metrics are up-to-date. updateMetrics(); JTextComponent textComponent = (JTextComponent) getContainer(); selectedColor = textComponent.getSelectedTextColor(); unselectedColor = textComponent.getForeground(); disabledColor = textComponent.getDisabledTextColor(); selectionStart = textComponent.getSelectionStart(); selectionEnd = textComponent.getSelectionEnd(); Rectangle rect = s.getBounds(); // FIXME: Text may be scrolled. Document document = textComponent.getDocument(); Element root = document.getDefaultRootElement(); int y = rect.y + metrics.getAscent(); int height = metrics.getHeight(); int count = root.getElementCount(); Rectangle clip = g.getClipBounds(); SwingUtilities.computeIntersection(rect.x, rect.y, rect.width, rect.height, clip); int line0 = (clip.y - rect.y) / height; line0 = Math.max(0, Math.min(line0, count - 1)); int line1 = (clip.y + clip.height - rect.y) / height; line1 = Math.max(0, Math.min(line1, count - 1)); int y = rect.y + metrics.getAscent() + height * line0; for (int i = line0; i <= line1; i++) { drawLine(i, g, rect.x, y); y += height; } }
4,587
public int viewToModel(float x, float y, Shape a, Position.Bias[] b) { Rectangle rec = a.getBounds(); Document doc = getDocument(); Element root = doc.getDefaultRootElement(); // PlainView doesn't support line-wrapping so we can find out which // Element was clicked on just by the y-position. // Since the coordinates may be outside of the coordinate space // of the allocation area (e.g. user dragged mouse outside // the component) we have to limit the values. // This has the nice effect that the user can drag the // mouse above or below the component and it will still // react to the x values (e.g. when selecting). int lineClicked = Math.min(Math.max((int) (y - rec.y) / metrics.getHeight(), 0), root.getElementCount() - 1); Element line = root.getElement(lineClicked); Segment s = getLineBuffer(); int start = line.getStartOffset(); // We don't want the \n at the end of the line. int end = line.getEndOffset() - 1; try { doc.getText(start, end - start, s); } catch (BadLocationException ble) { AssertionError ae = new AssertionError("Unexpected bad location"); ae.initCause(ble); throw ae; } int pos = Utilities.getTabbedTextOffset(s, metrics, rec.x, (int)x, this, start); return Math.max (0, pos); }
public int viewToModel(float x, float y, Shape a, Position.Bias[] b) { Rectangle rec = a instanceof Rectangle ? (Rectangle) a : a.getBounds(); tabBase = rec.x; int pos; if ((int) y < rec.y) pos = getStartOffset(); else if ((int) y > rec.y + rec.height) pos = getEndOffset() - 1; else { Document doc = getDocument(); Element root = doc.getDefaultRootElement(); // PlainView doesn't support line-wrapping so we can find out which // Element was clicked on just by the y-position. // Since the coordinates may be outside of the coordinate space // of the allocation area (e.g. user dragged mouse outside // the component) we have to limit the values. // This has the nice effect that the user can drag the // mouse above or below the component and it will still // react to the x values (e.g. when selecting). int lineClicked = Math.min(Math.max((int) (y - rec.y) / metrics.getHeight(), 0), root.getElementCount() - 1); Element line = root.getElement(lineClicked); Segment s = getLineBuffer(); int start = line.getStartOffset(); // We don't want the \n at the end of the line. int end = line.getEndOffset() - 1; try { doc.getText(start, end - start, s); } catch (BadLocationException ble) { AssertionError ae = new AssertionError("Unexpected bad location"); ae.initCause(ble); throw ae; } int pos = Utilities.getTabbedTextOffset(s, metrics, rec.x, (int)x, this, start); return Math.max (0, pos); }
4,590
public int viewToModel(float x, float y, Shape a, Position.Bias[] b) { Rectangle rec = a.getBounds(); Document doc = getDocument(); Element root = doc.getDefaultRootElement(); // PlainView doesn't support line-wrapping so we can find out which // Element was clicked on just by the y-position. // Since the coordinates may be outside of the coordinate space // of the allocation area (e.g. user dragged mouse outside // the component) we have to limit the values. // This has the nice effect that the user can drag the // mouse above or below the component and it will still // react to the x values (e.g. when selecting). int lineClicked = Math.min(Math.max((int) (y - rec.y) / metrics.getHeight(), 0), root.getElementCount() - 1); Element line = root.getElement(lineClicked); Segment s = getLineBuffer(); int start = line.getStartOffset(); // We don't want the \n at the end of the line. int end = line.getEndOffset() - 1; try { doc.getText(start, end - start, s); } catch (BadLocationException ble) { AssertionError ae = new AssertionError("Unexpected bad location"); ae.initCause(ble); throw ae; } int pos = Utilities.getTabbedTextOffset(s, metrics, rec.x, (int)x, this, start); return Math.max (0, pos); }
public int viewToModel(float x, float y, Shape a, Position.Bias[] b) { Rectangle rec = a.getBounds(); Document doc = getDocument(); Element root = doc.getDefaultRootElement(); // PlainView doesn't support line-wrapping so we can find out which // Element was clicked on just by the y-position. // Since the coordinates may be outside of the coordinate space // of the allocation area (e.g. user dragged mouse outside // the component) we have to limit the values. // This has the nice effect that the user can drag the // mouse above or below the component and it will still // react to the x values (e.g. when selecting). int lineClicked = Math.min(Math.max((int) (y - rec.y) / metrics.getHeight(), 0), root.getElementCount() - 1); Element line = root.getElement(lineClicked); Segment s = getLineBuffer(); int start = line.getStartOffset(); // We don't want the \n at the end of the line. int end = line.getEndOffset() - 1; try { doc.getText(start, end - start, s); } catch (BadLocationException ble) { AssertionError ae = new AssertionError("Unexpected bad location"); ae.initCause(ble); throw ae; } int pos = Utilities.getTabbedTextOffset(s, metrics, rec.x, (int)x, this, start); return Math.max (0, pos); }
4,591
public int viewToModel(float x, float y, Shape a, Position.Bias[] b) { Rectangle rec = a.getBounds(); Document doc = getDocument(); Element root = doc.getDefaultRootElement(); // PlainView doesn't support line-wrapping so we can find out which // Element was clicked on just by the y-position. // Since the coordinates may be outside of the coordinate space // of the allocation area (e.g. user dragged mouse outside // the component) we have to limit the values. // This has the nice effect that the user can drag the // mouse above or below the component and it will still // react to the x values (e.g. when selecting). int lineClicked = Math.min(Math.max((int) (y - rec.y) / metrics.getHeight(), 0), root.getElementCount() - 1); Element line = root.getElement(lineClicked); Segment s = getLineBuffer(); int start = line.getStartOffset(); // We don't want the \n at the end of the line. int end = line.getEndOffset() - 1; try { doc.getText(start, end - start, s); } catch (BadLocationException ble) { AssertionError ae = new AssertionError("Unexpected bad location"); ae.initCause(ble); throw ae; } int pos = Utilities.getTabbedTextOffset(s, metrics, rec.x, (int)x, this, start); return Math.max (0, pos); }
public int viewToModel(float x, float y, Shape a, Position.Bias[] b) { Rectangle rec = a.getBounds(); Document doc = getDocument(); Element root = doc.getDefaultRootElement(); // PlainView doesn't support line-wrapping so we can find out which // Element was clicked on just by the y-position. // Since the coordinates may be outside of the coordinate space // of the allocation area (e.g. user dragged mouse outside // the component) we have to limit the values. // This has the nice effect that the user can drag the // mouse above or below the component and it will still // react to the x values (e.g. when selecting). int lineClicked = Math.min(Math.max((int) (y - rec.y) / metrics.getHeight(), 0), root.getElementCount() - 1); Element line = root.getElement(lineClicked); Segment s = getLineBuffer(); int start = line.getStartOffset(); // We don't want the \n at the end of the line. int end = line.getEndOffset() - 1; try { int p0 = lineEl.getStartOffset(); int p1 = lineEl.getEndOffset(); Segment s = new Segment(); doc.getText(p0, p1 - p0, s); tabBase = rec.x; pos = p0 + Utilities.getTabbedTextOffset(s, metrics, tabBase, (int) x, this, p0); } catch (BadLocationException ble) { AssertionError ae = new AssertionError("Unexpected bad location"); ae.initCause(ble); throw ae; } int pos = Utilities.getTabbedTextOffset(s, metrics, rec.x, (int)x, this, start); return Math.max (0, pos); }
4,592
public int viewToModel(float x, float y, Shape a, Position.Bias[] b) { Rectangle rec = a.getBounds(); Document doc = getDocument(); Element root = doc.getDefaultRootElement(); // PlainView doesn't support line-wrapping so we can find out which // Element was clicked on just by the y-position. // Since the coordinates may be outside of the coordinate space // of the allocation area (e.g. user dragged mouse outside // the component) we have to limit the values. // This has the nice effect that the user can drag the // mouse above or below the component and it will still // react to the x values (e.g. when selecting). int lineClicked = Math.min(Math.max((int) (y - rec.y) / metrics.getHeight(), 0), root.getElementCount() - 1); Element line = root.getElement(lineClicked); Segment s = getLineBuffer(); int start = line.getStartOffset(); // We don't want the \n at the end of the line. int end = line.getEndOffset() - 1; try { doc.getText(start, end - start, s); } catch (BadLocationException ble) { AssertionError ae = new AssertionError("Unexpected bad location"); ae.initCause(ble); throw ae; } int pos = Utilities.getTabbedTextOffset(s, metrics, rec.x, (int)x, this, start); return Math.max (0, pos); }
public int viewToModel(float x, float y, Shape a, Position.Bias[] b) { Rectangle rec = a.getBounds(); Document doc = getDocument(); Element root = doc.getDefaultRootElement(); // PlainView doesn't support line-wrapping so we can find out which // Element was clicked on just by the y-position. // Since the coordinates may be outside of the coordinate space // of the allocation area (e.g. user dragged mouse outside // the component) we have to limit the values. // This has the nice effect that the user can drag the // mouse above or below the component and it will still // react to the x values (e.g. when selecting). int lineClicked = Math.min(Math.max((int) (y - rec.y) / metrics.getHeight(), 0), root.getElementCount() - 1); Element line = root.getElement(lineClicked); Segment s = getLineBuffer(); int start = line.getStartOffset(); // We don't want the \n at the end of the line. int end = line.getEndOffset() - 1; try { doc.getText(start, end - start, s); } catch (BadLocationException ex) { AssertionError ae = new AssertionError("Unexpected bad location"); ae.initCause(ble); throw ae; } int pos = Utilities.getTabbedTextOffset(s, metrics, rec.x, (int)x, this, start); return Math.max (0, pos); }
4,593
public int viewToModel(float x, float y, Shape a, Position.Bias[] b) { Rectangle rec = a.getBounds(); Document doc = getDocument(); Element root = doc.getDefaultRootElement(); // PlainView doesn't support line-wrapping so we can find out which // Element was clicked on just by the y-position. // Since the coordinates may be outside of the coordinate space // of the allocation area (e.g. user dragged mouse outside // the component) we have to limit the values. // This has the nice effect that the user can drag the // mouse above or below the component and it will still // react to the x values (e.g. when selecting). int lineClicked = Math.min(Math.max((int) (y - rec.y) / metrics.getHeight(), 0), root.getElementCount() - 1); Element line = root.getElement(lineClicked); Segment s = getLineBuffer(); int start = line.getStartOffset(); // We don't want the \n at the end of the line. int end = line.getEndOffset() - 1; try { doc.getText(start, end - start, s); } catch (BadLocationException ble) { AssertionError ae = new AssertionError("Unexpected bad location"); ae.initCause(ble); throw ae; } int pos = Utilities.getTabbedTextOffset(s, metrics, rec.x, (int)x, this, start); return Math.max (0, pos); }
public int viewToModel(float x, float y, Shape a, Position.Bias[] b) { Rectangle rec = a.getBounds(); Document doc = getDocument(); Element root = doc.getDefaultRootElement(); // PlainView doesn't support line-wrapping so we can find out which // Element was clicked on just by the y-position. // Since the coordinates may be outside of the coordinate space // of the allocation area (e.g. user dragged mouse outside // the component) we have to limit the values. // This has the nice effect that the user can drag the // mouse above or below the component and it will still // react to the x values (e.g. when selecting). int lineClicked = Math.min(Math.max((int) (y - rec.y) / metrics.getHeight(), 0), root.getElementCount() - 1); Element line = root.getElement(lineClicked); Segment s = getLineBuffer(); int start = line.getStartOffset(); // We don't want the \n at the end of the line. int end = line.getEndOffset() - 1; try { doc.getText(start, end - start, s); } catch (BadLocationException ble) { AssertionError ae = new AssertionError("Unexpected bad location"); ae.initCause(ble); throw ae; } int pos = Utilities.getTabbedTextOffset(s, metrics, rec.x, (int)x, this, start); return Math.max (0, pos); }
4,594
public int viewToModel(float x, float y, Shape a, Position.Bias[] b) { Rectangle rec = a.getBounds(); Document doc = getDocument(); Element root = doc.getDefaultRootElement(); // PlainView doesn't support line-wrapping so we can find out which // Element was clicked on just by the y-position. // Since the coordinates may be outside of the coordinate space // of the allocation area (e.g. user dragged mouse outside // the component) we have to limit the values. // This has the nice effect that the user can drag the // mouse above or below the component and it will still // react to the x values (e.g. when selecting). int lineClicked = Math.min(Math.max((int) (y - rec.y) / metrics.getHeight(), 0), root.getElementCount() - 1); Element line = root.getElement(lineClicked); Segment s = getLineBuffer(); int start = line.getStartOffset(); // We don't want the \n at the end of the line. int end = line.getEndOffset() - 1; try { doc.getText(start, end - start, s); } catch (BadLocationException ble) { AssertionError ae = new AssertionError("Unexpected bad location"); ae.initCause(ble); throw ae; } int pos = Utilities.getTabbedTextOffset(s, metrics, rec.x, (int)x, this, start); return Math.max (0, pos); }
public int viewToModel(float x, float y, Shape a, Position.Bias[] b) { Rectangle rec = a.getBounds(); Document doc = getDocument(); Element root = doc.getDefaultRootElement(); // PlainView doesn't support line-wrapping so we can find out which // Element was clicked on just by the y-position. // Since the coordinates may be outside of the coordinate space // of the allocation area (e.g. user dragged mouse outside // the component) we have to limit the values. // This has the nice effect that the user can drag the // mouse above or below the component and it will still // react to the x values (e.g. when selecting). int lineClicked = Math.min(Math.max((int) (y - rec.y) / metrics.getHeight(), 0), root.getElementCount() - 1); Element line = root.getElement(lineClicked); Segment s = getLineBuffer(); int start = line.getStartOffset(); // We don't want the \n at the end of the line. int end = line.getEndOffset() - 1; try { doc.getText(start, end - start, s); } catch (BadLocationException ble) { AssertionError ae = new AssertionError("Unexpected bad location"); ae.initCause(ble); throw ae; } int pos = Utilities.getTabbedTextOffset(s, metrics, rec.x, (int)x, this, start); return Math.max (0, pos); }
4,595
public synchronized long[] allocNew(int nrClusters) throws IOException { long rc[] = new long[nrClusters]; rc[0] = allocNew(); for (int i = 1; i < nrClusters; i++) { rc[i] = allocAppend(rc[i - 1]); } return rc; }
public synchronized long[] allocNew(int nrClusters) throws IOException { long rc[] = new long[nrClusters]; rc[0] = allocNew(); for (int i = 1; i < nrClusters; i++) { rc[i] = allocAppend(rc[i - 1]); } return rc; }
4,596
public synchronized long[] allocNew(int nrClusters) throws IOException { long rc[] = new long[nrClusters]; rc[0] = allocNew(); for (int i = 1; i < nrClusters; i++) { rc[i] = allocAppend(rc[i - 1]); } return rc; }
public synchronized long[] allocNew(int nrClusters) throws IOException { long rc[] = new long[nrClusters]; rc[0] = allocNew(); for (int i = 1; i < nrClusters; i++) { rc[i] = allocAppend(rc[i - 1]); } return rc; }
4,597
public synchronized long[] allocNew(int nrClusters) throws IOException { long rc[] = new long[nrClusters]; rc[0] = allocNew(); for (int i = 1; i < nrClusters; i++) { rc[i] = allocAppend(rc[i - 1]); } return rc; }
public synchronized long[] allocNew(int nrClusters) throws IOException { long rc[] = new long[nrClusters]; rc[0] = allocNew(); for (int i = 1; i < nrClusters; i++) { rc[i] = allocAppend(rc[i - 1]); } return rc; }
4,598
private void nextSession() { int index = sessionPane.getSelectedIndex(); sessionPane.setForegroundAt(index,Color.black); sessionPane.setIconAt(index,unfocused); if (index < sessionPane.getTabCount() - 1) { sessionPane.setSelectedIndex(++index); sessionPane.setForegroundAt(index,Color.blue); sessionPane.setIconAt(index,focused); } else { sessionPane.setSelectedIndex(0); sessionPane.setForegroundAt(0,Color.blue); sessionPane.setIconAt(0,focused); } sessionPane.getComponent(sessionPane.getSelectedIndex()).requestFocus(); }
private void nextSession() { int index = sessionPane.getSelectedIndex(); sessionPane.setForegroundAt(index,Color.black); sessionPane.setIconAt(index,unfocused); if (index < sessionPane.getTabCount() - 1) { sessionPane.setSelectedIndex(++index); sessionPane.setForegroundAt(index,Color.blue); sessionPane.setIconAt(index,focused); } else { sessionPane.setSelectedIndex(0); sessionPane.setForegroundAt(0,Color.blue); sessionPane.setIconAt(0,focused); } ((Session)sessionPane.getComponent(sessionPane.getSelectedIndex())).grabFocus(); }
4,600
private void prevSession() { int index = sessionPane.getSelectedIndex(); sessionPane.setForegroundAt(index,Color.black); sessionPane.setIconAt(index,unfocused); if (index == 0) { sessionPane.setSelectedIndex(sessionPane.getTabCount() - 1); sessionPane.setForegroundAt(sessionPane.getSelectedIndex(),Color.blue); sessionPane.setIconAt(sessionPane.getSelectedIndex(),focused); } else { sessionPane.setSelectedIndex(--index); sessionPane.setForegroundAt(index,Color.blue); sessionPane.setIconAt(index,focused); } sessionPane.getComponent(sessionPane.getSelectedIndex()).requestFocus(); }
private void prevSession() { int index = sessionPane.getSelectedIndex(); sessionPane.setForegroundAt(index,Color.black); sessionPane.setIconAt(index,unfocused); if (index == 0) { sessionPane.setSelectedIndex(sessionPane.getTabCount() - 1); sessionPane.setForegroundAt(sessionPane.getSelectedIndex(),Color.blue); sessionPane.setIconAt(sessionPane.getSelectedIndex(),focused); } else { sessionPane.setSelectedIndex(--index); sessionPane.setForegroundAt(index,Color.blue); sessionPane.setIconAt(index,focused); } ((Session)sessionPane.getComponent(sessionPane.getSelectedIndex())).grabFocus(); }
4,601
public void removeSessionView(Session targetSession) { int index = sessionPane.indexOfComponent(targetSession); System.out.println("session found and closing down " + index); targetSession.removeSessionListener(this); targetSession.removeSessionJumpListener(this); int tabs = sessionPane.getTabCount(); sessionPane.remove(index); tabs--; if (index < tabs) { sessionPane.setSelectedIndex(index); sessionPane.setForegroundAt(index,Color.blue); sessionPane.setIconAt(index,focused); ((Session)sessionPane.getComponentAt(index)).requestFocus(); } else { if (tabs > 0) { sessionPane.setSelectedIndex(0); sessionPane.setForegroundAt(0,Color.blue); sessionPane.setIconAt(0,focused); ((Session)sessionPane.getComponentAt(0)).requestFocus(); } } }
public void removeSessionView(Session targetSession) { int index = sessionPane.indexOfComponent(targetSession); System.out.println("session found and closing down " + index); targetSession.removeSessionListener(this); targetSession.removeSessionJumpListener(this); int tabs = sessionPane.getTabCount(); sessionPane.remove(index); tabs--; if (index < tabs) { sessionPane.setSelectedIndex(index); sessionPane.setForegroundAt(index,Color.blue); sessionPane.setIconAt(index,focused); ((Session)sessionPane.getComponentAt(index)).grabFocus(); } else { if (tabs > 0) { sessionPane.setSelectedIndex(0); sessionPane.setForegroundAt(0,Color.blue); sessionPane.setIconAt(0,focused); ((Session)sessionPane.getComponentAt(0)).requestFocus(); } } }
4,602
public void removeSessionView(Session targetSession) { int index = sessionPane.indexOfComponent(targetSession); System.out.println("session found and closing down " + index); targetSession.removeSessionListener(this); targetSession.removeSessionJumpListener(this); int tabs = sessionPane.getTabCount(); sessionPane.remove(index); tabs--; if (index < tabs) { sessionPane.setSelectedIndex(index); sessionPane.setForegroundAt(index,Color.blue); sessionPane.setIconAt(index,focused); ((Session)sessionPane.getComponentAt(index)).requestFocus(); } else { if (tabs > 0) { sessionPane.setSelectedIndex(0); sessionPane.setForegroundAt(0,Color.blue); sessionPane.setIconAt(0,focused); ((Session)sessionPane.getComponentAt(0)).requestFocus(); } } }
public void removeSessionView(Session targetSession) { int index = sessionPane.indexOfComponent(targetSession); System.out.println("session found and closing down " + index); targetSession.removeSessionListener(this); targetSession.removeSessionJumpListener(this); int tabs = sessionPane.getTabCount(); sessionPane.remove(index); tabs--; if (index < tabs) { sessionPane.setSelectedIndex(index); sessionPane.setForegroundAt(index,Color.blue); sessionPane.setIconAt(index,focused); ((Session)sessionPane.getComponentAt(index)).requestFocus(); } else { if (tabs > 0) { sessionPane.setSelectedIndex(0); sessionPane.setForegroundAt(0,Color.blue); sessionPane.setIconAt(0,focused); ((Session)sessionPane.getComponentAt(0)).grabFocus(); } } }
4,603
public void stateChanged(ChangeEvent e) { JTabbedPane p = (JTabbedPane)e.getSource(); p.setForegroundAt(selectedIndex,Color.black); p.setIconAt(selectedIndex,unfocused); Session sg = (Session)p.getComponentAt(selectedIndex); sg.setVisible(false); sg = (Session)p.getSelectedComponent(); if (sg == null) return; sg.setVisible(true); sg.requestFocus(); selectedIndex = p.getSelectedIndex(); p.setForegroundAt(selectedIndex,Color.blue); p.setIconAt(selectedIndex,focused); }
public void stateChanged(ChangeEvent e) { JTabbedPane p = (JTabbedPane)e.getSource(); p.setForegroundAt(selectedIndex,Color.black); p.setIconAt(selectedIndex,unfocused); Session sg = (Session)p.getComponentAt(selectedIndex); sg.setVisible(false); sg = (Session)p.getSelectedComponent(); if (sg == null) return; sg.setVisible(true); sg.grabFocus(); selectedIndex = p.getSelectedIndex(); p.setForegroundAt(selectedIndex,Color.blue); p.setIconAt(selectedIndex,focused); }
4,604
public void drawLine(int lineIndex, Graphics g, int x, int y) { try { metrics = g.getFontMetrics(); // FIXME: Selected text are not drawn yet. Element line = getDocument().getDefaultRootElement().getElement(lineIndex); drawUnselectedText(g, x, y, line.getStartOffset(), line.getEndOffset()); //drawSelectedText(g, , , , ); } catch (BadLocationException e) { // This should never happen. } }
protected void drawLine(int lineIndex, Graphics g, int x, int y) { try { metrics = g.getFontMetrics(); // FIXME: Selected text are not drawn yet. Element line = getDocument().getDefaultRootElement().getElement(lineIndex); drawUnselectedText(g, x, y, line.getStartOffset(), line.getEndOffset()); //drawSelectedText(g, , , , ); } catch (BadLocationException e) { // This should never happen. } }
4,605
public int getTabSize() { return 8; }
protected int getTabSize() { return 8; }
4,606
public Number decrementDimension() { Number dim = getDimension(); if (dim == null) { Log.error(" in DataCube, incrementDimentsion, the dimension is undef"); return null; } else return setDimension(new Integer(dim.intValue()-1));}
public Number decrementDimension() { Number dim = getDimension(); if (dim == null) { Log.error(" in DataCube, incrementDimentsion, the dimension is undef"); return null; } else return setDimension(new Integer(dim.intValue()-1));}
4,607
public Number decrementDimension() { Number dim = getDimension(); if (dim == null) { Log.error(" in DataCube, incrementDimentsion, the dimension is undef"); return null; } else return setDimension(new Integer(dim.intValue()-1));}
public Number decrementDimension() { Number dim = getDimension(); if (dim == null) { Log.error(" in DataCube, incrementDimentsion, the dimension is undef"); return null; } else return setDimension(new Integer(dim.intValue()-1));}
4,608
public Number getDimension() { return (Number) ((XMLAttribute) attribHash.get("dimension")).getAttribValue();}
public Number getDimension() { return (Number) ((XMLAttribute) attribHash.get("dimension")).getAttribValue();}
4,609
public int[] getMaxDataIndex() { List axes = parentArray.getAxisList(); int[] maxDataIndices = new int[axes.size()]; for(int i = 0; i < axes.size(); i++) { maxDataIndices[i]=((Axis) axes.get(i)).getLength(); } //update the *maxDimensionIndex* attribute attribHash.put("maxDimensionIndex", maxDataIndices); return maxDataIndices;}
public int[] getMaxDataIndex() { List axes = parentArray.getAxisList(); int[] maxDataIndices = new int[axes.size()]; int stop = axes.size(); for(int i = 0; i < stop; i++) { maxDataIndices[i]=((Axis) axes.get(i)).getLength(); } //update the *maxDimensionIndex* attribute attribHash.put("maxDimensionIndex", maxDataIndices); return maxDataIndices;}
4,610
public int[] getMaxDataIndex() { List axes = parentArray.getAxisList(); int[] maxDataIndices = new int[axes.size()]; for(int i = 0; i < axes.size(); i++) { maxDataIndices[i]=((Axis) axes.get(i)).getLength(); } //update the *maxDimensionIndex* attribute attribHash.put("maxDimensionIndex", maxDataIndices); return maxDataIndices;}
public int[] getMaxDataIndex() { List axes = parentArray.getAxisList(); int[] maxDataIndices = new int[axes.size()]; for(int i = 0; i < axes.size(); i++) { maxDataIndices[i]=((Axis) axes.get(i)).getLength(); } //update the *maxDimensionIndex* attribute return maxDataIndices;}
4,611
public Number incrementDimension(Axis axis) { Number dim = getDimension(); if (dim.intValue()==0) { //add first dimension data.add(null); data.add(null); return setDimension(new Integer(1)); } if (dim.intValue() == 1) { //add second dimension int length = axis.getLength(); for (int i = 2; i < 2*length; i++) data.add(i,null); } else{ //dimension >= 2 List oldData = data; int length = axis.getLength(); data = Collections.synchronizedList(new ArrayList(length)); data.add(0,oldData); for (int i = 1; i < length; i++) data.add(i,null); } return setDimension(new Integer(dim.intValue()+1));}
public Number incrementDimension(Axis axis) { Number dim = getDimension(); if (dim.intValue()==0) { //add first dimension data.add(null); data.add(null); return setDimension(new Integer(1)); } if (dim.intValue() == 1) { //add second dimension int length = axis.getLength(); for (int i = 2; i < 2*length; i++) data.add(i,null); } else{ //dimension >= 2 List oldData = data; int length = axis.getLength(); data = Collections.synchronizedList(new ArrayList(length)); data.add(0,oldData); for (int i = 1; i < length; i++) data.add(i,null); } return setDimension(new Integer(dim.intValue()+1));}
4,612
public Number incrementDimension(Axis axis) { Number dim = getDimension(); if (dim.intValue()==0) { //add first dimension data.add(null); data.add(null); return setDimension(new Integer(1)); } if (dim.intValue() == 1) { //add second dimension int length = axis.getLength(); for (int i = 2; i < 2*length; i++) data.add(i,null); } else{ //dimension >= 2 List oldData = data; int length = axis.getLength(); data = Collections.synchronizedList(new ArrayList(length)); data.add(0,oldData); for (int i = 1; i < length; i++) data.add(i,null); } return setDimension(new Integer(dim.intValue()+1));}
public Number incrementDimension(Axis axis) { Number dim = getDimension(); if (dim.intValue()==0) { //add first dimension data.add(null); data.add(null); return dimension++; } if (dim.intValue() == 1) { //add second dimension int length = axis.getLength(); for (int i = 2; i < 2*length; i++) data.add(i,null); } else{ //dimension >= 2 List oldData = data; int length = axis.getLength(); data = Collections.synchronizedList(new ArrayList(length)); data.add(0,oldData); for (int i = 1; i < length; i++) data.add(i,null); } return setDimension(new Integer(dim.intValue()+1));}
4,613
public Number incrementDimension(Axis axis) { Number dim = getDimension(); if (dim.intValue()==0) { //add first dimension data.add(null); data.add(null); return setDimension(new Integer(1)); } if (dim.intValue() == 1) { //add second dimension int length = axis.getLength(); for (int i = 2; i < 2*length; i++) data.add(i,null); } else{ //dimension >= 2 List oldData = data; int length = axis.getLength(); data = Collections.synchronizedList(new ArrayList(length)); data.add(0,oldData); for (int i = 1; i < length; i++) data.add(i,null); } return setDimension(new Integer(dim.intValue()+1));}
public Number incrementDimension(Axis axis) { Number dim = getDimension(); if (dim.intValue()==0) { //add first dimension data.add(null); data.add(null); return setDimension(new Integer(1)); } if (dimension == 1) { //add second dimension int length = axis.getLength(); for (int i = 2; i < 2*length; i++) data.add(i,null); } else{ //dimension >= 2 List oldData = data; int length = axis.getLength(); data = Collections.synchronizedList(new ArrayList(length)); data.add(0,oldData); for (int i = 1; i < length; i++) data.add(i,null); } return setDimension(new Integer(dim.intValue()+1));}
4,614
public Number incrementDimension(Axis axis) { Number dim = getDimension(); if (dim.intValue()==0) { //add first dimension data.add(null); data.add(null); return setDimension(new Integer(1)); } if (dim.intValue() == 1) { //add second dimension int length = axis.getLength(); for (int i = 2; i < 2*length; i++) data.add(i,null); } else{ //dimension >= 2 List oldData = data; int length = axis.getLength(); data = Collections.synchronizedList(new ArrayList(length)); data.add(0,oldData); for (int i = 1; i < length; i++) data.add(i,null); } return setDimension(new Integer(dim.intValue()+1));}
public Number incrementDimension(Axis axis) { Number dim = getDimension(); if (dim.intValue()==0) { //add first dimension data.add(null); data.add(null); return setDimension(new Integer(1)); } if (dim.intValue() == 1) { //add second dimension int length = axis.getLength(); for (int i = 2; i < 2*length; i++) data.add(i,null); } else{ //dimension >= 2 List oldData = data; int length = axis.getLength(); data = Collections.synchronizedList(new ArrayList(length)); data.add(0,oldData); for (int i = 1; i < length; i++) data.add(i,null); } return setDimension(new Integer(dim.intValue()+1));}
4,615
private void init() { classXDFNodeName = "data"; // order matters! these are in *reverse* order of their // occurence in the XDF DTD attribOrder.add(0,"maxDimensionIndex"); attribOrder.add(0,"dimension"); attribOrder.add(0,"compression"); attribOrder.add(0,"checksum"); attribOrder.add(0,"href"); //set up the attribute hashtable key with the default initial value attribHash.put("maxDimensionIndex", new XMLAttribute(Collections.synchronizedList(new ArrayList()), Constants.LIST_TYPE)); attribHash.put("dimension", new XMLAttribute(new Integer(0), Constants.NUMBER_TYPE)); attribHash.put("compression", new XMLAttribute(null, Constants.STRING_TYPE)); //double check init value attribHash.put("checksum", new XMLAttribute(new Double(0), Constants.NUMBER_TYPE)); //double check attribHash.put("href", new XMLAttribute(null, Constants.STRING_TYPE)); };
private void init() { classXDFNodeName = "data"; // order matters! these are in *reverse* order of their // occurence in the XDF DTD attribOrder.add(0,"maxDimensionIndex"); attribOrder.add(0,"dimension"); attribOrder.add(0,"compression"); attribOrder.add(0,"checksum"); attribOrder.add(0,"href"); //set up the attribute hashtable key with the default initial value attribHash.put("maxDimensionIndex", new XMLAttribute(Collections.synchronizedList(new ArrayList()), Constants.LIST_TYPE)); attribHash.put("dimension", new XMLAttribute(new Integer(0), Constants.NUMBER_TYPE)); attribHash.put("compression", new XMLAttribute(null, Constants.STRING_TYPE)); //double check init value attribHash.put("checksum", new XMLAttribute(new Double(0), Constants.NUMBER_TYPE)); //double check attribHash.put("href", new XMLAttribute(null, Constants.STRING_TYPE)); };
4,616
private void init() { classXDFNodeName = "data"; // order matters! these are in *reverse* order of their // occurence in the XDF DTD attribOrder.add(0,"maxDimensionIndex"); attribOrder.add(0,"dimension"); attribOrder.add(0,"compression"); attribOrder.add(0,"checksum"); attribOrder.add(0,"href"); //set up the attribute hashtable key with the default initial value attribHash.put("maxDimensionIndex", new XMLAttribute(Collections.synchronizedList(new ArrayList()), Constants.LIST_TYPE)); attribHash.put("dimension", new XMLAttribute(new Integer(0), Constants.NUMBER_TYPE)); attribHash.put("compression", new XMLAttribute(null, Constants.STRING_TYPE)); //double check init value attribHash.put("checksum", new XMLAttribute(new Double(0), Constants.NUMBER_TYPE)); //double check attribHash.put("href", new XMLAttribute(null, Constants.STRING_TYPE)); };
private void init() { classXDFNodeName = "data"; // order matters! these are in *reverse* order of their // occurence in the XDF DTD attribOrder.add(0,"maxDimensionIndex"); attribOrder.add(0,"dimension"); attribOrder.add(0,"compression"); attribOrder.add(0,"checksum"); attribOrder.add(0,"href"); //set up the attribute hashtable key with the default initial value attribHash.put("maxDimensionIndex", new XMLAttribute(Collections.synchronizedList(new ArrayList()), Constants.LIST_TYPE)); attribHash.put("dimension", new XMLAttribute(new Integer(0), Constants.NUMBER_TYPE)); attribHash.put("compression", new XMLAttribute(null, Constants.STRING_TYPE)); //double check init value attribHash.put("checksum", new XMLAttribute(new Double(0), Constants.NUMBER_TYPE)); //double check attribHash.put("href", new XMLAttribute(null, Constants.STRING_TYPE)); };
4,617
private void init() { classXDFNodeName = "data"; // order matters! these are in *reverse* order of their // occurence in the XDF DTD attribOrder.add(0,"maxDimensionIndex"); attribOrder.add(0,"dimension"); attribOrder.add(0,"compression"); attribOrder.add(0,"checksum"); attribOrder.add(0,"href"); //set up the attribute hashtable key with the default initial value attribHash.put("maxDimensionIndex", new XMLAttribute(Collections.synchronizedList(new ArrayList()), Constants.LIST_TYPE)); attribHash.put("dimension", new XMLAttribute(new Integer(0), Constants.NUMBER_TYPE)); attribHash.put("compression", new XMLAttribute(null, Constants.STRING_TYPE)); //double check init value attribHash.put("checksum", new XMLAttribute(new Double(0), Constants.NUMBER_TYPE)); //double check attribHash.put("href", new XMLAttribute(null, Constants.STRING_TYPE)); };
private void init() { classXDFNodeName = "data"; // order matters! these are in *reverse* order of their // occurence in the XDF DTD attribOrder.add(0,"maxDimensionIndex"); attribOrder.add(0,"dimension"); attribOrder.add(0,"compression"); attribOrder.add(0,"checksum"); attribOrder.add(0,"href"); //set up the attribute hashtable key with the default initial value attribHash.put("maxDimensionIndex", new XMLAttribute(Collections.synchronizedList(new ArrayList()), Constants.LIST_TYPE)); attribHash.put("dimension", new XMLAttribute(new Integer(0), Constants.NUMBER_TYPE)); attribHash.put("compression", new XMLAttribute(null, Constants.STRING_TYPE)); //double check init value attribHash.put("encoding", new XMLAttribute(null, Constants.STRING_TYPE)); attribHash.put("checksum", new XMLAttribute(null, Constants.NUMBER_TYPE)); //double check attribHash.put("href", new XMLAttribute(null, Constants.STRING_TYPE)); };
4,618
public Number setChecksum (Number checksum) { Log.info("in DataCube.setChecksum()"); return (Number) ((XMLAttribute) attribHash.get("checksum")).setAttribValue(checksum);}
public Number setChecksum (Number checksum) { Log.info("in DataCube.setChecksum()"); return (Number) ((XMLAttribute) attribHash.get("checksum")).setAttribValue(checksum);}
4,619