All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.sun.java.swing.DefaultFocusManager

java.lang.Object
   |
   +----com.sun.java.swing.FocusManager
           |
           +----com.sun.java.swing.DefaultFocusManager

public class DefaultFocusManager
extends FocusManager

Constructor Index

 o DefaultFocusManager()

Method Index

 o compareTabOrder(Component, Component)
Return true if a should be before b in the "tab" order.
 o focusNextComponent(Component)
Cause the focus manager to set the focus on the next focusable component
 o focusPreviousComponent(Component)
Cause the focus manager to set the focus on the previous focusable component
 o getComponentAfter(Container, Component)
Return the component the should receive the focus after aComponent
 o getComponentBefore(Container, Component)
Return the component that should receive the focus before aComponent
 o getFirstComponent(Container)
Return the first component that should receive the focus
 o getLastComponent(Container)
Return the last component that should receive the focus
 o processKeyEvent(Component, KeyEvent)
This method is called by JComponents when a key event occurs.

Constructors

 o DefaultFocusManager
 public DefaultFocusManager()

Methods

 o processKeyEvent
 public void processKeyEvent(Component focusedComponent,
                             KeyEvent anEvent)
This method is called by JComponents when a key event occurs. JComponent gives key events to the focus manager first, then to key listeners, then to the keyboard UI dispatcher. This method should look at the key event and change the focused component if the key event matches the receiver's focus manager hot keys. For example the default focus manager will change the focus if the key event matches TAB or Shift + TAB. The focus manager should call consume() on anEvent if anEvent has been processed. focusedComponent is the component that currently has the focus. Note: FocusManager will receive KEY_PRESSED, KEY_RELEASED and KEY_TYPED key events. If one event is consumed, all other events type should be consumed.

Overrides:
processKeyEvent in class FocusManager
 o focusNextComponent
 public void focusNextComponent(Component aComponent)
Cause the focus manager to set the focus on the next focusable component

Overrides:
focusNextComponent in class FocusManager
 o focusPreviousComponent
 public void focusPreviousComponent(Component aComponent)
Cause the focus manager to set the focus on the previous focusable component

Overrides:
focusPreviousComponent in class FocusManager
 o getFirstComponent
 public Component getFirstComponent(Container aContainer)
Return the first component that should receive the focus

 o getLastComponent
 public Component getLastComponent(Container aContainer)
Return the last component that should receive the focus

 o getComponentBefore
 public Component getComponentBefore(Container aContainer,
                                     Component aComponent)
Return the component that should receive the focus before aComponent

 o getComponentAfter
 public Component getComponentAfter(Container aContainer,
                                    Component aComponent)
Return the component the should receive the focus after aComponent

 o compareTabOrder
 public boolean compareTabOrder(Component a,
                                Component b)
Return true if a should be before b in the "tab" order. Override this method if you want to change the automatic "tab" order. The default implementation will order tab to give a left to right, top down order. Override this method if another order is required.


All Packages  Class Hierarchy  This Package  Previous  Next  Index