Files
ec-gn-ja-pcf/EC-GN-JA-PCF/.svn/pristine/91/91d99695ab6991a44e28b917406e8b3c083f9799.svn-base

27 lines
618 B
Plaintext

from org.csstudio.opibuilder.scriptUtil import PVUtil
from org.csstudio.opibuilder.scriptUtil import ColorFontUtil
table = widget.getTable()
nbColPVs = 3
#find index of the trigger PV
i = 0
while triggerPV != pvs[i]:
i += 1
table.setCellText(i / nbColPVs, i % nbColPVs + 3, PVUtil.getString(triggerPV))
s = PVUtil.getSeverity(triggerPV)
color = ColorFontUtil.WHITE
if s == 0:
color = ColorFontUtil.GREEN
elif s == 1:
color = ColorFontUtil.RED
elif s == 2:
color = ColorFontUtil.YELLOW
elif s == 3:
color = ColorFontUtil.PINK
table.setCellBackground(i / nbColPVs, i % nbColPVs + 3, color)