use of com.intellij.openapi.wm.ex.ToolWindowEx in project intellij-community by JetBrains.
the class DesignerToolWindowManager method initToolWindow.
//////////////////////////////////////////////////////////////////////////////////////////
//
// Impl
//
//////////////////////////////////////////////////////////////////////////////////////////
@Override
protected void initToolWindow() {
if (myToolWindowContent == null) {
myToolWindowContent = new DesignerToolWindow(myProject, true);
}
myToolWindow = ToolWindowManager.getInstance(myProject).registerToolWindow(DesignerBundle.message("designer.toolwindow.name"), false, getAnchor(), myProject, true);
myToolWindow.setIcon(UIDesignerNewIcons.ToolWindow);
if (!ApplicationManager.getApplication().isHeadlessEnvironment()) {
myToolWindow.getComponent().putClientProperty(ToolWindowContentUi.HIDE_ID_LABEL, "true");
}
((ToolWindowEx) myToolWindow).setTitleActions(myToolWindowContent.createActions());
initGearActions();
ContentManager contentManager = myToolWindow.getContentManager();
Content content = contentManager.getFactory().createContent(myToolWindowContent.getToolWindowPanel(), DesignerBundle.message("designer.toolwindow.title"), false);
content.setCloseable(false);
content.setPreferredFocusableComponent(myToolWindowContent.getComponentTree());
contentManager.addContent(content);
contentManager.setSelectedContent(content, true);
myToolWindow.setAvailable(false, null);
}
use of com.intellij.openapi.wm.ex.ToolWindowEx in project intellij-community by JetBrains.
the class TerminalToolWindowPanel method setToolWindowHeaderVisible.
private void setToolWindowHeaderVisible(boolean isVisible) {
InternalDecorator decorator = ((ToolWindowEx) myWindow).getDecorator();
decorator.setHeaderVisible(isVisible);
}
use of com.intellij.openapi.wm.ex.ToolWindowEx in project intellij-community by JetBrains.
the class LightToolWindowManager method initGearActions.
protected final void initGearActions() {
ToolWindowEx toolWindow = (ToolWindowEx) myToolWindow;
toolWindow.setAdditionalGearActions(new DefaultActionGroup(createGearActions()));
}
use of com.intellij.openapi.wm.ex.ToolWindowEx in project intellij-community by JetBrains.
the class ToggleFloatingModeAction method setSelected.
public void setSelected(AnActionEvent event, boolean flag) {
Project project = event.getProject();
if (project == null) {
return;
}
String id = ToolWindowManager.getInstance(project).getActiveToolWindowId();
if (id == null) {
return;
}
ToolWindowManagerEx mgr = ToolWindowManagerEx.getInstanceEx(project);
ToolWindowEx toolWindow = (ToolWindowEx) mgr.getToolWindow(id);
ToolWindowType type = toolWindow.getType();
if (ToolWindowType.FLOATING == type) {
toolWindow.setType(toolWindow.getInternalType(), null);
} else {
toolWindow.setType(ToolWindowType.FLOATING, null);
}
}
use of com.intellij.openapi.wm.ex.ToolWindowEx in project intellij-community by JetBrains.
the class ToggleWindowedModeAction method setSelected.
public void setSelected(AnActionEvent event, boolean flag) {
Project project = event.getProject();
if (project == null) {
return;
}
String id = ToolWindowManager.getInstance(project).getActiveToolWindowId();
if (id == null) {
return;
}
ToolWindowManagerEx mgr = ToolWindowManagerEx.getInstanceEx(project);
ToolWindowEx toolWindow = (ToolWindowEx) mgr.getToolWindow(id);
ToolWindowType type = toolWindow.getType();
if (ToolWindowType.WINDOWED == type) {
toolWindow.setType(toolWindow.getInternalType(), null);
} else {
toolWindow.setType(ToolWindowType.WINDOWED, null);
}
}
Aggregations