public abstract class AbstractValueHoldingSwingGadget<T,F extends GomFormElement> extends Object implements SwingGadget, ValueHolder<T>, Editable
value holding SwingGadgets.
Subclass-API:
addAspect(AspectType,Object) - register an aspect for a the specified type that will be returned by getAspect(AspectType).
The type for the value holding aspect will be added on instance creation.notifyValueChange(GadgetIdentifier) - propagate a value change event to given host.ValueHolder.getValue() & ValueHolder.setValue(Object) - remain to be implemented.Labelable.getLabel() & Editable.setEditable(boolean) - remain to be implemented.TYPE| Modifier | Constructor and Description |
|---|---|
protected |
AbstractValueHoldingSwingGadget(SwingGadgetContext<F> context)
Constructor adding the core aspects.
|
| Modifier and Type | Method and Description |
|---|---|
protected <A> void |
addAspect(AspectType<A> type,
A aspect)
Add an aspect supported by this
Aspectable. |
<A> A |
getAspect(AspectType<A> type)
Request an aspect from the aspectable.
|
protected SpecialistsBroker |
getBroker()
Access the broker providing access to specialists on application knowledge.
|
protected String |
getDescription()
Convenience method returning the description of the form.
|
protected Language |
getDisplayLanguage()
Convenience method to get the language to be used for displaying values.
|
protected F |
getForm()
Convenience method to access the form definition for this gadget.
|
protected GadgetIdentifier |
getGadgetId()
Provides the basic gadget identifier related to the form element of this gadget.
|
String |
getLabel()
Convenience implementation returning the display label for this gadget.
|
protected LocalizationAgent |
getLocalizationAgent()
Convenience method to get the agent providing localization functionalities.
|
protected NotificationHost |
getNotificationHost()
Access the notification host responsibly for this value holder.
|
protected OperationAgent |
getOperationAgent()
Convenience method to get the agent providing operations.
|
protected Language |
getPersistencyLanguage()
Convenience method to get the language to be used for accessing values.
|
protected UIAgent |
getUiAgent()
Convenience method to get the agent providing access to UI settings related operations.
|
protected boolean |
isRelease()
Convenience method indicating the gadget to operate in store element release mode.
|
protected void |
notifyValueChange(GadgetIdentifier identifier)
Notify about the value having changed.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetComponentgetValue, isEmpty, setValuesetEditableprotected AbstractValueHoldingSwingGadget(SwingGadgetContext<F> context)
context - The context for this swing gadget.public final String getLabel()
protected final String getDescription()
public final <A> A getAspect(@NotNull AspectType<A> type)
getAspect in interface AspectableA - The type of the returned instance.type - The aspect requested.null, if the aspect is not supported.protected final <A> void addAspect(@NotNull AspectType<A> type, @NotNull A aspect)
Aspectable.type - The aspect type.aspect - The aspect implementation.protected final F getForm()
protected final GadgetIdentifier getGadgetId()
@NotNull protected final NotificationHost getNotificationHost()
protected final void notifyValueChange(GadgetIdentifier identifier)
identifier - The identifier of this gadget and the specific Swing component.@NotNull protected final Language getDisplayLanguage()
protected final Language getPersistencyLanguage()
protected final boolean isRelease()
true, if release mode should be used.protected final SpecialistsBroker getBroker()
protected final LocalizationAgent getLocalizationAgent()
protected final OperationAgent getOperationAgent()
protected final UIAgent getUiAgent()
Copyright © 2015 e-Spirit AG. All Rights Reserved. Build 5.1.408