Source Code Cross Referenced for SettingsDefaults.java in  » IDE-Netbeans » editor » org » netbeans » editor » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » IDE Netbeans » editor » org.netbeans.editor 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
003:         *
004:         * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
005:         *
006:         * The contents of this file are subject to the terms of either the GNU
007:         * General Public License Version 2 only ("GPL") or the Common
008:         * Development and Distribution License("CDDL") (collectively, the
009:         * "License"). You may not use this file except in compliance with the
010:         * License. You can obtain a copy of the License at
011:         * http://www.netbeans.org/cddl-gplv2.html
012:         * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
013:         * specific language governing permissions and limitations under the
014:         * License.  When distributing the software, include this License Header
015:         * Notice in each file and include the License file at
016:         * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
017:         * particular file as subject to the "Classpath" exception as provided
018:         * by Sun in the GPL Version 2 section of the License file that
019:         * accompanied this code. If applicable, add the following below the
020:         * License Header, with the fields enclosed by brackets [] replaced by
021:         * your own identifying information:
022:         * "Portions Copyrighted [year] [name of copyright owner]"
023:         *
024:         * Contributor(s):
025:         *
026:         * The Original Software is NetBeans. The Initial Developer of the Original
027:         * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
028:         * Microsystems, Inc. All Rights Reserved.
029:         *
030:         * If you wish your version of this file to be governed by only the CDDL
031:         * or only the GPL Version 2, indicate your decision by adding
032:         * "[Contributor] elects to include this software in this distribution
033:         * under the [CDDL or GPL Version 2] license." If you do not indicate a
034:         * single choice of license, a recipient has the option to distribute
035:         * your version of this file under either the CDDL, the GPL Version 2 or
036:         * to extend the choice of license to its licensees as provided above.
037:         * However, if you add GPL Version 2 code and therefore, elected the GPL
038:         * Version 2 license, then the option applies only if the new code is
039:         * made subject to such option by the copyright holder.
040:         */
041:
042:        package org.netbeans.editor;
043:
044:        import java.awt.Color;
045:        import java.awt.Font;
046:        import java.awt.Insets;
047:        import java.awt.Dimension;
048:        import java.awt.event.KeyEvent;
049:        import java.awt.event.InputEvent;
050:        import javax.swing.UIManager;
051:        import java.util.Map;
052:        import java.util.HashMap;
053:
054:        /**
055:         * Default values for the settings. They are used
056:         * by <tt>BaseSettingsInitializer</tt> to initialize
057:         * the settings with the default values. They can be also used
058:         * for substitution if the value of the particular setting
059:         * is unacceptable.
060:         *
061:         * @author Miloslav Metelka
062:         * @version 1.00
063:         */
064:
065:        public class SettingsDefaults {
066:
067:            private static final Integer INTEGER_MAX_VALUE = new Integer(
068:                    Integer.MAX_VALUE);
069:
070:            // Caret color
071:            public static final Color defaultCaretColor = Color.black;
072:
073:            // Empty coloring - it doesn't change font or colors
074:            public static final Coloring emptyColoring = new Coloring(null,
075:                    null, null);
076:
077:            // Default coloring
078:            private static int defaultFontSize; // Fix of #33249
079:            static {
080:                Integer customFontSize = (Integer) UIManager
081:                        .get("customFontSize"); // NOI18N
082:                if (customFontSize != null) {
083:                    defaultFontSize = customFontSize.intValue();
084:                } else {
085:                    Font systemDefaultFont = UIManager
086:                            .getFont("TextField.font"); // NOI18N
087:                    defaultFontSize = (systemDefaultFont != null) ? systemDefaultFont
088:                            .getSize()
089:                            : 12;
090:                }
091:            }
092:
093:            public static final Font defaultFont = new Font("Monospaced",
094:                    Font.PLAIN, defaultFontSize); // NOI18N
095:            public static final Color defaultForeColor = Color.black;
096:            public static final Color defaultBackColor = Color.white;
097:            public static final Coloring defaultColoring = new Coloring(
098:                    defaultFont, defaultForeColor, defaultBackColor);
099:            // line number coloring
100:            public static final Color defaultLineNumberForeColor = Color.BLACK;
101:            public static final Color defaultLineNumberBackColor = new Color(
102:                    233, 232, 226);
103:            public static final Coloring defaultLineNumberColoring = new Coloring(
104:                    null, defaultLineNumberForeColor,
105:                    defaultLineNumberBackColor);
106:            // gutter line
107:            public static final Color defaultGutterLine = new Color(184, 184,
108:                    184);
109:            // caret selection coloring
110:            public static final Color defaultSelectionForeColor = Color.white;
111:            public static final Color defaultSelectionBackColor = new Color(
112:                    180, 180, 180);
113:            public static final Coloring defaultSelectionColoring = new Coloring(
114:                    null, defaultSelectionForeColor, defaultSelectionBackColor);
115:            // Highlight search coloring
116:            public static final Color defaultHighlightSearchForeColor = Color.black;
117:            public static final Color defaultHighlightSearchBackColor = new Color(
118:                    246, 248, 139);
119:            public static final Coloring defaultHighlightSearchColoring = new Coloring(
120:                    null, defaultHighlightSearchForeColor,
121:                    defaultHighlightSearchBackColor);
122:            // Incremental search coloring
123:            public static final Color defaultIncSearchForeColor = Color.black;
124:            public static final Color defaultIncSearchBackColor = new Color(
125:                    255, 153, 0);
126:            public static final Coloring defaultIncSearchColoring = new Coloring(
127:                    null, defaultIncSearchForeColor, defaultIncSearchBackColor);
128:            // Block search coloring
129:            public static final Color defaultBlockSearchForeColor = Color.black;
130:            public static final Color defaultBlockSearchBackColor = new Color(
131:                    224, 232, 241);
132:            public static final Coloring defaultblockSearchColoring = new Coloring(
133:                    null, defaultBlockSearchForeColor,
134:                    defaultBlockSearchBackColor);
135:
136:            // Guarded blocks coloring
137:            public static final Color defaultGuardedForeColor = null;
138:            public static final Color defaultGuardedBackColor = new Color(225,
139:                    236, 247);
140:            public static final Coloring defaultGuardedColoring = new Coloring(
141:                    null, defaultGuardedForeColor, defaultGuardedBackColor);
142:
143:            // code folding coloring
144:            public static final Color defaultCodeFoldingForeColor = new Color(
145:                    102, 102, 102);
146:            public static final Coloring defaultCodeFoldingColoring = new Coloring(
147:                    null, defaultCodeFoldingForeColor, null);
148:
149:            // code folding bar coloring
150:            public static final Color defaultCodeFoldingBarForeColor = new Color(
151:                    102, 102, 102);
152:            public static final Color defaultCodeFoldingBarBackColor = Color.WHITE;
153:            public static final Coloring defaultCodeFoldingBarColoring = new Coloring(
154:                    null, defaultCodeFoldingBarForeColor, null);
155:
156:            public static final Color defaultStatusBarForeColor = UIManager
157:                    .getColor("ScrollPane.foreground"); //NOI18N
158:            public static final Color defaultStatusBarBackColor = UIManager
159:                    .getColor("ScrollPane.background"); // NOI18N
160:            public static final Coloring defaultStatusBarColoring = new Coloring(
161:                    defaultFont, defaultStatusBarForeColor,
162:                    defaultStatusBarBackColor);
163:
164:            public static final Color defaultStatusBarBoldForeColor = Color.white;
165:            public static final Color defaultStatusBarBoldBackColor = Color.red;
166:            public static final Coloring defaultStatusBarBoldColoring = new Coloring(
167:                    defaultFont, defaultStatusBarBoldForeColor,
168:                    defaultStatusBarBoldBackColor);
169:
170:            public static final Integer defaultCaretBlinkRate = new Integer(-1);
171:            public static final Integer defaultTabSize = new Integer(8);
172:            public static final Integer defaultSpacesPerTab = new Integer(4);
173:            public static final Integer defaultShiftWidth = new Integer(4); // usually
174:            // not used as there's a Evaluator for shift width
175:
176:            public static final Integer defaultStatusBarCaretDelay = new Integer(
177:                    200);
178:
179:            public static final Color defaultTextLimitLineColor = new Color(
180:                    255, 235, 235);
181:            public static final Integer defaultTextLimitWidth = new Integer(80);
182:
183:            public static final Acceptor defaultIdentifierAcceptor = AcceptorFactory.LETTER_DIGIT;
184:            public static final Acceptor defaultWhitespaceAcceptor = AcceptorFactory.WHITESPACE;
185:
186:            public static final Float defaultLineHeightCorrection = new Float(
187:                    1.0f);
188:
189:            public static final Integer defaultTextLeftMarginWidth = new Integer(
190:                    0);
191:            public static final Insets defaultMargin = new Insets(0, 0, 0, 0);
192:            public static final Insets defaultScrollJumpInsets = new Insets(-5,
193:                    -10, -5, -30);
194:            public static final Insets defaultScrollFindInsets = new Insets(
195:                    -10, -10, -10, -10);
196:            public static final Dimension defaultComponentSizeIncrement = new Dimension(
197:                    -5, -30);
198:
199:            public static final Integer defaultReadBufferSize = new Integer(
200:                    16384);
201:            public static final Integer defaultWriteBufferSize = new Integer(
202:                    16384);
203:            public static final Integer defaultReadMarkDistance = new Integer(
204:                    180);
205:            public static final Integer defaultMarkDistance = new Integer(100);
206:            public static final Integer defaultMaxMarkDistance = new Integer(
207:                    150);
208:            public static final Integer defaultMinMarkDistance = new Integer(50);
209:            public static final Integer defaultSyntaxUpdateBatchSize = new Integer(
210:                    defaultMarkDistance.intValue() * 7);
211:            public static final Integer defaultLineBatchSize = new Integer(2);
212:
213:            public static final Boolean defaultExpandTabs = Boolean.TRUE;
214:
215:            public static final String defaultCaretTypeInsertMode = BaseCaret.LINE_CARET;
216:            public static final String defaultCaretTypeOverwriteMode = BaseCaret.BLOCK_CARET;
217:            public static final Color defaultCaretColorInsertMode = Color.black;
218:            public static final Color defaultCaretColorOvwerwriteMode = Color.black;
219:            public static final Boolean defaultCaretItalicInsertMode = Boolean.FALSE;
220:            public static final Boolean defaultCaretItalicOverwriteMode = Boolean.FALSE;
221:            public static final Acceptor defaultAbbrevExpandAcceptor = AcceptorFactory.WHITESPACE;
222:            public static final Acceptor defaultAbbrevAddTypedCharAcceptor = AcceptorFactory.NL;
223:            public static final Acceptor defaultAbbrevResetAcceptor = AcceptorFactory.NON_JAVA_IDENTIFIER;
224:
225:            /** @deprecated Use Editor Settings, Editor Settings Storage and Editor Code Templates API instead. */
226:            public static final Map defaultAbbrevMap = new HashMap();
227:
228:            public static final Map defaultMacroMap = new HashMap();
229:
230:            public static final Boolean defaultStatusBarVisible = Boolean.TRUE;
231:
232:            public static final Boolean defaultLineNumberVisible = Boolean.FALSE;
233:            public static final Boolean defaultPrintLineNumberVisible = Boolean.TRUE;
234:            public static final Boolean defaultTextLimitLineVisible = Boolean.TRUE;
235:            public static final Boolean defaultHomeKeyColumnOne = Boolean.FALSE;
236:            public static final Boolean defaultWordMoveNewlineStop = Boolean.TRUE;
237:            public static final Boolean defaultInputMethodsEnabled = Boolean.TRUE;
238:            public static final Boolean defaultFindHighlightSearch = Boolean.TRUE;
239:            public static final Boolean defaultFindIncSearch = Boolean.TRUE;
240:            public static final Boolean defaultFindBackwardSearch = Boolean.FALSE;
241:            public static final Boolean defaultFindWrapSearch = Boolean.TRUE;
242:            public static final Boolean defaultFindMatchCase = Boolean.FALSE;
243:            public static final Boolean defaultFindWholeWords = Boolean.FALSE;
244:            public static final Boolean defaultFindRegExp = Boolean.FALSE;
245:            public static final Integer defaultFindHistorySize = new Integer(30);
246:            public static final Integer defaultWordMatchSearchLen = INTEGER_MAX_VALUE;
247:            public static final Boolean defaultWordMatchWrapSearch = Boolean.TRUE;
248:            public static final Boolean defaultWordMatchMatchOneChar = Boolean.TRUE;
249:            public static final Boolean defaultWordMatchMatchCase = Boolean.FALSE;
250:            public static final Boolean defaultWordMatchSmartCase = Boolean.FALSE;
251:            public static final Boolean defaultCodeFoldingEnable = Boolean.FALSE;
252:
253:            public static final String[] defaultColoringNames = new String[] {
254:                    SettingsNames.DEFAULT_COLORING,
255:                    SettingsNames.LINE_NUMBER_COLORING,
256:                    SettingsNames.GUARDED_COLORING,
257:                    SettingsNames.CODE_FOLDING_COLORING,
258:                    SettingsNames.CODE_FOLDING_BAR_COLORING,
259:                    SettingsNames.SELECTION_COLORING,
260:                    SettingsNames.HIGHLIGHT_SEARCH_COLORING,
261:                    SettingsNames.INC_SEARCH_COLORING,
262:                    SettingsNames.BLOCK_SEARCH_COLORING,
263:                    SettingsNames.STATUS_BAR_COLORING,
264:                    SettingsNames.STATUS_BAR_BOLD_COLORING };
265:
266:            private static final int FIND_NEXT_KEY = System
267:                    .getProperty("mrj.version") == null ? KeyEvent.VK_F3
268:                    : KeyEvent.VK_G;
269:
270:            private static final int FIND_NEXT_MASK = System
271:                    .getProperty("mrj.version") == null ? 0
272:                    : KeyEvent.META_DOWN_MASK;
273:
274:            //#26854 - use Command, not Ctrl, on mac    
275:            private static final int MENU_MASK = java.awt.Toolkit
276:                    .getDefaultToolkit().getMenuShortcutKeyMask();
277:
278:            //Default behavior on mac is that alt+arrows is word jumps
279:            private static final int WORD_SELECT_MASK = System
280:                    .getProperty("mrj.version") == null ? InputEvent.CTRL_DOWN_MASK
281:                    : InputEvent.ALT_DOWN_MASK;
282:
283:            private static final int ALT_MASK = System
284:                    .getProperty("mrj.version") == null ? InputEvent.ALT_DOWN_MASK
285:                    : InputEvent.CTRL_DOWN_MASK;
286:
287:            //    public static MultiKeyBinding[] defaultKeyBindings
288:            //    = new MultiKeyBinding[] {
289:            //          new MultiKeyBinding( //1
290:            //              KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0),
291:            //              BaseKit.insertBreakAction
292:            //          ),
293:            //          new MultiKeyBinding( //2
294:            //              KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, MENU_MASK),
295:            //              BaseKit.splitLineAction
296:            //          ),
297:            //          new MultiKeyBinding( //3
298:            //              KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, InputEvent.SHIFT_MASK),
299:            //              BaseKit.startNewLineAction
300:            //          ),
301:            //          
302:            //	  // start-new-line-action cannot be registered here as there
303:            //	  // is already another action registered for Shift+enter in
304:            //	  // the ext-kit. The code is added directly there
305:            //	  //           new MultiKeyBinding(
306:            //	  //               KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, InputEvent.SHIFT_MASK),
307:            //	  //               BaseKit.startNewLineAction
308:            //	  //           ),
309:            //          new MultiKeyBinding( //4
310:            //              KeyStroke.getKeyStroke(KeyEvent.VK_TAB, 0),
311:            //              BaseKit.insertTabAction
312:            //          ),
313:            //          new MultiKeyBinding( //5
314:            //              KeyStroke.getKeyStroke(KeyEvent.VK_TAB, InputEvent.SHIFT_MASK),
315:            //              BaseKit.removeTabAction
316:            //          ),
317:            //          new MultiKeyBinding( //6
318:            //              KeyStroke.getKeyStroke(KeyEvent.VK_BACK_SPACE, 0),
319:            //              BaseKit.deletePrevCharAction
320:            //          ),
321:            //          new MultiKeyBinding( //7
322:            //              KeyStroke.getKeyStroke(KeyEvent.VK_BACK_SPACE, InputEvent.SHIFT_MASK),
323:            //              BaseKit.deletePrevCharAction
324:            //          ),
325:            ///*          new MultiKeyBinding(
326:            //              KeyStroke.getKeyStroke(KeyEvent.VK_H, MENU_MASK | InputEvent.SHIFT_MASK),
327:            //              BaseKit.deletePrevCharAction
328:            //          ),
329:            //*/          new MultiKeyBinding( //8
330:            //              KeyStroke.getKeyStroke(KeyEvent.VK_DELETE, 0),
331:            //              BaseKit.deleteNextCharAction
332:            //          ),
333:            //          new MultiKeyBinding( //9
334:            //              KeyStroke.getKeyStroke(KeyEvent.VK_RIGHT, 0),
335:            //              BaseKit.forwardAction
336:            //          ),
337:            //          new MultiKeyBinding( //10
338:            //              KeyStroke.getKeyStroke(KeyEvent.VK_KP_RIGHT, 0), // keypad right
339:            //              BaseKit.forwardAction
340:            //          ),
341:            //          new MultiKeyBinding( //11
342:            //              KeyStroke.getKeyStroke(KeyEvent.VK_RIGHT, InputEvent.SHIFT_MASK),
343:            //              BaseKit.selectionForwardAction
344:            //          ),
345:            //          new MultiKeyBinding( //12
346:            //              KeyStroke.getKeyStroke(KeyEvent.VK_RIGHT, WORD_SELECT_MASK),
347:            //              BaseKit.nextWordAction
348:            //          ),
349:            //          new MultiKeyBinding( //13
350:            //              KeyStroke.getKeyStroke(KeyEvent.VK_RIGHT, InputEvent.SHIFT_MASK | WORD_SELECT_MASK),
351:            //              BaseKit.selectionNextWordAction
352:            //          ),
353:            //          new MultiKeyBinding( //14
354:            //              KeyStroke.getKeyStroke(KeyEvent.VK_LEFT, 0),
355:            //              BaseKit.backwardAction
356:            //          ),
357:            //          new MultiKeyBinding( //15
358:            //              KeyStroke.getKeyStroke(KeyEvent.VK_KP_LEFT, 0), // keypad left
359:            //              BaseKit.backwardAction
360:            //          ),
361:            //          new MultiKeyBinding( //16
362:            //              KeyStroke.getKeyStroke(KeyEvent.VK_LEFT,  InputEvent.SHIFT_MASK),
363:            //              BaseKit.selectionBackwardAction
364:            //          ),
365:            //          new MultiKeyBinding( //17
366:            //              KeyStroke.getKeyStroke(KeyEvent.VK_LEFT, WORD_SELECT_MASK),
367:            //              BaseKit.previousWordAction
368:            //          ),
369:            //          new MultiKeyBinding( //18
370:            //              KeyStroke.getKeyStroke(KeyEvent.VK_LEFT, InputEvent.SHIFT_MASK | WORD_SELECT_MASK),
371:            //              BaseKit.selectionPreviousWordAction
372:            //          ),
373:            //          new MultiKeyBinding( //19
374:            //              KeyStroke.getKeyStroke(KeyEvent.VK_DOWN, 0),
375:            //              BaseKit.downAction
376:            //          ),
377:            //          new MultiKeyBinding( //20
378:            //              KeyStroke.getKeyStroke(KeyEvent.VK_KP_DOWN, 0), // keypad down
379:            //              BaseKit.downAction
380:            //          ),
381:            //          new MultiKeyBinding( //21
382:            //              KeyStroke.getKeyStroke(KeyEvent.VK_DOWN, InputEvent.SHIFT_MASK),
383:            //              BaseKit.selectionDownAction
384:            //          ),
385:            //          new MultiKeyBinding( //22
386:            //              KeyStroke.getKeyStroke(KeyEvent.VK_DOWN, InputEvent.CTRL_MASK),
387:            //              BaseKit.scrollUpAction
388:            //          ),
389:            //          new MultiKeyBinding( //23
390:            //              KeyStroke.getKeyStroke(KeyEvent.VK_UP, 0),
391:            //              BaseKit.upAction
392:            //          ),
393:            //          new MultiKeyBinding( //24
394:            //              KeyStroke.getKeyStroke(KeyEvent.VK_KP_UP, 0), // keypad up
395:            //              BaseKit.upAction
396:            //          ),
397:            //          new MultiKeyBinding( //25
398:            //              KeyStroke.getKeyStroke(KeyEvent.VK_UP, InputEvent.SHIFT_MASK),
399:            //              BaseKit.selectionUpAction
400:            //          ),
401:            //          new MultiKeyBinding( //26
402:            //              KeyStroke.getKeyStroke(KeyEvent.VK_UP, InputEvent.CTRL_MASK),
403:            //              BaseKit.scrollDownAction
404:            //          ),
405:            //          new MultiKeyBinding( //27
406:            //              KeyStroke.getKeyStroke(KeyEvent.VK_PAGE_DOWN, 0),
407:            //              BaseKit.pageDownAction
408:            //          ),
409:            //          new MultiKeyBinding( //28
410:            //              KeyStroke.getKeyStroke(KeyEvent.VK_PAGE_DOWN, InputEvent.SHIFT_MASK),
411:            //              BaseKit.selectionPageDownAction
412:            //          ),
413:            //          new MultiKeyBinding( //29
414:            //              KeyStroke.getKeyStroke(KeyEvent.VK_PAGE_UP, 0),
415:            //              BaseKit.pageUpAction
416:            //          ),
417:            //          new MultiKeyBinding( //30
418:            //              KeyStroke.getKeyStroke(KeyEvent.VK_PAGE_UP, InputEvent.SHIFT_MASK),
419:            //              BaseKit.selectionPageUpAction
420:            //          ),
421:            //          new MultiKeyBinding( //31
422:            //              KeyStroke.getKeyStroke(KeyEvent.VK_HOME, 0),
423:            //              BaseKit.beginLineAction
424:            //          ),
425:            //          new MultiKeyBinding( //32
426:            //              KeyStroke.getKeyStroke(KeyEvent.VK_HOME, InputEvent.SHIFT_MASK),
427:            //              BaseKit.selectionBeginLineAction
428:            //          ),
429:            //          new MultiKeyBinding( //33
430:            //              KeyStroke.getKeyStroke(KeyEvent.VK_HOME, MENU_MASK),
431:            //              BaseKit.beginAction
432:            //          ),
433:            //          new MultiKeyBinding( //34
434:            //              KeyStroke.getKeyStroke(KeyEvent.VK_HOME, InputEvent.SHIFT_MASK | MENU_MASK),
435:            //              BaseKit.selectionBeginAction
436:            //          ),
437:            //          new MultiKeyBinding( //35
438:            //              KeyStroke.getKeyStroke(KeyEvent.VK_END, 0),
439:            //              BaseKit.endLineAction
440:            //          ),
441:            //          new MultiKeyBinding( //36
442:            //              KeyStroke.getKeyStroke(KeyEvent.VK_END, InputEvent.SHIFT_MASK),
443:            //              BaseKit.selectionEndLineAction
444:            //          ),
445:            //          new MultiKeyBinding( //37
446:            //              KeyStroke.getKeyStroke(KeyEvent.VK_END, MENU_MASK),
447:            //              BaseKit.endAction
448:            //          ),
449:            //          new MultiKeyBinding( //38
450:            //              KeyStroke.getKeyStroke(KeyEvent.VK_END, InputEvent.SHIFT_MASK | MENU_MASK),
451:            //              BaseKit.selectionEndAction
452:            //          ),
453:            //
454:            //          // clipboard bindings
455:            //          new MultiKeyBinding( //39
456:            //              KeyStroke.getKeyStroke(KeyEvent.VK_C, MENU_MASK),
457:            //              BaseKit.copyAction
458:            //          ),
459:            //          new MultiKeyBinding( //40
460:            //              KeyStroke.getKeyStroke(KeyEvent.VK_INSERT, MENU_MASK),
461:            //              BaseKit.copyAction
462:            //          ),
463:            //          new MultiKeyBinding( //41
464:            //              KeyStroke.getKeyStroke(KeyEvent.VK_COPY, 0),
465:            //              BaseKit.copyAction
466:            //          ),
467:            //          new MultiKeyBinding( //42
468:            //              KeyStroke.getKeyStroke(KeyEvent.VK_DELETE, InputEvent.SHIFT_MASK),
469:            //              BaseKit.cutAction
470:            //          ),
471:            //          new MultiKeyBinding( //43
472:            //              KeyStroke.getKeyStroke(KeyEvent.VK_X, MENU_MASK),
473:            //              BaseKit.cutAction
474:            //          ),
475:            //          new MultiKeyBinding( //44
476:            //              KeyStroke.getKeyStroke(KeyEvent.VK_CUT, 0),
477:            //              BaseKit.cutAction
478:            //          ),
479:            //          new MultiKeyBinding( //45
480:            //              KeyStroke.getKeyStroke(KeyEvent.VK_V, MENU_MASK),
481:            //              BaseKit.pasteAction
482:            //          ),
483:            //          new MultiKeyBinding( //46
484:            //              KeyStroke.getKeyStroke(KeyEvent.VK_INSERT, InputEvent.SHIFT_MASK),
485:            //              BaseKit.pasteAction
486:            //          ),
487:            //          new MultiKeyBinding( //47
488:            //              KeyStroke.getKeyStroke(KeyEvent.VK_PASTE, 0),
489:            //              BaseKit.pasteAction
490:            //          ),
491:            //          new MultiKeyBinding( //48
492:            //              KeyStroke.getKeyStroke(KeyEvent.VK_V, MENU_MASK | InputEvent.SHIFT_MASK),
493:            //              BaseKit.pasteFormatedAction
494:            //          ),
495:            //
496:            //          // undo and redo bindings - handled at system level
497:            //          new MultiKeyBinding( //49
498:            //              KeyStroke.getKeyStroke(KeyEvent.VK_Z, MENU_MASK),
499:            //              BaseKit.undoAction
500:            //          ),
501:            //          new MultiKeyBinding( //50
502:            //              KeyStroke.getKeyStroke(KeyEvent.VK_UNDO, 0),
503:            //              BaseKit.undoAction
504:            //          ),
505:            //          new MultiKeyBinding( //51
506:            //              KeyStroke.getKeyStroke(KeyEvent.VK_Y, MENU_MASK),
507:            //              BaseKit.redoAction
508:            //          ),
509:            //
510:            //          // other bindings
511:            //          new MultiKeyBinding( //52
512:            //              KeyStroke.getKeyStroke(KeyEvent.VK_A, MENU_MASK),
513:            //              BaseKit.selectAllAction
514:            //          ),
515:            //          new MultiKeyBinding( //53
516:            //              new KeyStroke[] {
517:            //                  KeyStroke.getKeyStroke(KeyEvent.VK_U, ALT_MASK),
518:            //                  KeyStroke.getKeyStroke(KeyEvent.VK_E, 0),
519:            //              },
520:            //              BaseKit.endWordAction
521:            //          ),
522:            //          /* #47709
523:            //          new MultiKeyBinding( //54
524:            //              KeyStroke.getKeyStroke(KeyEvent.VK_W, MENU_MASK),
525:            //              BaseKit.removeWordAction
526:            //          ),
527:            //           */
528:            //          new MultiKeyBinding( //55
529:            //              KeyStroke.getKeyStroke(KeyEvent.VK_U, MENU_MASK),
530:            //              BaseKit.removeLineBeginAction
531:            //          ),
532:            //          new MultiKeyBinding( //56
533:            //              KeyStroke.getKeyStroke(KeyEvent.VK_E, MENU_MASK),
534:            //              BaseKit.removeLineAction
535:            //          ),
536:            //          new MultiKeyBinding( //57
537:            //              KeyStroke.getKeyStroke(KeyEvent.VK_INSERT, 0),
538:            //              BaseKit.toggleTypingModeAction
539:            //          ),
540:            ///*          new MultiKeyBinding( //58
541:            //              KeyStroke.getKeyStroke(KeyEvent.VK_F2, MENU_MASK),
542:            //              BaseKit.toggleBookmarkAction
543:            //          ),
544:            //          new MultiKeyBinding( //59
545:            //              KeyStroke.getKeyStroke(KeyEvent.VK_F2, 0),
546:            //              BaseKit.gotoNextBookmarkAction
547:            //          ),
548:            //          new MultiKeyBinding( //59.5
549:            //              KeyStroke.getKeyStroke(KeyEvent.VK_F2, KeyEvent.SHIFT_DOWN_MASK),
550:            //              BaseKit.gotoPreviousBookmarkAction
551:            //          ),
552:            // */
553:            //          new MultiKeyBinding( //60
554:            //              KeyStroke.getKeyStroke(FIND_NEXT_KEY, FIND_NEXT_MASK),
555:            //              BaseKit.findNextAction
556:            //          ),
557:            //          new MultiKeyBinding( //61
558:            //              KeyStroke.getKeyStroke(FIND_NEXT_KEY, FIND_NEXT_MASK | InputEvent.SHIFT_MASK),
559:            //              BaseKit.findPreviousAction
560:            //          ),
561:            //          new MultiKeyBinding( //62
562:            //              KeyStroke.getKeyStroke(FIND_NEXT_KEY, FIND_NEXT_MASK | InputEvent.CTRL_MASK),
563:            //              BaseKit.findSelectionAction
564:            //          ),
565:            //          new MultiKeyBinding( //63
566:            //              KeyStroke.getKeyStroke(KeyEvent.VK_H, ALT_MASK | InputEvent.SHIFT_MASK),
567:            //              BaseKit.toggleHighlightSearchAction
568:            //          ),
569:            //          new MultiKeyBinding( //64
570:            //              KeyStroke.getKeyStroke(KeyEvent.VK_L, MENU_MASK),
571:            //              BaseKit.wordMatchNextAction
572:            //          ),
573:            //          new MultiKeyBinding( //65
574:            //              KeyStroke.getKeyStroke(KeyEvent.VK_K, MENU_MASK),
575:            //              BaseKit.wordMatchPrevAction
576:            //          ),
577:            //          new MultiKeyBinding( //66
578:            //              KeyStroke.getKeyStroke(KeyEvent.VK_T, MENU_MASK),
579:            //              BaseKit.shiftLineRightAction
580:            //          ),
581:            //          new MultiKeyBinding( //67
582:            //              KeyStroke.getKeyStroke(KeyEvent.VK_D, MENU_MASK),
583:            //              BaseKit.shiftLineLeftAction
584:            //          ),
585:            //          new MultiKeyBinding( //68
586:            //              KeyStroke.getKeyStroke(KeyEvent.VK_SPACE, InputEvent.SHIFT_MASK),
587:            //              BaseKit.abbrevResetAction
588:            //          ),
589:            //          new MultiKeyBinding( //69
590:            //              KeyStroke.getKeyStroke(KeyEvent.VK_C, MENU_MASK | InputEvent.SHIFT_MASK),
591:            //              BaseKit.annotationsCyclingAction
592:            //          ),
593:            //
594:            //          new MultiKeyBinding( //70
595:            //              new KeyStroke[] {
596:            //                  KeyStroke.getKeyStroke(KeyEvent.VK_U, ALT_MASK),
597:            //                  KeyStroke.getKeyStroke(KeyEvent.VK_T, 0),
598:            //              },
599:            //              BaseKit.adjustWindowTopAction
600:            //          ),
601:            //          new MultiKeyBinding( //71
602:            //              new KeyStroke[] {
603:            //                  KeyStroke.getKeyStroke(KeyEvent.VK_U, ALT_MASK),
604:            //                  KeyStroke.getKeyStroke(KeyEvent.VK_M, 0),
605:            //              },
606:            //              BaseKit.adjustWindowCenterAction
607:            //          ),
608:            //          new MultiKeyBinding( //72
609:            //              new KeyStroke[] {
610:            //                  KeyStroke.getKeyStroke(KeyEvent.VK_U, ALT_MASK),
611:            //                  KeyStroke.getKeyStroke(KeyEvent.VK_B, 0),
612:            //              },
613:            //              BaseKit.adjustWindowBottomAction
614:            //          ),
615:            //
616:            //          new MultiKeyBinding( //73
617:            //              KeyStroke.getKeyStroke(KeyEvent.VK_T, InputEvent.SHIFT_MASK | ALT_MASK),
618:            //              BaseKit.adjustCaretTopAction
619:            //          ),
620:            //          new MultiKeyBinding( //74
621:            //              KeyStroke.getKeyStroke(KeyEvent.VK_M, InputEvent.SHIFT_MASK | ALT_MASK),
622:            //              BaseKit.adjustCaretCenterAction
623:            //          ),
624:            //          new MultiKeyBinding( //75
625:            //              KeyStroke.getKeyStroke(KeyEvent.VK_B, InputEvent.SHIFT_MASK | ALT_MASK),
626:            //              BaseKit.adjustCaretBottomAction
627:            //          ),
628:            //
629:            //          new MultiKeyBinding( //76
630:            //              KeyStroke.getKeyStroke(KeyEvent.VK_F, MENU_MASK | InputEvent.SHIFT_MASK ),
631:            //              BaseKit.formatAction
632:            //          ),
633:            //          new MultiKeyBinding( //77
634:            //              KeyStroke.getKeyStroke(KeyEvent.VK_J, ALT_MASK),
635:            //              BaseKit.selectIdentifierAction
636:            //          ),
637:            //          new MultiKeyBinding( //78
638:            //              KeyStroke.getKeyStroke(KeyEvent.VK_K, ALT_MASK),
639:            //              BaseKit.jumpListPrevAction
640:            //          ),
641:            //          new MultiKeyBinding( //79
642:            //              KeyStroke.getKeyStroke(KeyEvent.VK_L, ALT_MASK),
643:            //              BaseKit.jumpListNextAction
644:            //          ),
645:            //          new MultiKeyBinding( //80
646:            //              KeyStroke.getKeyStroke(KeyEvent.VK_K, InputEvent.SHIFT_MASK | ALT_MASK),
647:            //              BaseKit.jumpListPrevComponentAction
648:            //          ),
649:            //          new MultiKeyBinding( //81
650:            //              KeyStroke.getKeyStroke(KeyEvent.VK_L, InputEvent.SHIFT_MASK | ALT_MASK),
651:            //              BaseKit.jumpListNextComponentAction
652:            //          ),
653:            //          new MultiKeyBinding( //82
654:            //              new KeyStroke[] {
655:            //                  KeyStroke.getKeyStroke(KeyEvent.VK_U, ALT_MASK),
656:            //                  KeyStroke.getKeyStroke(KeyEvent.VK_U, 0),
657:            //              },
658:            //              BaseKit.toUpperCaseAction
659:            //          ),
660:            //          new MultiKeyBinding( //83
661:            //              new KeyStroke[] {
662:            //                  KeyStroke.getKeyStroke(KeyEvent.VK_U, ALT_MASK),
663:            //                  KeyStroke.getKeyStroke(KeyEvent.VK_L, 0),
664:            //              },
665:            //              BaseKit.toLowerCaseAction
666:            //          ),
667:            //          new MultiKeyBinding( //84
668:            //              new KeyStroke[] {
669:            //                  KeyStroke.getKeyStroke(KeyEvent.VK_U, ALT_MASK),
670:            //                  KeyStroke.getKeyStroke(KeyEvent.VK_R, 0),
671:            //              },
672:            //              BaseKit.switchCaseAction
673:            //          ),
674:            //
675:            //          new MultiKeyBinding( //85
676:            //              KeyStroke.getKeyStroke(KeyEvent.VK_M, MENU_MASK),
677:            //              BaseKit.selectNextParameterAction
678:            //          ),
679:            //
680:            //          new MultiKeyBinding( //86
681:            //              new KeyStroke[] {
682:            //                  KeyStroke.getKeyStroke(KeyEvent.VK_J, MENU_MASK),
683:            //                  KeyStroke.getKeyStroke(KeyEvent.VK_S, 0),
684:            //              },
685:            //              BaseKit.startMacroRecordingAction
686:            //          ),
687:            //
688:            //          new MultiKeyBinding( //87
689:            //              new KeyStroke[] {
690:            //                  KeyStroke.getKeyStroke(KeyEvent.VK_J, MENU_MASK),
691:            //                  KeyStroke.getKeyStroke(KeyEvent.VK_E, 0),
692:            //              },
693:            //              BaseKit.stopMacroRecordingAction
694:            //          ),
695:            //          
696:            //          new MultiKeyBinding( //88
697:            //              KeyStroke.getKeyStroke(KeyEvent.VK_SUBTRACT, MENU_MASK),
698:            //              BaseKit.collapseFoldAction
699:            //          ),
700:            //
701:            //          new MultiKeyBinding( //89
702:            //              KeyStroke.getKeyStroke(KeyEvent.VK_ADD, MENU_MASK),
703:            //              BaseKit.expandFoldAction
704:            //          ),
705:            //          
706:            //          new MultiKeyBinding( //90
707:            //              KeyStroke.getKeyStroke(KeyEvent.VK_SUBTRACT, MENU_MASK | InputEvent.SHIFT_MASK),
708:            //              BaseKit.collapseAllFoldsAction
709:            //          ),
710:            //          
711:            //          new MultiKeyBinding( //91
712:            //              KeyStroke.getKeyStroke(KeyEvent.VK_ADD, MENU_MASK | InputEvent.SHIFT_MASK),
713:            //              BaseKit.expandAllFoldsAction
714:            //          ),
715:            //
716:            //          new MultiKeyBinding( //92
717:            //              KeyStroke.getKeyStroke(KeyEvent.VK_MINUS, MENU_MASK),
718:            //              BaseKit.collapseFoldAction
719:            //          ),
720:            //
721:            //          new MultiKeyBinding( //93
722:            //              KeyStroke.getKeyStroke(KeyEvent.VK_EQUALS, MENU_MASK),
723:            //              BaseKit.expandFoldAction
724:            //          ),
725:            //
726:            //          new MultiKeyBinding( //94
727:            //              KeyStroke.getKeyStroke(KeyEvent.VK_PLUS, MENU_MASK),
728:            //              BaseKit.expandFoldAction
729:            //          ),
730:            //
731:            //          new MultiKeyBinding( //95
732:            //              KeyStroke.getKeyStroke(KeyEvent.VK_MINUS, MENU_MASK | InputEvent.SHIFT_MASK),
733:            //              BaseKit.collapseAllFoldsAction
734:            //          ),
735:            //          
736:            //          new MultiKeyBinding( //96
737:            //              KeyStroke.getKeyStroke(KeyEvent.VK_EQUALS, MENU_MASK | InputEvent.SHIFT_MASK),
738:            //              BaseKit.expandAllFoldsAction
739:            //          ),
740:            //          
741:            //          new MultiKeyBinding( //97
742:            //              KeyStroke.getKeyStroke(KeyEvent.VK_PLUS, MENU_MASK | InputEvent.SHIFT_MASK),
743:            //              BaseKit.expandAllFoldsAction
744:            //          ),
745:            //          
746:            //          new MultiKeyBinding( //98
747:            //              KeyStroke.getKeyStroke(KeyEvent.VK_Q, ALT_MASK | InputEvent.SHIFT_MASK),
748:            //              "dump-view-hierarchy" // NOI18N
749:            //          ),
750:            //          new MultiKeyBinding( //99
751:            //              KeyStroke.getKeyStroke(KeyEvent.VK_BACK_SPACE, MENU_MASK),
752:            //              BaseKit.removePreviousWordAction
753:            //          ),
754:            //          new MultiKeyBinding( //100
755:            //              KeyStroke.getKeyStroke(KeyEvent.VK_DELETE, MENU_MASK),
756:            //              BaseKit.removeNextWordAction
757:            //          )
758:            //      };
759:
760:            //#46811 - Install mac specific key handling
761:            static {
762:                int end = 8;
763:                if (System.getProperty("mrj.version") != null) { //NOI18N
764:                //              MultiKeyBinding[] nue = new MultiKeyBinding[defaultKeyBindings.length + end];
765:                //              
766:                //              nue[0] = new MultiKeyBinding(
767:                //                 KeyStroke.getKeyStroke(KeyEvent.VK_RIGHT, InputEvent.META_MASK),
768:                //                 BaseKit.endLineAction
769:                //              );
770:                //              
771:                //              nue[1] = new MultiKeyBinding(
772:                //                 KeyStroke.getKeyStroke(KeyEvent.VK_LEFT, InputEvent.META_MASK),
773:                //                 BaseKit.beginLineAction
774:                //              );
775:                //              
776:                //              nue[2] = new MultiKeyBinding(
777:                //                KeyStroke.getKeyStroke(KeyEvent.VK_UP, InputEvent.META_MASK),
778:                //                BaseKit.beginAction
779:                //              );
780:                //              
781:                //              nue[3] = new MultiKeyBinding(
782:                //                KeyStroke.getKeyStroke(KeyEvent.VK_DOWN, InputEvent.META_MASK),
783:                //                BaseKit.endAction
784:                //              );
785:                //              
786:                //              nue[4] = new MultiKeyBinding(
787:                //                KeyStroke.getKeyStroke(KeyEvent.VK_DOWN, InputEvent.META_MASK | InputEvent.SHIFT_MASK),
788:                //                BaseKit.selectionEndAction
789:                //              );
790:                //              
791:                //              nue[5] = new MultiKeyBinding(
792:                //                KeyStroke.getKeyStroke(KeyEvent.VK_UP, InputEvent.META_MASK | InputEvent.SHIFT_MASK),
793:                //                BaseKit.selectionBeginAction
794:                //              );
795:                //              
796:                //              nue[6] = new MultiKeyBinding( //36
797:                //                  KeyStroke.getKeyStroke(KeyEvent.VK_RIGHT, InputEvent.SHIFT_MASK | InputEvent.META_MASK),
798:                //                  BaseKit.selectionEndLineAction
799:                //              );
800:                //              
801:                //              nue[7] = new MultiKeyBinding( //32
802:                //                  KeyStroke.getKeyStroke(KeyEvent.VK_LEFT, InputEvent.SHIFT_MASK | InputEvent.META_MASK),
803:                //                  BaseKit.selectionBeginLineAction
804:                //              );
805:                //              
806:                //              
807:                //              System.arraycopy(defaultKeyBindings, 0, nue, end, defaultKeyBindings.length);
808:                //              defaultKeyBindings = nue;
809:                }
810:            }
811:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.