Search in sources :

Example 1 with OPITimer

use of org.csstudio.opibuilder.util.OPITimer in project yamcs-studio by yamcs.

the class PVWidgetEditpartDelegate method initUpdateSuppressTimer.

/**
 * Initialize the updateSuppressTimer
 */
private synchronized void initUpdateSuppressTimer() {
    if (updateSuppressTimer == null)
        updateSuppressTimer = new OPITimer();
    if (timerTask == null)
        timerTask = new Runnable() {

            @Override
            public void run() {
                AbstractWidgetProperty pvValueProperty = editpart.getWidgetModel().getProperty(controlPVValuePropId);
                // recover update
                if (pvValueListeners != null) {
                    for (PropertyChangeListener listener : pvValueListeners) {
                        pvValueProperty.addPropertyChangeListener(listener);
                    }
                }
                // forcefully set PV_Value property again
                pvValueProperty.setPropertyValue(pvValueProperty.getPropertyValue(), true);
            }
        };
}
Also used : PropertyChangeListener(java.beans.PropertyChangeListener) AbstractWidgetProperty(org.csstudio.opibuilder.properties.AbstractWidgetProperty) OPITimer(org.csstudio.opibuilder.util.OPITimer)

Aggregations

PropertyChangeListener (java.beans.PropertyChangeListener)1 AbstractWidgetProperty (org.csstudio.opibuilder.properties.AbstractWidgetProperty)1 OPITimer (org.csstudio.opibuilder.util.OPITimer)1