org.nuiton.jaxx.action
Interface ActionConfigurationResolver<A extends java.lang.annotation.Annotation,C extends javax.swing.JComponent>

Type Parameters:
A - type of annotation for config
C - type of component
All Known Implementing Classes:
AbstractActionConfigurationResolver, ActionConfigConfigurationResolver, SelectActionConfigConfigurationResolver, ToggleActionConfigConfigurationResolver

public interface ActionConfigurationResolver<A extends java.lang.annotation.Annotation,C extends javax.swing.JComponent>

The contract to be realized to resolve an MyAbstractAction configuration.

Configuration is done by a Annotation of type A placed on the action class.

If the instanciated action box the real action, we should always search on the boxed action.

Moreover, a action can only be fired by a certain type of component (for example a Button or a ComboBox), the class of the component type is given by the C class.

Author:
chemit

Method Summary
 A applyConfiguration(javax.swing.JComponent component, MyAbstractAction action)
           
 java.lang.Class<A> getAnnotationImpl()
           
 java.lang.Class<C> getComponentImpl()
           
 A resolveConfiguration(MyAbstractAction action)
          Search the annotation that configure the given action (or the boxed action).
 

Method Detail

resolveConfiguration

A resolveConfiguration(MyAbstractAction action)
Search the annotation that configure the given action (or the boxed action).

Parameters:
action - current action
Returns:
the configuration of the action

applyConfiguration

A applyConfiguration(javax.swing.JComponent component,
                     MyAbstractAction action)
Parameters:
component - widget that requires the action
action - given action
Returns:
the configuration of the action

getAnnotationImpl

java.lang.Class<A> getAnnotationImpl()
Returns:
the configuration annotation dealed by this resolver

getComponentImpl

java.lang.Class<C> getComponentImpl()
Returns:
the class of the component which can fired the action


Copyright © 2008-2009 CodeLutin. All Rights Reserved.