com.mucommander.ui.helper
Class FocusRequester

java.lang.Object
  extended by com.mucommander.ui.helper.FocusRequester
All Implemented Interfaces:
java.lang.Runnable

public class FocusRequester
extends java.lang.Object
implements java.lang.Runnable

The sole purpose of this class is to provide a way to request focus on a component after all currently queued Swing events have been processed. This is useful for components that are not eligible to receive focus at the time they request it, for instance when they are not visible yet.

Author:
Maxence Bernard

Method Summary
static void requestFocus(java.awt.Component c)
          Requests focus on the given componentusing Component.requestFocus(), after all currently queued Swing events have been processed.
static void requestFocusInWindow(java.awt.Component c)
          Requests focus on the given componentusing Component.requestFocusInWindow(boolean)}, after all currently queued Swing events have been processed.
 void run()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

requestFocus

public static void requestFocus(java.awt.Component c)
Requests focus on the given componentusing Component.requestFocus(), after all currently queued Swing events have been processed.

This method can typically be used when a component has been added to the screen but is not yet visible. In that case, calling Component.requestFocus() would have no effect.

Parameters:
c - the component on which to request focus
See Also:
Component.requestFocus()

requestFocusInWindow

public static void requestFocusInWindow(java.awt.Component c)
Requests focus on the given componentusing Component.requestFocusInWindow(boolean)}, after all currently queued Swing events have been processed.

This method can typically be used when a component has been added to the screen but is not yet visible. In that case, calling Component.requestFocusInWindow() would have no effect.

Parameters:
c - the component on which to request focus
See Also:
Component.requestFocusInWindow()

run

public void run()
Specified by:
run in interface java.lang.Runnable


This file is part of muCommander - Copyright (C) 2002-2008 Maxence Bernard