Modify Border Size in FlatTheme

Hi,

how can I modify the gap beetween the stations in SplitLayout wirt a CFlatTheme. I would like to minimize the gap beetween the stations. (Version 1.1.0)

Thanks,
Martin

The gap is independent from the theme. You can call SplitDockStation.setDividerSize to change the gap.

[Edit: see also CContentArea.getCenter to gain access to the SplitDockStation.]

Hi Beni,

I used the install method of DefaultSplitLayoutManager to set the divider size, that works fine, thanks. But I also would like to minimize the border of the contentArea. I tried to set the border of all stations to null but this does not work. How can I change the border of the contentArea?

Martin

		control = new CControl(frame);		
		PropertyKey<SplitLayoutManager> key = SplitDockStation.LAYOUT_MANAGER;
		DefaultSplitLayoutManager defaultSplitLayoutManager = new DefaultSplitLayoutManager() {
			@Override
			public void calculateDivider(SplitDockStation station,
					PutInfo putInfo, Leaf origin) {
				super.calculateDivider(station, putInfo, origin);
				putInfo.setDivider(0.5);
			}
			
			@Override
			public void install(SplitDockStation station){
				station.setBorder(null); // this line has no effect
				station.setDividerSize(2);
				super.install(station);
			}
		};

		control.putProperty(key, defaultSplitLayoutManager);

You are probably searching for CContentArea.setMinimumAreaSize. This method takes a Dimension which describes the size of the “border”. E.g. a value of “new Dimension(1,1)” changes the “border” width and height to 1.

I write “border” because this is not really a border. There are additional DockStations placed around the center area, these stations show minimized Dockables. If you set their size too small, you can’t drag and drop Dockables there anymore.

CContentArea.setMinimumAreaSize has not the effect I am searching for. To clarify my needs a attached a screenshot. I would like to change the minimize the red area in the sccrenshot.
I’m using a Border Layout where CControl.getContentArea is only used for the Center.

That is exactly the area that should be affected by “setMinimumAreaSize”. Hm, could be that this is a bug that was still present in 1.1.0. What happens if you set “CControl.putProperty( FlapDockStation.MINIMUM_SIZE, new Dimension(1,1))”?

thanks, that works as expected.