net.sf.doolin.gui.window.support
Class WindowActionContext<B>

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.window.support.WindowActionContext<B>
Type Parameters:
B - Type of data for the window
All Implemented Interfaces:
Serializable, IBean, ActionContext

public class WindowActionContext<B>
extends AbstractActionContext

Action context for a window

Author:
Damien Coraboeuf
See Also:
Serialized Form

Constructor Summary
WindowActionContext(GUIWindow<B> window)
          Constructor
 
Method Summary
protected  ValidationSupport<B> 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

WindowActionContext

public WindowActionContext(GUIWindow<B> window)
Constructor

Parameters:
window - The window
Method Detail

createValidationSupport

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

Overrides:
createValidationSupport in class AbstractActionContext
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.