Available Methods
- putClientProperty ( )
- getClientProperty ( )
- add ( )
- setBorder ( )
- getHeight ( )
- setOpaque ( )
- setEnabled ( )
- getBorder ( )
- getWidth ( )
- setForeground ( )
- setBackground ( )
- isEnabled ( )
- getInsets ( )
- isOpaque ( )
- getParent ( )
- setToolTipText ( )
- setFont ( )
- removeMouseListener ( )
- getPreferredSize ( )
- getActionMap ( )
- setBounds ( )
- setMaximumSize ( )
- setPreferredSize ( )
- getComponents ( )
- getBackground ( )
- setLayout ( )
- setCursor ( )
- addMouseListener ( )
- paint ( )
- isVisible ( )
- getName ( )
- getFontMetrics ( )
- removeAll ( )
- repaint ( )
- addMouseMotionListener ( )
- removeMouseMotionListener ( )
- setAlignmentX ( )
- setInheritsPopupMenu ( )
- removeFocusListener ( )
- setVisible ( )
- getInputMap ( )
- removePropertyChangeListener ( )
- print ( )
- addFocusListener ( )
- setMinimumSize ( )
- isShowing ( )
- addPropertyChangeListener ( )
- getComponentCount ( )
- addKeyListener ( )
- revalidate ( )
- getComponent ( )
- getSize ( )
- getMaximumSize ( )
- getFont ( )
- getTransferHandler ( )
- getMinimumSize ( )
- getLocationOnScreen ( )
- getVisibleRect ( )
- setAutoscrolls ( )
- setFocusable ( )
- doLayout ( )
- addMouseWheelListener ( )
- getBounds ( )
- setSize ( )
- removeKeyListener ( )
- setFocusTraversalKeys ( )
- addHierarchyListener ( )
- removeMouseWheelListener ( )
- invalidate ( )
- addComponentListener ( )
- inside ( )
- AccessibleJComponent ( )
- hasFocus ( )
- remove ( )
- getTreeLock ( )
- setDoubleBuffered ( )
- setDefaultLocale ( )
- getLayout ( )
- requestFocus ( )
- WHEN_ANCESTOR_OF_FOCUSED_COMPONENT
- getAutoscrolls ( )
- getToolTipLocation ( )
Related Classes
- java.io.File
- java.util.logging.Level
- java.awt.image.BufferedImage
- java.awt.Color
- java.awt.event.ActionEvent
- java.awt.event.ActionListener
- javax.swing.JPanel
- java.awt.Dimension
- javax.swing.JFrame
- java.awt.Font
- java.awt.event.MouseEvent
- javax.swing.JLabel
- java.awt.Graphics2D
- java.awt.Graphics
- javax.swing.JButton
- java.awt.event.KeyEvent
- java.awt.BorderLayout
- java.awt.Component
- javax.swing.JScrollPane
- java.awt.event.WindowEvent
- java.awt.Rectangle
- javax.swing.JTextField
- javax.swing.SwingUtilities
- java.awt.event.MouseAdapter
- javax.swing.ImageIcon
Java Code Examples for javax.swing.JComponent#setFocusTraversalKeys()
The following examples show how to use
javax.swing.JComponent#setFocusTraversalKeys() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SwingHelper.java From azure-devops-intellij with MIT License | 5 votes |
/** * This method sets the FocusTraversalKeys for a component to be the standard keys. * Use this on Tables or TextAreas where you want the tab keys to leave the control. * * @param component the component that you want to fix tab keys for */ public static void fixTabKeys(final JComponent component) { final Set<AWTKeyStroke> forward = new HashSet<AWTKeyStroke>( component.getFocusTraversalKeys(KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS)); forward.add(KeyStroke.getKeyStroke("TAB")); component.setFocusTraversalKeys(KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS, forward); final Set<AWTKeyStroke> backward = new HashSet<AWTKeyStroke>( component.getFocusTraversalKeys(KeyboardFocusManager.BACKWARD_TRAVERSAL_KEYS)); backward.add(KeyStroke.getKeyStroke("shift TAB")); component.setFocusTraversalKeys(KeyboardFocusManager.BACKWARD_TRAVERSAL_KEYS, backward); }
Example 2
Source File: ToolAdapterTabbedEditorDialog.java From snap-desktop with GNU General Public License v3.0 | 5 votes |
private static void forwardFocusWhenTabKeyReleased(JComponent aSenderComponent, JComponent aReceiverComponent) { ForwardFocusAction forwardFocusAction = new ForwardFocusAction("TabKeyAction", aReceiverComponent); aSenderComponent.setFocusTraversalKeys(0, new HashSet()); int modifiers = 0; // '0' => no modifiers int keyCode = KeyEvent.VK_TAB; KeyStroke tabKeyReleased = KeyStroke.getKeyStroke(keyCode, modifiers, true); aSenderComponent.getInputMap(1).put(tabKeyReleased, forwardFocusAction.getName()); aSenderComponent.getActionMap().put(forwardFocusAction.getName(), forwardFocusAction); }
Example 3
Source File: UIUtils.java From netbeans with Apache License 2.0 | 4 votes |
public static void fixFocusTraversalKeys(JComponent component) { Set<AWTKeyStroke> set = component.getFocusTraversalKeys(KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS); set = new HashSet<AWTKeyStroke>(set); set.add(AWTKeyStroke.getAWTKeyStroke(KeyEvent.VK_TAB, InputEvent.CTRL_DOWN_MASK | InputEvent.ALT_DOWN_MASK)); component.setFocusTraversalKeys(KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS, set); }