Class Contributions


  • public abstract class Contributions
    extends java.lang.Object
    For contributions to the EASY UI. (preliminary, to be aligned with self-bootstrapping capabilities in future) Please do not change the name or the location of this class as it is populated via OSGI-DS.
    Author:
    Holger Eichelberger
    • Field Detail

      • REGISTERED

        private static final java.util.List<Contributions> REGISTERED
        Stores the registered UI contributions.
    • Constructor Detail

      • Contributions

        public Contributions()
    • Method Detail

      • register

        public static void register​(Contributions contribution)
        Registers a particular contribution.
        Parameters:
        contribution - the new contribution
      • unregister

        public static void unregister​(Contributions contribution)
        Unregisters a particular contribution.
        Parameters:
        contribution - the contribution to be unregisted
      • isEnabled

        public static final boolean isEnabled​(Contributions.UIElement element)
        Returns whether the specified UI element is enabled (at least one contribution must request this).
        Parameters:
        element - the UI element
        Returns:
        true if it shall be enabled, false else
      • isEnabledImpl

        protected abstract boolean isEnabledImpl​(Contributions.UIElement element)
        Returns whether this contribution requires that the given UI element shall be enabled.
        Parameters:
        element - the UI element
        Returns:
        true if it shall be enabled, false else
      • getToolTip

        public static final java.lang.String getToolTip​(Contributions.UIElement element)
        Returns the tool tip for the specified UI element (composed from all contributions).
        Parameters:
        element - the UI element
        Returns:
        true if it shall be enabled, false else
      • getToolTipImpl

        protected abstract java.lang.String getToolTipImpl​(Contributions.UIElement element)
        Returns the tool tip of the given UI element .
        Parameters:
        element - the UI element
        Returns:
        the tool tip (part) for the given UI element (may be null)
      • configure

        public static final void configure​(org.eclipse.swt.widgets.Control control,
                                           Contributions.UIElement element)
        Configures the given control dependent on isEnabled(UIElement) and getToolTip(UIElement). [convenience method]
        Parameters:
        control - the control to be configured
        element - the UI element the control represents