[Erledigt] Associating an ID with each dockable window

Hi,

Is there a way to associate an ID (preferably a String) with each dockable window managed by DockingFrames, so that at any time I can look for the dockable window with that ID? Of course, I can create my own map for this, and update it whenever I create a new dockable window, but then I need to keep track of when windows are closed and remove them from the map.

Thanks,
Shlomy

No, it was an early decision for the design of DF not to use IDs.

You could use “DockController#getRegister().addDockRegisterListener(…)” to track the dis-/appearance of Dockables.

Some classes like DockFrontend or CControl use IDs, but they are no more than maps managed by the client. They will not automatically add or remove Dockables.

Ok, I can manage the map myself, but is there a way to ask whether a window that was dropped somewhere still exists or was closed? For my purposes, this is sufficient. I don’t need to know when a window is removed, but I do need to know whether a window exists in the system or not.

Shlomy

Ask the Dockable whether it has a controller or not, “Dockable#getController() == null” indicates that the Dockable is not registered anywhere.

Great, thanks.