src/share/classes/java/awt/ContainerOrderFocusTraversalPolicy.java

Print this page

        

*** 83,93 **** * getComponentBefore have already built the list before determining * that they need to invoke getFirstComponent or getLastComponent, the * list should be reused if possible. */ transient private Container cachedRoot; ! transient private List cachedCycle; /* * We suppose to use getFocusTraversalCycle & getComponentIndex methods in order * to divide the policy into two parts: * 1) Making the focus traversal cycle. --- 83,93 ---- * getComponentBefore have already built the list before determining * that they need to invoke getFirstComponent or getLastComponent, the * list should be reused if possible. */ transient private Container cachedRoot; ! transient private List<Component> cachedCycle; /* * We suppose to use getFocusTraversalCycle & getComponentIndex methods in order * to divide the policy into two parts: * 1) Making the focus traversal cycle.
*** 109,119 **** } /*protected*/ private int getComponentIndex(List<Component> cycle, Component aComponent) { return cycle.indexOf(aComponent); } ! private void enumerateCycle(Container container, List cycle) { if (!(container.isVisible() && container.isDisplayable())) { return; } cycle.add(container); --- 109,119 ---- } /*protected*/ private int getComponentIndex(List<Component> cycle, Component aComponent) { return cycle.indexOf(aComponent); } ! private void enumerateCycle(Container container, List<Component> cycle) { if (!(container.isVisible() && container.isDisplayable())) { return; } cycle.add(container);