Exploring JXLayerUI 2

Sharing the same LayerUI between multiple JXLayers

In this test we explore what happens if the same LayerUI instance is shared between multiple JXLayer instances. We use the same setup of wrapped JXLayer components (mouse drawing, hide cursor and magnifying glass) as in the previous test.

But this time we create two sets of wrapped JXLayers. They share the same instances of the mouse drawing, hide cursor and magnifying glass LayerUIs.

The LayerUIs are such designed that the state information that they need to maintain is kept in a separate StateObject that, upon stall time, is stored as a client property in the JXLayer. So, in this test setup, each LayerUI maintains two StateObjects, one for each set of wrapped JXLayers.

The menu