Class AbstractFilterKeyPressHandler

java.lang.Object
de.knightsoftnet.mtwidgets.client.ui.handler.AbstractFilterKeyPressHandler
All Implemented Interfaces:
com.google.gwt.event.dom.client.KeyPressHandler, com.google.gwt.event.shared.EventHandler
Direct Known Subclasses:
CurrencyKeyPressHandler, DecimalKeyPressHandler, NumericKeyPressHandler, NumericWithSeparatorsKeyPressHandler, PercentKeyPressHandler, PhoneNumberKeyPressHandler

public abstract class AbstractFilterKeyPressHandler extends Object implements com.google.gwt.event.dom.client.KeyPressHandler
Abstract key press handler which limits input to allowed characters.
Author:
Manfred Tremmel
  • Constructor Details

    • AbstractFilterKeyPressHandler

      protected AbstractFilterKeyPressHandler(Set<Character> allowedCharacters, boolean allowCopyAndPast)
      constructor initializing fields.
      Parameters:
      allowedCharacters - characters which are allowed to add
      allowCopyAndPast - is copy and paste allowed?
    • AbstractFilterKeyPressHandler

      protected AbstractFilterKeyPressHandler(String allowedCharacters, boolean allowCopyAndPast)
      constructor initializing fields.
      Parameters:
      allowedCharacters - characters which are allowed to add
      allowCopyAndPast - is copy and paste allowed?
  • Method Details

    • getAllowedCharacters

      protected final Set<Character> getAllowedCharacters()
    • setAllowedCharacters

      protected final void setAllowedCharacters(Set<Character> allowedCharacters)
    • setAllowedCharacters

      protected final void setAllowedCharacters(String allowedCharacters)
    • onKeyPress

      public void onKeyPress(com.google.gwt.event.dom.client.KeyPressEvent event)
      Specified by:
      onKeyPress in interface com.google.gwt.event.dom.client.KeyPressHandler