Hi,
I am using DockingFrames in a scenario where the JFrame instance is not known when I initialize DockingFrames and create a default layout by dropping components.
I am able to create a DockFrontend without giving it the JFrame instance, however, when I add multiple dockables, the actual window shows only the first dockable.
Here’s how I create the DockFrontend. The JFrame instance is created in the display() method.
_frontend = new DockFrontend();
DockTheme theme = new FlatTheme();
//set the Theme
_frontend.getController().setTheme(new NoStackTheme(theme));
_defaultStation = new SplitDockStation();
_frontend.addRoot(_defaultStation, "DefaultStation");
_factory = new LbViewFactory();
_frontend.registerFactory(_factory);
createDefaultLayout();
display();
Here is the createDefaultLayout() method.
private void createDefaultLayout()
{
LbViewFactory.LbView gridView =
_factory.layout(LbViewFactory.DockableEnum.GRID);
_frontend. add(gridView, LbViewFactory.DockableEnum.GRID.getTitle());
_defaultStation.drop(gridView);
LbViewFactory.LbView formulaEditorView =
_factory.layout(LbViewFactory.DockableEnum.FORMULA_EDITOR);
_frontend.add(formulaEditorView,
LbViewFactory.DockableEnum.FORMULA_EDITOR.getTitle());
_defaultStation.drop(formulaEditorView, SplitDockProperty.SOUTH);
LbViewFactory.LbView bcpView =
_factory.layout(LbViewFactory.DockableEnum.BINDING_CONFIG_PANEL);
_frontend.add(bcpView,
LbViewFactory.DockableEnum.BINDING_CONFIG_PANEL.getTitle());
_defaultStation.drop(bcpView, SplitDockProperty.WEST);
}
I am adding 3 components to the _defaultStation. However, only the first one is displayed.
If I create the JFrame before creating the DockFrontend and give DockFrontend an instance of JFrame, then the app works fine.
Is it possible to get this to work such that the DockFrontend does not have to know of JFrame at initialization time?
–
Thanks
Parag