1 7 package javax.swing; 8 9 import java.awt.*; 10 import java.awt.event.*; 11 import java.beans.*; 12 import java.util.Set ; 13 14 15 23 final class DelegatingDefaultFocusManager extends DefaultFocusManager { 24 private final KeyboardFocusManager delegate; 25 26 DelegatingDefaultFocusManager(KeyboardFocusManager delegate) { 27 this.delegate = delegate; 28 setDefaultFocusTraversalPolicy(gluePolicy); 29 } 30 31 KeyboardFocusManager getDelegate() { 32 return delegate; 33 } 34 35 38 public void processKeyEvent(Component focusedComponent, KeyEvent e) { 39 delegate.processKeyEvent(focusedComponent, e); 40 } 41 public void focusNextComponent(Component aComponent) { 42 delegate.focusNextComponent(aComponent); 43 } 44 public void focusPreviousComponent(Component aComponent) { 45 delegate.focusPreviousComponent(aComponent); 46 } 47 48 58 public Component getFocusOwner() { 59 return delegate.getFocusOwner(); 60 } 61 public void clearGlobalFocusOwner() { 62 delegate.clearGlobalFocusOwner(); 63 } 64 public Component getPermanentFocusOwner() { 65 return delegate.getPermanentFocusOwner(); 66 } 67 public Window getFocusedWindow() { 68 return delegate.getFocusedWindow(); 69 } 70 public Window getActiveWindow() { 71 return delegate.getActiveWindow(); 72 } 73 public FocusTraversalPolicy getDefaultFocusTraversalPolicy() { 74 return delegate.getDefaultFocusTraversalPolicy(); 75 } 76 public void setDefaultFocusTraversalPolicy(FocusTraversalPolicy 77 defaultPolicy) { 78 if (delegate != null) { 79 delegate.setDefaultFocusTraversalPolicy(defaultPolicy); 81 } 82 } 83 public void 84 setDefaultFocusTraversalKeys(int id, 85 Set <? extends AWTKeyStroke> keystrokes) 86 { 87 delegate.setDefaultFocusTraversalKeys(id, keystrokes); 88 } 89 public Set <AWTKeyStroke> getDefaultFocusTraversalKeys(int id) { 90 return delegate.getDefaultFocusTraversalKeys(id); 91 } 92 public Container getCurrentFocusCycleRoot() { 93 return delegate.getCurrentFocusCycleRoot(); 94 } 95 public void setGlobalCurrentFocusCycleRoot(Container newFocusCycleRoot) { 96 delegate.setGlobalCurrentFocusCycleRoot(newFocusCycleRoot); 97 } 98 public void addPropertyChangeListener(PropertyChangeListener listener) { 99 delegate.addPropertyChangeListener(listener); 100 } 101 public void removePropertyChangeListener(PropertyChangeListener listener) { 102 delegate.removePropertyChangeListener(listener); 103 } 104 public void addPropertyChangeListener(String propertyName, 105 PropertyChangeListener listener) { 106 delegate.addPropertyChangeListener(propertyName, listener); 107 } 108 public void removePropertyChangeListener(String propertyName, 109 PropertyChangeListener listener) { 110 delegate.removePropertyChangeListener(propertyName, listener); 111 } 112 public void addVetoableChangeListener(VetoableChangeListener listener) { 113 delegate.addVetoableChangeListener(listener); 114 } 115 public void removeVetoableChangeListener(VetoableChangeListener listener) { 116 delegate.removeVetoableChangeListener(listener); 117 } 118 public void addVetoableChangeListener(String propertyName, 119 VetoableChangeListener listener) { 120 delegate.addVetoableChangeListener(propertyName, listener); 121 } 122 public void removeVetoableChangeListener(String propertyName, 123 VetoableChangeListener listener) { 124 delegate.removeVetoableChangeListener(propertyName, listener); 125 } 126 public void addKeyEventDispatcher(KeyEventDispatcher dispatcher) { 127 delegate.addKeyEventDispatcher(dispatcher); 128 } 129 public void removeKeyEventDispatcher(KeyEventDispatcher dispatcher) { 130 delegate.removeKeyEventDispatcher(dispatcher); 131 } 132 public boolean dispatchEvent(AWTEvent e) { 133 return delegate.dispatchEvent(e); 134 } 135 public boolean dispatchKeyEvent(KeyEvent e) { 136 return delegate.dispatchKeyEvent(e); 137 } 138 public void upFocusCycle(Component aComponent) { 139 delegate.upFocusCycle(aComponent); 140 } 141 public void downFocusCycle(Container aContainer) { 142 delegate.downFocusCycle(aContainer); 143 } 144 } 145 | Popular Tags |