I have a couple of questions about the docking framework. I am working on a charting framework for a trading system. Traders do open multiple charts for multiple markets. The idea here is to have one container for all the opened charts.
To start with, it is easy to have one chart in the frame that uses the docking framework. However, if we need to have multiple of them enclosed in the same frame, I need a way to dynamically add the charts to this frame on opening them.
Can you please answer the following two questions?
Is it possible to dynamically add new panels to the frame that is using docking framework? We do not want to create several charts at the start up and start showing them when a trader opens it.
Is it possible to drag and drop the already opened charts on the existing frame that is using docking framework, such that the newly dropped chart will be added as another tab. I know that it supports very well as long as the panels are added to the same frame. we would like to drop them from outside the frame.
Yes. To me a chart looks like some document you open, maybe edit, and close again. There is a class “DefaultMultipleCDockable” that is designed for exactly such a case. It is even associated with a factory to store and load its content persistently.
Mostly. The framework will use one specific Window as root Window for most JDialogs it creates, otherwise nothing is tied to this root Window. There could be an issue if you try to exchange the root window during runtime, some JDialogs may not notice. I’ll do some testing during the weekend and release a version that will no longer have this issue.
Also if the user closes a Window it is the clients responsibility to properly clean up any panels (Dockables) and docking areas (DockStations).
Ok, that was perhaps not a satisfying answer. I’d like to add that the framework should support multiple Windows, and if you find an issue then it is a bug. Anyone in this forum will confirm that the usual lifetime of a confirmed bug is around a week.