|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ToolWindow
Tool Windows are secondary windows within the main window that provide access to and/or support for a particular functionality. This interface is the main entry point to modify tool window properties. Moreover there are methods to make the tool available, visible and active. A PropertyChangeEvent is fired for the following properties:
ToolWindowManager| Method Summary | ||
|---|---|---|
void |
addToolWindowAction(ToolWindowAction toolWindowAction)
Adds the passed toolwindow action to all the type descriptors. |
|
void |
addToolWindowListener(ToolWindowListener listener)
Adds the specified toolwindow listener to receive toolwindow events from this tool. |
|
ToolWindowTab |
addToolWindowTab(Dockable dockable)
Adds a dockable. |
|
ToolWindowTab |
addToolWindowTab(String title,
Component component)
Adds a component represented by a title and no icon. |
|
void |
aggregate()
The method is used to set to the true value the visible property of the tool. |
|
void |
aggregate(AggregationPosition onPosition)
Agggregate this tool to the already visible tools using the specified aggregation position. |
|
void |
aggregate(ToolWindow onToolWindow,
AggregationPosition onPosition)
Aggregate this tool using onToolWindow as a relative position and
the aggregation position as the position relative to the specified toolwindow. |
|
void |
aggregateByReference(ToolWindow refToolWindow,
AggregationPosition onPosition)
This method is used when the user want to aggregate the toolwindow to another toolwindow whose type is FLOATING, FLOATING_FREE or FLOATING_LIVE. |
|
ToolWindowAnchor |
getAnchor()
Returns the anchor which the tool is anchored. |
|
int |
getAnchorIndex()
Returns the anchor index. |
|
int |
getIndex()
Returns the tool's index. |
|
RepresentativeAnchorDescriptor<ToolWindow> |
getRepresentativeAnchorDescriptor()
Returns the representative anchor descriptor used to modify the behaviours of that object. |
|
ToolWindowListener[] |
getToolWindowListeners()
Returns an array of all the toolwindow listeners registered on this tool. |
|
ToolWindowTab[] |
getToolWindowTabs()
Gets all the tabs in this toolwindow. |
|
ToolWindowType |
getType()
Returns the tool type. |
|
|
getTypeDescriptor(Class<T> descriptorClass)
This method retrieves the TypeDescriptor for the descriptorClass. |
|
ToolWindowTypeDescriptor |
getTypeDescriptor(ToolWindowType type)
This method retrieves the TypeDescriptor for type that the tool uses to modify the behaviours
of that type. |
|
boolean |
isActive()
Returns true is the tool is active. |
|
boolean |
isAggregateMode()
Returns aggregateEnabled property value. |
|
boolean |
isAutoHide()
Returns the autoHide property value of the tool. |
|
boolean |
isAvailable()
Returns true is the tool is available. |
|
boolean |
isHideOnZeroTabs()
Return the "hideOnZeroTabs" property value. |
|
boolean |
isLockedOnAnchor()
Returns true if the toolwindow's representative anchor is bonded to a subset of the available anchors,
false otherwise. |
|
boolean |
isVisible()
Returns true is the tool is visible. |
|
void |
removeToolWindowAction(String id)
Removes the toolwindow action by id from all the type descriptors. |
|
void |
removeToolWindowListener(ToolWindowListener listener)
Removes the specified toolwindow listener so that it no longer receives toolwindow events from this tool. |
|
boolean |
removeToolWindowTab(ToolWindowTab toolWindowTab)
Removes the specified tab from this toolwindow. |
|
void |
setActive(boolean active)
The method is used to set the active property of the tool. |
|
void |
setAggregateMode(boolean aggregateEnabled)
The method is used to set the aggregateEnabled property of the tool. |
|
void |
setAnchor(ToolWindowAnchor anchor)
This method is used to set the anchor for the tool. |
|
void |
setAnchor(ToolWindowAnchor anchor,
int index)
This method is used to set the anchor for the tool. |
|
void |
setAutoHide(boolean autoHide)
This method is used to set the autoHide property for the tool. |
|
void |
setAvailable(boolean available)
The method is used to set the available property of the tool. |
|
void |
setHideOnZeroTabs(boolean hideOnZeroTabs)
Sets the "hideOnZeroTabs" property. |
|
void |
setIndex(int index)
This method is used to set the index for the tool. |
|
void |
setLockedOnAnchor(boolean lockedOnAnchor)
Bounds or not the toolwindow's representative anchro to stay in a subset of the available anchors. |
|
void |
setType(ToolWindowType type)
This method is used to set the type for the tool. |
|
void |
setVisible(boolean visible)
The method is used to set the visible property of the tool. |
|
| Methods inherited from interface org.noos.xing.mydoggy.Dockable |
|---|
ensureVisible, getComponent, getDockableManager, getIcon, getId, getTitle, isDetached, isFlashing, isMaximized, isMinimized, isSelected, setDetached, setFlashing, setFlashing, setIcon, setMaximized, setMinimized, setSelected, setTitle |
| Methods inherited from interface org.noos.xing.mydoggy.Observable |
|---|
addPropertyChangeListener, addPropertyChangeListener, getPropertyChangeListeners, getPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener |
| Methods inherited from interface org.noos.xing.mydoggy.DockableManager |
|---|
addAlias, addDockableManagerListener, getAliases, getDockableById, getDockableManagerListeners, getDockables, removeAlias, removeDockableManagerListener |
| Method Detail |
|---|
void setIndex(int index)
index - the new index for the tool.Dockable.getIcon()int getIndex()
setIndex(int)void setAvailable(boolean available)
available is true then tool becomes available in a way that depends on tool window type.
If available is false then tool becomes not available in a way that depends on tool window
type.
available - true to make the tool available, false to make the tool not available.isAvailable(),
setVisible(boolean)boolean isAvailable()
setAvailable(boolean)void setVisible(boolean visible)
visible is true then tool becomes available if not already was.
Moreover the tool shows the component in a way that depends on tool window type and becomes visible.
If visible is false then tool becomes not available if not already was.
Moreover the tool hides the component in a way that depends on tool window type and becomes not visible.
visible - true to make the tool visible, false to make the tool not visible.isVisible()boolean isVisible()
isVisible in interface Dockable<ToolWindowManager>setVisible(boolean)void aggregate()
void aggregate(AggregationPosition onPosition)
onPosition - the position used to aggregate the tool.
void aggregate(ToolWindow onToolWindow,
AggregationPosition onPosition)
onToolWindow as a relative position and
the aggregation position as the position relative to the specified toolwindow.
This method is usable also when the tool is already visible.
onToolWindow - the toolwindow used as relative position. It must be already visible.onPosition - the position used to aggregate the tool.
void aggregateByReference(ToolWindow refToolWindow,
AggregationPosition onPosition)
refToolWindow - the floating toolwindow used as aggregation target.onPosition - the position used to aggregate the tool.void setAggregateMode(boolean aggregateEnabled)
aggregateEnabled is true then every call to
setVisible(true) will have the same behaviout of a call to aggregate()
method.
aggregateEnabled - true to translate every call to setVisible(true)
to a call to aggregate() method, false to disable the translation.isAggregateMode()boolean isAggregateMode()
setAggregateMode(boolean)void setActive(boolean active)
active is true then tool becomes available and visibile if not already was.
Moreover the tool grabs the focus from focus owner and becomes active.
If active is false then the focus is passed to another component outer the tool and tool
becomes not active.
active - true to make the tool active, false to deactivate the tool.setAvailable(boolean),
setVisible(boolean)boolean isActive()
setActive(boolean)void setAnchor(ToolWindowAnchor anchor)
setAnchor(anchor, -1).
anchor - the new anchor.ToolWindowAnchor,
getAnchor()
void setAnchor(ToolWindowAnchor anchor,
int index)
anchor - the new anchor.index - the position relative to the other tools on the same anchor.
Use 0 for the first position, -1 for the last position.ToolWindowAnchor,
getAnchor()ToolWindowAnchor getAnchor()
s,
ToolWindowAnchorint getAnchorIndex()
void setAutoHide(boolean autoHide)
autoHide - true to hide the tool when the tool losts focus;
false to make inactive the tool when the tool losts focus.()void setLockedOnAnchor(boolean lockedOnAnchor)
lockedOnAnchor - true if the toolwindow's representative anchor is bonded to a subset of the available anchors,
false otherwise.boolean isLockedOnAnchor()
true if the toolwindow's representative anchor is bonded to a subset of the available anchors,
false otherwise.
true if the toolwindow's representative anchor is bonded to a subset of the available anchors,
false otherwise.boolean isAutoHide()
setAutoHide(boolean)void setType(ToolWindowType type)
type - the new type.ToolWindowType,
getType()ToolWindowType getType()
setType(ToolWindowType),
ToolWindowTypevoid setHideOnZeroTabs(boolean hideOnZeroTabs)
true is used this means that
the tool is hidden when no tabs are available on it.
hideOnZeroTabs - true to hide the tool when no tabs are available on it,
false otherwise.isHideOnZeroTabs()boolean isHideOnZeroTabs()
true if the the tool is hidden when no tabs are available on it,
false otherwise.setHideOnZeroTabs(boolean)
ToolWindowTab addToolWindowTab(String title,
Component component)
component represented by a title and no icon.
title - the title to be displayed in this tabcomponent - the component to be displayed when this tab is clicked
ToolWindowTab addToolWindowTab(Dockable dockable)
dockable. A toolwindow tab is created to accommodate the dockable.
dockable - the dockable to be accommodated.
ToolWindowTab instance that represents the accommodated dockable.boolean removeToolWindowTab(ToolWindowTab toolWindowTab)
toolWindowTab - the tab to be removed
addToolWindowTab(String, java.awt.Component)ToolWindowTab[] getToolWindowTabs()
void addToolWindowAction(ToolWindowAction toolWindowAction)
toolWindowAction - the action to be added to all the type desccriptors.removeToolWindowAction(String)void removeToolWindowAction(String id)
id - the id of the action to be removed from all the type descriptors.addToolWindowAction(ToolWindowAction)void addToolWindowListener(ToolWindowListener listener)
l is null,
no exception is thrown and no action is performed.
listener - the toolwindow listenerToolWindowListener,
removeToolWindowListener(ToolWindowListener),
getToolWindowListeners()void removeToolWindowListener(ToolWindowListener listener)
listener is null,
no exception is thrown and no action is performed.
listener - the toolwindow listeneraddToolWindowListener(ToolWindowListener)ToolWindowListener[] getToolWindowListeners()
ToolWindowListeners
or an empty array if no toolwindow listeners are currently registeredaddToolWindowListener(ToolWindowListener)ToolWindowTypeDescriptor getTypeDescriptor(ToolWindowType type)
type that the tool uses to modify the behaviours
of that type. The modifications are visible only for this tool.
type - tool window type.
type.<T extends ToolWindowTypeDescriptor> T getTypeDescriptor(Class<T> descriptorClass)
descriptorClass.
descriptorClass - the descriptor class.
descriptorClass.RepresentativeAnchorDescriptor<ToolWindow> getRepresentativeAnchorDescriptor()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||