Package javax.swing.text

Examples of javax.swing.text.StyledDocument.insertString()


                    StringBuffer statsBuff = new StringBuffer(100);
                    statsBuff.append(JMeterUtils.getResString("view_results_assertion_error")).append(res.isError()).append(NL); //$NON-NLS-1$
                    statsBuff.append(JMeterUtils.getResString("view_results_assertion_failure")).append(res.isFailure()).append(NL); //$NON-NLS-1$
                    statsBuff.append(JMeterUtils.getResString("view_results_assertion_failure_message")).append(res.getFailureMessage()).append(NL); //$NON-NLS-1$
                    statsDoc.insertString(statsDoc.getLength(), statsBuff.toString(), null);
                    statsBuff = null;
                }
            }
        } catch (BadLocationException exc) {
            log.error("Error setting statistics text", exc);
View Full Code Here


                    log.debug("valueChanged1 : load time - " + res.getTime());
                    if (res != null && res.getSamplerData() != null) {
                        sampleDataField.setText(res.getSamplerData().trim());
                    }

                    statsDoc.insertString(
                        statsDoc.getLength(),
                        "Load time: " + res.getTime() + "\n",
                        null);

                    String responseCode = res.getResponseCode();
View Full Code Here

                            break;
                        case 5 :
                            style = statsDoc.getStyle("ServerError");
                            break;
                    }
                    statsDoc.insertString(
                        statsDoc.getLength(),
                        "HTTP response code: " + responseCode + "\n",
                        style);

                    // response message label
View Full Code Here

                    // response message label
                    String responseMsgStr = res.getResponseMessage();

                    log.debug(
                        "valueChanged1 : response message - " + responseMsgStr);
                    statsDoc.insertString(
                        statsDoc.getLength(),
                        "HTTP response message: " + responseMsgStr + "\n",
                        null);

                    // get the text response and image icon
View Full Code Here

    text.setText("");
    StyledDocument doc = text.getStyledDocument();

    try {
      for (String line: strings) {
        doc.insertString(doc.getLength(), line + "\n", doc.getStyle("regular"));
      }
    } catch (BadLocationException ble) { }
    text.setCaretPosition(0);
  }
View Full Code Here

    text.setText("");
    StyledDocument doc = text.getStyledDocument();

    try {
      for (String rule: getRules())
        doc.insertString(doc.getLength(), rule + "\n", doc.getStyle("small"));
    } catch (BadLocationException e) {}

    text.setCaretPosition(0);
  }
View Full Code Here

    text.setText("");
    StyledDocument doc = text.getStyledDocument();

    try {
      for (String line: strings) {
        doc.insertString(doc.getLength(), line + "\n", doc.getStyle("regular"));
      }
    } catch (BadLocationException ble) { }
    text.setCaretPosition(0);
  }
View Full Code Here

        try {
            BufferedReader in = new BufferedReader(new FileReader(org.salamanca.
                    commands.CommandLogger.getLogFilePath()));
            String str;
            while ((str = in.readLine()) != null) {
                doc.insertString(doc.getLength(), str+lineSeparator, style);
            }
            in.close();
        } catch (IOException e) {
        } catch (BadLocationException ex) {
            /** @todo Handle this exception */
 
View Full Code Here

                statsBuff.append(JMeterUtils.getResString("view_results_size_in_bytes")).append(sampleResult.getBytes()).append(NL); //$NON-NLS-1$
                statsBuff.append(JMeterUtils.getResString("view_results_size_headers_in_bytes")).append(sampleResult.getHeadersSize()).append(NL); //$NON-NLS-1$
                statsBuff.append(JMeterUtils.getResString("view_results_size_body_in_bytes")).append(sampleResult.getBodySize()).append(NL); //$NON-NLS-1$
                statsBuff.append(JMeterUtils.getResString("view_results_sample_count")).append(sampleResult.getSampleCount()).append(NL); //$NON-NLS-1$
                statsBuff.append(JMeterUtils.getResString("view_results_error_count")).append(sampleResult.getErrorCount()).append(NL); //$NON-NLS-1$
                statsDoc.insertString(statsDoc.getLength(), statsBuff.toString(), null);
                statsBuff.setLength(0); // reset for reuse

                String responseCode = sampleResult.getResponseCode();

                int responseLevel = 0;
View Full Code Here

                    style = statsDoc.getStyle(STYLE_SERVER_ERROR);
                    break;
                }

                statsBuff.append(JMeterUtils.getResString("view_results_response_code")).append(responseCode).append(NL); //$NON-NLS-1$
                statsDoc.insertString(statsDoc.getLength(), statsBuff.toString(), style);
                statsBuff.setLength(0); // reset for reuse

                // response message label
                String responseMsgStr = sampleResult.getResponseMessage();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.