org.jacp.api.component
Interface IVComponent<C,L,A,M>

Type Parameters:
C - defines the base component where others extend from
L - defines the action listener type
A - defines the basic action type
M - defines the basic message type
All Superinterfaces:
IComponent<L,A,M>, IExtendedComponent<C>, IHandleable<A,M>, ISubComponent<L,A,M>

public interface IVComponent<C,L,A,M>
extends IExtendedComponent<C>, ISubComponent<L,A,M>

Represents an UI component handled by a perspective. A IVComponent is an // * visible UI component displayed in a defined area of perspective.

Author:
Andy Moncsek

Method Summary
 C getRoot()
          Returns the 'root' ui component created by the handle method.
 C postHandle(C node, IAction<A,M> action)
          To avoid toolkit specific threading issues the postHandle method always called after the handle method.
 void setRoot(C root)
          Set the root ui component created by the handle method.
 
Methods inherited from interface org.jacp.api.component.IExtendedComponent
onStart, onTearDown
 
Methods inherited from interface org.jacp.api.component.ISubComponent
getExecutionTarget, getNextIncomingMessage, getParentId, hasIncomingMessage, isBlocked, putIncomingMessage, setBlocked, setExecutionTarget, setParentId
 
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.IHandleable
handle
 

Method Detail

setRoot

void setRoot(C root)
Set the root ui component created by the handle method.

Parameters:
root -

getRoot

C getRoot()
Returns the 'root' ui component created by the handle method.

Returns:
the root component

postHandle

C postHandle(C node,
             IAction<A,M> action)
To avoid toolkit specific threading issues the postHandle method always called after the handle method. While the handle method is executed in a separate thread the postHandle method is guaranteed to run in application main thread. It is mostly save to create new components outside the main thread in the handle method but when you like to recycle your components you should use the postHandle method. In the postHandle method you should avoid long running tasks. Use it only to create or update your ui components.

Parameters:
node -
action -
Returns:
an ui component