Class AbstractFilterAndReplaceKeyPressHandler
- java.lang.Object
-
- de.knightsoftnet.mtwidgets.client.ui.handler.AbstractFilterAndReplaceKeyPressHandler
-
- All Implemented Interfaces:
com.google.gwt.event.dom.client.KeyPressHandler,com.google.gwt.event.shared.EventHandler
- Direct Known Subclasses:
NumericAndUpperAsciiKeyPressHandler,SimpleFilterAndReplaceKeyPressHandler,UpperAsciiKeyPressHandler
public abstract class AbstractFilterAndReplaceKeyPressHandler extends Object implements com.google.gwt.event.dom.client.KeyPressHandler
Abstract key press handler which limits input to allowed characters and replaces characters by other.- Author:
- Manfred Tremmel
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractFilterAndReplaceKeyPressHandler(boolean pallowCopyAndPast)constructor.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract booleanisAllowedCharacter(char pcharacter)check if character is allowed to type in unchanged.abstract booleanisCharacterToReplace(char pcharacter)check if character is one which has to be replaced.voidonKeyPress(com.google.gwt.event.dom.client.KeyPressEvent pevent)abstract charreplaceCharacter(char pcharacter)replace character by another.
-
-
-
Method Detail
-
onKeyPress
public void onKeyPress(com.google.gwt.event.dom.client.KeyPressEvent pevent)
- Specified by:
onKeyPressin interfacecom.google.gwt.event.dom.client.KeyPressHandler
-
isAllowedCharacter
public abstract boolean isAllowedCharacter(char pcharacter)
check if character is allowed to type in unchanged.- Parameters:
pcharacter- character to check- Returns:
- true if it's allowed
-
isCharacterToReplace
public abstract boolean isCharacterToReplace(char pcharacter)
check if character is one which has to be replaced.- Parameters:
pcharacter- character to check- Returns:
- true if character has to be replaced
-
replaceCharacter
public abstract char replaceCharacter(char pcharacter)
replace character by another.- Parameters:
pcharacter- character to replace- Returns:
- replaced character
-
-