public class JacpContextImpl extends java.lang.Object implements Context, InternalContext
| Constructor and Description |
|---|
JacpContextImpl(java.lang.String id,
java.lang.String name,
java.util.concurrent.TransferQueue<org.jacpfx.api.message.Message<javafx.event.Event,java.lang.Object>> globalMessageQueue) |
JacpContextImpl(java.lang.String parentId,
java.util.concurrent.TransferQueue<org.jacpfx.api.message.Message<javafx.event.Event,java.lang.Object>> globalMessageQueue) |
JacpContextImpl(java.util.concurrent.TransferQueue<org.jacpfx.api.message.Message<javafx.event.Event,java.lang.Object>> globalMessageQueue) |
| Modifier and Type | Method and Description |
|---|---|
AsyncHandler<?> |
asyncHandler()
The async handler allows to supply consumers, suppliers and function on worker thread and on FX thread
|
boolean |
equals(java.lang.Object o) |
FXComponentLayout |
getComponentLayout()
Retruns the component layout
|
javafx.event.EventHandler<javafx.event.Event> |
getEventHandler(java.lang.Object message)
Returns an event handler that handles messages to caller component
|
javafx.event.EventHandler<javafx.event.Event> |
getEventHandler(java.lang.String targetId,
java.lang.Object message)
Returns an event handler that handles messages to target component
|
java.lang.String |
getExecutionTarget()
Returns the perspective in which the component should executed in.
|
java.lang.String |
getFullyQualifiedId()
Returns the fully qualified id like "parentId.componentId"
|
java.lang.String |
getId()
Returns the id of the component.
|
<T> ManagedFragmentHandler<T> |
getManagedFragmentHandler(java.lang.Class<T> clazz)
Returns a managed fragment handler, which contains part of an UI and can fully interact with CDI and it's parent component.
|
java.lang.String |
getName()
Returns the name of a component.
|
java.lang.String |
getParentId()
Returns the ID of parent component/perspective.
|
java.util.ResourceBundle |
getResourceBundle()
Returns the component resource bundle.
|
java.lang.String |
getReturnTargetAndClear()
Returns component id which is targeted by callback component return value; the
return value will be handled like an average message and will be
delivered to targeted component.
|
java.lang.String |
getTargetLayout()
Returns the target layout in parent perspective
|
int |
hashCode() |
void |
hideModalDialog()
hides the current modal dialog
|
boolean |
isActive()
Get the default active status of component.
|
void |
send(java.lang.Object message)
Send a message to caller component itself.
|
void |
send(java.lang.String targetId,
java.lang.Object message)
Send a message to defined targetId.
|
void |
setActive(boolean active)
Set default active state of component.
|
void |
setExecutionTarget(java.lang.String id)
Defines the perspective in which the component should executed in.
|
void |
setFXComponentLayout(FXComponentLayout layout)
Set the FXComponentLayout
|
void |
setId(java.lang.String id)
Set the component id
|
void |
setName(java.lang.String name)
Set the components name
|
void |
setParentId(java.lang.String parentId)
Set the parent id
|
void |
setResourceBundle(java.util.ResourceBundle resourceBundle)
Set the resource bundle
|
void |
setReturnTarget(java.lang.String returnTargetId)
Set component targetId which is the target of a background component return
value; the return value will be handled like an average message and will
be delivered to targeted component.
|
void |
setTargetLayout(java.lang.String targetLayout)
Defines the target layoutId, where the UI component should appear in,the layout is registered in perspective and is a placeholder for the component.
|
void |
showModalDialog(javafx.scene.Node node)
shows the passed Node as modal dialog
|
void |
updateActiveState(boolean active)
Set default active state of component.
|
void |
updateExecutionTarget(java.lang.String id)
Defines the perspective in which the component should executed in.
|
void |
updateReturnTarget(java.lang.String returnTargetId)
Set component targetId which is the target of a background component return
value; the return value will be handled like an average message and will
be delivered to targeted component.
|
public JacpContextImpl(java.lang.String id,
java.lang.String name,
java.util.concurrent.TransferQueue<org.jacpfx.api.message.Message<javafx.event.Event,java.lang.Object>> globalMessageQueue)
public JacpContextImpl(java.util.concurrent.TransferQueue<org.jacpfx.api.message.Message<javafx.event.Event,java.lang.Object>> globalMessageQueue)
public JacpContextImpl(java.lang.String parentId,
java.util.concurrent.TransferQueue<org.jacpfx.api.message.Message<javafx.event.Event,java.lang.Object>> globalMessageQueue)
public final javafx.event.EventHandler<javafx.event.Event> getEventHandler(java.lang.Object message)
getEventHandler in interface org.jacpfx.api.context.JacpContext<javafx.event.EventHandler<javafx.event.Event>,java.lang.Object>public final javafx.event.EventHandler<javafx.event.Event> getEventHandler(java.lang.String targetId,
java.lang.Object message)
getEventHandler in interface org.jacpfx.api.context.JacpContext<javafx.event.EventHandler<javafx.event.Event>,java.lang.Object>targetId - ; the targets component id.message - ; the message to send to target.public final void send(java.lang.String targetId,
java.lang.Object message)
send in interface org.jacpfx.api.context.JacpContext<javafx.event.EventHandler<javafx.event.Event>,java.lang.Object>public final void send(java.lang.Object message)
send in interface org.jacpfx.api.context.JacpContext<javafx.event.EventHandler<javafx.event.Event>,java.lang.Object>public final java.lang.String getId()
getId in interface org.jacpfx.api.context.JacpContext<javafx.event.EventHandler<javafx.event.Event>,java.lang.Object>public final java.lang.String getFullyQualifiedId()
getFullyQualifiedId in interface org.jacpfx.api.context.JacpContext<javafx.event.EventHandler<javafx.event.Event>,java.lang.Object>public final void setId(java.lang.String id)
setId in interface InternalContextpublic java.lang.String getParentId()
getParentId in interface org.jacpfx.api.context.JacpContext<javafx.event.EventHandler<javafx.event.Event>,java.lang.Object>public final void setParentId(java.lang.String parentId)
setParentId in interface InternalContextpublic java.lang.String getName()
getName in interface org.jacpfx.api.context.JacpContext<javafx.event.EventHandler<javafx.event.Event>,java.lang.Object>public final void setName(java.lang.String name)
setName in interface InternalContextpublic final java.util.ResourceBundle getResourceBundle()
getResourceBundle in interface org.jacpfx.api.context.JacpContext<javafx.event.EventHandler<javafx.event.Event>,java.lang.Object>public void setResourceBundle(java.util.ResourceBundle resourceBundle)
setResourceBundle in interface InternalContextpublic boolean isActive()
isActive in interface org.jacpfx.api.context.JacpContext<javafx.event.EventHandler<javafx.event.Event>,java.lang.Object>public void setActive(boolean active)
setActive in interface org.jacpfx.api.context.JacpContext<javafx.event.EventHandler<javafx.event.Event>,java.lang.Object>active - ; the component active state.public void updateActiveState(boolean active)
updateActiveState in interface InternalContextactive - ; the component active state.public <T> ManagedFragmentHandler<T> getManagedFragmentHandler(java.lang.Class<T> clazz)
getManagedFragmentHandler in interface ContextT - the type of the managed fragmentclazz - the class of the requested managed fragmentpublic void showModalDialog(javafx.scene.Node node)
showModalDialog in interface Contextnode - the Node to show in dialogpublic void hideModalDialog()
hideModalDialog in interface Contextpublic FXComponentLayout getComponentLayout()
getComponentLayout in interface Contextpublic void setFXComponentLayout(FXComponentLayout layout)
setFXComponentLayout in interface InternalContextpublic final java.lang.String getReturnTargetAndClear()
getReturnTargetAndClear in interface InternalContextpublic final void setReturnTarget(java.lang.String returnTargetId)
throws java.lang.IllegalStateException
setReturnTarget in interface org.jacpfx.api.context.JacpContext<javafx.event.EventHandler<javafx.event.Event>,java.lang.Object>returnTargetId - ; represents a component id to return the value tojava.lang.IllegalStateExceptionpublic final void updateReturnTarget(java.lang.String returnTargetId)
throws java.lang.IllegalStateException
updateReturnTarget in interface InternalContextreturnTargetId - ; represents a component id to return the value tojava.lang.IllegalStateExceptionpublic java.lang.String getExecutionTarget()
getExecutionTarget in interface InternalContextpublic void setExecutionTarget(java.lang.String id)
throws java.lang.IllegalStateException
setExecutionTarget in interface org.jacpfx.api.context.JacpContext<javafx.event.EventHandler<javafx.event.Event>,java.lang.Object>java.lang.IllegalStateExceptionpublic void updateExecutionTarget(java.lang.String id)
throws java.lang.IllegalStateException
updateExecutionTarget in interface InternalContextjava.lang.IllegalStateExceptionpublic AsyncHandler<?> asyncHandler()
asyncHandler in interface Contextpublic final java.lang.String getTargetLayout()
getTargetLayout in interface InternalContextpublic void setTargetLayout(java.lang.String targetLayout)
throws java.lang.IllegalStateException
setTargetLayout in interface org.jacpfx.api.context.JacpContext<javafx.event.EventHandler<javafx.event.Event>,java.lang.Object>java.lang.IllegalStateExceptionpublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Object