public static class ToolWindowHeadlessManagerImpl.MockToolWindow extends java.lang.Object implements ToolWindowEx
ToolWindow.Border
SHOW_CONTENT_ICON
Constructor and Description |
---|
MockToolWindow(Project project) |
Modifier and Type | Method and Description |
---|---|
void |
activate(java.lang.Runnable runnable) |
void |
activate(java.lang.Runnable runnable,
boolean autoFocusContents) |
void |
activate(java.lang.Runnable runnable,
boolean autoFocusContents,
boolean forced) |
void |
addContentManagerListener(ContentManagerListener listener) |
ToolWindowAnchor |
getAnchor() |
javax.swing.JComponent |
getComponent() |
ContentManager |
getContentManager() |
ContentManager |
getContentManagerIfCreated() |
ToolWindowContentUiType |
getContentUiType() |
InternalDecorator |
getDecorator() |
Disposable |
getDisposable() |
javax.swing.Icon |
getIcon() |
java.lang.String |
getId() |
ToolWindowType |
getInternalType() |
Project |
getProject() |
ActionCallback |
getReady(java.lang.Object requestor) |
java.lang.String |
getStripeTitle() |
java.lang.String |
getTitle() |
ToolWindowType |
getType() |
void |
hide(java.lang.Runnable runnable)
Hides tool window.
|
void |
installWatcher(ContentManager contentManager) |
boolean |
isActive() |
boolean |
isAutoHide() |
boolean |
isAvailable() |
boolean |
isDisposed() |
boolean |
isShowStripeButton() |
boolean |
isSplitMode() |
boolean |
isVisible() |
void |
remove()
Delete tool window.
|
void |
setAdditionalGearActions(ActionGroup additionalGearActions) |
void |
setAnchor(ToolWindowAnchor anchor,
java.lang.Runnable runnable) |
void |
setAutoHide(boolean state) |
void |
setAvailable(boolean value) |
void |
setAvailable(boolean available,
java.lang.Runnable runnable)
Sets whether the tool window available or not.
|
void |
setContentUiType(ToolWindowContentUiType type,
java.lang.Runnable runnable) |
void |
setDefaultContentUiType(ToolWindowContentUiType type) |
void |
setDefaultState(ToolWindowAnchor anchor,
ToolWindowType type,
java.awt.Rectangle floatingBounds) |
void |
setIcon(javax.swing.Icon icon)
Sets new window icon.
|
void |
setShowStripeButton(boolean show) |
void |
setSplitMode(boolean isSideTool,
java.lang.Runnable runnable)
There are four base
anchors for Tool Window: TOP, LEFT, BOTTOM, RIGHT. |
void |
setStripeTitle(java.lang.String title)
Sets new window stripe button text.
|
void |
setTabActions(AnAction... actions) |
void |
setTabDoubleClickActions(java.util.List<AnAction> actions) |
void |
setTitle(java.lang.String title)
Sets new window title.
|
void |
setTitleActions(AnAction... actions) |
void |
setToHideOnEmptyContent(boolean hideOnEmpty) |
void |
setType(ToolWindowType type,
java.lang.Runnable runnable) |
void |
show(java.lang.Runnable runnable) |
void |
showContentPopup(java.awt.event.InputEvent inputEvent) |
void |
stretchHeight(int value) |
void |
stretchWidth(int value) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
setUseLastFocusedOnActivation
getActivation, getHelpId, hide, setHelpId, show
public MockToolWindow(Project project)
public Project getProject()
getProject
in interface ToolWindowEx
public Disposable getDisposable()
getDisposable
in interface ToolWindow
public void remove()
ToolWindow
remove
in interface ToolWindow
public java.lang.String getId()
getId
in interface ToolWindow
public boolean isActive()
isActive
in interface ToolWindow
public void activate(java.lang.Runnable runnable)
activate
in interface ToolWindow
runnable
- A command to execute right after the window gets activated. The call is asynchronous since it may require animation.public boolean isDisposed()
isDisposed
in interface ToolWindow
public boolean isVisible()
isVisible
in interface ToolWindow
public void setShowStripeButton(boolean show)
setShowStripeButton
in interface ToolWindow
show
- if false
stripe button should be hidden.public boolean isShowStripeButton()
isShowStripeButton
in interface ToolWindow
public ActionCallback getReady(java.lang.Object requestor)
public void show(java.lang.Runnable runnable)
show
in interface ToolWindow
runnable
- A command to execute right after the window shows up. The call is asynchronous since it may require animation.public void hide(java.lang.Runnable runnable)
ToolWindow
hide
in interface ToolWindow
runnable
- A command to execute right after the window hides. The call is asynchronous since it may require animation.public ToolWindowAnchor getAnchor()
getAnchor
in interface ToolWindow
public void setAnchor(ToolWindowAnchor anchor, java.lang.Runnable runnable)
setAnchor
in interface ToolWindow
public boolean isSplitMode()
isSplitMode
in interface ToolWindow
public void setSplitMode(boolean isSideTool, java.lang.Runnable runnable)
ToolWindow
anchors
for Tool Window: TOP, LEFT, BOTTOM, RIGHT.
For each anchor there are two groups tool windows - not split and split for better organizing.
For example, you can see two actions in Move To group: Left Top and Left Bottom.
'Left' here is anchor or side where the button is located,
'Top' and 'Bottom' are two subsets of buttons (not split and split).setSplitMode
in interface ToolWindow
ToolWindowAnchor
public boolean isAutoHide()
isAutoHide
in interface ToolWindow
public void setAutoHide(boolean state)
setAutoHide
in interface ToolWindow
public void setToHideOnEmptyContent(boolean hideOnEmpty)
setToHideOnEmptyContent
in interface ToolWindow
public ToolWindowType getType()
getType
in interface ToolWindow
public void setType(ToolWindowType type, java.lang.Runnable runnable)
setType
in interface ToolWindow
public javax.swing.Icon getIcon()
getIcon
in interface ToolWindow
null
if window has no icon.public void setIcon(javax.swing.Icon icon)
ToolWindow
setIcon
in interface ToolWindow
public java.lang.String getTitle()
getTitle
in interface ToolWindow
null
if window has no title.public void setTitle(java.lang.String title)
ToolWindow
setTitle
in interface ToolWindow
public java.lang.String getStripeTitle()
getStripeTitle
in interface ToolWindow
public void setStripeTitle(java.lang.String title)
ToolWindow
setStripeTitle
in interface ToolWindow
public boolean isAvailable()
isAvailable
in interface ToolWindow
public void setContentUiType(ToolWindowContentUiType type, java.lang.Runnable runnable)
setContentUiType
in interface ToolWindow
public void setDefaultContentUiType(ToolWindowContentUiType type)
setDefaultContentUiType
in interface ToolWindow
public ToolWindowContentUiType getContentUiType()
getContentUiType
in interface ToolWindow
public void setAvailable(boolean available, java.lang.Runnable runnable)
ToolWindow
setAvailable
in interface ToolWindow
public void setAvailable(boolean value)
setAvailable
in interface ToolWindow
public void installWatcher(ContentManager contentManager)
installWatcher
in interface ToolWindow
public javax.swing.JComponent getComponent()
getComponent
in interface ToolWindow
public ContentManager getContentManager()
getContentManager
in interface ToolWindow
public ContentManager getContentManagerIfCreated()
getContentManagerIfCreated
in interface ToolWindow
public void addContentManagerListener(ContentManagerListener listener)
addContentManagerListener
in interface ToolWindow
public void setDefaultState(ToolWindowAnchor anchor, ToolWindowType type, java.awt.Rectangle floatingBounds)
setDefaultState
in interface ToolWindow
public void activate(java.lang.Runnable runnable, boolean autoFocusContents)
activate
in interface ToolWindow
public void activate(java.lang.Runnable runnable, boolean autoFocusContents, boolean forced)
activate
in interface ToolWindow
public void showContentPopup(java.awt.event.InputEvent inputEvent)
showContentPopup
in interface ToolWindow
public ToolWindowType getInternalType()
getInternalType
in interface ToolWindowEx
public void stretchWidth(int value)
stretchWidth
in interface ToolWindowEx
public void stretchHeight(int value)
stretchHeight
in interface ToolWindowEx
public InternalDecorator getDecorator()
getDecorator
in interface ToolWindowEx
public void setAdditionalGearActions(ActionGroup additionalGearActions)
setAdditionalGearActions
in interface ToolWindowEx
public void setTitleActions(AnAction... actions)
setTitleActions
in interface ToolWindowEx
public void setTabActions(AnAction... actions)
setTabActions
in interface ToolWindowEx
public void setTabDoubleClickActions(java.util.List<AnAction> actions)
setTabDoubleClickActions
in interface ToolWindowEx