Class AbstractControlSWTRenderer<VCONTROL extends VControl>

    • Method Detail

      • isUnchangeableFeature

        protected boolean isUnchangeableFeature()
        Checks if the value referenced by the DMR can be changed or not by the user.
        Returns:
        true if the value cannot be changed.
      • applyUnchangeableFeature

        protected void applyUnchangeableFeature()
        This method is applied if the control's feature is configured as unchangeable. The renderer is usually disabled when feature is not changeable.
        Since:
        1.20
      • canHandleControlProcessor

        protected boolean canHandleControlProcessor()

        Indicates if the given Control SWT renderer takes the responsibility to call a possibly existing EMFFormsControlProcessorService itself.

        The default implementation returns false.

        Returns:
        true if the Control SWT renderer can handle the EMFFormsControlProcessorService itself, false otherwise.
        Since:
        1.8
      • defaultHandleControlProcessor

        protected void defaultHandleControlProcessor​(org.eclipse.swt.widgets.Control control)
        Calls a possibly existing EMFFormsControlProcessorService for the given control.
        Parameters:
        control - The Control which is to be processed by the EMFFormsControlProcessorService.
        Since:
        1.8
      • getValidationIcon

        @Deprecated
        protected final org.eclipse.swt.graphics.Image getValidationIcon​(int severity)
        Deprecated.
        use getValidationIcon() for default behavior or use the SWTValidationUiService if you need to get the color for a specific diagnostic.
        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
      • getValidationIcon

        protected final org.eclipse.swt.graphics.Image getValidationIcon()
        Returns the validation icon for the current validation result of this control's VElement.
        Returns:
        the icon to be displayed, or null when no icon is to be displayed
        Since:
        1.23
      • getValidationBackgroundColor

        @Deprecated
        protected final org.eclipse.swt.graphics.Color getValidationBackgroundColor​(int severity)
        Deprecated.
        use getValidationBackgroundColor() for default behavior or use the SWTValidationUiService if you need to get the color for a specific diagnostic.
        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
      • getValidationBackgroundColor

        protected final org.eclipse.swt.graphics.Color getValidationBackgroundColor()
        Returns the background color for the current validation result of this control's VElement.
        Returns:
        the color to be used as a background color
        Since:
        1.23
      • getValidationForegroundColor

        @Deprecated
        protected final org.eclipse.swt.graphics.Color getValidationForegroundColor​(int severity)
        Deprecated.
        use getValidationForegroundColor() for default behavior or use the SWTValidationUiService if you need to get the color for a specific diagnostic.
        Returns the foreground 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 foreground color
        Since:
        1.10
      • getValidationForegroundColor

        protected final org.eclipse.swt.graphics.Color getValidationForegroundColor()
        Returns the foreground color for the current validation result of this control's VElement.
        Returns:
        the color to be used as a foreground color
        Since:
        1.23
      • getDataBindingContext

        protected final org.eclipse.core.databinding.DataBindingContext getDataBindingContext()
        Creates a new DataBindingContext.
        Returns:
        a new DataBindingContext each time this method is called
      • getModelValue

        protected final org.eclipse.core.databinding.observable.value.IObservableValue getModelValue()
                                                                                              throws DatabindingFailedException
        Returns an IObservableValue based on the control's domain model reference and domain model.
        Returns:
        the IObservableValue
        Throws:
        DatabindingFailedException - if the databinding of the domain model object fails.
        Since:
        1.6
      • getEditingDomain

        protected final org.eclipse.emf.edit.domain.EditingDomain getEditingDomain​(org.eclipse.emf.ecore.EObject domainModel)
        Returns the EditingDomain for the provided domain model.
        Parameters:
        domainModel - The provided domain model
        Returns:
        The EditingDomain of this domain model
        Since:
        1.6
      • createLabel

        protected org.eclipse.swt.widgets.Control createLabel​(org.eclipse.swt.widgets.Composite parent)
        Create the Control displaying the label of the current VControl.
        Parameters:
        parent - the Composite to render onto
        Returns:
        the created Control or null
      • getLabelStyleBits

        protected int getLabelStyleBits()
        Returns:
        the style bits for the control's label
        Since:
        1.16
      • createValidationIcon

        protected org.eclipse.swt.widgets.Label createValidationIcon​(org.eclipse.swt.widgets.Composite composite)
        Creates a validation icon.
        Parameters:
        composite - the Composite to create onto
        Returns:
        the created Label