org.jacp.api.perspective
Interface IPerspective<L,A,M>

Type Parameters:
L - defines the action listener type
A - defines the basic action type
M - defines the basic message type
All Superinterfaces:
IComponent<L,A,M>, IHandleable<A,M>, IRootComponent<ISubComponent<L,A,M>,IAction<A,M>>

public interface IPerspective<L,A,M>
extends IComponent<L,A,M>, IRootComponent<ISubComponent<L,A,M>,IAction<A,M>>, IHandleable<A,M>

Defines a perspective, a perspective is a root component handled by an workbench and contains subcomponents such as visibla UI components or background components. A workbench can handle one or more perspectives (1-n) and every perspective can handle one ore more components (1-n).

Author:
Andy Moncsek

Method Summary
 java.util.concurrent.BlockingQueue<ISubComponent<L,A,M>> getComponentDelegateQueue()
          Returns delegate queue to delegate components to correct target
 java.util.concurrent.BlockingQueue<IAction<A,M>> getComponentsMessageQueue()
          returns the components coordinator message queue;
 java.util.concurrent.BlockingQueue<IDelegateDTO<A,M>> getMessageDelegateQueue()
          Returns delegate queue to delegate actions to correct target
 java.util.List<ISubComponent<L,A,M>> getSubcomponents()
          Returns all subcomponents in perspective.
 void handlePerspective(IAction<A,M> action)
          Handle a message call on perspective instance.
 void init(java.util.concurrent.BlockingQueue<ISubComponent<L,A,M>> componentDelegateQueue, java.util.concurrent.BlockingQueue<IDelegateDTO<A,M>> messageDelegateQueue)
          The initialization method.
 void postInit(IComponentHandler<ISubComponent<L,A,M>,IAction<A,M>> componentHandler)
          post init method to set correct component handler and to initialize components depending on objects created in startUp sequence
 void setSubcomponents(java.util.List<ISubComponent<L,A,M>> subComponents)
          Set all subcomponents handled by the perspective.
 
Methods inherited from interface org.jacp.api.component.IComponent
getActionListener, getId, getName, isActive, isStarted, setActive, setId, setMessageQueue, setName, setStarted
 
Methods inherited from interface org.jacp.api.component.IRootComponent
getComponentHandler, initComponents, registerComponent, unregisterComponent
 
Methods inherited from interface org.jacp.api.component.IHandleable
handle
 

Method Detail

init

void init(java.util.concurrent.BlockingQueue<ISubComponent<L,A,M>> componentDelegateQueue,
          java.util.concurrent.BlockingQueue<IDelegateDTO<A,M>> messageDelegateQueue)
The initialization method.

Parameters:
componentDelegateQueue -
messageDelegateQueue -

postInit

void postInit(IComponentHandler<ISubComponent<L,A,M>,IAction<A,M>> componentHandler)
post init method to set correct component handler and to initialize components depending on objects created in startUp sequence

Parameters:
componentHandler -

getSubcomponents

java.util.List<ISubComponent<L,A,M>> getSubcomponents()
Returns all subcomponents in perspective.

Returns:
a list of all handled components in current perspective.

setSubcomponents

void setSubcomponents(java.util.List<ISubComponent<L,A,M>> subComponents)
Set all subcomponents handled by the perspective.

Parameters:
subComponents -

handlePerspective

void handlePerspective(IAction<A,M> action)
Handle a message call on perspective instance. This method should be override to handle the layout of an perspective.

Parameters:
action -

getComponentDelegateQueue

java.util.concurrent.BlockingQueue<ISubComponent<L,A,M>> getComponentDelegateQueue()
Returns delegate queue to delegate components to correct target

Returns:
the delegate queue

getMessageDelegateQueue

java.util.concurrent.BlockingQueue<IDelegateDTO<A,M>> getMessageDelegateQueue()
Returns delegate queue to delegate actions to correct target

Returns:
the delegate queue

getComponentsMessageQueue

java.util.concurrent.BlockingQueue<IAction<A,M>> getComponentsMessageQueue()
returns the components coordinator message queue;

Returns:
messgage queue