Zoom and pan in the vision client

No, I ran into an unfortunate API limitation due to the Designer Nav Tree’s assumptions about the hierarchy of Swing components. Only the BasicContainer class can contain other designable components, and those designable components are enumerated in the designer with Swing’s own getComponents() methods. Designable content enumeration should have been a dedicated interface for the Nav Tree, IMNSHO, as the re-used interface interferes with any type of layered (scrollable/zoomable) container.

In my investigations, I instrumented calls to the various getComponent*() methods to identify the callers, and then confirmed that a layered container was possible by lying to various calls from the Nav Tree’s utility functions. Too fragile and too slow (getting tracebacks on every getComponent call) to deploy anything for real.

IA would have to factor out all relevant designer calls to getComponent*() into something like getVisionComponents*() so that a subclass of BasicContainer could override those. Someone else would have to create and vote on a suitable entry at ideas.inductiveautomation.com as I cannot log into that site.

1 Like