Lines Matching refs:aComponent

110     /*protected*/ private int getComponentIndex(List<Component> cycle, Component aComponent) {
111 return cycle.indexOf(aComponent);
136 private Container getTopmostProvider(Container focusCycleRoot, Component aComponent) {
137 Container aCont = aComponent.getParent();
189 * Returns the Component that should receive the focus after aComponent.
190 * aContainer must be a focus cycle root of aComponent or a focus traversal policy provider.
201 * @param aContainer a focus cycle root of aComponent or a focus traversal policy provider
202 * @param aComponent a (possibly indirect) child of aContainer, or
204 * @return the Component that should receive the focus after aComponent, or
207 * root of aComponent or focus traversal policy provider, or if either aContainer or
208 * aComponent is null
210 public Component getComponentAfter(Container aContainer, Component aComponent) {
211 if (log.isLoggable(PlatformLogger.FINE)) log.fine("### Searching in " + aContainer + " for component after " + aComponent);
213 if (aContainer == null || aComponent == null) {
214 throw new IllegalArgumentException("aContainer and aComponent cannot be null");
219 } else if (aContainer.isFocusCycleRoot() && !aComponent.isFocusCycleRoot(aContainer)) {
220 throw new IllegalArgumentException("aContainer is not a focus cycle root of aComponent");
231 Component comp = getComponentDownCycle(aComponent, FORWARD_TRAVERSAL);
237 Container provider = getTopmostProvider(aContainer, aComponent);
240 log.fine("### Asking FTP " + provider + " for component after " + aComponent);
245 Component afterComp = policy.getComponentAfter(provider, aComponent);
253 aComponent = provider;
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);
294 * Returns the Component that should receive the focus before aComponent.
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
300 * @param aComponent a (possibly indirect) child of aContainer, or
302 * @return the Component that should receive the focus before aComponent,
305 * root of aComponent or focus traversal policy provider, or if either aContainer or
306 * aComponent is null
308 public Component getComponentBefore(Container aContainer, Component aComponent) {
309 if (aContainer == null || aComponent == null) {
310 throw new IllegalArgumentException("aContainer and aComponent cannot be null");
315 } else if (aContainer.isFocusCycleRoot() && !aComponent.isFocusCycleRoot(aContainer)) {
316 throw new IllegalArgumentException("aContainer is not a focus cycle root of aComponent");
326 Container provider = getTopmostProvider(aContainer, aComponent);
329 log.fine("### Asking FTP " + provider + " for component after " + aComponent);
334 Component beforeComp = policy.getComponentBefore(provider, aComponent);
342 aComponent = provider;
345 if (accept(aComponent)) {
346 return aComponent;
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);
551 * @param aComponent the Component whose fitness as a focus owner is to
553 * @return <code>true</code> if aComponent is visible, displayable,
556 protected boolean accept(Component aComponent) {
557 if (!aComponent.canBeFocusOwner()) {
564 if (!(aComponent instanceof Window)) {
565 for (Container enableTest = aComponent.getParent();