Class ConnectionHandler

java.lang.Object
org.csstudio.opibuilder.editparts.ConnectionHandler
Direct Known Subclasses:
PVWidgetConnectionHandler

public class ConnectionHandler extends Object
The handler help a widget to handle the pv connection event such as PVs' disconnection, connection recovered. It will show a disconnect border on the widget if any one of the PVs is disconnected. The detailed disconnected information will be displayed as tooltip.
  • Field Details

  • Constructor Details

    • ConnectionHandler

      public ConnectionHandler(AbstractBaseEditPart editpart)
      Parameters:
      editpart - the widget editpart to be handled.
  • Method Details

    • addPV

      public void addPV(String pvName, IPV pv)
      Add a PV to this handler, so its connection event can be handled.
      Parameters:
      pvName - name of the PV.
      pv - the PV object.
    • removePV

      public void removePV(String pvName)
    • markWidgetAsDisconnected

      protected void markWidgetAsDisconnected(IPV pv)
      Mark a widget as disconnected.
    • widgetConnectionRecovered

      protected void widgetConnectionRecovered(IPV pv, boolean valueChangedFromNull)
      Update the widget when a PV' connection is recovered.
      Parameters:
      valueChangedFromNull - true if this is called because value changed from null value.
    • isConnected

      public boolean isConnected()
      Returns:
      true if all pvs are connected.
    • isHasNullValue

      public boolean isHasNullValue()
      Returns:
      true if one or some PVs have null values.
    • getAllPVs

      public Map<String,IPV> getAllPVs()
      Returns:
      the map with all PVs. It is not allowed to change the Map.
    • getToolTipText

      public String getToolTipText()