Download presentation
Presentation is loading. Please wait.
1
Display Builder Update
Kay Kasemir, Megan Grodowitz Amanda Carpenter May 2016, ESS EPICS Meeting
2
CS-Studio ‘BOY’
4
Issue: Too much on UI Thread
Load *.opi file Load embedded *.opi (Linking Container) Handle PV updates Execute scripts CS-Studio “freezes”
5
BOY code: Change step by step?
Difficult: Based on GEditorF SWT/Draw2d UI Thread Risky: BOY is used in operation Unintended side effects (Linking Container, macros, views) Rewrite Model Representation JavaFX Editor Runtime PV
6
Display builder Update
Editor Runtime PV “Looks like BOY”, but better Model: Widgets, Properties, file format Representation: On-screen objects, JavaFX (or SWT) Runtime: PVs, scripts Representation JavaFX Model BOY Update
7
Load Displays: BOY vs. Display Builder
UI thread (BOY) vs. Background threads (Display Builder) boy_delay1.mov vs. builder_delay1.mov (Both BOY and display.builder have 2 sec delay in file access to simulate slow file access)
8
Model Widgets Properties Persistence Macros Colors, Fonts
Editor Runtime PV Widgets Arc, Rectangle, Label, LED, TextUpdate, .. Group (contains other widgets) Embedded Display Properties Allow changes from any thread Change notification Controlled order Persistence Loads existing *.opi files Saves in defined order Macros For ‘text’ as well as ‘x’, ‘visible’, .. Colors, Fonts Representation JavaFX Model TODO Many more properties and widgets Defaults based on ‘class’ property
9
Representation Java FX SWT Fixed the font size problem!
Editor Runtime PV Java FX For all widgets SWT Very few widgets, just to show it’s possible Fixed the font size problem! BOY “point size” vs. pixel Representation JavaFX Model TODO Many more widgets Many properties Web Representation?
10
Runtime Common Widget Runtime EmbeddedDisplay Runtime
Editor Runtime PV Common Widget Runtime Loads model in background Creates representation on UI thread Handles PVs and scripts (rules) in background One Jython interpreter & thread per window Throttles UI updates EmbeddedDisplay Runtime Keeps hosted display private ActionButton Runtime Replaces current or opens new window Representation JavaFX Model TODO ??
11
Compare BOY and display.builder
12
File Format Similar Concise Useful order
13
Widget Model: Consolidate, Refine
Rectangle, Rounded Rectangle Rectangle w/ corner width, height LED with different PV behavior LED for binary PV or ‘bit’ MultiStateLED for N states
14
Properties: Arrays and Structures
“trace_0_color”, .., “state_value_11” Actual arrays and structures: “traces[0].color”, “states[11].value” Array size only limited by memory
15
Keyboard Navigation in JavaFX
‘Tab’ move in widget order ‘Shift-Cursor’ move in on-screen order .. was impossible because of SWT/Draw2d mix
16
Alarm-sensitive Border
Space-efficient, distinguishable Minor: Single-line Major: Double-line Invalid/Disconnected: Broken line now without widget body resize
17
Plotting Basics of Image and XYPlot “work”
18
https://twitter.com/LeedeMora, SciPy2015 on YouTube
Image Widget Default color map: Viridis “perceptually uniform” SciPy2015 on YouTube
19
Editor
20
Editor Palette Properties Tracker to move/resize Toolbar Selection
Runtime PV Palette Properties In defined order No more off-screen value column Tracker to move/resize Snap-to-Grid Snap-to-Geometry (parallelized) Toolbar Un-do Front/back Align top/center/.., distribute Selection Rubberband, multi-widget, In and out of ‘Group’ Outline (Widget Tree) Representation JavaFX Model TODO Rulers?
21
Context-based Inline Editor
In editor, Double-click widget for PV Name (Any widget with PV) Text (Label Widget)
22
Image Widget Property Comparison
23
Color Map Editor Comparison
24
Poly Editor ‘Append’ Mode ‘Edit’ Mode Toggle between modes Add points
Delete last point ‘Edit’ Mode Move Add Delete points Toggle between modes
25
Scripts Execute in background Minimal script compatibility:
val = PVUtil.getDouble(pvs[0]) pos = *val widget.setPropertyValue(“x”, pos) Weren’t kidding when telling you to avoid scripts because compatibility is not guaranteed.
26
Rule & Script Dialog Streamlining
All rules of a widget in one dialog
27
You should still avoid scripts
.. but if you ignore this advice, you’ll find they work better than before (Long running script example)
28
Status Examined ~200 SNS Instrument screens
Many screens complete or nearly complete! Missing widgets: Menu Button Byte Monitor .. Missing Properties XYPlot Image (Intensity Graph) Some need manual work Scripts, Rules
29
Outlook Implement most BOY-type Widgets & Properties
Priority based on SNS instrument needs Plan to add vtype.pv.mqtt IoT Continue to allow Standalone Editor, Runtime Use outside of CS-Studio Eclipse Project?
30
Boy, Only Better Status Separate Model, Representation, Runtime
Background threads, less freezing Minimal script compatibility Status Reads existing files Handles basic instrument displays 1/3 of BOY widgets with essential features First release end-2016
32
Present current state of Model
Design Time Data Flow Add Widget, Set Property Editor Present current state of Model Update File Save Representation Model JFX Notify of changes
33
Present current state of Model
Runtime Data Flow Runtime PV Scripts, (Rules) UI Event Present current state of Model Enter Text, Push Button File Update Load Representation Model JFX Notify of changes
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.