public final class PreSetValidationListeners extends Object
VerifyListener
that performs pre-set validation.Modifier and Type | Class and Description |
---|---|
static class |
PreSetValidationListeners.PreSetVerifyListener
Default VerifyListener implementation.
|
Modifier and Type | Method and Description |
---|---|
static PreSetValidationListeners |
create()
Deprecated.
use
create(ViewModelContext) instead |
static PreSetValidationListeners |
create(ViewModelContext context)
Returns the validation listeners factory.
|
void |
focus(org.eclipse.swt.widgets.Text text,
org.eclipse.emf.ecore.EStructuralFeature feature,
PreSetValidationServiceRunnable focusLost,
Runnable focusGained)
Attach a
FocusListener to the given Text widget. |
protected VDiagnostic |
validateStrict(org.eclipse.emf.ecore.EStructuralFeature feature,
Object value)
Validate a given feature value strictly based on the defined constraints.
|
void |
verify(org.eclipse.swt.widgets.Combo combo,
org.eclipse.emf.ecore.EStructuralFeature feature)
Attach a
VerifyListener to the given Combo widget. |
void |
verify(org.eclipse.swt.widgets.Combo combo,
org.eclipse.emf.ecore.EStructuralFeature feature,
VElement vElement)
Attach a
VerifyListener to the given Combo widget. |
void |
verify(org.eclipse.swt.widgets.Text text,
org.eclipse.emf.ecore.EStructuralFeature feature)
Attach a
VerifyListener to the given Text widget. |
void |
verify(org.eclipse.swt.widgets.Text text,
org.eclipse.emf.ecore.EStructuralFeature feature,
VElement vElement)
Attach a
VerifyListener to the given Text widget. |
@Deprecated public static PreSetValidationListeners create()
create(ViewModelContext)
insteadpublic static PreSetValidationListeners create(ViewModelContext context)
context
- The ViewModelContext
of the entity that needs pre-validationpublic void verify(org.eclipse.swt.widgets.Text text, org.eclipse.emf.ecore.EStructuralFeature feature)
VerifyListener
to the given Text
widget.
Performs pre-set validation for the given EStructuralFeature
text
- the text widget the created verify listener should be attached tofeature
- the feature to be validatedpublic void verify(org.eclipse.swt.widgets.Combo combo, org.eclipse.emf.ecore.EStructuralFeature feature)
VerifyListener
to the given Combo
widget.
Performs pre-set validation for the given EStructuralFeature
combo
- the combo widget the created verify listener should be attached tofeature
- the feature to be validatedpublic void verify(org.eclipse.swt.widgets.Text text, org.eclipse.emf.ecore.EStructuralFeature feature, VElement vElement)
VerifyListener
to the given Text
widget.
Performs pre-set validation for the given EStructuralFeature
and reports any
errors to the given VElement
.text
- the text widget the created verify listener should be attached tofeature
- the feature to be validatedvElement
- the VElement
an Diagnostic
may be attached topublic void verify(org.eclipse.swt.widgets.Combo combo, org.eclipse.emf.ecore.EStructuralFeature feature, VElement vElement)
VerifyListener
to the given Combo
widget.
Performs pre-set validation for the given EStructuralFeature
and reports any
errors to the given VElement
.combo
- the combo widget the created verify listener should be attached tofeature
- the feature to be validatedvElement
- the VElement
an Diagnostic
may be attached toprotected VDiagnostic validateStrict(org.eclipse.emf.ecore.EStructuralFeature feature, Object value)
feature
- the feature to validatevalue
- the value to validateVDiagnostic
public void focus(org.eclipse.swt.widgets.Text text, org.eclipse.emf.ecore.EStructuralFeature feature, PreSetValidationServiceRunnable focusLost, Runnable focusGained)
FocusListener
to the given Text
widget.
Performs pre-set validation for the given EStructuralFeature
and
executes the Runnable
in case the content of the text widget is
invalid.text
- the text widget the created verify listener should be attached tofeature
- the feature to be validatedfocusLost
- code to be executed in case the text is invalid and focus has been lostfocusGained
- code to be executed in case the focus has been gainedCopyright © 2019. All rights reserved.