PageRenderTime 81ms CodeModel.GetById 77ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/jEdit/tags/jedit-4-0-pre5/org/gjt/sp/jedit/syntax/SyntaxStyle.java

#
Java | 73 lines | 27 code | 6 blank | 40 comment | 0 complexity | 9a896c434839684e75c7d9b91aa00a1e MD5 | raw file
 1/*
 2 * SyntaxStyle.java - A simple text style class
 3 * Copyright (C) 1999, 2001 Slava Pestov
 4 *
 5 * This program is free software; you can redistribute it and/or
 6 * modify it under the terms of the GNU General Public License
 7 * as published by the Free Software Foundation; either version 2
 8 * of the License, or any later version.
 9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
18 */
19package org.gjt.sp.jedit.syntax;
20
21import java.awt.Font;
22import java.awt.Color;
23
24/**
25 * A simple text style class. It can specify the color, italic flag,
26 * and bold flag of a run of text.
27 * @author Slava Pestov
28 * @version $Id: SyntaxStyle.java 3942 2001-12-24 03:21:25Z spestov $
29 */
30public class SyntaxStyle
31{
32	/**
33	 * Creates a new SyntaxStyle.
34	 * @param fgColor The text color
35	 * @param bgColor The background color
36	 * @param font The text font
37	 */
38	public SyntaxStyle(Color fgColor, Color bgColor, Font font)
39	{
40		this.fgColor = fgColor;
41		this.bgColor = bgColor;
42		this.font = font;
43	}
44
45	/**
46	 * Returns the text color.
47	 */
48	public Color getForegroundColor()
49	{
50		return fgColor;
51	}
52
53	/**
54	 * Returns the background color.
55	 */
56	public Color getBackgroundColor()
57	{
58		return bgColor;
59	}
60
61	/**
62	 * Returns the style font.
63	 */
64	public Font getFont()
65	{
66		return font;
67	}
68
69	// private members
70	private Color fgColor;
71	private Color bgColor;
72	private Font font;
73}