Minimum and Maximum Size of CFlatLayoutManager

I have a problem with the size of my window when the dock is minimized.
The default width or height is smaller than the minimum dimension of my dock content.

So I have extended the default CFlatLayoutManager like this :

private class MyFlapLayoutManager extends CFlapLayoutManager {
     public int getSize(FlapDockStation station, Dockable dockable) {
          int defaultSize=super.getSize(station, dockable);
          int size=defaultSize;
          FlapDockStation.Direction direction = station.getDirection();
          boolean isHorizontal=((direction == FlapDockStation.Direction.NORTH) 
					|| (direction == FlapDockStation.Direction.SOUTH));
          if (isHorizontal) {
                if (size<=dockable.getComponent().getMinimumSize().height) {
		if (size>=dockable.getComponent().getMaximumSize().height) {
	  } else {
		if (size<=dockable.getComponent().getMinimumSize().width) {
		if (size>=dockable.getComponent().getMaximumSize().width) {
	return size;
MyFlapLayoutManager myFlapManager=new MyFlapLayoutManager();
DockController dockControler=getCcontrol().getLocationManager().getController();
dockControler.getProperties().set(FlapDockStation.LAYOUT_MANAGER, myFlapManager);

Perhaps it could be nice to take by default into account the minimum/maximum dimensions.

It’s a good idea, but I will have to make it optional for backwards compatibility.

You should however consider, that in general Dockables with minimum or maximum size to not work well. Imagine your application has only one Dockable on its main-frame, that Dockable must be as big as the main-frame…