PageRenderTime 46ms CodeModel.GetById 16ms RepoModel.GetById 0ms app.codeStats 0ms

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

#
Java | 73 lines | 27 code | 6 blank | 40 comment | 0 complexity | 8feba02f74e401d12caa1036ee603eca MD5 | raw file
Possible License(s): BSD-3-Clause, AGPL-1.0, Apache-2.0, LGPL-2.0, LGPL-3.0, GPL-2.0, CC-BY-SA-3.0, LGPL-2.1, GPL-3.0, MPL-2.0-no-copyleft-exception, IPL-1.0
  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. */
  19. package org.gjt.sp.jedit.syntax;
  20. import java.awt.Font;
  21. import java.awt.Color;
  22. /**
  23. * A simple text style class. It can specify the color, italic flag,
  24. * and bold flag of a run of text.
  25. * @author Slava Pestov
  26. * @version $Id: SyntaxStyle.java 5540 2006-07-06 10:02:29Z $
  27. */
  28. public class SyntaxStyle
  29. {
  30. /**
  31. * Creates a new SyntaxStyle.
  32. * @param fgColor The text color
  33. * @param bgColor The background color
  34. * @param font The text font
  35. */
  36. public SyntaxStyle(Color fgColor, Color bgColor, Font font)
  37. {
  38. this.fgColor = fgColor;
  39. this.bgColor = bgColor;
  40. this.font = font;
  41. }
  42. /**
  43. * Returns the text color.
  44. */
  45. public Color getForegroundColor()
  46. {
  47. return fgColor;
  48. }
  49. /**
  50. * Returns the background color.
  51. */
  52. public Color getBackgroundColor()
  53. {
  54. return bgColor;
  55. }
  56. /**
  57. * Returns the style font.
  58. */
  59. public Font getFont()
  60. {
  61. return font;
  62. }
  63. // private members
  64. private Color fgColor;
  65. private Color bgColor;
  66. private Font font;
  67. }