MCPcopy
hub / github.com/arduino/Arduino / addNotify

Method addNotify

app/src/processing/app/EditorHeader.java:129–145  ·  view source on GitHub ↗

Called whenever we, or any of our ancestors, is added to a container.

()

Source from the content-addressed store, hash-verified

127 * Called whenever we, or any of our ancestors, is added to a container.
128 */
129 public void addNotify() {
130 super.addNotify();
131 /*
132 * Once we get added to a window, remove Ctrl-Tab and Ctrl-Shift-Tab from
133 * the keys used for focus traversal (so our bindings for these keys will
134 * work). All components inherit from the window eventually, so this should
135 * work whenever the focus is inside our window. Some components (notably
136 * JTextPane / JEditorPane) keep their own focus traversal keys, though, and
137 * have to be treated individually (either the same as below, or by
138 * disabling focus traversal entirely).
139 */
140 Window window = SwingUtilities.getWindowAncestor(this);
141 if (window != null) {
142 Keys.killFocusTraversalBinding(window, Keys.ctrl(KeyEvent.VK_TAB));
143 Keys.killFocusTraversalBinding(window, Keys.ctrlShift(KeyEvent.VK_TAB));
144 }
145 }
146
147 public EditorHeader(Editor eddie) {
148 this.editor = eddie; // weird name for listener

Callers

nothing calls this directly

Calls 3

ctrlMethod · 0.95
ctrlShiftMethod · 0.95

Tested by

no test coverage detected