Class SimpleBoundTagAdapter

    • Field Detail

      • colorMappingTable

        protected ColorStateTable colorMappingTable
        Used when binding a color property to a numeric tag.
      • currentColorState

        protected ColorState currentColorState
        The current color state. Used to avoid re-lookup every blink.
      • inBlink

        protected boolean inBlink
        Used to keep track of the blink status when blinking.
      • blinkTask

        protected java.util.TimerTask blinkTask
        TimerTask generated by the BlinkTimer that is controlling our blink timing.
      • currentWriteOp

        protected SimpleBoundTagAdapter.WriteOp currentWriteOp
        The current(latest) write operation, if any. While this is non-null, values coming in through setValue() will be cached. When the write is done, this class's implementation of ChangeListener will be invoked, which will clear out this value.
      • previousValue

        protected QualifiedValue previousValue
        Remembers the value before a write request
      • updatedValue

        protected QualifiedValue updatedValue
        The last seen value update that was squelched during the write request
      • updatingTag

        protected boolean updatingTag
        True when the push listener that listens to PropertyChangeEvents on the target property for bidirectional mode is updating the tag's value.
      • updatingProperty

        protected boolean updatingProperty
        True when the target property is being updated. This means that the push listener can ignore property change events, since they came from the adapter
    • Constructor Detail

      • SimpleBoundTagAdapter

        public SimpleBoundTagAdapter()
    • Method Detail

      • isWriteForced

        public static boolean isWriteForced()
        Returns true if an adapter is currently executing a forced write. Forced writes are intended to bypass systems such as "Reject updates during edit" on text boxes.
      • getLoggerName

        protected java.lang.String getLoggerName()
      • getLogger

        protected LoggerEx getLogger()
      • startup

        public void startup()
        Description copied from interface: Adapter
        Notifies the adapter that it is becoming active, and should start any polling/threaded activities.
        Specified by:
        startup in interface Adapter
        Overrides:
        startup in class AbstractPropertyAdapter
      • shutdown

        public void shutdown()
        Description copied from interface: Adapter
        Notifies the adapter that it is becoming inactive, and should cease any polling/threaded activities.
        Specified by:
        shutdown in interface Adapter
        Overrides:
        shutdown in class AbstractPropertyAdapter
      • doBlink

        public void doBlink()
        Implements Blinker. Called when the BlinkTask is running for a blinking color state.
        Specified by:
        doBlink in interface Blinker
      • propertyChange

        public void propertyChange​(java.beans.PropertyChangeEvent evt)
        Listens to the target property for tag updating.
        Specified by:
        propertyChange in interface java.beans.PropertyChangeListener
      • stateChanged

        public void stateChanged​(javax.swing.event.ChangeEvent e)
        Listens to the current WriteOperation for when the write is done.
        Specified by:
        stateChanged in interface javax.swing.event.ChangeListener
      • actionPerformed

        public void actionPerformed​(java.awt.event.ActionEvent e)
        Listens to the ReadAfterWrite timer
        Specified by:
        actionPerformed in interface java.awt.event.ActionListener
      • tagChanged

        public void tagChanged​(TagChangeEvent e)
        Listens for tag changes (implements TagChangeListener)
        Specified by:
        tagChanged in interface TagChangeListener
        Parameters:
        e - a ChangeEvent object
      • updateTarget

        protected void updateTarget()
        Description copied from class: AbstractPropertyAdapter
        Sets the target property to the value. If a problem occurs, the problem is displayed, not thrown. Note that updateValue() is probably a better bet, as it updates both value and quality.
        Overrides:
        updateTarget in class AbstractPropertyAdapter
      • getCurrentTagPath

        protected TagPath getCurrentTagPath()
      • setColorMappingTable

        public void setColorMappingTable​(ColorStateTable colorMappingTable)