All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.eclipse.swt.custom.StyledTextPrintOptions Maven / Gradle / Ivy

Go to download

The osx x86_64 swt jar as available in the Eclipse 4.6 (Neon) release for OSX. It is suitable for use with jface and other dependencies available from maven central in the org.eclipse.scout.sdk.deps group. The sources is copied from swt-4.6-cocoa-macosx-x86_64.zip from http://download.eclipse.org/eclipse/downloads/drops4/R-4.6-201606061100/ and javadoc is generated from sources.

The newest version!
/*******************************************************************************
 * Copyright (c) 2000, 2008 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
package org.eclipse.swt.custom;

/**
 * Use StyledTextPrintOptions to specify printing options for the
 * StyledText.print(Printer, StyledTextPrintOptions) API.
 * 

* The following example prints a right aligned page number in the footer, * sets the job name to "Example" and prints line background colors but no other * formatting: *

*
 * StyledTextPrintOptions options = new StyledTextPrintOptions();
 * options.footer = "\t\t<page>";
 * options.jobName = "Example";
 * options.printLineBackground = true;
 *
 * Runnable runnable = styledText.print(new Printer(), options);
 * runnable.run();
 * 
* * @see Sample code and further information * * @since 2.1 */ public class StyledTextPrintOptions { /** * Page number placeholder constant for use in header * and footer. Value is <page> */ public static final String PAGE_TAG = ""; /** * Separator constant for use in header and * footer. Value is \t */ public static final String SEPARATOR = "\t"; /** * Formatted text to print in the header of each page. *

"left '\t' center '\t' right"

*

left, center, right = <page> | #CDATA

*

Header and footer are defined as three separate regions for arbitrary * text or the page number placeholder <page> * (StyledTextPrintOptions.PAGE_TAG). The three regions are * left aligned, centered and right aligned. They are separated by a tab * character (StyledTextPrintOptions.SEPARATOR). */ public String header = null; /** * Formatted text to print in the footer of each page. *

"left '\t' center '\t' right"

*

left, center, right = <page> | #CDATA

*

Header and footer are defined as three separate regions for arbitrary * text or the page number placeholder <page> * (StyledTextPrintOptions.PAGE_TAG). The three regions are * left aligned, centered and right aligned. They are separated by a tab * character (StyledTextPrintOptions.SEPARATOR). */ public String footer = null; /** * Name of the print job. */ public String jobName = null; /** * Print the text foreground color. Default value is false. */ public boolean printTextForeground = false; /** * Print the text background color. Default value is false. */ public boolean printTextBackground = false; /** * Print the font styles. Default value is false. */ public boolean printTextFontStyle = false; /** * Print the line background color. Default value is false. */ public boolean printLineBackground = false; /** * Print line numbers. Default value is false. * * @since 3.3 */ public boolean printLineNumbers = false; /** * Labels used for printing line numbers. * * @since 3.4 */ public String[] lineLabels = null; }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy