01: /*
02: * PropertiesMode.java
03: *
04: * Copyright (C) 2000-2002 Peter Graves
05: *
06: * This program is free software; you can redistribute it and/or
07: * modify it under the terms of the GNU General Public License
08: * as published by the Free Software Foundation; either version 2
09: * of the License, or (at your option) any later version.
10: *
11: * This program is distributed in the hope that it will be useful,
12: * but WITHOUT ANY WARRANTY; without even the implied warranty of
13: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14: * GNU General Public License for more details.
15: *
16: * You should have received a copy of the GNU General Public License
17: * along with this program; if not, write to the Free Software
18: * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19: */
20:
21: package org.armedbear.j;
22:
23: import java.awt.event.KeyEvent;
24:
25: public final class PropertiesMode extends AbstractMode implements
26: Constants, Mode {
27: private static final PropertiesMode mode = new PropertiesMode();
28:
29: private PropertiesMode() {
30: super (PROPERTIES_MODE, PROPERTIES_MODE_NAME);
31: }
32:
33: public static final PropertiesMode getMode() {
34: return mode;
35: }
36:
37: public final Formatter getFormatter(Buffer buffer) {
38: return new PropertiesFormatter(buffer);
39: }
40:
41: protected void setKeyMapDefaults(KeyMap km) {
42: km.mapKey(KeyEvent.VK_F12, 0, "wrapComment");
43: // Duplicate mapping to support IBM 1.3 for Linux.
44: km.mapKey(0xffc9, 0, "wrapComment"); // F12
45: }
46: }
|