001    /*
002      Copyright (C) 2003 Laurent Martelli <laurent@aopsys.com>
003      
004      This program is free software; you can redistribute it and/or modify
005      it under the terms of the GNU Lesser General Public License as
006      published by the Free Software Foundation; either version 2 of the
007      License, or (at your option) any later version.
008    
009      This program is distributed in the hope that it will be useful, but
010      WITHOUT ANY WARRANTY; without even the implied warranty of
011      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
012      Lesser General Public License for more details.
013    
014      You should have received a copy of the GNU Lesser General Public
015      License along with this program; if not, write to the Free Software
016      Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
017      USA */
018    
019    
020    package org.objectweb.jac.aspects.gui.swing;
021    
022    import java.awt.Color;
023    
024    /**
025     * Holds the configuration of the Java source code editor
026     */
027    public class SHEditorConfig 
028    {
029        Color ignoreColor = new Color(0, 150, 0);
030        public Color getIgnoreColor() {
031            return ignoreColor;
032        }
033        public void setIgnoreColor(Color ignoreColor) {
034            this.ignoreColor = ignoreColor;
035        }
036    
037        Color stringColor = new Color(0,100,0);
038        public Color getStringColor() {
039            return stringColor;
040        }
041        public void setStringColor(Color stringColor) {
042            this.stringColor = stringColor;
043        }
044    
045        Color textColor = Color.black;
046        public Color getTextColor() {
047            return textColor;
048        }
049        public void setTextColor(Color textColor) {
050            this.textColor = textColor;
051        }
052    
053        Color backgroundColor = Color.white;
054        public Color getBackgroundColor() {
055            return backgroundColor;
056        }
057        public void setBackgroundColor(Color backgroundColor) {
058            this.backgroundColor = backgroundColor;
059        }
060    
061    
062        Color selectionColor = new Color(210,210,210);
063        public Color getSelectionColor() {
064            return selectionColor;
065        }
066        public void setSelectionColor(Color color) {
067            this.selectionColor = color;
068        }
069    
070        Color completionColor = Color.cyan;
071        public Color getCompletionColor() {
072            return completionColor;
073        }
074        public void setCompletionColor(Color color) {
075            this.completionColor = color;
076        }
077    
078        Color keywordColor = Color.blue;
079        public Color getKeywordColor() {
080            return keywordColor;
081        }
082        public void setKeywordColor(Color keywordColor) {
083            this.keywordColor = keywordColor;
084        }
085    
086        Color modifierColor = Color.magenta;
087        public Color getModifierColor() {
088            return modifierColor;
089        }
090        public void setModifierColor(Color modifierColor) {
091            this.modifierColor = modifierColor;
092        }
093    
094        Color typeColor = new Color(255, 69, 0);
095        public Color getTypeColor() {
096            return typeColor;
097        }
098        public void setTypeColor(Color typeColor) {
099            this.typeColor = typeColor;
100        }
101    
102        Color clampColor =  new Color(0, 120, 120);
103        public Color getClampColor() {
104            return clampColor;
105        }
106        public void setClampColor(Color clampColor) {
107            this.clampColor = clampColor;
108        }
109    
110        Color lineNrBgColor = new Color(180, 180, 180);
111        public Color getLineNrBgColor() {
112            return lineNrBgColor;
113        }
114        public void setLineNrBgColor(Color lineNrBgColor) {
115            this.lineNrBgColor = lineNrBgColor;
116        }
117    
118        Color lineNrColor = new Color(200, 0, 0);
119        public Color getLineNrColor() {
120            return lineNrColor;
121        }
122        public void setLineNrColor(Color 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    }