KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > editor > ext > ExtSettingsDefaults


1 /*
2  * The contents of this file are subject to the terms of the Common Development
3  * and Distribution License (the License). You may not use this file except in
4  * compliance with the License.
5  *
6  * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
7  * or http://www.netbeans.org/cddl.txt.
8  *
9  * When distributing Covered Code, include this CDDL Header Notice in each file
10  * and include the License file at http://www.netbeans.org/cddl.txt.
11  * If applicable, add the following below the CDDL Header, with the fields
12  * enclosed by brackets [] replaced by your own identifying information:
13  * "Portions Copyrighted [year] [name of copyright owner]"
14  *
15  * The Original Software is NetBeans. The Initial Developer of the Original
16  * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
17  * Microsystems, Inc. All Rights Reserved.
18  */

19
20 package org.netbeans.editor.ext;
21
22 import java.awt.Color JavaDoc;
23 import java.awt.Dimension JavaDoc;
24 import java.awt.event.InputEvent JavaDoc;
25 import java.awt.event.KeyEvent JavaDoc;
26 import java.util.Arrays JavaDoc;
27 import java.util.List JavaDoc;
28 import java.util.ArrayList JavaDoc;
29 import java.util.Map JavaDoc;
30 import java.util.HashMap JavaDoc;
31 import javax.swing.KeyStroke JavaDoc;
32 import javax.swing.text.JTextComponent JavaDoc;
33 import org.netbeans.editor.Coloring;
34 import org.netbeans.editor.Settings;
35 import org.netbeans.editor.SettingsUtil;
36 import org.netbeans.editor.SettingsNames;
37 import org.netbeans.editor.SettingsDefaults;
38 import org.netbeans.editor.BaseKit;
39 import org.netbeans.editor.MultiKeyBinding;
40
41 /**
42 * Initializer for the extended editor settings.
43 *
44 * @author Miloslav Metelka
45 * @version 1.00
46 */

47
48 public class ExtSettingsDefaults extends SettingsDefaults {
49
50     // Highlight row with caret coloring
51
public static final Color JavaDoc defaultHighlightCaretRowBackColor = new Color JavaDoc(255, 255, 220);
52     public static final Coloring defaultHighlightCaretRowColoring
53     = new Coloring(null, null, defaultHighlightCaretRowBackColor);
54     // Highlight matching brace coloring
55
public static final Color JavaDoc defaultHighlightMatchBraceForeColor = Color.white;
56     public static final Color JavaDoc defaultHighlightMatchBraceBackColor = new Color JavaDoc(255, 50, 210);
57     public static final Coloring defaultHighlightMatchBraceColoring
58     = new Coloring(null, defaultHighlightMatchBraceForeColor, defaultHighlightMatchBraceBackColor);
59
60     public static final Boolean JavaDoc defaultHighlightCaretRow = Boolean.TRUE;
61     public static final Boolean JavaDoc defaultHighlightMatchBrace = Boolean.TRUE;
62     public static final Integer JavaDoc defaultHighlightMatchBraceDelay = new Integer JavaDoc(100);
63     public static final Boolean JavaDoc defaultCaretSimpleMatchBrace = Boolean.TRUE;
64
65     public static final Boolean JavaDoc defaultCompletionAutoPopup = Boolean.TRUE;
66     public static final Boolean JavaDoc defaultCompletionCaseSensitive = Boolean.FALSE;
67     public static final Boolean JavaDoc defaultCompletionNaturalSort = Boolean.FALSE;
68     public static final Integer JavaDoc defaultCompletionAutoPopupDelay = new Integer JavaDoc(250);
69     public static final Integer JavaDoc defaultCompletionRefreshDelay = new Integer JavaDoc(200);
70     public static final Dimension JavaDoc defaultCompletionPaneMaxSize = new Dimension JavaDoc(400, 300);
71     public static final Dimension JavaDoc defaultCompletionPaneMinSize = new Dimension JavaDoc(60, 17);
72     public static final Boolean JavaDoc defaultFastImportPackage = Boolean.FALSE;
73     public static final Integer JavaDoc defaultFastImportSelection = new Integer JavaDoc(0);
74     public static final Boolean JavaDoc defaultShowDeprecatedMembers = Boolean.TRUE;
75     public static final Boolean JavaDoc defaultCompletionInstantSubstitution = Boolean.TRUE;
76     
77     public static final Color JavaDoc defaultJavaDocBGColor = new Color JavaDoc(247, 247, 255);
78     public static final Integer JavaDoc defaultJavaDocAutoPopupDelay = new Integer JavaDoc(200);
79     public static final Dimension JavaDoc defaultJavaDocPreferredSize = new Dimension JavaDoc(500, 300);
80     public static final Boolean JavaDoc defaultJavaDocAutoPopup = Boolean.TRUE;
81     private static int MENU_MASK = java.awt.Toolkit.getDefaultToolkit().getMenuShortcutKeyMask();
82     
83     
84 // public static final MultiKeyBinding[] defaultExtKeyBindings
85
// = new MultiKeyBinding[] {
86
// /*new MultiKeyBinding(
87
// KeyStroke.getKeyStroke(KeyEvent.VK_G, InputEvent.ALT_MASK),
88
// ExtKit.gotoDeclarationAction
89
// ),
90
// */
91
// new MultiKeyBinding(
92
// KeyStroke.getKeyStroke(KeyEvent.VK_F, MENU_MASK),
93
// ExtKit.findAction
94
// ),
95
// new MultiKeyBinding(
96
// KeyStroke.getKeyStroke(KeyEvent.VK_FIND, 0),
97
// ExtKit.findAction
98
// ),
99
// new MultiKeyBinding(
100
// KeyStroke.getKeyStroke(KeyEvent.VK_H, MENU_MASK),
101
// ExtKit.replaceAction
102
// ),
103
// new MultiKeyBinding(
104
// KeyStroke.getKeyStroke(KeyEvent.VK_G, InputEvent.CTRL_MASK),
105
// ExtKit.gotoAction
106
// ),
107
// new MultiKeyBinding(
108
// KeyStroke.getKeyStroke(KeyEvent.VK_SPACE, InputEvent.CTRL_MASK),
109
// ExtKit.completionShowAction
110
// ),
111
// new MultiKeyBinding( // Japanese Solaris uses CTRL+SPACE for IM
112
// KeyStroke.getKeyStroke(KeyEvent.VK_BACK_SLASH, InputEvent.CTRL_MASK),
113
// ExtKit.completionShowAction
114
// ),
115
///* new MultiKeyBinding(
116
// KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0),
117
// ExtKit.escapeAction
118
// ),*/
119
// new MultiKeyBinding(
120
// KeyStroke.getKeyStroke(KeyEvent.VK_OPEN_BRACKET, MENU_MASK),
121
// ExtKit.matchBraceAction
122
// ),
123
// new MultiKeyBinding(
124
// KeyStroke.getKeyStroke(KeyEvent.VK_OPEN_BRACKET, MENU_MASK | InputEvent.SHIFT_MASK),
125
// ExtKit.selectionMatchBraceAction
126
// ),
127
// new MultiKeyBinding(
128
// KeyStroke.getKeyStroke(KeyEvent.VK_F10, InputEvent.SHIFT_MASK),
129
// ExtKit.showPopupMenuAction
130
// ),
131
// /* new MultiKeyBinding(
132
// KeyStroke.getKeyStroke(KeyEvent.VK_U, MENU_MASK),
133
// // KeyStroke.getKeyStroke(KeyEvent.VK_BRACELEFT, MENU_MASK),
134
// ExtKit.braceCodeSelectAction
135
// ),
136
// */
137
//
138
// };
139

140 }
141
Popular Tags