de.espirit.firstspirit.ui.gadgets.swing
Class AbstractValueHoldingSwingGadget<T,F extends GomFormElement>

java.lang.Object
  extended by de.espirit.firstspirit.ui.gadgets.swing.AbstractValueHoldingSwingGadget<T,F>
All Implemented Interfaces:
Gadget, Aspectable, Editable, Labelable, ValueHolder<T>, SwingComponentProvider, SwingGadget

public abstract class AbstractValueHoldingSwingGadget<T,F extends GomFormElement>
extends Object
implements SwingGadget, ValueHolder<T>, Editable

Abstract implementation providing basic functionalities supporting value holding SwingGadgets.

Subclass-API:

Since:
4.2.405

Field Summary
 
Fields inherited from interface de.espirit.firstspirit.ui.gadgets.aspects.ValueHolder
TYPE
 
Fields inherited from interface de.espirit.firstspirit.ui.gadgets.aspects.Editable
TYPE
 
Constructor Summary
protected AbstractValueHoldingSwingGadget(SwingGadgetContext<F> context)
          Constructor adding the core aspects.
 
Method Summary
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  de.espirit.firstspirit.agency.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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface de.espirit.firstspirit.ui.gadgets.swing.SwingComponentProvider
getComponent
 
Methods inherited from interface de.espirit.firstspirit.ui.gadgets.aspects.ValueHolder
getValue, isEmpty, setValue
 
Methods inherited from interface de.espirit.firstspirit.ui.gadgets.aspects.Editable
setEditable
 

Constructor Detail

AbstractValueHoldingSwingGadget

protected AbstractValueHoldingSwingGadget(SwingGadgetContext<F> context)
Constructor adding the core aspects.

Parameters:
context - The context for this swing gadget.
Since:
4.2.405
Method Detail

getLabel

public final String getLabel()
Convenience implementation returning the display label for this gadget.

Specified by:
getLabel in interface Labelable
Returns:
The language dependent display label.
Since:
4.2.405

getDescription

protected final String getDescription()
Convenience method returning the description of the form.

Returns:
The form's description.
Since:
4.2.405

getAspect

public final <A> A getAspect(@NotNull
                             AspectType<A> type)
Request an aspect from the aspectable.

Specified by:
getAspect in interface Aspectable
Type Parameters:
A - The type of the returned instance.
Parameters:
type - The aspect requested.
Returns:
The aspect instance or null, if the aspect is not supported.
Since:
4.2.405

addAspect

protected final <A> void addAspect(@NotNull
                                   AspectType<A> type,
                                   @NotNull
                                   A aspect)
Add an aspect supported by this Aspectable.

Type Parameters:
A - The type of the aspect.
Parameters:
type - The aspect type.
aspect - The aspect implementation.
Since:
4.2.405

getForm

protected final F getForm()
Convenience method to access the form definition for this gadget.

Returns:
This gadget's form definition.
Since:
4.2.405

getGadgetId

protected final GadgetIdentifier getGadgetId()
Provides the basic gadget identifier related to the form element of this gadget.

Returns:
The basic gadget identifier.
Since:
4.2.405

getNotificationHost

@NotNull
protected final NotificationHost getNotificationHost()
Access the notification host responsibly for this value holder. The host will be set during the initialization phase following the instantiation of this value holder.

Returns:
The notification host.
Since:
4.2.405

notifyValueChange

protected final void notifyValueChange(GadgetIdentifier identifier)
Notify about the value having changed.

Parameters:
identifier - The identifier of this gadget and the specific Swing component.
Since:
4.2.405

getDisplayLanguage

@NotNull
protected final Language getDisplayLanguage()
Convenience method to get the language to be used for displaying values.

Returns:
The display language.
Since:
4.2.405

getPersistencyLanguage

protected final Language getPersistencyLanguage()
Convenience method to get the language to be used for accessing values.

Returns:
The persistency language.
Since:
4.2.405

isRelease

protected final boolean isRelease()
Convenience method indicating the gadget to operate in store element release mode.

Returns:
true, if release mode should be used.
Since:
4.2.405

getBroker

protected final SpecialistsBroker getBroker()
Access the broker providing access to specialists on application knowledge.

Returns:
The specialists broker.
Since:
4.2.405

getLocalizationAgent

protected final de.espirit.firstspirit.agency.LocalizationAgent getLocalizationAgent()
Convenience method to get the agent providing localization functionalities.

Returns:
The localization agent.
Since:
4.2.405

getOperationAgent

protected final OperationAgent getOperationAgent()
Convenience method to get the agent providing operations.

Returns:
The operation agent.
Since:
4.2.405

getUiAgent

protected final UIAgent getUiAgent()
Convenience method to get the agent providing access to UI settings related operations.

Returns:
The UI agent.
Since:
4.2.405


Copyright © 2012 e-Spirit AG. All Rights Reserved. Build 4.2.480