ExplorerTree(TreeModel model) { super(model); toggleClickCount = 0; // fix for #18292 // default action map for JTree defines these shortcuts // but we use our own mechanism for handling them // following lines disable default L&F handling (if it is // defined on Ctrl-c, Ctrl-v and Ctrl-x) getInputMap().put(KeyStroke.getKeyStroke("control C"), "none"); // NOI18N getInputMap().put(KeyStroke.getKeyStroke("control V"), "none"); // NOI18N getInputMap().put(KeyStroke.getKeyStroke("control X"), "none"); // NOI18N getInputMap().put(KeyStroke.getKeyStroke("COPY"), "none"); // NOI18N getInputMap().put(KeyStroke.getKeyStroke("PASTE"), "none"); // NOI18N getInputMap().put(KeyStroke.getKeyStroke("CUT"), "none"); // NOI18N setupSearch(); }
ExplorerTree(TreeModel model) { super(model); toggleClickCount = 0; // fix for #18292 // default action map for JTree defines these shortcuts // but we use our own mechanism for handling them // following lines disable default L&F handling (if it is // defined on Ctrl-c, Ctrl-v and Ctrl-x) getInputMap().put(KeyStroke.getKeyStroke("control C"), "none"); // NOI18N getInputMap().put(KeyStroke.getKeyStroke("control V"), "none"); // NOI18N getInputMap().put(KeyStroke.getKeyStroke("control X"), "none"); // NOI18N getInputMap().put(KeyStroke.getKeyStroke("COPY"), "none"); // NOI18N getInputMap().put(KeyStroke.getKeyStroke("PASTE"), "none"); // NOI18N getInputMap().put(KeyStroke.getKeyStroke("CUT"), "none"); // NOI18N setupSearch(); }
ExplorerTree(TreeModel model) { super(model); toggleClickCount = 0; // fix for #18292 // default action map for JTree defines these shortcuts // but we use our own mechanism for handling them // following lines disable default L&F handling (if it is // defined on Ctrl-c, Ctrl-v and Ctrl-x) getInputMap().put(KeyStroke.getKeyStroke("control C"), "none"); // NOI18N getInputMap().put(KeyStroke.getKeyStroke("control V"), "none"); // NOI18N getInputMap().put(KeyStroke.getKeyStroke("control X"), "none"); // NOI18N getInputMap().put(KeyStroke.getKeyStroke("COPY"), "none"); // NOI18N getInputMap().put(KeyStroke.getKeyStroke("PASTE"), "none"); // NOI18N getInputMap().put(KeyStroke.getKeyStroke("CUT"), "none"); // NOI18N if (Utilities.isMac()) { getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_C, InputEvent.META_MASK), "none"); // NOI18N getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_X, InputEvent.META_MASK), "none"); // NOI18N getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_V, InputEvent.META_MASK), "none"); // NOI18N } setupSearch(); if (!GraphicsEnvironment.isHeadless()) { setDragEnabled(true); } }