Class VirtualKeyboard


  • public class VirtualKeyboard
    extends Window
    • Field Detail

      • value

        public java.lang.String value
      • alfaKeyboard

        protected AlphabetKeyboard alfaKeyboard
        Representa o container do teclado alfa
      • isOpen

        protected static boolean isOpen
      • btnCancelClicked

        public boolean btnCancelClicked
    • Constructor Detail

      • VirtualKeyboard

        protected VirtualKeyboard()
    • Method Detail

      • orientationChanged

        public static void orientationChanged​(boolean changed)
      • getInstance

        public static VirtualKeyboard getInstance()
        Método que retorna a última instância criada do teclado... Caso não exista nenhuma instância criada irá retornar nulo. (Esse método só deve ser utilizado para recuperar a instância e não para criar o teclado..)
        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
      • 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
      • organizarVisibilidadeTecladoAlfa

        protected boolean organizarVisibilidadeTecladoAlfa()
        Organiza os botoes que sao visiveis de acordo com os caracteres validos do edit.
        Returns:
        retorna um boolean sinalizando se o teclado alfa deve ou nao aparecer
      • organizarVisibilidadeTecladoNumerico

        protected boolean organizarVisibilidadeTecladoNumerico()
        Organiza os botoes que sao visiveis de acordo com os caracteres validos do edit.
        Returns:
        retorna um boolean sinalizando se o teclado numerico deve ou nao aparecer
      • setValue

        public void setValue​(java.lang.String value)
        seta o valor que o campo será preenchido ao abrir o teclado.
        Parameters:
        value -
      • getText

        public java.lang.String getText()
        Método que retorna o valor digitado no edit do teclado virtual
        Returns:
        String indica o valor digitado no teclado virtual
      • setText

        public void setText​(java.lang.String text)
        Método que configura um valor para o edit do teclado virtual
        Parameters:
        text - novo texto para o teclado virtual
      • setValidChars

        public void setValidChars​(java.lang.String validCharsString)
        Seta os caracteres válidos que podem ser escritos nesse teclado. Caso seja nulo, qualquer caractere pode ser escrito.
      • setMaxLength

        public void setMaxLength​(int maxLength)
        Seta o tamanho maximo da String
        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)
        Método que atualiza as mensagens do componente
        Parameters:
        strCancelar -
        strLimpar -
      • updateImages

        public static void updateImages​(Image imgOk,
                                        Image imgCancela,
                                        Image imgLimpar,
                                        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