Class SWTDataElementIdHelper


  • public final class SWTDataElementIdHelper
    extends java.lang.Object
    Use this helper to ease setting the element as the SWT data.
    Since:
    1.9
    Author:
    Johannes Faltermeier
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String ELEMENT_ID_KEY
      Default key constant for the element id.
    • Field Detail

      • ELEMENT_ID_KEY

        public static final java.lang.String ELEMENT_ID_KEY
        Default key constant for the element id.
        See Also:
        Constant Field Values
    • Method Detail

      • setElementIdDataForVControl

        public static void setElementIdDataForVControl​(org.eclipse.swt.widgets.Widget widget,
                                                       VControl element,
                                                       ViewModelContext context)
        Sets the element id with the control sub id on the given widget.
        Parameters:
        widget - the widget to set the data on
        element - the element including the id
        context - the ViewModelContext
      • setElementIdDataWithSubId

        public static void setElementIdDataWithSubId​(org.eclipse.swt.widgets.Widget widget,
                                                     VElement element,
                                                     java.lang.String subId,
                                                     ViewModelContext context)
        Sets the element id with the given sub id on the given widget.
        Parameters:
        widget - the widget to set the data on
        element - the element including the id
        subId - the sub id
        context - the ViewModelContext