Toolbar Layout Persistence bug

Hello

Found a bug!

Exception in thread “AWT-EventQueue-0” java.lang.ClassCastException: bibliothek.gui.dock.ToolbarGroupDockStation cannot be cast to bibliothek.gui.dock.ToolbarDockStation
at bibliothek.gui.dock.station.toolbar.ToolbarDockStationFactory.getLayout(ToolbarDockStationFactory.java:59)
at bibliothek.gui.dock.layout.DockSituation.convert(DockSituation.java:335)
at bibliothek.gui.dock.layout.DockSituation.convert(DockSituation.java:326)
at bibliothek.gui.DockFrontend.getSetting(DockFrontend.java:1467)
at bibliothek.gui.DockFrontend.writeBlop(DockFrontend.java:2076)
at bibliothek.gui.DockFrontend.writeXML(DockFrontend.java:1953)
at lol.TestPersistentLayout$3.windowClosing(TestPersistentLayout.java:238)

Most probable solution:

public class ToolbarGroupDockStation extends AbstractToolbarDockStation {
...
    @Override
    public String getFactoryID(){
        return ToolbarDockStationFactory.ID;
    }
...
}

ToolbarDockStationFactory.ID should be ToolbarGroupDockStationFactory.ID

By the way, I’ve been working with DockingFrames for some months now, and I find it an excelent framework. Great job!

Hu, how could that have been in the code and noone had an exception for months? Well, I’ll have a look at it. Thanks for the info.

We are still in development stage, so layout persistence was not a priority until now, especially with toolbars.

Thanks for the attention! Hope I helped a little. :slight_smile: