Class PropertyInteractionDescriptor
- java.lang.Object
-
- com.inductiveautomation.factorypmi.application.binding.PropertyInteractionDescriptor
-
- All Implemented Interfaces:
InteractionDescriptor
- Direct Known Subclasses:
PropertyListenerDescriptor
public class PropertyInteractionDescriptor extends java.lang.Object implements InteractionDescriptor
An interaction descriptor that represents a dependency on a source component's property.
-
-
Constructor Summary
Constructors Constructor Description PropertyInteractionDescriptor()
PropertyInteractionDescriptor(java.awt.Component source, java.beans.PropertyChangeListener listener, PropertyAdapter adapter, java.lang.String sourceProp)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description java.lang.String
_getSymbolicSourcePath()
void
_setSymbolicSourcePath(java.lang.String symbolicSourcePath)
Sets the symbolic path for when the ID is told to serialize symbolicallyvoid
connect()
Connects the listener to the listenablevoid
disconnect()
Removes the listener from the listenable.Adapter
getAdapter()
Returns the adapter that this interaction listener is a slave to.javax.swing.JComponent
getListenable()
Returns the component (source component) that we listen to for detecting when the interaction is updatedjava.beans.PropertyChangeListener
getListener()
The property change listener that is used to listen to the listenable (source)QualityCode
getQuality()
Looks up the quality of the property this is listening tojava.awt.Component
getSource()
Returns the source componentjava.lang.String
getSourceProperty()
Returns the name of the property on the source that we are interested injava.lang.String
getSourceQualityProperty()
void
initialize(java.lang.Class type, java.lang.Object oldInstance, java.lang.Object newInstance, java.beans.Encoder out)
Serializes this IDboolean
isSerializeSymbolically()
True if this ID has been told to serialize symbolicallyvoid
setAdapter(Adapter a)
void
setConnected(boolean b)
Deprecated.void
setListener(java.beans.PropertyChangeListener listener)
Sets the listener (the PCL that listens to the source)void
setSerializeSymbolically(boolean b)
Notifies this ID that it should serialize symbolically.void
setSource(java.awt.Component component)
Sets the source componentvoid
setSourceProperty(java.lang.String string)
Sets the source property namejava.lang.String
toString()
-
-
-
Constructor Detail
-
PropertyInteractionDescriptor
public PropertyInteractionDescriptor()
-
PropertyInteractionDescriptor
public PropertyInteractionDescriptor(java.awt.Component source, java.beans.PropertyChangeListener listener, PropertyAdapter adapter, java.lang.String sourceProp)
-
-
Method Detail
-
getListenable
public javax.swing.JComponent getListenable()
Returns the component (source component) that we listen to for detecting when the interaction is updated
-
getListener
public java.beans.PropertyChangeListener getListener()
The property change listener that is used to listen to the listenable (source)
-
getSource
public java.awt.Component getSource()
Returns the source component- Specified by:
getSource
in interfaceInteractionDescriptor
-
getAdapter
public Adapter getAdapter()
Returns the adapter that this interaction listener is a slave to. It will be updated when we are updated from the source- Specified by:
getAdapter
in interfaceInteractionDescriptor
-
setAdapter
public void setAdapter(Adapter a)
- Specified by:
setAdapter
in interfaceInteractionDescriptor
-
getQuality
public QualityCode getQuality()
Looks up the quality of the property this is listening to
-
setListener
public void setListener(java.beans.PropertyChangeListener listener)
Sets the listener (the PCL that listens to the source)
-
setSource
public void setSource(java.awt.Component component)
Sets the source component- Specified by:
setSource
in interfaceInteractionDescriptor
-
disconnect
public void disconnect()
Removes the listener from the listenable.- Specified by:
disconnect
in interfaceInteractionDescriptor
-
connect
public void connect()
Connects the listener to the listenable- Specified by:
connect
in interfaceInteractionDescriptor
-
getSourceProperty
public java.lang.String getSourceProperty()
Returns the name of the property on the source that we are interested in
-
setSourceProperty
public void setSourceProperty(java.lang.String string)
Sets the source property name
-
getSourceQualityProperty
public java.lang.String getSourceQualityProperty()
-
setConnected
@Deprecated public void setConnected(boolean b)
Deprecated.
-
isSerializeSymbolically
public boolean isSerializeSymbolically()
True if this ID has been told to serialize symbolically- Specified by:
isSerializeSymbolically
in interfaceInteractionDescriptor
-
setSerializeSymbolically
public void setSerializeSymbolically(boolean b)
Notifies this ID that it should serialize symbolically. Used when copying when the source isn't also being copied. Used by the InteractionDescriptorPersistenceDelegate- Specified by:
setSerializeSymbolically
in interfaceInteractionDescriptor
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
initialize
public void initialize(java.lang.Class type, java.lang.Object oldInstance, java.lang.Object newInstance, java.beans.Encoder out)
Serializes this ID- Specified by:
initialize
in interfaceInteractionDescriptor
-
_getSymbolicSourcePath
public java.lang.String _getSymbolicSourcePath()
- Specified by:
_getSymbolicSourcePath
in interfaceInteractionDescriptor
-
_setSymbolicSourcePath
public void _setSymbolicSourcePath(java.lang.String symbolicSourcePath)
Sets the symbolic path for when the ID is told to serialize symbolically- Specified by:
_setSymbolicSourcePath
in interfaceInteractionDescriptor
-
-