public class AdvancedKeyboard
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
AdvancedKeyboard.ActionEventListener
Interface representing a listener of keyboard action events.
|
class |
AdvancedKeyboard.Configuration
Class that stores the configuration related some keyboard parameters.
|
class |
AdvancedKeyboard.Info
Class that stores the info related to the installed keyboard
configuration.
|
static interface |
AdvancedKeyboard.LayoutChangeEventListener
Interface representing a listener of keyboard layout change events.
|
static class |
AdvancedKeyboard.LayoutNotificationType
Enumerative representing the type of notification to use in order to
represent visually the current layout in which the keyboard is.
|
static interface |
AdvancedKeyboard.MultitapEventListener
Interface representing a listener of keyboard multitap events.
|
class |
AdvancedKeyboard.Overlay
Class that stores the info related to a keyboard overlay
configuration.
|
static class |
AdvancedKeyboard.PersistenceType
Enumerative representing the persistence type of the installed keyboard
configuration.
|
static class |
AdvancedKeyboard.Property
Read-only properties related to the currently configured keyboard.
|
class |
AdvancedKeyboard.Resources
Class that stores the resources related to the installed keyboard
configuration.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
addActionEventListener(AdvancedKeyboard.ActionEventListener listener)
Adds a listener to all action key events.
|
boolean |
addActionEventListener(AdvancedKeyboard.ActionEventListener listener,
int actionId)
Adds a listener to an action key event, registering to both press and release events.
|
boolean |
addActionEventListener(AdvancedKeyboard.ActionEventListener listener,
int actionId,
boolean pressed)
Adds a listener to a specific action key press or release.
|
boolean |
addLayoutChangeEventListener(AdvancedKeyboard.LayoutChangeEventListener listener)
Adds a listener to layout change events.
|
boolean |
addMultitapEventListener(AdvancedKeyboard.MultitapEventListener listener)
Adds a listener to multitap events.
|
AdvancedKeyboard.Configuration |
getConfiguration()
Gets the configuration related to some keyboard parameters.
|
int |
getCurrentLayoutIndex()
Gets the index of the current layout in which the keyboard is.
|
AdvancedKeyboard.Info |
getInfo()
Gets the info related to the installed keyboard configuration.
|
int |
getIntProperty(AdvancedKeyboard.Property property)
Reads an integer property.
|
java.util.List<AdvancedKeyboard.Overlay> |
getOverlays()
Gets the currently available keyboard overlays.
|
AdvancedKeyboard.Resources |
getResources()
Gets the resources related to the installed keyboard configuration.
|
java.lang.String |
getStringProperty(AdvancedKeyboard.Property property)
Reads a string property.
|
boolean |
installKeyboard(java.lang.String path,
AdvancedKeyboard.PersistenceType persistenceType)
Command the installation of a new keyboard configuration, by specifying
the path to the keyboard configuration file (as exported through the
Keyboard Editor application), the desired type of persistence and the option
to clear any existing configuration (outside of the default one).
|
boolean |
installOverlay(AdvancedKeyboard.Overlay overlay,
AdvancedKeyboard.PersistenceType persistenceType)
Command the installation of a keyboard overlay, by specifying the
overlay object for the keyboard to install.
|
boolean |
isLayoutLocked()
Checks if the keyboard layout is currently locked, preventing any layout
change both manually and through the SDK.
|
boolean |
removeActionEventListener(AdvancedKeyboard.ActionEventListener listener)
Removes a listener to all action key events.
|
boolean |
removeActionEventListener(AdvancedKeyboard.ActionEventListener listener,
int actionId)
Removes a listener to a specific action key event, both for press and release.
|
boolean |
removeActionEventListener(AdvancedKeyboard.ActionEventListener listener,
int actionId,
boolean pressed)
Removes a listener to a specific action key press or release.
|
boolean |
removeLayoutChangeEventListener(AdvancedKeyboard.LayoutChangeEventListener listener)
Removes a listener to layout change events.
|
boolean |
removeMultitapEventListener(AdvancedKeyboard.MultitapEventListener listener)
Removes a listener to multitap events.
|
void |
resetToDefault()
Resets the keyboard configuration to the default one.
|
boolean |
setConfiguration(AdvancedKeyboard.Configuration configuration)
Sets the keyboard configuration parameters.
|
boolean |
setCurrentLayoutIndex(int layoutIndex)
Sets the current layout index.
|
void |
setLayoutLocked(boolean layoutLocked)
Locks or unlocks the possibility for the keyboard to change its current
layout both manually or through the SDK methods.
|
public int getIntProperty(AdvancedKeyboard.Property property)
property - The property to read.ErrorManager singleton
or it returns
Integer.MIN_VALUE if exceptions are disabled.DeviceException - in case of error, when exceptions
are enabled through the ErrorManager singleton.public java.lang.String getStringProperty(AdvancedKeyboard.Property property)
property - The property to read.ErrorManager singleton
or it returns null if exceptions are disabled.DeviceException - in case of error, when exceptions
are enabled through the ErrorManager singleton.public AdvancedKeyboard.Info getInfo()
ErrorManager singleton or null if the exceptions are
disabled.DeviceException - in case of error, when exceptions
are enabled through the ErrorManager singleton.public AdvancedKeyboard.Resources getResources()
ErrorManager singleton or null if the exceptions are
disabled.DeviceException - in case of error, when exceptions
are enabled through the ErrorManager singleton.public AdvancedKeyboard.Configuration getConfiguration()
ErrorManager singleton or null if the exceptions are
disabled.DeviceException - in case of error, when exceptions
are enabled through the ErrorManager singleton.public boolean setConfiguration(AdvancedKeyboard.Configuration configuration)
configuration - The keyboard configuration to set.ErrorManager singleton or returns false if the exceptions
are disabled.DeviceException - in case of error, when exceptions
are enabled through the ErrorManager singleton.public java.util.List<AdvancedKeyboard.Overlay> getOverlays()
public boolean installOverlay(AdvancedKeyboard.Overlay overlay, AdvancedKeyboard.PersistenceType persistenceType)
getOverlays() method.overlay - The overlay object.persistenceType - Desired type of persistence. Be aware that the
FACTORY_RESET_PERSISTENT is not allowed and will cause an
installation failure.ErrorManager singleton.DeviceException - in case of error, when exceptions
are enabled through the ErrorManager singleton.public int getCurrentLayoutIndex()
ErrorManager singleton or return
Integer.MIN_VALUE if exceptions are disabled.DeviceException - in case of error, when exceptions
are enabled through the ErrorManager singleton.public boolean setCurrentLayoutIndex(int layoutIndex)
layoutIndex - The layout index.ErrorManager singleton or return
false if exceptions are disabled.DeviceException - in case of error, when exceptions
are enabled through the ErrorManager singleton.public boolean isLayoutLocked()
ErrorManager singleton or return
false if exceptions are disabled.DeviceException - in case of error, when exceptions
are enabled through the ErrorManager singleton.public void setLayoutLocked(boolean layoutLocked)
layoutLocked - True to lock the layout, false to unlock it.DeviceException - in case of error, when exceptions
are enabled through the ErrorManager singleton.public boolean installKeyboard(java.lang.String path,
AdvancedKeyboard.PersistenceType persistenceType)
path - Path of a zip file created through the use of the Keyboard Editor
application.persistenceType - Desired type of persistence. Be aware that the
FACTORY_RESET_PERSISTENT is not allowed and will cause an
installation failure.ErrorManager singleton.DeviceException - in case of error, when exceptions
are enabled through the ErrorManager singleton.public void resetToDefault()
public boolean addActionEventListener(AdvancedKeyboard.ActionEventListener listener, int actionId, boolean pressed)
listener - The listener to add.actionId - ID of the action event to listen to.pressed - True to listen to the pressure event, false to listen to the release event.ErrorManager singleton.DeviceException - in case of error, when exceptions
are enabled through the ErrorManager singleton.public boolean addActionEventListener(AdvancedKeyboard.ActionEventListener listener, int actionId)
listener - The listener to add.actionId - ID of the action event to listen to.ErrorManager singleton.DeviceException - in case of error, when exceptions
are enabled through the ErrorManager singleton.public boolean addActionEventListener(AdvancedKeyboard.ActionEventListener listener)
listener - The listener to add.ErrorManager singleton.DeviceException - in case of error, when exceptions
are enabled through the ErrorManager singleton.public boolean removeActionEventListener(AdvancedKeyboard.ActionEventListener listener, int actionId, boolean pressed)
listener - The listener to remove.actionId - ID of the related action key.pressed - True to remove the pressure event, false to remove the release event.ErrorManager singleton.DeviceException - in case of error, when exceptions
are enabled through the ErrorManager singleton.public boolean removeActionEventListener(AdvancedKeyboard.ActionEventListener listener, int actionId)
listener - The listener to remove.actionId - ID of the related action key.ErrorManager singleton.DeviceException - in case of error, when exceptions
are enabled through the ErrorManager singleton.public boolean removeActionEventListener(AdvancedKeyboard.ActionEventListener listener)
listener - The listener to remove.ErrorManager singleton.DeviceException - in case of error, when exceptions
are enabled through the ErrorManager singleton.public boolean addLayoutChangeEventListener(AdvancedKeyboard.LayoutChangeEventListener listener)
listener - The listener to add.ErrorManager singleton.DeviceException - in case of error, when exceptions
are enabled through the ErrorManager singleton.public boolean removeLayoutChangeEventListener(AdvancedKeyboard.LayoutChangeEventListener listener)
listener - The listener to remove.ErrorManager singleton.DeviceException - in case of error, when exceptions
are enabled through the ErrorManager singleton.public boolean addMultitapEventListener(AdvancedKeyboard.MultitapEventListener listener)
listener - The listener to add.ErrorManager singleton.DeviceException - in case of error, when exceptions
are enabled through the ErrorManager singleton.public boolean removeMultitapEventListener(AdvancedKeyboard.MultitapEventListener listener)
listener - The listener to remove.ErrorManager singleton.DeviceException - in case of error, when exceptions
are enabled through the ErrorManager singleton.