Customizing the host keypad
- The following code sample shows how to hide the host keypad:
The default implementation of this method returnspublic IHostKeypadDisplayInfo getHostKeypadDisplayInfo() { HostKeypadDisplayInfo displayInfo = new HostKeypadDisplayInfo(); displayInfo.setKeypadVisible(false); return displayInfo; }null, indicating to the ZIETrans runtime that the settings defined in the project settings should be used to show (or not show) the host keypad (and to determine which keys to show). By overriding this method and returning a value other thannull, the ZIETrans runtime will use thisHostKeypadDisplayInfoobject when the transformation is applied during runtime. - The following code sample shows how to show only the Enter and
F1/Help keys on a host keypad:
public IHostKeypadDisplayInfo getHostKeypadDisplayInfo() { // Construct an array of keys to include on the keypad KeypadKey[] keysToDisplay = new KeypadKey[] { new KeypadKey("[enter]", "Enter"), new KeypadKey("[pf1]", "Help") }; // Construct and return the keypad display info object return new HostKeypadDisplayInfo(keysToDisplay, true, IHostKeypadDisplayInfo.DISPLAY_BUTTON); }