Class PropertyInteractionDescriptor

java.lang.Object
com.inductiveautomation.factorypmi.application.binding.PropertyInteractionDescriptor
All Implemented Interfaces:
InteractionDescriptor
Direct Known Subclasses:
PropertyListenerDescriptor

public class PropertyInteractionDescriptor extends Object implements InteractionDescriptor
An interaction descriptor that represents a dependency on a source component's property.
  • Constructor Details

  • Method Details

    • getListenable

      public JComponent getListenable()
      Returns the component (source component) that we listen to for detecting when the interaction is updated
    • getListener

      public PropertyChangeListener getListener()
      The property change listener that is used to listen to the listenable (source)
    • getSource

      public Component getSource()
      Returns the source component
      Specified by:
      getSource in interface InteractionDescriptor
    • 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 interface InteractionDescriptor
    • setAdapter

      public void setAdapter(Adapter a)
      Specified by:
      setAdapter in interface InteractionDescriptor
    • getQuality

      public QualityCode getQuality()
      Looks up the quality of the property this is listening to
    • setListener

      public void setListener(PropertyChangeListener listener)
      Sets the listener (the PCL that listens to the source)
    • setSource

      public void setSource(Component component)
      Sets the source component
      Specified by:
      setSource in interface InteractionDescriptor
    • disconnect

      public void disconnect()
      Removes the listener from the listenable.
      Specified by:
      disconnect in interface InteractionDescriptor
    • connect

      public void connect()
      Connects the listener to the listenable
      Specified by:
      connect in interface InteractionDescriptor
    • getSourceProperty

      public String getSourceProperty()
      Returns the name of the property on the source that we are interested in
    • setSourceProperty

      public void setSourceProperty(String string)
      Sets the source property name
    • getSourceQualityProperty

      public 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 interface InteractionDescriptor
    • 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 interface InteractionDescriptor
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • initialize

      public void initialize(Class type, Object oldInstance, Object newInstance, Encoder out)
      Serializes this ID
      Specified by:
      initialize in interface InteractionDescriptor
    • _getSymbolicSourcePath

      public String _getSymbolicSourcePath()
      Specified by:
      _getSymbolicSourcePath in interface InteractionDescriptor
    • _setSymbolicSourcePath

      public void _setSymbolicSourcePath(String symbolicSourcePath)
      Sets the symbolic path for when the ID is told to serialize symbolically
      Specified by:
      _setSymbolicSourcePath in interface InteractionDescriptor