Class VirtualKeyboard


  • public class VirtualKeyboard
    extends Window
    • Field Detail

      • value

        public java.lang.String value
      • alfaKeyboard

        protected AlphabetKeyboard alfaKeyboard
        Represents the container's letters keyboard
      • isOpen

        protected static boolean isOpen
      • btnCancelPressed

        public boolean btnCancelPressed
      • iconColor

        public static int iconColor
      • totalTime

        protected int totalTime
    • Constructor Detail

      • VirtualKeyboard

        protected VirtualKeyboard()
    • Method Detail

      • orientationChanged

        public static void orientationChanged​(boolean changed)
      • getInstance

        public static VirtualKeyboard getInstance()
        This method returns the last created instance of the VirtualKeyboard. In case there isn't one it will return null (This method should only be used to retrieve an instance, not create one).
        Returns:
      • onPopup

        protected void onPopup()
        Description copied from class: Window
        Placeholder called imediatly before the popup began. The default implementation does nothing.
        Overrides:
        onPopup in class Window
      • setRect

        protected void setRect​(boolean screenResized)
      • popup

        public void popup()
        Description copied from class: Window
        Pops up this window, blocking the execution until the window closes.
        Overrides:
        popup in class Window
      • postPopup

        protected void postPopup()
        Description copied from class: Window
        Placeholder called after the popup is done and after the repaint of this window. The default implementation does nothing.
        Overrides:
        postPopup in class Window
      • postUnpop

        public void postUnpop()
        Description copied from class: Window
        Placeholder called after the unpop is done and after the repaint of the other window. The default implementation does nothing.
        Overrides:
        postUnpop in class Window
      • onUnpop

        protected void onUnpop()
        Description copied from class: Window
        Placeholder called imediatly before the unpop began. The default implementation does nothing.
        Overrides:
        onUnpop in class Window
      • organizarVisibilidadeTecladoAlfa

        protected boolean organizarVisibilidadeTecladoAlfa()
        Organizes the visible buttons in accordance with the valid characters.
        Returns:
        returns a boolean which signals if the letters keyboard should appear or not
      • organizeNumericKeyboardVisibility

        protected boolean organizeNumericKeyboardVisibility()
        Organizes the visible buttons in accordance with the valid characters.
        Returns:
        returns a boolean which signals if the numeric keyboard should appear or not
      • setValue

        public void setValue​(java.lang.String value)
        Sets the value used when you open the keyboard.
        Parameters:
        value -
      • getText

        public java.lang.String getText()
        Returns the value on the VirtualKeyboard
        Returns:
        String value
      • setText

        public void setText​(java.lang.String text)
        Sets the text on the VirtualKeyboard Edit.
        Parameters:
        text - new text
      • setValidChars

        public void setValidChars​(java.lang.String validCharsString)
        Sets the possible characters to be written on the keyboard. If the value is null, any character can be used.
      • setMaxLength

        public void setMaxLength​(int maxLength)
        Sets the max string size
        Parameters:
        maxLength2 -
      • setMode

        public void setMode​(byte mode)
      • setFocus

        public void setFocus​(Control c)
        Description copied from class: Window
        Sets focus to the given control. When a user types a key, the control with focus get the key event. At any given time, only one control in a window can have focus. Calling this method will cause a FOCUS_OUT control event to be posted to the window's current focus control (if one exists) and will cause a FOCUS_IN control event to be posted to the new focus control.
        Overrides:
        setFocus in class Window
      • onEvent

        public void onEvent​(Event event)
        Description copied from class: Control
        Called to process key, pen, control and other posted events.
        Overrides:
        onEvent in class Control
        Parameters:
        event - the event to process
        See Also:
        Event, KeyEvent, PenEvent
      • setCursorPosEnd

        public void setCursorPosEnd()
      • setCursorPos

        public void setCursorPos()
      • updateMessages

        public static void updateMessages​(java.lang.String strCancelar,
                                          java.lang.String strLimpar)
        Deprecated.
        Updates the messages.
        Parameters:
        strCancelar -
        strLimpar -
      • updateStrCancel

        public static void updateStrCancel​(java.lang.String strCancel)
        Updates the cancel string;
        Parameters:
        strCancel -
      • updateImages

        public static void updateImages​(Image imgOk,
                                        Image imgCancel,
                                        Image imgBackSpace,
                                        Image img123,
                                        Image imgAbc)
      • screenResized

        public void screenResized()
        Description copied from class: Window
        Called when the screen is resized, probably caused by a rotation. ATTENTION: THIS CALL CANNOT BE BLOCKED OR THE SYSTEM WILL LOCK!
        Overrides:
        screenResized in class Window