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