CSplitDockStationHandle.Maximal.setMode

Hello,

I just try to remove properly my gridArea but when closing its owner’s frame I have an Exception.

Exception in thread “main” java.lang.IllegalStateException: handle already in use
at bibliothek.gui.dock.common.mode.station.CSplitDockStationHandle$Maximal.setMode(CSplitDockStationHandle.java:317)
at bibliothek.gui.dock.facile.mode.AbstractLocationMode.remove(AbstractLocationMode.java:194)
at bibliothek.gui.dock.common.CGridArea.uninstall(CGridArea.java:225)
at bibliothek.gui.dock.common.intern.AbstractDockableCStation.setControl(AbstractDockableCStation.java:108)
at bibliothek.gui.dock.common.CControl.remove(CControl.java:1465)
at TestCase.main(TestCase.java:15)

I look the code and I can see that the “CSplitDockStationHandle.Maximal.setMode” method can’t accept a null parameter value. So, i have modified the line 316 like this: if( maximizedMode != null && mode != null). This workaround let me work for now.

Thanks for your very good framework.

{
	public static void main(String[] args)
	{
		CControl cControl = new CControl();
		final CGridArea gridArea = cControl.createGridArea("test");
		cControl.remove((SingleCDockable) gridArea);
		cControl.remove((CStation<?>) gridArea);
	}
}

Thanks, I completely forgot that.