Restoring minimized CDockable

I’m using the CContentArea.

When I click on a minimized CDockable, I’d like it to restore back to the CWorkingArea, not stay in the flap. I was thinking I could add a CDockableStateListener to the dockable, then trigger setExtendedMode(ExtendedMode.NORMALIZED) on some event. But no event is fired when the flap is shown, only when it is moved back / forth from the working area.

Is there another place I should add a listener, or is there a setting to kick it out of the flap?

thanks

The dockable is considered to be minimized as long as a FlapDockStation is its parent.

Hm, try adding a DockStationListener to all FlapDockStations (CContentArea.getNorth…, CMinimizeArea.intern()… ), the listeners “dockableSelected” method should be triggered when the user clicks on the button in the station.

Thanks for the hint. This is what worked for me:

    control.getContentArea().getWest().addDockStationListener(new DockStationAdapter() {
        @Override
        public void dockableSelected(DockStation station, Dockable oldSelection, Dockable newSelection) {
            if (newSelection != null && newSelection instanceof CommonDockable){
                ((CommonDockable)newSelection).getDockable().setExtendedMode(ExtendedMode.NORMALIZED);
            }
        }
    });