001: /*
002: * Sun Public License Notice
003: *
004: * The contents of this file are subject to the Sun Public License
005: * Version 1.0 (the "License"). You may not use this file except in
006: * compliance with the License. A copy of the License is available at
007: * http://www.sun.com/
008: *
009: * The Original Code is NetBeans. The Initial Developer of the Original
010: * Code is Sun Microsystems, Inc. Portions Copyright 1997-2000 Sun
011: * Microsystems, Inc. All Rights Reserved.
012: */
013:
014: package org.netbeans.editor.ext;
015:
016: import java.awt.Color;
017: import java.awt.Dimension;
018: import java.awt.event.InputEvent;
019: import java.awt.event.KeyEvent;
020:
021: import javax.swing.KeyStroke;
022:
023: import org.netbeans.editor.Coloring;
024: import org.netbeans.editor.MultiKeyBinding;
025: import org.netbeans.editor.SettingsDefaults;
026:
027: /**
028: * Initializer for the extended editor settings.
029: *
030: * @author Miloslav Metelka
031: * @version 1.00
032: */
033:
034: public class ExtSettingsDefaults extends SettingsDefaults {
035:
036: // Highlight row with caret coloring
037: public static final Color defaultHighlightCaretRowBackColor = new Color(
038: 255, 255, 220);
039: public static final Coloring defaultHighlightCaretRowColoring = new Coloring(
040: null, null, defaultHighlightCaretRowBackColor);
041: // Highlight matching brace coloring
042: public static final Color defaultHighlightMatchBraceForeColor = Color.white;
043: public static final Color defaultHighlightMatchBraceBackColor = new Color(
044: 255, 50, 210);
045: public static final Coloring defaultHighlightMatchBraceColoring = new Coloring(
046: null, defaultHighlightMatchBraceForeColor,
047: defaultHighlightMatchBraceBackColor);
048:
049: public static final Boolean defaultHighlightCaretRow = Boolean.FALSE;
050: public static final Boolean defaultHighlightMatchBrace = Boolean.TRUE;
051: public static final Integer defaultHighlightMatchBraceDelay = new Integer(
052: 100);
053: public static final Boolean defaultCaretSimpleMatchBrace = Boolean.TRUE;
054:
055: public static final Boolean defaultCompletionAutoPopup = Boolean.TRUE;
056: public static final Integer defaultCompletionAutoPopupDelay = new Integer(
057: 500);
058: public static final Integer defaultCompletionRefreshDelay = new Integer(
059: 200);
060: public static final Dimension defaultCompletionPaneMaxSize = new Dimension(
061: 400, 300);
062: public static final Dimension defaultCompletionPaneMinSize = new Dimension(
063: 60, 30);
064: public static final Boolean defaultDisplayGoToClassInfo = Boolean.TRUE;
065:
066: public static final MultiKeyBinding[] defaultExtKeyBindings = new MultiKeyBinding[] {
067: new MultiKeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_G,
068: InputEvent.ALT_MASK), ExtKit.gotoDeclarationAction),
069: new MultiKeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_F,
070: InputEvent.CTRL_MASK), ExtKit.findAction),
071: new MultiKeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_H,
072: InputEvent.CTRL_MASK), ExtKit.replaceAction),
073: new MultiKeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_G,
074: InputEvent.CTRL_MASK), ExtKit.gotoAction),
075: new MultiKeyBinding(KeyStroke.getKeyStroke(
076: KeyEvent.VK_SPACE, InputEvent.CTRL_MASK),
077: ExtKit.completionShowAction),
078: new MultiKeyBinding(
079: // Japanese
080: // Solaris
081: // uses
082: // CTRL+SPACE
083: // for
084: // IM
085: KeyStroke.getKeyStroke(KeyEvent.VK_BACK_SLASH,
086: InputEvent.CTRL_MASK),
087: ExtKit.completionShowAction),
088: new MultiKeyBinding(KeyStroke.getKeyStroke(
089: KeyEvent.VK_ESCAPE, 0), ExtKit.escapeAction),
090: new MultiKeyBinding(KeyStroke.getKeyStroke(
091: KeyEvent.VK_OPEN_BRACKET, InputEvent.CTRL_MASK),
092: ExtKit.matchBraceAction),
093: new MultiKeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_B,
094: InputEvent.CTRL_MASK | InputEvent.SHIFT_MASK),
095: ExtKit.selectionMatchBraceAction),
096: new MultiKeyBinding(KeyStroke.getKeyStroke(
097: KeyEvent.VK_ENTER, InputEvent.SHIFT_MASK),
098: ExtKit.shiftInsertBreakAction),
099: new MultiKeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_F10,
100: InputEvent.SHIFT_MASK), ExtKit.showPopupMenuAction),
101: /*
102: * new MultiKeyBinding( KeyStroke.getKeyStroke(KeyEvent.VK_U,
103: * InputEvent.CTRL_MASK), // KeyStroke.getKeyStroke(KeyEvent.VK_BRACELEFT,
104: * InputEvent.CTRL_MASK), ExtKit.braceCodeSelectAction ),
105: */
106:
107: };
108:
109: }
|