KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > editor > PrintContainer


1 /*
2  * The contents of this file are subject to the terms of the Common Development
3  * and Distribution License (the License). You may not use this file except in
4  * compliance with the License.
5  *
6  * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
7  * or http://www.netbeans.org/cddl.txt.
8  *
9  * When distributing Covered Code, include this CDDL Header Notice in each file
10  * and include the License file at http://www.netbeans.org/cddl.txt.
11  * If applicable, add the following below the CDDL Header, with the fields
12  * enclosed by brackets [] replaced by your own identifying information:
13  * "Portions Copyrighted [year] [name of copyright owner]"
14  *
15  * The Original Software is NetBeans. The Initial Developer of the Original
16  * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
17  * Microsystems, Inc. All Rights Reserved.
18  */

19
20 package org.netbeans.editor;
21
22 import java.awt.Color JavaDoc;
23 import java.awt.Font JavaDoc;
24
25 /**
26 * Container for printed text. The parts of text attributed by font,
27 * fore and back color are added to it for the whole printed area.
28 *
29 * @author Miloslav Metelka
30 * @version 1.00
31 */

32
33 public interface PrintContainer {
34
35     /** Add the attributed characters to the container.
36      * @param chars characters being added.
37      * @param font font of the added characters
38      * @param foreColor foreground color of the added characters
39      * @param backColor background color of the added characters
40      */

41     public void add(char[] chars, Font JavaDoc font, Color JavaDoc foreColor, Color JavaDoc backColor);
42
43     /** End of line was found. */
44     public void eol();
45
46     /**
47      * @return true if the container needs to init empty line with
48      * at least one character. Printing then adds one space
49      * to each empty line.
50      * False means that the container is able to accept
51      * lines with no characters.
52      */

53     public boolean initEmptyLines();
54
55 }
56
Popular Tags