1 11 12 package org.eclipse.jface.bindings.keys.formatting; 13 14 15 16 26 public final class KeyFormatterFactory { 27 28 31 private static final IKeyFormatter FORMAL_KEY_FORMATTER = new FormalKeyFormatter(); 32 33 36 private static final IKeyFormatter EMACS_KEY_FORMATTER = new EmacsKeyFormatter(); 37 38 42 private static IKeyFormatter defaultKeyFormatter = FORMAL_KEY_FORMATTER; 43 44 49 public static final IKeyFormatter getDefault() { 50 return defaultKeyFormatter; 51 } 52 53 58 public static final IKeyFormatter getEmacsKeyFormatter() { 59 return EMACS_KEY_FORMATTER; 60 } 61 62 67 public static final IKeyFormatter getFormalKeyFormatter() { 68 return FORMAL_KEY_FORMATTER; 69 } 70 71 77 public static final void setDefault(final IKeyFormatter defaultKeyFormatter) { 78 if (defaultKeyFormatter == null) { 79 throw new NullPointerException (); 80 } 81 82 KeyFormatterFactory.defaultKeyFormatter = defaultKeyFormatter; 83 } 84 85 88 private KeyFormatterFactory() { 89 } 91 } 92 | Popular Tags |