public static class RepeatInputComboBoxDialog.RequestFocusListener
extends java.lang.Object
implements javax.swing.event.AncestorListener
Convenience class to request focus on a component.
When the component is added to a realized Window then component will request focus immediately, since the ancestorAdded event is fired immediately.
When the component is added to a non realized Window, then the focus request will be made once the window is realized, since the ancestorAdded event will not be fired until then.
Using the default constructor will cause the listener to be removed from the component once the AncestorEvent is generated. A second constructor allows you to specify a boolean value of false to prevent the AncestorListener from being removed when the event is generated. This will allow you to reuse the listener each time the event is generated.
Modifier and Type | Class and Description |
---|---|
class |
RepeatInputComboBoxDialog.RequestFocusListener.SizeListener |
class |
RepeatInputComboBoxDialog.RequestFocusListener.WinListener |
Modifier and Type | Field and Description |
---|---|
static java.awt.Point |
location |
static java.awt.Point |
locationOnClose |
static java.awt.Dimension |
size |
static java.awt.Dimension |
sizeOnClose |
Constructor and Description |
---|
RequestFocusListener() |
RequestFocusListener(boolean removeListener) |
Modifier and Type | Method and Description |
---|---|
void |
ancestorAdded(javax.swing.event.AncestorEvent e) |
void |
ancestorMoved(javax.swing.event.AncestorEvent e) |
void |
ancestorRemoved(javax.swing.event.AncestorEvent e) |
static java.awt.Dialog |
getDialog(java.awt.event.ComponentEvent e) |
static java.awt.Window |
getWindow(java.awt.Component component) |
public static java.awt.Dimension size
public static java.awt.Point location
public static java.awt.Point locationOnClose
public static java.awt.Dimension sizeOnClose
public RequestFocusListener()
public RequestFocusListener(boolean removeListener)
public static java.awt.Dialog getDialog(java.awt.event.ComponentEvent e)
public static java.awt.Window getWindow(java.awt.Component component)
public void ancestorAdded(javax.swing.event.AncestorEvent e)
ancestorAdded
in interface javax.swing.event.AncestorListener
public void ancestorMoved(javax.swing.event.AncestorEvent e)
ancestorMoved
in interface javax.swing.event.AncestorListener
public void ancestorRemoved(javax.swing.event.AncestorEvent e)
ancestorRemoved
in interface javax.swing.event.AncestorListener