Class PVWidgetEditpartDelegate
java.lang.Object
org.csstudio.opibuilder.editparts.PVWidgetEditpartDelegate
- All Implemented Interfaces:
IPVWidgetEditpart
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.csstudio.opibuilder.editparts.IPVWidgetEditpart
IPVWidgetEditpart.ISetPVValueListener -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidcalculateAlarmColor(boolean isSensitive, Color saveColor) org.eclipse.draw2d.Bordervoidvoidprotected voidfireSetPVValue(String pvPropId, Object value) String[]getPV()Get the PV corresponding to thePV Nameproperty.Get the pv by PV property id.getPVValue(String pvPropId) Get value from one of the attached PVs.intvoidinitFigure(org.eclipse.draw2d.IFigure figure) booleanvoidmarkAsControlPV(String pvPropId, String pvValuePropId) For PV Control widgets, mark this PV as control PV.voidvoidsetControlEnabled(boolean enabled) Set whether the editpart is enabled for PV control.voidsetIgnoreOldPVValue(boolean ignoreOldValue) voidsetPVValue(String pvPropId, Object value) Set PV to given value.voidsetUpdateSuppressTime(int updateSuppressTime) Set the time needed to suppress reading back from PV after writing.voidvoidstartPVs()Start all PVs.protected voidStart the updateSuppressTimer.void
-
Field Details
-
timerTask
-
updateSuppressTimer
-
-
Constructor Details
-
PVWidgetEditpartDelegate
- Parameters:
editpart- the editpart to be delegated. It must implementedIPVWidgetEditpart
-
-
Method Details
-
getWidgetModel
-
doActivate
public void doActivate() -
startPVs
public void startPVs()Start all PVs. This should be called as the last step in editpart.activate(). -
doDeActivate
public void doDeActivate() -
getControlPV
- Specified by:
getControlPVin interfaceIPVWidgetEditpart- Returns:
- the control PV. null if no control PV on this widget.
-
getPV
Get the PV corresponding to thePV Nameproperty. It is same as callinggetPV("pv_name").- Specified by:
getPVin interfaceIPVWidgetEditpart- Returns:
- the PV corresponding to the
PV Nameproperty. null if PV Name is not configured for this widget.
-
getPV
Get the pv by PV property id.- Specified by:
getPVin interfaceIPVWidgetEditpart- Parameters:
pvPropId- the PV property id.- Returns:
- the corresponding pv for the pvPropId. null if the pv doesn't exist.
-
getPVValue
Get value from one of the attached PVs.- Specified by:
getPVValuein interfaceIPVWidgetEditpart- Parameters:
pvPropId- the property id of the PV. It is "pv_name" for the main PV.- Returns:
- the IValue of the PV.
-
getUpdateSuppressTime
public int getUpdateSuppressTime()- Returns:
- the time needed to suppress reading back from PV after writing. No need to suppress if returned value <=0
-
setUpdateSuppressTime
public void setUpdateSuppressTime(int updateSuppressTime) Set the time needed to suppress reading back from PV after writing. No need to suppress if returned value <=0- Parameters:
updateSuppressTime-
-
initFigure
public void initFigure(org.eclipse.draw2d.IFigure figure) -
markAsControlPV
For PV Control widgets, mark this PV as control PV.- Parameters:
pvPropId- the propId of the PV.
-
isPVControlWidget
public boolean isPVControlWidget()- Specified by:
isPVControlWidgetin interfaceIPVWidgetEditpart
-
registerBasePropertyChangeHandlers
public void registerBasePropertyChangeHandlers() -
stopPulsing
public void stopPulsing() -
startPulsing
public void startPulsing() -
startUpdateSuppressTimer
protected void startUpdateSuppressTimer()Start the updateSuppressTimer. All property change listeners of PV_Value property will temporarily removed until timer is due. -
calculateBorder
public org.eclipse.draw2d.Border calculateBorder() -
calculateBackColor
-
calculateForeColor
-
calculateAlarmColor
-
setPVValue
Set PV to given value. Should accept Double, Double[], Integer, String, maybe more.- Specified by:
setPVValuein interfaceIPVWidgetEditpart- Parameters:
pvPropId-value-
-
setIgnoreOldPVValue
public void setIgnoreOldPVValue(boolean ignoreOldValue) -
getAllPVNames
- Specified by:
getAllPVNamesin interfaceIPVWidgetEditpart- Returns:
- A String array with all PV names from PV properties. It only returns the visible and nonempty PV properties.
-
getPVName
- Specified by:
getPVNamein interfaceIPVWidgetEditpart- Returns:
- name of the major PV.
-
addSetPVValueListener
- Specified by:
addSetPVValueListenerin interfaceIPVWidgetEditpart
-
fireSetPVValue
-
setControlEnabled
public void setControlEnabled(boolean enabled) Set whether the editpart is enabled for PV control. Disabled editparts have greyed-out figures, and the cursor is set to a cross.- Specified by:
setControlEnabledin interfaceIPVWidgetEditpart
-
addAlarmSeverityListener
-