Lines Matching refs:cycle
33 * of child Components in a Container. From a particular focus cycle root, the
40 * down-cycle. That is, during normal forward focus traversal, the Component
41 * traversed after a focus cycle root will be the focus-cycle-root's default
93 * 1) Making the focus traversal cycle.
94 * 2) Traversing the cycle.
96 * traversal cycle. The two methods mentioned above should implement this logic.
98 * cycle: traversing back and forth, retrieving the initial/default/first/last
106 List<Component> cycle = new ArrayList<Component>();
107 enumerateCycle(aContainer, cycle);
108 return cycle;
110 /*protected*/ private int getComponentIndex(List<Component> cycle, Component aComponent) {
111 return cycle.indexOf(aComponent);
114 private void enumerateCycle(Container container, List cycle) {
119 cycle.add(container);
128 enumerateCycle(cont, cycle);
132 cycle.add(comp);
152 * Checks if a new focus cycle takes place and returns a Component to traverse focus to.
153 * @param comp a possible focus cycle root or policy provider
156 * and implicit down-cycle is set, otherwise {@code null}
169 log.fine("### Transfered focus down-cycle to " + retComp +
170 " in the focus cycle root " + cont);
190 * aContainer must be a focus cycle root of aComponent or a focus traversal policy provider.
193 * focus down-cycle. That is, during normal forward focus traversal, the
194 * Component traversed after a focus cycle root will be the focus-cycle-
199 * traversal policy provider</a>, the focus is always transferred down-cycle.
201 * @param aContainer a focus cycle root of aComponent or a focus traversal policy provider
206 * @throws IllegalArgumentException if aContainer is not a focus cycle
217 throw new IllegalArgumentException("aContainer should be focus cycle root or focus traversal policy provider");
220 throw new IllegalArgumentException("aContainer is not a focus cycle root of aComponent");
229 // Before all the ckecks below we first see if it's an FTP provider or a focus cycle root.
230 // If it's the case just go down cycle (if it's set to "implicit").
247 // Null result means that we overstepped the limit of the FTP's cycle.
248 // In that case we must quit the cycle, otherwise return the component found.
256 List<Component> cycle = getFocusTraversalCycle(aContainer);
258 if (log.isLoggable(PlatformLogger.FINE)) log.fine("### Cycle is " + cycle + ", component is " + aComponent);
260 int index = getComponentIndex(cycle, aComponent);
264 log.fine("### Didn't find component " + aComponent + " in a cycle " + aContainer);
269 for (index++; index < cycle.size(); index++) {
270 comp = cycle.get(index);
280 this.cachedCycle = cycle;
295 * aContainer must be a focus cycle root of aComponent or a <a
299 * @param aContainer a focus cycle root of aComponent or focus traversal policy provider
304 * @throws IllegalArgumentException if aContainer is not a focus cycle
313 throw new IllegalArgumentException("aContainer should be focus cycle root or focus traversal policy provider");
316 throw new IllegalArgumentException("aContainer is not a focus cycle root of aComponent");
336 // Null result means that we overstepped the limit of the FTP's cycle.
337 // In that case we must quit the cycle, otherwise return the component found.
350 List<Component> cycle = getFocusTraversalCycle(aContainer);
352 if (log.isLoggable(PlatformLogger.FINE)) log.fine("### Cycle is " + cycle + ", component is " + aComponent);
354 int index = getComponentIndex(cycle, aComponent);
358 log.fine("### Didn't find component " + aComponent + " in a cycle " + aContainer);
367 comp = cycle.get(index);
377 this.cachedCycle = cycle;
391 * Returns the first Component in the traversal cycle. This method is used
395 * @param aContainer the focus cycle root or focus traversal policy provider whose first
397 * @return the first Component in the traversal cycle of aContainer,
402 List<Component> cycle;
417 cycle = this.cachedCycle;
419 cycle = getFocusTraversalCycle(aContainer);
422 if (cycle.size() == 0) {
426 if (log.isLoggable(PlatformLogger.FINE)) log.fine("### Cycle is " + cycle);
428 for (Component comp : cycle) {
442 * Returns the last Component in the traversal cycle. This method is used
446 * @param aContainer the focus cycle root or focus traversal policy provider whose last
448 * @return the last Component in the traversal cycle of aContainer,
453 List<Component> cycle;
467 cycle = this.cachedCycle;
469 cycle = getFocusTraversalCycle(aContainer);
472 if (cycle.size() == 0) {
476 if (log.isLoggable(PlatformLogger.FINE)) log.fine("### Cycle is " + cycle);
478 for (int i= cycle.size() - 1; i >= 0; i--) {
479 Component comp = cycle.get(i);
495 * to receive focus when traversing down into a new focus traversal cycle
499 * @param aContainer the focus cycle root or focus traversal policy provider whose default
501 * @return the default Component in the traversal cycle of aContainer,
512 * down-cycle implicitly. If <code>true</code>, during normal forward focus
513 * traversal, the Component traversed after a focus cycle root will be the
514 * focus-cycle-root's default Component to focus. If <code>false</code>,
515 * the next Component in the focus traversal cycle rooted at the specified
516 * focus cycle root will be traversed instead. The default value for this
520 * ContainerOrderFocusTraversalPolicy transfers focus down-cycle
531 * down-cycle implicitly. If <code>true</code>, during normal forward focus
532 * traversal, the Component traversed after a focus cycle root will be the
533 * focus-cycle-root's default Component to focus. If <code>false</code>,
534 * the next Component in the focus traversal cycle rooted at the specified
535 * focus cycle root will be traversed instead.
538 * down-cycle implicitly