/** * Returns a runnable that will print the widget's text * to the specified printer. * <p> * The runnable may be run in a non-UI thread. * </p> * * @param printer the printer to print to * @param options print options to use during printing * * @return a <code>Runnable</code> for printing the receiver's text * * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT when printer or options is null</li> * </ul> * @since 2.1 */ public Runnable print(Printer printer, StyledTextPrintOptions options) { checkWidget(); if (printer == null || options == null) { SWT.error(SWT.ERROR_NULL_ARGUMENT); } return new Printing(this, printer, options); } /**
/** * Returns a runnable that will print the widget's text * to the specified printer. * <p> * The runnable may be run in a non-UI thread. * </p> * * @param printer the printer to print to * @param options print options to use during printing * * @return a <code>Runnable</code> for printing the receiver's text * * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT when printer or options is null</li> * </ul> * @since 2.1 */ public Runnable print(Printer printer, StyledTextPrintOptions options) { checkWidget(); if (printer == null || options == null) { SWT.error(SWT.ERROR_NULL_ARGUMENT); } return new Printing(this, printer, options); } /**
/** * Returns a runnable that will print the widget's text * to the specified printer. * <p> * The runnable may be run in a non-UI thread. * </p> * * @param printer the printer to print to * @param options print options to use during printing * * @return a <code>Runnable</code> for printing the receiver's text * * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT when printer or options is null</li> * </ul> * @since 2.1 */ public Runnable print(Printer printer, StyledTextPrintOptions options) { checkWidget(); if (printer == null || options == null) { SWT.error(SWT.ERROR_NULL_ARGUMENT); } return new Printing(this, printer, options); } /**
/** * Returns a runnable that will print the widget's text * to the specified printer. * <p> * The runnable may be run in a non-UI thread. * </p> * * @param printer the printer to print to * @param options print options to use during printing * * @return a <code>Runnable</code> for printing the receiver's text * * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT when printer or options is null</li> * </ul> * @since 2.1 */ public Runnable print(Printer printer, StyledTextPrintOptions options) { checkWidget(); if (printer == null || options == null) { SWT.error(SWT.ERROR_NULL_ARGUMENT); } return new Printing(this, printer, options); } /**
/** * Returns a runnable that will print the widget's text * to the specified printer. * <p> * The runnable may be run in a non-UI thread. * </p> * * @param printer the printer to print to * @param options print options to use during printing * * @return a <code>Runnable</code> for printing the receiver's text * * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT when printer or options is null</li> * </ul> * @since 2.1 */ public Runnable print(Printer printer, StyledTextPrintOptions options) { checkWidget(); if (printer == null || options == null) { SWT.error(SWT.ERROR_NULL_ARGUMENT); } return new Printing(this, printer, options); } /**
/** * Prints the widget's text to the default printer. * * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> */ public void print() { checkWidget(); Printer printer = new Printer(); StyledTextPrintOptions options = new StyledTextPrintOptions(); options.printTextForeground = true; options.printTextBackground = true; options.printTextFontStyle = true; options.printLineBackground = true; new Printing(this, printer, options).run(); printer.dispose(); } /**
/** * Prints the widget's text to the default printer. * * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> */ public void print() { checkWidget(); Printer printer = new Printer(); StyledTextPrintOptions options = new StyledTextPrintOptions(); options.printTextForeground = true; options.printTextBackground = true; options.printTextFontStyle = true; options.printLineBackground = true; new Printing(this, printer, options).run(); printer.dispose(); } /**
/** * Prints the widget's text to the default printer. * * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> */ public void print() { checkWidget(); Printer printer = new Printer(); StyledTextPrintOptions options = new StyledTextPrintOptions(); options.printTextForeground = true; options.printTextBackground = true; options.printTextFontStyle = true; options.printLineBackground = true; new Printing(this, printer, options).run(); printer.dispose(); } /**
/** * Prints the widget's text to the default printer. * * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> */ public void print() { checkWidget(); Printer printer = new Printer(); StyledTextPrintOptions options = new StyledTextPrintOptions(); options.printTextForeground = true; options.printTextBackground = true; options.printTextFontStyle = true; options.printLineBackground = true; new Printing(this, printer, options).run(); printer.dispose(); } /**
/** * Prints the widget's text to the default printer. * * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> */ public void print() { checkWidget(); Printer printer = new Printer(); StyledTextPrintOptions options = new StyledTextPrintOptions(); options.printTextForeground = true; options.printTextBackground = true; options.printTextFontStyle = true; options.printLineBackground = true; new Printing(this, printer, options).run(); printer.dispose(); } /**