I need ToolWindow to trigger show/hide events

Answered

I need to get componentShown and componentHidden event

for some reason it doesn't work. It only works actually the first time it is created.

this.toolWindow.getComponent().addComponentListener ( new ComponentAdapter ()
{
public void componentShown ( ComponentEvent e )
{
System.out.println ( "Component shown" );
}

public void componentHidden ( ComponentEvent e )
{
System.out.println ( "Component hidden" );
}
} );
1 comment
Comment actions Permalink

Try registering the following topic:

ToolWindowManagerListener.TOPIC

It provides toolWindowShown and stateChanged methods that will help you distinguish the state of your ToolWindow.

0

Please sign in to leave a comment.