Placement of tabs in tabbed dockables

Hi again!
I would like to change the default tab placement of tabbed dockables from the bottom to the top. In JTabbedPane you can do that by calling setTabPlacement(int) to BOTTOM, TOP, LEFT or RIGHT. Is there anything like that also available for a dockable whose dockables are tabbed?
Thanks for your help and best regards,
grml

Requires version 1.0.8:

controller.getProperties().set( StackDockStation.TAB_PLACEMENT, TabPlacement.TOP_OF_DOCKABLE );```

... or the same effect with CControl:
```CControl control = ...
control.putProperty( ... );```

Thank you Beni. I will try it. BTW: How save is it to use version 1.0.8? It is still a preview version.
Best,
grml

Version 1.0.8 is almost finished, the final version will not have much additional changes. From my point of view the current version is as stable as 1.0.7.

And using (unstable) 1.0.8 has the bonus of getting bugfixes (at least of the bugs I know of…) and new features, with 1.0.7 you will be left alone.

Hi Beni!
I have switched to 1.0.8p5 and tried your code. Unfortunately, StackDockStation does not show a property like TAB_PLACEMENT. I just get COMPONENT_FACTORY and TITLE_ID. I have tried to take a constant from PropertyKey (in the CControl version of your code using putProperty()), but also there is no TAB_PLACEMENT property.
What is to do?
Thanks,
grml

There is TAB_PLACEMENT in 1.0.8p5, I just downloaded the code… make sure your classpath is ok and does not point to an old version.

Thanks, it was indeed a mess in the class path. I have resolved the issues. However, the StateManager is no longer available. I needed it to substitute the dockable icons by using e.g. StateManager.ICON_MANAGER_KEY_MAXIMIZE. Where are these constants now?
Thanks and best,
grml

Found them in CLocationModeManager.
Thanks anyway :slight_smile:
Best,
grml

Hi!
A new problem: CControl control; control = new CControl(frame); control.intern().getController().getIcons().setIconClient(CLocationModeManager.ICON_MANAGER_KEY_MAXIMIZE, JUtil.getIcon("dockable_maximize.png")); yields an IllegalArgumentException saying: location and mode do not belong together, they do not have the same identifier.
Is this due to the usage of a common-class in the context of a core-class?
Regards,
grml

Post the entire stacktrace please. There is such an error, but not related to the icons.

The error happens at grid.add(0, 0, 1, 2, dDriver);

DefaultCDockable dDriver = ...
final CControl control = DockingController.createControl();
		CGrid grid = new CGrid(control);
		grid.add(0, 0, 1, 2, dDriver);```
createControl() contains the code with the icons. 
These are the first stack trace items after calling grid.add(0,0,1,2,dDriver).
```java.lang.IllegalArgumentException: location and mode do not belong together, they do not have the same identifier
	at bibliothek.gui.dock.common.mode.CLocationModeManager.setLocation(Unknown Source)
	at bibliothek.gui.dock.common.intern.AbstractCDockable$2.setUniqueId(Unknown Source)
	at bibliothek.gui.dock.common.CControl.add(Unknown Source)
	at bibliothek.gui.dock.common.CGrid.add(Unknown Source)```
When creating the dockable I used the following command:
```dockable.setDefaultLocation(ExtendedMode.MINIMIZED, CLocation.base().minimalEast());```
Maybe this helps, too.

Thanks and best regards,
grml

“setUniqueId” calls “setLocation” only if there are default-locations set. I assume one of the default-locations does not belong to some mode (modes=normal, externalized, minimized,…). What happens if you do not call “setDefaultLocation”? What default-locations do you set?

Commenting out the “setDefaultLocation()” does not yield the exception.
All dockables of this controller are created via a method containing the setDefaultLocation()-method as posted before. So all dockables get the same default location. Maybe this is the problem?

I have to run your codesnippets to check what is going on. I’ll answer again once I’m home.

That was my fault: in setLocation I compared the wrong objects leading to the exception. I’ve uploaded a new Version 1.0.8p5a with the fix.

Sorry for the inconvenience.

Thanks a lot! It’s working now. No problem, the inconvenience :slight_smile:
Regards,
grml