Interface SWTValidationUiService
-
- All Known Implementing Classes:
SWTValidationUiServiceImpl
public interface SWTValidationUiService
Service implementations provide visualizations (icons and colors) for validation results.- Since:
- 1.23
- Author:
- Lucas Koehler
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description org.eclipse.swt.graphics.Color
getValidationBackgroundColor(org.eclipse.emf.common.util.Diagnostic diagnostic, VElement vElement, ViewModelContext viewModelContext)
Returns the background color for a control with the given Diagnostic, VElement and view model context, if applicable.org.eclipse.swt.graphics.Color
getValidationBackgroundColor(VElement vElement, ViewModelContext viewModelContext)
Returns the background color for a control matching the highest severity of the given VElement's diagnostic.org.eclipse.swt.graphics.Color
getValidationForegroundColor(org.eclipse.emf.common.util.Diagnostic diagnostic, VElement vElement, ViewModelContext viewModelContext)
Returns the foreground color for a control with the given Diagnostic, VElement and view model context, if applicable.org.eclipse.swt.graphics.Color
getValidationForegroundColor(VElement vElement, ViewModelContext viewModelContext)
Returns the foreground color for a control matching the highest severity of the given VElement's diagnostic.org.eclipse.swt.graphics.Image
getValidationIcon(org.eclipse.emf.common.util.Diagnostic diagnostic, VElement vElement, ViewModelContext viewModelContext)
Returns the validation icon matching the given Diagnostic, VElement and view model context, if applicable.org.eclipse.swt.graphics.Image
getValidationIcon(VElement vElement, ViewModelContext viewModelContext)
Returns the validation icon matching the highest severity of the given VElement's diagnostic.
-
-
-
Method Detail
-
getValidationIcon
org.eclipse.swt.graphics.Image getValidationIcon(org.eclipse.emf.common.util.Diagnostic diagnostic, VElement vElement, ViewModelContext viewModelContext)
Returns the validation icon matching the given Diagnostic, VElement and view model context, if applicable.- Parameters:
diagnostic
- theDiagnostic
defining the validation visualizationvElement
- TheVElement
that is being renderedviewModelContext
- The correspondingViewModelContext
- Returns:
- the icon to be displayed, or
null
when no icon is to be displayed
-
getValidationIcon
org.eclipse.swt.graphics.Image getValidationIcon(VElement vElement, ViewModelContext viewModelContext)
Returns the validation icon matching the highest severity of the given VElement's diagnostic.- Parameters:
vElement
- TheVElement
that is being renderedviewModelContext
- The correspondingViewModelContext
- Returns:
- the icon to be displayed, or
null
when no icon is to be displayed
-
getValidationForegroundColor
org.eclipse.swt.graphics.Color getValidationForegroundColor(org.eclipse.emf.common.util.Diagnostic diagnostic, VElement vElement, ViewModelContext viewModelContext)
Returns the foreground color for a control with the given Diagnostic, VElement and view model context, if applicable.- Parameters:
diagnostic
- theDiagnostic
defining the validation visualizationvElement
- TheVElement
that is being renderedviewModelContext
- The correspondingViewModelContext
- Returns:
- the color to be used as a foreground color
-
getValidationForegroundColor
org.eclipse.swt.graphics.Color getValidationForegroundColor(VElement vElement, ViewModelContext viewModelContext)
Returns the foreground color for a control matching the highest severity of the given VElement's diagnostic.- Parameters:
vElement
- TheVElement
that is being renderedviewModelContext
- The correspondingViewModelContext
- Returns:
- the color to be used as a foreground color
-
getValidationBackgroundColor
org.eclipse.swt.graphics.Color getValidationBackgroundColor(org.eclipse.emf.common.util.Diagnostic diagnostic, VElement vElement, ViewModelContext viewModelContext)
Returns the background color for a control with the given Diagnostic, VElement and view model context, if applicable.- Parameters:
diagnostic
- theDiagnostic
defining the validation visualizationvElement
- TheVElement
that is being renderedviewModelContext
- The correspondingViewModelContext
- Returns:
- the color to be used as a background color
-
getValidationBackgroundColor
org.eclipse.swt.graphics.Color getValidationBackgroundColor(VElement vElement, ViewModelContext viewModelContext)
Returns the background color for a control matching the highest severity of the given VElement's diagnostic.- Parameters:
vElement
- TheVElement
that is being renderedviewModelContext
- The correspondingViewModelContext
- Returns:
- the color to be used as a background color
-
-