Using ContentManagerUI

To obtain the instance of ContentManagerUI

Use the following :
ContentManagerUI contentManagerUI = toolWindowManager.getContentManager().getContentManagerUI();

Returns the content manager ui.

To change ContentManagerUI

Use the following :
toolWindowManager.getContentManager().setContentManagerUI(new MyDoggyDesktopContentManagerUI());

Sets the content manager ui.

To set 'Closeable' and 'Detachable' property

Use the following :
ContentManagerUI contentManagerUI = toolWindowManager.getContentManager().getContentManagerUI();
contentManagerUI.setCloseable(true);
contentManagerUI.setsetDetachable(true);

Sets the 'Closeable' and/or 'Detachable' property of all contents registered to content manager.

To add a ContentManagerUIListener

Use the following :
ContentManagerUI contentManagerUI = toolWindowManager.getContentManager().getContentManagerUI();
contentManagerUI.addContentManagerUIListener(listener);

Registers listener so that it will receive events when a content is removed or detached using the ui. For the remove action you can apply a veto to the action. If listener listener is null, no exception is thrown and no action is performed.

Using ContentUI

To retrieve the ContentUI for a Content

Use the following :
ContentManagerUI contentManagerUI = toolWindowManager.getContentManager().getContentManagerUI();
Content content = toolWindowManager.getContentManager().getContent(0);
ContentUI contentUi = contentManagerUI.getContentUI(content);

Returns the ui part to which this manager maps the specified content.

To retrieve the Content from a ContentUI

Use the following :
ContentManagerUI contentManagerUI = toolWindowManager.getContentManager().getContentManagerUI();
Content content = toolWindowManager.getContentManager().getContent(0);
ContentUI contentUi = contentManagerUI.getContentUI(content);
assert contentUi.getContent() == content;

Returns the Content contropart of a ContentUI instance.

To set 'Closeable' and 'Detachable' property

Use the following :
ContentManagerUI contentManagerUI = toolWindowManager.getContentManager().getContentManagerUI();
Content content = toolWindowManager.getContentManager().getContent(0);
ContentUI contentUi = contentManagerUI.getContentUI(content);
contentUi.setCloseable(true);
contentUi.setDetachable(true);

Sets the 'Closeable' and/or 'Detachable' property of a specific ContentUI.

To customize transparency support.

Use the following :
ContentManagerUI contentManagerUI = toolWindowManager.getContentManager().getContentManagerUI();
Content content = toolWindowManager.getContentManager().getContent(0);
ContentUI contentUi = contentManagerUI.getContentUI(content);
contentUi.setTransparentMode(true);
contentUi.setTransparentRatio(0.7f);
contentUi.setTransparentDelay(1000);

Sets the transparent mode. If the transparent mode is enabled then when the content is detached and the window containing the content losts the focus then the window becomes transparent. This facility is os-dependent.