Class Contributions
- java.lang.Object
-
- net.ssehub.easy.producer.ui.contributions.Contributions
-
public abstract class Contributions extends java.lang.ObjectFor 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
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static classContributions.ToolTipListenerA listener showing a tooltip on a disabled button.static classContributions.UIElementDenotes individual UI elements.
-
Field Summary
Fields Modifier and Type Field Description private static java.util.List<Contributions>REGISTEREDStores the registered UI contributions.
-
Constructor Summary
Constructors Constructor Description Contributions()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static voidconfigure(org.eclipse.swt.widgets.Control control, Contributions.UIElement element)static java.lang.StringgetToolTip(Contributions.UIElement element)Returns the tool tip for the specified UI element (composed from all contributions).protected abstract java.lang.StringgetToolTipImpl(Contributions.UIElement element)Returns the tool tip of the given UI element .static booleanisEnabled(Contributions.UIElement element)Returns whether the specified UI element is enabled (at least one contribution must request this).protected abstract booleanisEnabledImpl(Contributions.UIElement element)Returns whether this contribution requires that the given UI element shall be enabled.static voidregister(Contributions contribution)Registers a particular contribution.static voidunregister(Contributions contribution)Unregisters a particular contribution.
-
-
-
Field Detail
-
REGISTERED
private static final java.util.List<Contributions> REGISTERED
Stores the registered UI 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:
trueif it shall be enabled,falseelse
-
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:
trueif it shall be enabled,falseelse
-
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:
trueif it shall be enabled,falseelse
-
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 givencontroldependent onisEnabled(UIElement)andgetToolTip(UIElement). [convenience method]- Parameters:
control- the control to be configuredelement- the UI element the control represents
-
-