org.noos.xing.mydoggy
Interface ToolWindowGroup


public interface ToolWindowGroup

This interface lets the user to manager a group of tool window. The idea is to provide the same mechanism of prospectives of eclipse ide for toolwindows. The typical usage is to retrieve a group from the tool window manager and to add any toolwindows. After that we can show or hide all tools registered in a group.

Since:
1.0.0
Author:
Angelo De Caro (angelo.decaro@gmail.com)

Method Summary
 void addToolWindow(ToolWindow toolWindow)
          Appends the specified tool window to the end of this group.
 void addToolWindowGroupListener(ToolWindowGroupListener listener)
          Registers listener so that it will receive events when the groups are made visibile or invisible, when a tool is added or removed If listener listener is null, no exception is thrown and no action is performed.
 boolean containesToolWindow(ToolWindow toolWindow)
          Returns true if this group contains the specified tool window.
 String getName()
          Returns the group's name.
 ToolWindow[] getToolsWindow()
          Returns an array containing all of the toolwindows in this group in proper sequence.
 ToolWindowGroupListener[] getToolWindowGroupListeners()
          Returns an array of all the tool window group listeners registered on this group.
 boolean isImplicit()
          Returns true if this is an implicit group, false otherwise.
 boolean removeToolWindow(ToolWindow toolWindow)
          Removes the occurrence in this group of the specified tool window.
 void removeToolWindowGroupListener(ToolWindowGroupListener listener)
          Unregisters listener so that it will no longer receive events.
 void setImplicit(boolean implicit)
          The method is used to set the implicit property of the group.
 void setVisible(boolean visible)
          Invokes setVisible(visible) on all toolwindows contained in this group in proper sequence.
 

Method Detail

getName

String getName()
Returns the group's name.

Returns:
group's name.
Since:
1.0.0

addToolWindow

void addToolWindow(ToolWindow toolWindow)
Appends the specified tool window to the end of this group.

Parameters:
toolWindow - tool window to be appended to this group.
Throws:
NullPointerException - if the specified tool window is null.
IllegalArgumentException - if tool window was already added.
Since:
1.0.0

removeToolWindow

boolean removeToolWindow(ToolWindow toolWindow)
Removes the occurrence in this group of the specified tool window.

Parameters:
toolWindow - tool window to be removed from this group, if present.
Returns:
true if this group contained the specified tool window.
Throws:
NullPointerException - if the specified element is null.
Since:
1.0.0

getToolsWindow

ToolWindow[] getToolsWindow()
Returns an array containing all of the toolwindows in this group in proper sequence.

Returns:
an array containing all of the elements in this group in proper sequence.
Since:
1.0.0

containesToolWindow

boolean containesToolWindow(ToolWindow toolWindow)
Returns true if this group contains the specified tool window.

Parameters:
toolWindow - tool window whose presence in this group is to be tested.
Returns:
true if this group contains the specified element.
Throws:
NullPointerException - if the specified element is null.
Since:
1.0.0

setImplicit

void setImplicit(boolean implicit)
The method is used to set the implicit property of the group. If implicit is true then if a tool in this group is made visible then all tools in this group will be make visible.
Default value is false.

Parameters:
implicit - true to enable, false otherwise.
Since:
1.3.0

isImplicit

boolean isImplicit()
Returns true if this is an implicit group, false otherwise.

Returns:
true if this is an implicit group, false otherwise.
Since:
1.3.0

setVisible

void setVisible(boolean visible)
Invokes setVisible(visible) on all toolwindows contained in this group in proper sequence.

Parameters:
visible - true to make the tools, contained in this group, visible, false to hide.
Since:
1.0.0
See Also:
ToolWindow.setVisible(boolean)

addToolWindowGroupListener

void addToolWindowGroupListener(ToolWindowGroupListener listener)
Registers listener so that it will receive events when the groups are made visibile or invisible, when a tool is added or removed If listener listener is null, no exception is thrown and no action is performed.

Parameters:
listener - the ToolWindowGroupListener to register.
Since:
1.0.0
See Also:
ToolWindowGroupListener

removeToolWindowGroupListener

void removeToolWindowGroupListener(ToolWindowGroupListener listener)
Unregisters listener so that it will no longer receive events. This method performs no function, nor does it throw an exception, if the listener specified by the argument was not previously added to this group. If listener listener is null, no exception is thrown and no action is performed.

Parameters:
listener - the ToolWindowGroupListener to be removed
Since:
1.0.0
See Also:
addToolWindowGroupListener(ToolWindowGroupListener)

getToolWindowGroupListeners

ToolWindowGroupListener[] getToolWindowGroupListeners()
Returns an array of all the tool window group listeners registered on this group.

Returns:
all of the group's ToolWindowGroupListeners or an empty array if no tool window group listeners are currently registered.
Since:
1.0.0
See Also:
addToolWindowGroupListener(ToolWindowGroupListener), removeToolWindowGroupListener(ToolWindowGroupListener)


Copyright © 2012. All Rights Reserved.