Ensure one stacked Dock is "visible"

Hello,

I have some docks stacked. Only one is “visible” (had the focus, is selected) at the time; the other ones are behind the selected one.

How can I select/choose at run time the “selected/focused” one (in a way to make it ‘visible’ in front of the other stacked ones) ?

If I use only the method “setVisible(true)”, if the dock is already in a stack, but behind others ones, the dock doesn’t become the “selected” one from the stack.

Thanks for your work on this project.

Christophe.

Make it focused, e.g. if using Common call “yourDockable.toFront()”.

Well … I have no “toFront()” method to call …
I explain a little bit more:

I have a couple of “SingleCDockable”. Some of them are “staked” (and shown in a kind of tabpane so).

During a process, I want to ensure that one of the dock is “visible by the user”. So I would like to :

  • Know if my dock is stacked in a tabbed pane.
  • If so … I should “select the tab” to make it “selected/visible to the user”.

I have a CControl but this object does not provide a kind of “toFront(CDockable)” and my “SingleCDockable” do not have a “toFront()” method.

The “toFront” method is defined in AbstractCDockable, so any DefaultSingleCDockable or DefaultCDockable does have it.

Another solution: use CDockable#intern to get a CommonDockable. Use CommonDockable#getDockParent to get its parent DockStation. If the parent station is an instance of StackDockStation: then the Dockable is stacked. In any case, calling “DockStation#setFrontDockable” will move the Dockable to the front.

you are right …

the cause was that my variables have a “too low type” : they are typed as “CSingleCDockable” but I instanciate “DefaultSingleCDockable” … which, this ones have the toFront() method !

And … it works perfectly !

Thank you very much.
You made a really good job on this project !

Christophe.