net.sf.doolin.gui.view.support
Class ViewActionContext<V>

java.lang.Object
  extended by net.sf.doolin.bus.bean.Bean
      extended by net.sf.doolin.gui.action.support.AbstractActionContext
          extended by net.sf.doolin.gui.view.support.ViewActionContext<V>
Type Parameters:
V - Type of object for the view
All Implemented Interfaces:
Serializable, IBean, ActionContext

public class ViewActionContext<V>
extends AbstractActionContext

Context based on a view.

Author:
Damien Coraboeuf
See Also:
Serialized Form

Constructor Summary
ViewActionContext(GUIView<V> view)
          Constructor
ViewActionContext(GUIView<V> view, Object initialContextValue)
          Constructor
 
Method Summary
protected
<T> ValidationSupport<T>
createValidationSupport()
          Creates the validation support
 GUIApplication getApplication()
          Gets the running application
 JComponent getComponent()
          Gets the component associated with 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.
<T> GUIView<T>
getView()
          Gets the view associated to this content
<T> GUIWindow<T>
getWindow()
          Gets the window associated to this content
 
Methods inherited from class net.sf.doolin.gui.action.support.AbstractActionContext
getContext, getValidationSupport, setContext
 
Methods inherited from class net.sf.doolin.bus.bean.Bean
getBeanNotificationSupport, getParentBean, notify, setParentBean
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ViewActionContext

public ViewActionContext(GUIView<V> view)
Constructor

Parameters:
view - View

ViewActionContext

public ViewActionContext(GUIView<V> view,
                         Object initialContextValue)
Constructor

Parameters:
view - View
initialContextValue - Initial context value
Method Detail

createValidationSupport

protected <T> ValidationSupport<T> createValidationSupport()
Description copied from class: AbstractActionContext
Creates the validation support

Overrides:
createValidationSupport in class AbstractActionContext
Type Parameters:
T - Type of bean for the validator
Returns:
Validation support for this action context

getApplication

public GUIApplication getApplication()
Description copied from interface: ActionContext
Gets the running application

Returns:
Application (never null)

getComponent

public JComponent getComponent()
Description copied from interface: ActionContext
Gets the component associated with this context.

Returns:
Component

getData

public Object getData()
Description copied from interface: ActionContext
Gets the data associated with this context.

Returns:
Model

getSubscriberValidator

public SubscriberValidator getSubscriberValidator()
Description copied from interface: ActionContext
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

getView

public <T> GUIView<T> getView()
Description copied from interface: ActionContext
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

public <T> GUIWindow<T> getWindow()
Description copied from interface: ActionContext
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.


Copyright © 2011. All Rights Reserved.