Lines Matching defs: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<Component> 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("### Transferred 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
219 throw new IllegalArgumentException("aContainer should be focus cycle root or focus traversal policy provider");
222 throw new IllegalArgumentException("aContainer is not a focus cycle root of aComponent");
231 // Before all the checks below we first see if it's an FTP provider or a focus cycle root.
232 // If it's the case just go down cycle (if it's set to "implicit").
234 // Check if aComponent is focus-cycle-root's default Component, i.e.
235 // focus cycle root & focus-cycle-root's default Component is same.
251 // Null result means that we overstepped the limit of the FTP's cycle.
252 // In that case we must quit the cycle, otherwise return the component found.
262 List<Component> cycle = getFocusTraversalCycle(aContainer);
265 log.fine("### Cycle is " + cycle + ", component is " + aComponent);
268 int index = getComponentIndex(cycle, aComponent);
272 log.fine("### Didn't find component " + aComponent + " in a cycle " + aContainer);
277 for (index++; index < cycle.size(); index++) {
278 comp = cycle.get(index);
288 this.cachedCycle = cycle;
303 * aContainer must be a focus cycle root of aComponent or a <a
307 * @param aContainer a focus cycle root of aComponent or focus traversal policy provider
312 * @throws IllegalArgumentException if aContainer is not a focus cycle
321 throw new IllegalArgumentException("aContainer should be focus cycle root or focus traversal policy provider");
324 throw new IllegalArgumentException("aContainer is not a focus cycle root of aComponent");
344 // Null result means that we overstepped the limit of the FTP's cycle.
345 // In that case we must quit the cycle, otherwise return the component found.
360 List<Component> cycle = getFocusTraversalCycle(aContainer);
363 log.fine("### Cycle is " + cycle + ", component is " + aComponent);
366 int index = getComponentIndex(cycle, aComponent);
370 log.fine("### Didn't find component " + aComponent + " in a cycle " + aContainer);
379 comp = cycle.get(index);
389 this.cachedCycle = cycle;
403 * Returns the first Component in the traversal cycle. This method is used
407 * @param aContainer the focus cycle root or focus traversal policy provider whose first
409 * @return the first Component in the traversal cycle of aContainer,
414 List<Component> cycle;
431 cycle = this.cachedCycle;
433 cycle = getFocusTraversalCycle(aContainer);
436 if (cycle.size() == 0) {
443 log.fine("### Cycle is " + cycle);
446 for (Component comp : cycle) {
460 * Returns the last Component in the traversal cycle. This method is used
464 * @param aContainer the focus cycle root or focus traversal policy provider whose last
466 * @return the last Component in the traversal cycle of aContainer,
471 List<Component> cycle;
487 cycle = this.cachedCycle;
489 cycle = getFocusTraversalCycle(aContainer);
492 if (cycle.size() == 0) {
499 log.fine("### Cycle is " + cycle);
502 for (int i= cycle.size() - 1; i >= 0; i--) {
503 Component comp = cycle.get(i);
522 * to receive focus when traversing down into a new focus traversal cycle
526 * @param aContainer the focus cycle root or focus traversal policy provider whose default
528 * @return the default Component in the traversal cycle of aContainer,
539 * down-cycle implicitly. If {@code true}, during normal forward focus
540 * traversal, the Component traversed after a focus cycle root will be the
541 * focus-cycle-root's default Component to focus. If {@code false},
542 * the next Component in the focus traversal cycle rooted at the specified
543 * focus cycle root will be traversed instead. The default value for this
547 * ContainerOrderFocusTraversalPolicy transfers focus down-cycle
558 * down-cycle implicitly. If {@code true}, during normal forward focus
559 * traversal, the Component traversed after a focus cycle root will be the
560 * focus-cycle-root's default Component to focus. If {@code false},
561 * the next Component in the focus traversal cycle rooted at the specified
562 * focus cycle root will be traversed instead.
565 * down-cycle implicitly