Class UpperAsciiKeyPressHandler
java.lang.Object
de.knightsoftnet.mtwidgets.client.ui.handler.AbstractFilterAndReplaceKeyPressHandler
de.knightsoftnet.mtwidgets.client.ui.handler.UpperAsciiKeyPressHandler
- All Implemented Interfaces:
com.google.gwt.event.dom.client.KeyPressHandler,com.google.gwt.event.shared.EventHandler
Key press handler which limits input to UperCase ASCII characters.
- Author:
- Manfred Tremmel
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanisAllowedCharacter(char character) check if character is allowed to type in unchanged.booleanisCharacterToReplace(char character) check if character is one which has to be replaced.charreplaceCharacter(char character) replace character by another.Methods inherited from class de.knightsoftnet.mtwidgets.client.ui.handler.AbstractFilterAndReplaceKeyPressHandler
onKeyPress
-
Constructor Details
-
UpperAsciiKeyPressHandler
public UpperAsciiKeyPressHandler()default constructor.
-
-
Method Details
-
isAllowedCharacter
public boolean isAllowedCharacter(char character) Description copied from class:AbstractFilterAndReplaceKeyPressHandlercheck if character is allowed to type in unchanged.- Specified by:
isAllowedCharacterin classAbstractFilterAndReplaceKeyPressHandler- Parameters:
character- character to check- Returns:
- true if it's allowed
-
isCharacterToReplace
public boolean isCharacterToReplace(char character) Description copied from class:AbstractFilterAndReplaceKeyPressHandlercheck if character is one which has to be replaced.- Specified by:
isCharacterToReplacein classAbstractFilterAndReplaceKeyPressHandler- Parameters:
character- character to check- Returns:
- true if character has to be replaced
-
replaceCharacter
public char replaceCharacter(char character) Description copied from class:AbstractFilterAndReplaceKeyPressHandlerreplace character by another.- Specified by:
replaceCharacterin classAbstractFilterAndReplaceKeyPressHandler- Parameters:
character- character to replace- Returns:
- replaced character
-