public class EEFTextMemento
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
KEY
The key used to attach the user input memento to the widget.
|
| Constructor and Description |
|---|
EEFTextMemento(EEFTextDescription description,
java.lang.Object self,
java.lang.String referenceValue,
java.lang.String userInput)
The constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
appliesTo(EEFTextDescription textDescription,
java.util.Map<java.lang.String,java.lang.Object> variables)
Indicates if the memento applies to the given lifecycle manager.
|
EEFTextDescription |
getDescription()
Return the description.
|
java.lang.String |
getReferenceValue()
Return the referenceValue.
|
java.lang.String |
getUserInput()
Return the userInput.
|
static EEFTextMemento |
of(org.eclipse.swt.widgets.Widget widget)
Returns the memento of the given widget.
|
static void |
remove(org.eclipse.swt.widgets.Widget widget)
Removes the memento of the given widget.
|
void |
store(org.eclipse.swt.widgets.Widget widget)
Stores the memento in the given widget.
|
java.lang.String |
toString() |
public static final java.lang.String KEY
public EEFTextMemento(EEFTextDescription description, java.lang.Object self, java.lang.String referenceValue, java.lang.String userInput)
description - The description of the text widget.self - The "self" target elementreferenceValue - The reference value corresponding to the pristine text computed from the modeluserInput - The user inputpublic boolean appliesTo(EEFTextDescription textDescription, java.util.Map<java.lang.String,java.lang.Object> variables)
textDescription - The description of the text widget of the lifecycle managervariables - The variables of the lifecycle managertrue if the memento applies to the lifecycle manager, false otherwise.public void store(org.eclipse.swt.widgets.Widget widget)
widget - The widgetpublic static EEFTextMemento of(org.eclipse.swt.widgets.Widget widget)
widget - The widgetpublic static void remove(org.eclipse.swt.widgets.Widget widget)
widget - The widgetpublic EEFTextDescription getDescription()
public java.lang.String getReferenceValue()
public java.lang.String getUserInput()
public java.lang.String toString()
toString in class java.lang.Object