Contents | Package | Class | Tree | Deprecated | Index | Help Java 1.2 Beta 3
PREV | NEXT SHOW LISTS | HIDE LISTS

Class java.awt.swing.DefaultFocusManager

java.lang.Object
    |
    +----java.awt.swing.FocusManager
            |
            +----java.awt.swing.DefaultFocusManager

public class DefaultFocusManager
extends FocusManager

Fields inherited from class java.awt.swing.FocusManager
 FOCUS_MANAGER_CLASS_PROPERTY
 

Method Summary
boolean  compareTabOrder(Component a, Component b)
Return true if a should be before b in the "tab" order.
void  focusNextComponent(Component aComponent)
Cause the focus manager to set the focus on the next focusable component
void  focusPreviousComponent(Component aComponent)
Cause the focus manager to set the focus on the previous focusable component
Component  getComponentAfter(Container aContainer, Component aComponent)
Return the component the should receive the focus after aComponent
Component  getComponentBefore(Container aContainer, Component aComponent)
Return the component that should receive the focus before aComponent
Component  getFirstComponent(Container aContainer)
Return the first component that should receive the focus
Component  getLastComponent(Container aContainer)
Return the last component that should receive the focus
void  processKeyEvent(Component focusedComponent, KeyEvent anEvent)
This method is called by JComponents when a key event occurs.
 
Methods inherited from class java.awt.swing.FocusManager
 disableSwingFocusManager, focusNextComponent, focusPreviousComponent, getCurrentManager, isFocusManagerEnabled, processKeyEvent, setCurrentManager
 
Methods inherited from class java.lang.Object
 clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

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

focusNextComponent

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

focusPreviousComponent

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

getFirstComponent

public Component getFirstComponent(Container aContainer)
Return the first component that should receive the focus

getLastComponent

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

getComponentBefore

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

getComponentAfter

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

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.

Contents | Package | Class | Tree | Deprecated | Index | Help Java 1.2 Beta 3
PREV | NEXT SHOW LISTS | HIDE LISTS

Submit a bug or feature
Submit comments/suggestions about new javadoc look.
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.
Copyright 1993-1998 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A. All Rights Reserved.