use of org.csstudio.display.builder.runtime.pv.RuntimePV in project org.csstudio.display.builder by kasemir.
the class WidgetInfoAction method runWithEvent.
@Override
public void runWithEvent(final Event event) {
final WidgetRuntime<?> runtime = WidgetRuntime.ofWidget(widget);
final List<WidgetInfoDialog.NameStateValue> pvs = new ArrayList<>();
for (RuntimePV pv : runtime.getPVs()) pvs.add(new WidgetInfoDialog.NameStateValue(pv.getName(), pv.isReadonly() ? "read-only" : "writable", pv.read()));
final WidgetInfoDialog dialog = new WidgetInfoDialog(widget, pvs);
if (event.display != null) {
final Point mouse = event.display.getCursorLocation();
dialog.setX(mouse.x);
dialog.setY(mouse.y);
}
dialog.show();
ModalityHack.forDialog(dialog);
}
Aggregations