ControlSystemStudio / phoebus

A framework and set of tools to monitor and operate large scale control systems, such as the ones in the accelerator community.
http://phoebus.org/
Eclipse Public License 1.0
90 stars 90 forks source link

Expose JFXRepresentation to other packages? #3069

Open daykin opened 2 months ago

daykin commented 2 months ago

For the 'click heat-mapping' aspect of the UX analytics plugin, I need to know the Zoom level and boundaries of the JFXRepresentation of a display runtime in order to reconcile click events between clients that may have different sized and zoomed instances. The most trivial solution would be to change DisplayRuntimeInstance.getRepresentation() from package-private to public.

Alternatively, it might be safer from a compartmentalization perspective to only add a getZoom(), getCurrentHeight(), etc, but that is less flexible.

Which one would all of you Phoebus gurus suggest?

kasemir commented 2 months ago

Make the DisplayRuntimeInstance.getRepresentation() public, maybe with a comment that direct access to the JFX representation was allowed for special use cases like UX analytics. Display code should try to keep the separation of Model, Runtime and Representation which, in the original implementation, allowed swapping between an SWT and JFX representation.

daykin commented 2 months ago

3077 opened