Class DefaultInteractionController
- java.lang.Object
-
- com.inductiveautomation.factorypmi.application.binding.DefaultInteractionController
-
- All Implemented Interfaces:
InteractionController
public class DefaultInteractionController extends java.lang.Object implements InteractionController
Straight-forward implementation of an interaction controller using a map of adapters.
-
-
Constructor Summary
Constructors Constructor Description DefaultInteractionController()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddAdapter(java.awt.Component c, Adapter a)voidconnectAdapters(VisionClientContext context)Adapter[]getAllAdaptersForTarget(java.awt.Component target)Get all adapters (property + general) for the target component.VisionClientContextgetContext()java.util.HashMap<java.awt.Component,java.util.List<Adapter>>getGeneralAdapters()Getter of underlying map, for serializationInteractionDescriptor[]getInteractionDescriptorsWithSource(java.awt.Component source)Get all of the interactions that have the given component as a source (dependency)InteractionDescriptor[]getInteractionDescriptorsWithTarget(java.awt.Component target)Get all of the interactions that target the given component.PropertyAdaptergetPropertyAdapter(java.awt.Component c, java.lang.String propName)Get the property adapter for the given property.java.util.HashMap<PropertyKey,PropertyAdapter>getPropertyAdapters()Getter of underlying map, for serializationvoidprintInteractions()voidremoveAdapter(java.awt.Component c, Adapter a)java.util.List<Adapter>removeAllAdaptersForTarget(java.awt.Component target)voidremovePropertyAdapter(java.awt.Component c, java.lang.String propName)voidsetGeneralAdapters(java.util.HashMap<java.awt.Component,java.util.List<Adapter>> generalAdapters)voidsetPropertyAdapter(java.awt.Component c, java.lang.String propName, PropertyAdapter pa)voidsetPropertyAdapters(java.util.HashMap<PropertyKey,PropertyAdapter> map)voidshutdownAdapters()voidshutdownBindings()voidshutdownEventHandlers()voidstartupAdapters()voidstartupBindings()voidstartupEventHandlers()
-
-
-
Method Detail
-
getPropertyAdapters
public java.util.HashMap<PropertyKey,PropertyAdapter> getPropertyAdapters()
Getter of underlying map, for serialization
-
getGeneralAdapters
public java.util.HashMap<java.awt.Component,java.util.List<Adapter>> getGeneralAdapters()
Getter of underlying map, for serialization
-
setPropertyAdapters
public void setPropertyAdapters(java.util.HashMap<PropertyKey,PropertyAdapter> map)
-
setGeneralAdapters
public void setGeneralAdapters(java.util.HashMap<java.awt.Component,java.util.List<Adapter>> generalAdapters)
-
getPropertyAdapter
public PropertyAdapter getPropertyAdapter(java.awt.Component c, java.lang.String propName)
Description copied from interface:InteractionControllerGet the property adapter for the given property. If no adapter (a.k.a. binding) is installed, null is returned.- Specified by:
getPropertyAdapterin interfaceInteractionController
-
getInteractionDescriptorsWithSource
public InteractionDescriptor[] getInteractionDescriptorsWithSource(java.awt.Component source)
Description copied from interface:InteractionControllerGet all of the interactions that have the given component as a source (dependency)- Specified by:
getInteractionDescriptorsWithSourcein interfaceInteractionController
-
getInteractionDescriptorsWithTarget
public InteractionDescriptor[] getInteractionDescriptorsWithTarget(java.awt.Component target)
Description copied from interface:InteractionControllerGet all of the interactions that target the given component.- Specified by:
getInteractionDescriptorsWithTargetin interfaceInteractionController
-
getAllAdaptersForTarget
public Adapter[] getAllAdaptersForTarget(java.awt.Component target)
Description copied from interface:InteractionControllerGet all adapters (property + general) for the target component.- Specified by:
getAllAdaptersForTargetin interfaceInteractionController
-
removeAllAdaptersForTarget
public java.util.List<Adapter> removeAllAdaptersForTarget(java.awt.Component target)
- Specified by:
removeAllAdaptersForTargetin interfaceInteractionController
-
setPropertyAdapter
public void setPropertyAdapter(java.awt.Component c, java.lang.String propName, PropertyAdapter pa)- Specified by:
setPropertyAdapterin interfaceInteractionController
-
removePropertyAdapter
public void removePropertyAdapter(java.awt.Component c, java.lang.String propName)- Specified by:
removePropertyAdapterin interfaceInteractionController
-
addAdapter
public void addAdapter(java.awt.Component c, Adapter a)- Specified by:
addAdapterin interfaceInteractionController
-
removeAdapter
public void removeAdapter(java.awt.Component c, Adapter a)- Specified by:
removeAdapterin interfaceInteractionController
-
connectAdapters
public void connectAdapters(VisionClientContext context)
-
startupEventHandlers
public void startupEventHandlers()
-
startupBindings
public void startupBindings()
-
startupAdapters
public void startupAdapters()
-
shutdownEventHandlers
public void shutdownEventHandlers()
-
shutdownBindings
public void shutdownBindings()
-
shutdownAdapters
public void shutdownAdapters()
-
printInteractions
public void printInteractions()
-
getContext
public VisionClientContext getContext()
-
-