public class KeyboardPopup
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
AUTO_SHOW_PROPERTY
Client property key specifying whether the virtual keyboard is automatically shown on focus.
|
static java.lang.String |
CUSTOM_LAYOUT_PROPERTY
Client property key specifying a custom keyboard layout template for a component.
|
static java.lang.String |
LAYOUT_MODE_PROPERTY
Client property key specifying the keyboard layout mode for a component.
|
static java.lang.String |
POPUP_PLACEMENT_PROPERTY
Client property key specifying the popup placement relative to a component.
|
| Constructor and Description |
|---|
KeyboardPopup()
Initializes a new instance of the
KeyboardPopup class. |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
canExtend(java.lang.Object c)
Determines whether the specified object can be extended with virtual keyboard auto-show capabilities.
|
void |
dispose()
Disposes resources used by this auto-show manager.
|
static boolean |
getAutoShow(java.awt.Component c)
Gets whether automatic keyboard popup on focus is enabled for the specified component,
inheriting from parent containers or the top-level window if not set directly.
|
java.awt.Component |
getCurrentTarget()
Gets the currently active target component for which the keyboard is shown.
|
static KeyboardLayout |
getCustomLayout(java.awt.Component c)
Gets the custom keyboard layout template associated with the specified component,
inheriting from parent containers if not set directly.
|
static KeyboardPopup |
getDefaultInstance()
Gets the shared default instance of
KeyboardPopup. |
KeyboardMode |
getDefaultLayoutMode()
Gets the default layout mode used when components do not specify an override.
|
PopupPlacement |
getDefaultPlacement()
Gets the default popup placement relative to the active component.
|
static KeyboardMode |
getLayoutMode(java.awt.Component c)
Gets the keyboard layout mode associated with the specified component,
inheriting from parent containers or the default if not set directly.
|
static PopupPlacement |
getPopupPlacement(java.awt.Component c)
Gets the popup placement mode relative to the specified component,
inheriting from parent containers or the default if not set directly.
|
Theme |
getTheme()
Gets the theme applied to the virtual keyboard popup.
|
void |
hide()
Hides the virtual keyboard popup.
|
static void |
hidePopup()
Hides the virtual keyboard popup if currently visible.
|
static void |
install()
Installs automatic popup display globally across all windows.
|
static void |
install(java.awt.Window window)
Installs automatic popup display on the specified window.
|
boolean |
isAutoReleaseModifierKeys()
Gets whether pressing a regular key automatically releases modifier keys.
|
boolean |
isCloseOnEscape()
Gets whether pressing Escape closes the virtual keyboard popup.
|
boolean |
isEnabled()
Gets whether automatic popup display on focus is globally enabled for this instance.
|
static boolean |
isInputControl(java.awt.Component c)
Determines whether the specified component is considered an editable input control.
|
boolean |
isPopupVisible()
Gets whether the virtual keyboard popup is currently visible.
|
boolean |
isShowCloseButton()
Gets whether a close button is displayed on the popup.
|
static boolean |
isVisible()
Returns whether the virtual keyboard popup is currently visible.
|
void |
setAutoReleaseModifierKeys(boolean value)
Sets whether pressing a regular key automatically releases modifier keys.
|
static void |
setAutoShow(java.awt.Component c,
boolean value)
Sets whether automatic keyboard popup on focus is enabled for the specified component.
|
void |
setCloseOnEscape(boolean value)
Sets whether pressing Escape closes the virtual keyboard popup.
|
static void |
setCustomLayout(java.awt.Component c,
KeyboardLayout value)
Sets a custom keyboard layout template for the specified component.
|
void |
setDefaultLayoutMode(KeyboardMode value)
Sets the default layout mode used when components do not specify an override.
|
void |
setDefaultPlacement(PopupPlacement value)
Sets the default popup placement relative to the active component.
|
void |
setEnabled(boolean value)
Sets whether automatic popup display on focus is globally enabled for this instance.
|
static void |
setLayoutMode(java.awt.Component c,
KeyboardMode value)
Sets the keyboard layout mode associated with the specified component.
|
static void |
setPopupPlacement(java.awt.Component c,
PopupPlacement value)
Sets the popup placement mode relative to the specified component.
|
void |
setShowCloseButton(boolean value)
Sets whether a close button is displayed on the popup.
|
void |
setTheme(Theme value)
Sets the theme applied to the virtual keyboard popup.
|
void |
show(java.awt.Component target)
Shows the virtual keyboard popup for the specified target component.
|
static void |
showPopup(java.awt.Component target)
Shows the virtual keyboard popup for the specified target component using default settings.
|
static void |
uninstall()
Disables automatic popup display globally.
|
static void |
uninstall(java.awt.Window window)
Disables automatic popup display for the specified window.
|
public static final java.lang.String AUTO_SHOW_PROPERTY
public static final java.lang.String LAYOUT_MODE_PROPERTY
public static final java.lang.String POPUP_PLACEMENT_PROPERTY
public static final java.lang.String CUSTOM_LAYOUT_PROPERTY
public KeyboardPopup()
KeyboardPopup class.public static KeyboardPopup getDefaultInstance()
KeyboardPopup.public static void install()
public static void install(java.awt.Window window)
window - The window to enable auto-show for.public static void uninstall()
public static void uninstall(java.awt.Window window)
window - The window to disable auto-show for.public static void showPopup(java.awt.Component target)
target - The target input component.public static void hidePopup()
public static boolean isVisible()
public static void setAutoShow(java.awt.Component c,
boolean value)
c - The component to configure.value - true to enable auto-show, or false to disable.public static boolean getAutoShow(java.awt.Component c)
c - The component to inspect.public static void setLayoutMode(java.awt.Component c,
KeyboardMode value)
c - The component to configure.value - The keyboard layout mode.public static KeyboardMode getLayoutMode(java.awt.Component c)
c - The component to inspect.public static void setPopupPlacement(java.awt.Component c,
PopupPlacement value)
c - The component to configure.value - The popup placement mode.public static PopupPlacement getPopupPlacement(java.awt.Component c)
c - The component to inspect.public static void setCustomLayout(java.awt.Component c,
KeyboardLayout value)
c - The component to configure.value - The custom keyboard layout template.public static KeyboardLayout getCustomLayout(java.awt.Component c)
c - The component to inspect.public static boolean isInputControl(java.awt.Component c)
c - The component to inspect.public static boolean canExtend(java.lang.Object c)
c - The component or object to test.public boolean isEnabled()
public void setEnabled(boolean value)
value - true to enable auto-show, or false to disable.public KeyboardMode getDefaultLayoutMode()
KeyboardMode value.public void setDefaultLayoutMode(KeyboardMode value)
value - A KeyboardMode value.public PopupPlacement getDefaultPlacement()
PopupPlacement value.public void setDefaultPlacement(PopupPlacement value)
value - A PopupPlacement value.public Theme getTheme()
Theme value.public void setTheme(Theme value)
value - A Theme value.public boolean isCloseOnEscape()
public void setCloseOnEscape(boolean value)
value - true to close on Escape, or false otherwise.public boolean isShowCloseButton()
public void setShowCloseButton(boolean value)
value - true to show close button, or false otherwise.public boolean isAutoReleaseModifierKeys()
public void setAutoReleaseModifierKeys(boolean value)
value - true to auto-release modifier keys, or false otherwise.public boolean isPopupVisible()
public java.awt.Component getCurrentTarget()
public void show(java.awt.Component target)
target - The target input component.public void hide()
public void dispose()