KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > jac > aspects > gui > swing > SHEditorConfig


1 /*
2   Copyright (C) 2003 Laurent Martelli <laurent@aopsys.com>
3   
4   This program is free software; you can redistribute it and/or modify
5   it under the terms of the GNU Lesser General Public License as
6   published by the Free Software Foundation; either version 2 of the
7   License, or (at your option) any later version.
8
9   This program is distributed in the hope that it will be useful, but
10   WITHOUT ANY WARRANTY; without even the implied warranty of
11   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12   Lesser General Public License for more details.
13
14   You should have received a copy of the GNU Lesser General Public
15   License along with this program; if not, write to the Free Software
16   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
17   USA */

18
19
20 package org.objectweb.jac.aspects.gui.swing;
21
22 import java.awt.Color JavaDoc;
23
24 /**
25  * Holds the configuration of the Java source code editor
26  */

27 public class SHEditorConfig
28 {
29     Color JavaDoc ignoreColor = new Color JavaDoc(0, 150, 0);
30     public Color JavaDoc getIgnoreColor() {
31         return ignoreColor;
32     }
33     public void setIgnoreColor(Color JavaDoc ignoreColor) {
34         this.ignoreColor = ignoreColor;
35     }
36
37     Color JavaDoc stringColor = new Color JavaDoc(0,100,0);
38     public Color JavaDoc getStringColor() {
39         return stringColor;
40     }
41     public void setStringColor(Color JavaDoc stringColor) {
42         this.stringColor = stringColor;
43     }
44
45     Color JavaDoc textColor = Color.black;
46     public Color JavaDoc getTextColor() {
47         return textColor;
48     }
49     public void setTextColor(Color JavaDoc textColor) {
50         this.textColor = textColor;
51     }
52
53     Color JavaDoc backgroundColor = Color.white;
54     public Color JavaDoc getBackgroundColor() {
55         return backgroundColor;
56     }
57     public void setBackgroundColor(Color JavaDoc backgroundColor) {
58         this.backgroundColor = backgroundColor;
59     }
60
61
62     Color JavaDoc selectionColor = new Color JavaDoc(210,210,210);
63     public Color JavaDoc getSelectionColor() {
64         return selectionColor;
65     }
66     public void setSelectionColor(Color JavaDoc color) {
67         this.selectionColor = color;
68     }
69
70     Color JavaDoc completionColor = Color.cyan;
71     public Color JavaDoc getCompletionColor() {
72         return completionColor;
73     }
74     public void setCompletionColor(Color JavaDoc color) {
75         this.completionColor = color;
76     }
77
78     Color JavaDoc keywordColor = Color.blue;
79     public Color JavaDoc getKeywordColor() {
80         return keywordColor;
81     }
82     public void setKeywordColor(Color JavaDoc keywordColor) {
83         this.keywordColor = keywordColor;
84     }
85
86     Color JavaDoc modifierColor = Color.magenta;
87     public Color JavaDoc getModifierColor() {
88         return modifierColor;
89     }
90     public void setModifierColor(Color JavaDoc modifierColor) {
91         this.modifierColor = modifierColor;
92     }
93
94     Color JavaDoc typeColor = new Color JavaDoc(255, 69, 0);
95     public Color JavaDoc getTypeColor() {
96         return typeColor;
97     }
98     public void setTypeColor(Color JavaDoc typeColor) {
99         this.typeColor = typeColor;
100     }
101
102     Color JavaDoc clampColor = new Color JavaDoc(0, 120, 120);
103     public Color JavaDoc getClampColor() {
104         return clampColor;
105     }
106     public void setClampColor(Color JavaDoc clampColor) {
107         this.clampColor = clampColor;
108     }
109
110     Color JavaDoc lineNrBgColor = new Color JavaDoc(180, 180, 180);
111     public Color JavaDoc getLineNrBgColor() {
112         return lineNrBgColor;
113     }
114     public void setLineNrBgColor(Color JavaDoc lineNrBgColor) {
115         this.lineNrBgColor = lineNrBgColor;
116     }
117
118     Color JavaDoc lineNrColor = new Color JavaDoc(200, 0, 0);
119     public Color JavaDoc getLineNrColor() {
120         return lineNrColor;
121     }
122     public void setLineNrColor(Color JavaDoc lineNrColor) {
123         this.lineNrColor = lineNrColor;
124     }
125    
126     /** number of spaces equivalent to a tab character */
127     int tabWidth = 4;
128     public void setTabWidth(int tabWidth) {
129         this.tabWidth = tabWidth;
130     }
131     public int getTabWidth() {
132         return tabWidth;
133     }
134
135     /** wether to display line numbers in the left margin */
136     boolean showLineNumbers = false;
137     public void setShowLineNumbers(boolean showLineNumbers) {
138         this.showLineNumbers = showLineNumbers;
139     }
140     public boolean getShowLineNumbers() {
141         return showLineNumbers;
142     }
143
144     /** wether to complete on each keystroke */
145     boolean autoComplete = true;
146     public void setAutoComplete(boolean autoComplete) {
147         this.autoComplete = autoComplete;
148     }
149     public boolean isAutoComplete() {
150         return autoComplete;
151     }
152 }
153
Popular Tags