source: other-projects/rsyntax-textarea/src/java/org/fife/ui/rtextarea/BackgroundPainterStrategy.java@ 25584

Last change on this file since 25584 was 25584, checked in by davidb, 12 years ago

Initial cut an a text edit area for GLI that supports color syntax highlighting

File size: 1.3 KB
Line 
1/*
2 * 01/22/2005
3 *
4 * BackgroundPainterStrategy.java - Renders an RTextAreaBase's background
5 * using some strategy.
6 *
7 * This library is distributed under a modified BSD license. See the included
8 * RSyntaxTextArea.License.txt file for details.
9 */
10package org.fife.ui.rtextarea;
11
12import java.awt.Graphics;
13import java.awt.Rectangle;
14
15
16/**
17 * Interface for classes that paint the background of an
18 * <code>RTextAreaBase</code>. The Strategy pattern is used for this
19 * object because the background can be painted as a solid color, as
20 * an image, and possibly other ways (gradients, animated images, etc.).
21 * When a method to change the background of an <code>RTextAreaBase</code>
22 * instance is called (such as <code>setBackground</code>,
23 * <code>setBackgroundImage</code> or <code>setBackgoundObject</code>),
24 * the correct strategy is then created and used to paint its background.
25 *
26 * @author Robert Futrell
27 * @version 0.1
28 * @see org.fife.ui.rtextarea.ImageBackgroundPainterStrategy
29 * @see org.fife.ui.rtextarea.ColorBackgroundPainterStrategy
30 */
31public interface BackgroundPainterStrategy {
32
33
34 /**
35 * Paints the background.
36 *
37 * @param g The graphics context.
38 * @param bounds The bounds of the object whose backgrouns we're
39 * painting.
40 */
41 public void paint(Graphics g, Rectangle bounds);
42
43
44}
Note: See TracBrowser for help on using the repository browser.