net.sf.doolin.gui.action
Interface ActionContext

All Known Implementing Classes:
AbstractActionContext, AbstractFieldActionContext, ApplicationActionContext, DelegateDataActionContext, FieldActionContext, TableActionContext, TreeActionContext, ViewActionContext, WindowActionContext

public interface ActionContext

Context for the execution of an action.

This interface is central to the Doolin GUI framework. It allows almost each element of an application (mainly GUIAction instances) to know where they are running: the application, the window, the view, the data and the contextual data.

Author:
Damien Coraboeuf

Method Summary
 GUIApplication getApplication()
          Gets the running application
 JComponent getComponent()
          Gets the component associated with this context.
 Object getContext()
          Gets any contextual information linked to this context.
 Object getData()
          Gets the data associated with this context.
 SubscriberValidator getSubscriberValidator()
          Gets the validator to use for any subscription managed by this context.
<V> ValidationSupport<V>
getValidationSupport()
          Gets the validation support for this action context
<T> GUIView<T>
getView()
          Gets the view associated to this content
<T> GUIWindow<T>
getWindow()
          Gets the window associated to this content
 void setContext(Object value)
          Sets the contextual value of this context.
 

Method Detail

getApplication

GUIApplication getApplication()
Gets the running application

Returns:
Application (never null)

getComponent

JComponent getComponent()
Gets the component associated with this context.

Returns:
Component

getContext

Object getContext()
Gets any contextual information linked to this context. While the context data cannot change (only its content), the contextual data can change at any time.

Returns:
Contextual information or null if none has been defined.

getData

Object getData()
Gets the data associated with this context.

Returns:
Model

getSubscriberValidator

SubscriberValidator getSubscriberValidator()
Gets the validator to use for any subscription managed by this context. The returned validator will return false as soon as this ActionContext is no longer valid.

Returns:
Validator

getValidationSupport

<V> ValidationSupport<V> getValidationSupport()
Gets the validation support for this action context

Type Parameters:
V - Type of the bean that is managed by the validation support. It should be the same than the one associated with the window or the view.
Returns:
Validation support

getView

<T> GUIView<T> getView()
Gets the view associated to this content

Type Parameters:
T - Type of model for the view
Returns:
View or null if no view is associated to this context

getWindow

<T> GUIWindow<T> getWindow()
Gets the window associated to this content

Type Parameters:
T - Type of model for the window
Returns:
Window or null is no window can be associated with this context.

setContext

void setContext(Object value)
Sets the contextual value of this context.

Parameters:
value - New contextual value


Copyright © 2011. All Rights Reserved.