Compiere 3.1

org.compiere.apps
Class AFocusTraversalPolicy

java.lang.Object
  extended by java.awt.FocusTraversalPolicy
      extended by javax.swing.InternalFrameFocusTraversalPolicy
          extended by javax.swing.SortingFocusTraversalPolicy
              extended by javax.swing.LayoutFocusTraversalPolicy
                  extended by org.compiere.apps.AFocusTraversalPolicy
All Implemented Interfaces:
Serializable

public class AFocusTraversalPolicy
extends LayoutFocusTraversalPolicy

Compiere Application Focus Traversal Policy

Version:
$Id: AFocusTraversalPolicy.java,v 1.2 2006/07/30 00:51:27 jjanke Exp $
Author:
Jorg Janke
See Also:
Serialized Form

Constructor Summary
AFocusTraversalPolicy()
          Constructor
 
Method Summary
protected  boolean accept(Component aComponent)
          Determines whether the specified Component is an acceptable choice as the new focus owner.
static AFocusTraversalPolicy get()
          Get singleton
 Component getDefaultComponent(Container aContainer)
          Get Default Component
 Component getFirstComponent(Container aContainer)
          Get First Component
 
Methods inherited from class javax.swing.LayoutFocusTraversalPolicy
getComponentAfter, getComponentBefore, getLastComponent
 
Methods inherited from class javax.swing.SortingFocusTraversalPolicy
getComparator, getImplicitDownCycleTraversal, setComparator, setImplicitDownCycleTraversal
 
Methods inherited from class javax.swing.InternalFrameFocusTraversalPolicy
getInitialComponent
 
Methods inherited from class java.awt.FocusTraversalPolicy
getInitialComponent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AFocusTraversalPolicy

public AFocusTraversalPolicy()
Constructor

Method Detail

get

public static AFocusTraversalPolicy get()
Get singleton

Returns:
AFocusTraversalPolicy

getDefaultComponent

public Component getDefaultComponent(Container aContainer)
Get Default Component

Overrides:
getDefaultComponent in class SortingFocusTraversalPolicy
Parameters:
aContainer - container
Returns:
default or null

getFirstComponent

public Component getFirstComponent(Container aContainer)
Get First Component

Overrides:
getFirstComponent in class LayoutFocusTraversalPolicy
Parameters:
aContainer - container
Returns:
first component to focus

accept

protected boolean accept(Component aComponent)
Determines whether the specified Component is an acceptable choice as the new focus owner. This method performs the following sequence of operations:
  1. Checks whether aComponent is visible, displayable, enabled, and focusable. If any of these properties is false, this method returns false.
  2. If aComponent is an instance of JTable, returns true.
  3. If aComponent is an instance of JComboBox, then returns the value of aComponent.getUI().isFocusTraversable(aComponent).
  4. If aComponent is a JComponent with a JComponent.WHEN_FOCUSED InputMap that is neither null nor empty, returns true.
  5. Returns the value of DefaultFocusTraversalPolicy.accept(aComponent).

Overrides:
accept in class LayoutFocusTraversalPolicy
Parameters:
aComponent - the Component whose fitness as a focus owner is to be tested
Returns:
true if aComponent is a valid choice for a focus owner; otherwise false
See Also:
Component.isVisible(), Component.isDisplayable(), Component.isEnabled(), Component.isFocusable(), ComboBoxUI.isFocusTraversable(javax.swing.JComboBox), JComponent.getInputMap(), DefaultFocusTraversalPolicy.accept(java.awt.Component)

Compiere 3.1

Compiere® is a registered trademark of ComPiere, Inc. ©2004-2008 HumanFlash.com All rights reserved.