1
2
3
4
5
6
7
8
9 package com.ochafik.swing.syntaxcoloring;
10
11 import java.awt.Color;
12
13 import javax.swing.JPopupMenu;
14
15
16
17
18
19
20
21 public class TextAreaDefaults
22 {
23
24
25 public InputHandler inputHandler;
26 public SyntaxDocument document;
27 public boolean editable;
28
29 public boolean caretVisible;
30 public boolean caretBlinks;
31 public boolean blockCaret;
32 public int electricScroll;
33
34 public int cols;
35 public int rows;
36 public SyntaxStyle[] styles;
37 public Color caretColor;
38 public Color selectionColor;
39 public Color lineHighlightColor;
40 public boolean lineHighlight;
41 public Color bracketHighlightColor;
42 public boolean bracketHighlight;
43 public Color eolMarkerColor;
44 public boolean eolMarkers;
45 public boolean paintInvalid;
46
47 public JPopupMenu popup;
48
49
50
51
52
53 public static TextAreaDefaults getDefaults()
54 {
55
56
57 TextAreaDefaults DEFAULTS;
58 DEFAULTS = new TextAreaDefaults();
59
60 DEFAULTS.inputHandler = new DefaultInputHandler();
61 DEFAULTS.inputHandler.addDefaultKeyBindings();
62 DEFAULTS.document = new SyntaxDocument();
63 DEFAULTS.editable = true;
64
65 DEFAULTS.caretVisible = true;
66 DEFAULTS.caretBlinks = true;
67 DEFAULTS.electricScroll = 3;
68
69 DEFAULTS.cols = 80;
70 DEFAULTS.rows = 25;
71 DEFAULTS.styles = SyntaxUtilities.getDefaultSyntaxStyles();
72 DEFAULTS.caretColor = Color.red;
73 DEFAULTS.selectionColor = new Color(0xccccff);
74 DEFAULTS.lineHighlightColor = new Color(0xe0e0e0);
75 DEFAULTS.lineHighlight = true;
76 DEFAULTS.bracketHighlightColor = Color.black;
77 DEFAULTS.bracketHighlight = true;
78 DEFAULTS.eolMarkerColor = new Color(0x009999);
79 DEFAULTS.eolMarkers = true;
80 DEFAULTS.paintInvalid = true;
81
82
83 return DEFAULTS;
84 }
85 }