Class Binding

java.lang.Object
com.inductiveautomation.snap.ui.Binding
All Implemented Interfaces:
Archivable, Cloneable

public class Binding extends Object implements Cloneable, Archivable
This class maps a UI node value to a model key value (some kind of display object like a Swing component value or an RMShape size).
  • Constructor Details

    • Binding

      public Binding()
      Creates a new binding.
    • Binding

      public Binding(String aPropName, String aKey)
      Creates a new binding for property name and key.
  • Method Details

    • getNode

      public Object getNode()
      Returns the UI node.
    • setNode

      public void setNode(Object anObj)
      Sets the UI node.
    • getHelper

      public UIHelper getHelper()
      Returns the UI node's helper (convenience).
    • setHelper

      public void setHelper(UIHelper aHelper)
      Sets the UI node's helper.
    • getPropertyName

      public String getPropertyName()
      Returns the property name.
    • setPropertyName

      public void setPropertyName(String aPropertyName)
      Sets the property name.
    • getKey

      public String getKey()
      Returns the key that is used to get the property value from the bound object.
    • setKey

      public void setKey(String aKey)
      Sets the key that is used to get the property value from the bound object.
    • getConversionKey

      public String getConversionKey()
      Returns the conversion key used to get conversion map to convert bound object value to UI node.
    • setConversionKey

      public void setConversionKey(String aKey)
      Sets the conversion key used to get conversion map to convert bound object value to UI node.
    • getFormat

      public Format getFormat()
      Returns the format object to be used to format values to strings.
    • setFormat

      public void setFormat(Format aFormat)
      Sets the format object to be used to convert values to strings.
    • clone

      public Binding clone()
      Standard clone implementation.
      Overrides:
      clone in class Object
    • toXML

      public RXElement toXML(RXArchiver anArchiver)
      XML archival.
      Specified by:
      toXML in interface Archivable
    • fromXML

      public Binding fromXML(RXArchiver anArchiver, RXElement anElement)
      XML unarchival.
      Specified by:
      fromXML in interface Archivable
    • toString

      public String toString()
      Returns a string representation.
      Overrides:
      toString in class Object