public class StringTypeHandler extends Object implements TypeHandler<String,FieldUpdateEvent<String>,ReflectionFormBuilder,JTextField>
| Modifier | Constructor and Description |
|---|---|
protected |
StringTypeHandler() |
| Modifier and Type | Method and Description |
|---|---|
static StringTypeHandler |
getInstance() |
org.apache.commons.lang3.tuple.Pair<JComponent,ComponentHandler<?>> |
handle(Type type,
String fieldValue,
String fieldName,
Class<?> declaringClass,
FieldUpdateListener<FieldUpdateEvent<String>> updateListener,
ReflectionFormBuilder reflectionFormBuilder) |
void |
reset(JTextField component) |
public static StringTypeHandler getInstance()
public org.apache.commons.lang3.tuple.Pair<JComponent,ComponentHandler<?>> handle(Type type, String fieldValue, String fieldName, Class<?> declaringClass, FieldUpdateListener<FieldUpdateEvent<String>> updateListener, ReflectionFormBuilder reflectionFormBuilder) throws FieldHandlingException
handle in interface TypeHandler<String,FieldUpdateEvent<String>,ReflectionFormBuilder,JTextField>type - the Type to be handledfieldValue - the value of the field or the nested generic propertyfieldName - the name of the field (the same for nested generics)declaringClass - the class declaring the fieldupdateListener - an FieldUpdateListener to notify on updatesreflectionFormBuilder - a ReflectionFormBuilder used for
recursionPair of the handling result and the generating
ComponentResettable. The latter reference can be used to
easily keep track of the actual generating handler in a long line of
delegations of handlers which avoids ClassCastExceptions at
runtime as long as ComponentResettables implemented correctlyFieldHandlingException - wraps all exceptions occuring during read
or write access to fieldspublic void reset(JTextField component)
reset in interface ComponentHandler<JTextField>Copyright © 2018. All rights reserved.