Search in sources :

Example 1 with PVNameToValueBinding

use of org.csstudio.display.builder.runtime.PVNameToValueBinding in project org.csstudio.display.builder by kasemir.

the class XYPlotWidgetRuntime method start.

@Override
public void start() throws Exception {
    super.start();
    for (TraceWidgetProperty trace : widget.propTraces().getValue()) {
        bindings.add(new PVNameToValueBinding(this, trace.traceXPV(), trace.traceXValue()));
        bindings.add(new PVNameToValueBinding(this, trace.traceYPV(), trace.traceYValue()));
        bindings.add(new PVNameToValueBinding(this, trace.traceErrorPV(), trace.traceErrorValue()));
    }
    for (MarkerProperty marker : widget.propMarkers().getValue()) bindMarker(marker.pv(), marker.value());
}
Also used : TraceWidgetProperty(org.csstudio.display.builder.model.widgets.plots.PlotWidgetProperties.TraceWidgetProperty) PVNameToValueBinding(org.csstudio.display.builder.runtime.PVNameToValueBinding) MarkerProperty(org.csstudio.display.builder.model.widgets.plots.XYPlotWidget.MarkerProperty)

Example 2 with PVNameToValueBinding

use of org.csstudio.display.builder.runtime.PVNameToValueBinding in project org.csstudio.display.builder by kasemir.

the class XYPlotWidgetRuntime method stop.

@Override
public void stop() {
    // Disconnect Marker PVs and listeners
    for (Map.Entry<WidgetProperty<?>, WidgetPropertyListener<?>> entry : marker_prop_listeners.entrySet()) entry.getKey().removePropertyListener(entry.getValue());
    marker_prop_listeners.clear();
    for (Map.Entry<RuntimePV, RuntimePVListener> entry : marker_pv_listeners.entrySet()) entry.getKey().removeListener(entry.getValue());
    marker_pv_listeners.clear();
    for (RuntimePV pv : marker_pvs) {
        removePV(pv);
        PVFactory.releasePV(pv);
    }
    marker_pvs.clear();
    for (PVNameToValueBinding binding : bindings) binding.dispose();
    super.stop();
}
Also used : TraceWidgetProperty(org.csstudio.display.builder.model.widgets.plots.PlotWidgetProperties.TraceWidgetProperty) WidgetProperty(org.csstudio.display.builder.model.WidgetProperty) RuntimePV(org.csstudio.display.builder.runtime.pv.RuntimePV) PVNameToValueBinding(org.csstudio.display.builder.runtime.PVNameToValueBinding) WidgetPropertyListener(org.csstudio.display.builder.model.WidgetPropertyListener) ConcurrentHashMap(java.util.concurrent.ConcurrentHashMap) Map(java.util.Map) RuntimePVListener(org.csstudio.display.builder.runtime.pv.RuntimePVListener)

Example 3 with PVNameToValueBinding

use of org.csstudio.display.builder.runtime.PVNameToValueBinding in project org.csstudio.display.builder by kasemir.

the class KnobWidgetRuntime method start.

@Override
public void start() throws Exception {
    super.start();
    bindings.add(new PVNameToValueBinding(this, widget.propReadbackPVName(), widget.propReadbackPVValue()));
}
Also used : PVNameToValueBinding(org.csstudio.display.builder.runtime.PVNameToValueBinding)

Aggregations

PVNameToValueBinding (org.csstudio.display.builder.runtime.PVNameToValueBinding)3 TraceWidgetProperty (org.csstudio.display.builder.model.widgets.plots.PlotWidgetProperties.TraceWidgetProperty)2 Map (java.util.Map)1 ConcurrentHashMap (java.util.concurrent.ConcurrentHashMap)1 WidgetProperty (org.csstudio.display.builder.model.WidgetProperty)1 WidgetPropertyListener (org.csstudio.display.builder.model.WidgetPropertyListener)1 MarkerProperty (org.csstudio.display.builder.model.widgets.plots.XYPlotWidget.MarkerProperty)1 RuntimePV (org.csstudio.display.builder.runtime.pv.RuntimePV)1 RuntimePVListener (org.csstudio.display.builder.runtime.pv.RuntimePVListener)1