org.eclipse.emf.ecp.edit.internal.swt.util
Class SWTValidationHelper

java.lang.Object
  extended by org.eclipse.emf.ecp.edit.internal.swt.util.SWTValidationHelper

public final class SWTValidationHelper
extends Object

Helper class for accessing icons and colours for validations.

Author:
jfaltermeier

Field Summary
static SWTValidationHelper INSTANCE
          The instance of the SWTValidationHelper.
 
Method Summary
 org.eclipse.swt.graphics.Color getValidationBackgroundColor(int severity)
          Returns the background color for a control with the given validation severity.
 org.eclipse.swt.graphics.Image getValidationIcon(int severity)
          Returns the validation icon matching the given severity.
 org.eclipse.jface.resource.ImageDescriptor getValidationOverlayDescriptor(int severity)
          Returns the validation overlay icon matching the given severity.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INSTANCE

public static final SWTValidationHelper INSTANCE
The instance of the SWTValidationHelper.

Method Detail

getValidationBackgroundColor

public org.eclipse.swt.graphics.Color getValidationBackgroundColor(int severity)
Returns the background color for a control with the given validation severity.

Parameters:
severity - severity the severity of the Diagnostic
Returns:
the color to be used as a background color

getValidationIcon

public org.eclipse.swt.graphics.Image getValidationIcon(int severity)
Returns the validation icon matching the given severity.

Parameters:
severity - the severity of the Diagnostic
Returns:
the icon to be displayed, or null when no icon is to be displayed

getValidationOverlayDescriptor

public org.eclipse.jface.resource.ImageDescriptor getValidationOverlayDescriptor(int severity)
Returns the validation overlay icon matching the given severity.

Parameters:
severity - the severity of the Diagnostic
Returns:
the icon to be displayed, or null when no icon is to be displayed


Copyright © 2014. All Rights Reserved.